MetaMask / MetaMask/internal-snaps
[tron-wallet-snap] Add support for `keyring_createAccounts`
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1
- Forks
- 2
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 105
Description
# Description
As part of the performance improvements around account management, the keyring API now supports a new method to allow the creation of multiple accounts in one request via the method `keyring_createAccounts` (`@metamask/keyring-api` version 22.0.0), this new RPC method accepts a batch request — either a single BIP-44 index or an inclusive index range — and creates all accounts in one call.
This ticket requires the Tron snap to also support the method `keyring_createAccounts` and update the clients configuration to enable account creation batching. To do so, go to the file `controller-init/multichain/multichain-account-service-init.ts` (extension client case) and update the Tron provider configuration to set `createAccounts > batched` to `true`
# Acceptance Criteria
1. The Tron snap now supports `keyring_createAccounts`
2. A new version is released and both clients are updated to use it
3. Set the `createAccounts > batched` configuration value to `true` in both clients
# References
- Solana snap PR: https://github.com/MetaMask/snap-solana-wallet/pull/599
- [Method signature](https://github.com/MetaMask/accounts/blob/8488a657c5daf6203d1c59ca80081f54d03a77fb/packages/keyring-api/src/api/keyring.ts#L71)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the referenced Solana snap PR and the keyring_createAccounts method signature, then inspect the Tron snap's keyring implementation. Update controller-init/multichain/multichain-account-service-init.ts for the extension client and identify the corresponding configuration in the other client. Done means the Tron snap supports the method, a new version is released, both clients use it, and createAccounts.batched is true.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100