Repository navigation
Import Starknet accounts created in Xverse #734
Description
Summary
Seed import should find Starknet accounts created in Xverse. Most of the work is already done. Xverse derives keys on the same ladder as Bramble (m/44'/9004'/{i}'/0/0, straight from the BIP-39 seed), and its accounts use an Argent 0.4-shaped constructor that Bramble already encodes. What's missing is one class hash that Xverse switched to in mid-2025. Bramble doesn't know it, so recent Xverse accounts land at addresses the scan never derives.
What Xverse does (from source)
Source: secretkeylabs/xverse-core develop @ ec24922ea6e9. The files are starknet/utils.ts, starknet/constants.ts, account/starknet.ts and account/index.ts.
- Keys:
HDKey.fromMasterSeed(bip39 seed)→m/44'/9004'/{derivationIndex}'/0/0→@scure/starknetgrindKey. The index always sits on the hardened account level. Legacy Xverse wallets ("index" derivation type) still pass their index there for Starknet, so they don't need a second axis. There's no ETH-seeded tree like Ready's (Seed import finds zero Ready (Argent X) software accounts — wrong master seed, wrong axis #505) and no passphrase. - Address:
calculateContractAddressFromHash(salt = pubkey, class, calldata, deployer = 0). That's the same deploy shape as Ready's standard account. - Constructor:
owner = Signer::Starknet(pubkey),guardian = None. That's our existingsigner-owner-guardian-optionshape (["0x0", pubkey, "0x1"]). Xverse only supports this one template (argent-x-v0_4_0-with-0-guardians). - Class hash: two eras.
- Before 2025-06-30, Xverse used
0x036078…45927f, the official Argent 0.4.0 class and ourARGENT_ACCOUNT_CLASS_HASH. - On 2025-06-30 (xverse-core Privacy: keep the viewing key off the RPC, honour lock and auto-lock, and fail closed on stale fee prices #499, "Change account class hash to Argent Xverse"), it switched to
0x663fc01a0dbe1bacc4cd2a4c856eb9784b255a20988aa33d4d52b6fc20bd024. That class isn't in Argent's publicdeployments/account.txt. Xverse's comment points at a Cairo Native recompile. The public Xverse release came after the switch, so most real accounts should be on this class.
- Before 2025-06-30, Xverse used
- Lazy deploy: Xverse deploys the account on its first outgoing transaction. Many Xverse accounts are funded but undeployed, for example a user who only received strkBTC/WBTC.
The 0x663fc01a… class is declared on mainnet (starknet_getClass via mainnet.nodes.starknet.org). Its ABI is Argent's: IAccount, IArgentUserAccount (get_owner/get_guardian/get_version), sessions, outside execution, upgradeable, and constructor(owner: Signer, guardian: Option<Signer>). In other words, it's an Argent 0.4.x build with the 0.4.0 calldata layout.
Where Bramble stands today
- Pre-switch Xverse accounts should already import.
recoveryScanShapes()(apps/extension/src/background/onboarding/onboarding-ops.ts) scansARGENT_ACCOUNT_CLASS_HASHon the wallet's ownstarknet-bip44ladder, which is Xverse's ladder and class. This is unverified. - Post-switch accounts are missed.
0x663fc01a…isn't inACCOUNT_CLASSES(packages/foundation/wallet-model/src/accounts/account-families.ts). Even if we added it as an Argent deployment class, the scan only walks other Argent classes on theargentx-bip44ladder, never onstarknet-bip44.
Proposed change
- Add
0x663fc01a…toACCOUNT_CLASSESasfamily: "argent",label: "argent 0.4.0 (xverse)",constructorShape: "signer-owner-guardian-option",roles: ["deployment", "implementation"]. SetauthorizationShapeonly after the signing check below. Update the table's doc comment, since it now holds a vendor-specific Argent build. - Add one scan shape: Argent at
0x663fc01a…on thestarknet-bip44ladder. Don't scan every Argent class on that ladder. Only these two pairs are known to exist. - Decide how an undeployed, funded Xverse account gets deployed. Bramble can deploy Argent 0.4.0, but deploy code paths may assume
ARGENT_ACCOUNT_CLASS_HASH(seeisCreatableCandidateandtransactions/deployment.ts). Either deploy at the Xverse class, or refuse with a clear notice like the Braavos counterfactual flow does. - Add an
xversefixture group totools/vendor-dataset/manifest/and avendorDerivationfor it, then extenddocs/VENDOR_IMPORT_DATASET.mdwith these Phase 0 findings.
Checks before trusting this
- Ground truth from the real app. xverse-core was last pushed 2025-08-01, and the shipped Xverse app could have moved past it. Create a throwaway seed in Xverse (extension, and mobile separately), activate one account, leave one funded but undeployed, add a second account, and confirm Bramble finds all of them at the expected index.
- Signing. Confirm
0x663fc01a…accepts Argent 0.4's signer-array encoding (argent-signer-array) and thataccount-compatibility.tstreats it like 0.4.0. Test on a fake-chain E2E plus one live mainnet transfer. - Version. Read
get_version()on a deployed Xverse account to pin which Argent release this build is. - Upgrades. An Xverse account that upgrades to an official Argent class must still be recognised. It keeps its address, and the new class is already in the table as an implementation.
- Bitcoin-only Xverse users have no Starknet account. That's expected and shouldn't surface as an error.
Out of scope
- Xverse Ledger accounts. I found no evidence that Xverse supports Starknet on Ledger.
- Xverse's paymaster (AVNU) fee flow. It doesn't affect discovery.
Size
Steps 1–2 are a few lines plus tests (tests/ scan-shape coverage and the class table). Step 3 and the live verification take most of the effort.
Activity
derek-flossman commentedon Oct 26, 2026
Status update (AI-assisted, posted from @derek-flossman's account).
Fix up for review in #763: Bramble's phrase scan now finds deployed Xverse-created Starknet accounts (class verified on Mainnet and against Xverse's source). Deploying funded but undeployed Xverse accounts will follow once #733 merges. Targets v0.10.8.
test: pin Xverse scan lanes and the funded-undeployed case (#734)
Merge pull request #763 from starknet-innovation/fix/734-xverse-class…
derek-flossman commentedon Oct 26, 2026
Fixed by #763, merged into release/v0.10.8. Ships in v0.10.8.
test: exercise Xverse deployment through production signing and live-…
Merge pull request #780 from starknet-innovation/fix/734-deploy-xverse