fix: rename STRK20 sub-accounts to shadow accounts (spec PR 406) - #76
Merged
Merged
Conversation
|
🎉 This PR is included in version 0.10.4-beta.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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
Applies starknet-specs PR #406
(merged 2026-08-11): the STRK20 sub-account concept is renamed to shadow account
across the wallet API. Terminology only — no semantic or structural change.
Target version: 0.10.4-beta.2.
Breaking (wire-visible)
wallet_strk20SubaccountCommitmentwallet_strk20ShadowAccountCommitmentSTRK20_SUBACCOUNT_INVOKE_ACTIONSTRK20_SHADOW_ACCOUNT_INVOKE_ACTION"subaccount_invoke"(action discriminator)"shadow_account_invoke"STRK20_SUBACCOUNT_INVOKE_ACTIONis re-exported both flat and underWALLET_API, soconsumers importing it need to update. No deprecated alias is provided: STRK20 only
landed in
0.10.3, the0.10.4line is still in beta, and an alias would not havecovered the two other changes — the RPC method key and the
"subaccount_invoke"discriminator are wire values, not types.
Changes
src/wallet-api/components.tsSTRK20_SUBACCOUNT_INVOKE_ACTION→STRK20_SHADOW_ACCOUNT_INVOKE_ACTION, with itstypediscriminator'subaccount_invoke'→'shadow_account_invoke'.STRK20_ACTIONunion member updated accordingly.STRK20_DAPP_NAME,STRK20_COLLECT_POLICYand the invoke actionrealigned word-for-word on the new spec wording (including "shadow account anonymizer").
src/wallet-api/methods.tswallet_strk20SubaccountCommitment→wallet_strk20ShadowAccountCommitment. Params,result and error set are unchanged.
Validation
npm run ts:check— passes../node_modules/.bin/biome lint --write .— no fixes applied.grep -riE "sub[_ -]?account" src/— no occurrence left.