Skip to content

Conversation

@d4mr
Copy link
Contributor

@d4mr d4mr commented Feb 11, 2025

PR-Codex overview

This PR introduces the @thirdweb-dev/aws-kms-wallet package, providing AWS KMS wallet functionality for the thirdweb SDK. It includes a new utility function for chain handling, updates to configuration files, and comprehensive usage documentation.

Detailed summary

  • Added getChain function in src/utils/chain.ts to return chain information.
  • Created tsconfig.build.json for TypeScript configuration.
  • Updated README.md with installation instructions, usage examples, and requirements.
  • Defined package metadata in package.json for @thirdweb-dev/aws-kms-wallet.
  • Implemented AWS KMS account functionality in src/index.ts, including transaction signing and message signing methods.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@changeset-bot
Copy link

changeset-bot bot commented Feb 11, 2025

⚠️ No Changeset found

Latest commit: 3fee8df

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Feb 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

5 Skipped Deployments
Name Status Preview Comments Updated (UTC)
docs-v2 ⬜️ Skipped (Inspect) Feb 11, 2025 9:52pm
login ⬜️ Skipped (Inspect) Feb 11, 2025 9:52pm
thirdweb_playground ⬜️ Skipped (Inspect) Feb 11, 2025 9:52pm
thirdweb-www ⬜️ Skipped (Inspect) Feb 11, 2025 9:52pm
wallet-ui ⬜️ Skipped (Inspect) Feb 11, 2025 9:52pm

@graphite-app
Copy link
Contributor

graphite-app bot commented Feb 11, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge-queue - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

@socket-security
Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@aws-sdk/[email protected] Transitive: environment, filesystem, shell +16 2.82 MB aws-sdk-bot
npm/[email protected] None +4 2.25 MB odanado
npm/[email protected] Transitive: environment +15 46.9 MB thirdweb-bot

View full report↗︎

@d4mr
Copy link
Contributor Author

d4mr commented Feb 11, 2025

Problems:

  1. Exported types: some required types are not exported from thirdweb
  2. getCachedChain is not exported, and since I only have a chainId I cannot resolve a chain in case the user has chain overrides

@@ -0,0 +1,7 @@
import type { Chain } from "thirdweb";

export async function getChain(chainId: number): Promise<Chain> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wut

import { serializeTransaction } from "thirdweb/transaction";
import { hashMessage } from "thirdweb/utils";
import type { Account } from "thirdweb/wallets";
import type { SignableMessage, TypedData, TypedDataDefinition } from "viem";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use Ox types: https://oxlib.sh/

});

// Use the account for transactions, signing messages, etc.
const tx = await account.sendTransaction({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the standalone function sendTransaction({ transaction, account }) instead

const transaction = prepareContractCall(...);
const result = await sendTransaction({ transaction, account });

@github-actions
Copy link
Contributor

This PR has been inactive for 7 days. It is now marked as stale and will be closed in 2 days if no further activity occurs.

@github-actions github-actions bot added the Stale label Feb 20, 2025
@github-actions github-actions bot closed this Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants