Repository navigation
chore(account-demo): vendor viem#5004 @47710b6 + source SCOPE from actorScope - #140
Merged
Merged
Conversation
…torScope PR #105 vendored an earlier viem#5004 state (old actorScope). Rebuild vendor/aa from feat/eip-8130-production @ 47710b6 (message-signing envelope, contract-address sync), which reshuffles the actorScope bitmask (sender→operator; policy/nonce/selfPayer/sponsorPayer bit values changed) and adds signMessage/signTypedData + validateSignature. Source the demo's SCOPE constant from viem's actorScope instead of a hardcoded copy so the bits can't drift from the protocol — otherwise a policy-gated session key (SCOPE.policy | SCOPE.nonce) would be mis-scoped under the new values. Update the hand-written actorScope type in index.d.ts. Typecheck clean, tests pass, production build succeeds.
Collaborator
✅ Heimdall Review Status
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Pull latest viem: feat/eip-8130-production advanced to ad18b249
("register drive-only contracts as k1 operators", base/eip-8130 #101).
The TRUSTED_EXECUTOR sentinel is deprecated — key.trustedExecutor(caller)
now resolves to a k1/ecrecover operational actor. The demo already calls
key.trustedExecutor(...), so the new behavior flows through the rebuilt
bundle with no UI code change (types unchanged).
Typecheck clean, 309 tests pass, build succeeds.
BrianBland
approved these changes
Sep 2, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #105 (which vendored an earlier viem#5004 state with the old
actorScope). Re-vendorsvendor/aafrom wevm/viem#5004 at its current head (feat/eip-8130-production@47710b6— "message-signing envelope, dataSuffix→metadata, contract address sync") and makes the demo source its scope bitmask from viem.Changes
vendor/aa/index.jsfrom viem47710b6, picking up:toAccount().signMessage/signTypedData,signMessageEnvelope,signTypedDataEnvelope,replaySafeHash, …) + thevalidateSignatureaction.actorScopechange:sender→operator, and the bit values reshuffled (selfPayer 0x08→0x02,sponsorPayer 0x10→0x04,policy 0x02→0x08,nonce 0x04→0x10).SignedAccountChanges→SignedAccountChangeBatchsigning typehash. (All byte-packing/typehash logic stays inside viem.)model.ts: sourceSCOPEfrom viem'sactorScopeinstead of a hardcoded copy. Under the new bits, the old hardcoded values would mis-scope a policy-gated session key (SCOPE.policy | SCOPE.nonce→0x06=selfPayer | sponsorPayer). All call sites (scopeChips, presets,trustedExecutorauthorization) now get correct values automatically.index.d.ts: update the hand-writtenactorScopetype to the new shape.Net diff is 3 files: the rebuilt bundle, its types, and the one-line-of-intent
SCOPEchange.Test plan
tsc --noEmitcleannpm test— all pass (309)npm run build— succeedsNotes
viem#5004 is still a draft upstream, so the bundle is built from the fork branch rather than an npm release; collapses to
npm install viem@latestonce it ships.