Skip to content

feat(tempo): add key authorization manager#4672

Merged
jxom merged 4 commits into
wevm:mainfrom
deodad:dad/account-prepare-transaction-request
May 26, 2026
Merged

feat(tempo): add key authorization manager#4672
jxom merged 4 commits into
wevm:mainfrom
deodad:dad/account-prepare-transaction-request

Conversation

@deodad
Copy link
Copy Markdown
Contributor

@deodad deodad commented May 26, 2026

Summary

Add a Tempo key authorization manager that access key accounts can use to attach pending key authorizations during transaction preparation.

Motivation

Access key transactions need a place to carry pending key authorizations without making every storage implementation perform chain reads or attaching a generic prepare hook to all accounts.

Changes

  • Added src/tempo/KeyAuthorizationManager.ts with a storage-like manager interface and memory source.
  • Added optional keyAuthorizationManager support to Tempo access key account constructors in src/tempo/Account.ts.
  • Updated Tempo prepareTransactionRequest to attach pending key authorizations and remove stale entries after on-chain authorization is detected.
  • Passed client into chain prepare hooks so Tempo can check key metadata during preparation.

Testing

  • pnpm check:types
  • pnpm exec biome check src/types/chain.ts src/actions/wallet/prepareTransactionRequest.ts src/tempo/Account.ts src/tempo/KeyAuthorizationManager.ts src/tempo/index.ts src/tempo/chainConfig.ts src/tempo/chainConfig.test.ts
  • pnpm test src/tempo/chainConfig.test.ts -t keyAuthorizationManager

@vercel
Copy link
Copy Markdown

vercel Bot commented May 26, 2026

@deodad is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 26, 2026

🦋 Changeset detected

Latest commit: 067ffcf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Patch

Not sure what this means? Click here to learn what changesets are.

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

@deodad deodad marked this pull request as ready for review May 26, 2026 20:55
@deodad deodad force-pushed the dad/account-prepare-transaction-request branch from 2045e56 to 21655a1 Compare May 26, 2026 20:57
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 26, 2026

Open in StackBlitz

npm i https://pkg.pr.new/viem@4672

commit: 067ffcf

@jxom jxom merged commit c582dad into wevm:main May 26, 2026
21 of 30 checks passed
@github-actions github-actions Bot mentioned this pull request May 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants