Skip to content

feat(keyring-sdk): add generateEthAccountId + use it in EthKeyringWrapper#504

Merged
ccharly merged 7 commits intomainfrom
cc/feat/deterministic-uuid-for-evm-for-keyring-v2-eth-keyring-wrapper
Apr 9, 2026
Merged

feat(keyring-sdk): add generateEthAccountId + use it in EthKeyringWrapper#504
ccharly merged 7 commits intomainfrom
cc/feat/deterministic-uuid-for-evm-for-keyring-v2-eth-keyring-wrapper

Conversation

@ccharly
Copy link
Copy Markdown
Contributor

@ccharly ccharly commented Apr 8, 2026

Change how account ID are generate for EthKeyringWrapper so IDs are now deterministic (similarly to what the AccountsController is doing today).


Note

Medium Risk
Changes how EthKeyringWrapper generates AccountIds (from random UUIDs to deterministic IDs derived from addresses), which can affect persisted IDs and any consumers relying on ID stability/uniqueness semantics across sessions.

Overview
Introduces generateEthAccountId, a deterministic UUIDv4-like AccountId generator derived from a normalized EVM address hash, and exports it from the SDK.

Updates KeyringWrapper to accept registryOptions, and updates EthKeyringWrapper to always configure its registry to use generateEthAccountId (preventing custom registry configuration). Adds unit tests for the new generator and wrapper behavior, and adjusts multiple keyring wrapper tests (HD/Ledger/QR/Simple/Trezor) to assert IDs remain stable across deserialize/registry rebuilds; also updates Trezor fixtures used in tests.

Adds ethereum-cryptography as a dependency and updates the keyring-sdk changelog/lockfile accordingly.

Reviewed by Cursor Bugbot for commit f8f5415. Bugbot is set up for automated code reviews on this repo. Configure here.

Base automatically changed from cc/feat/deterministic-uuid-for-evm-for-keyring-v2 to main April 8, 2026 14:38
@ccharly ccharly force-pushed the cc/feat/deterministic-uuid-for-evm-for-keyring-v2-eth-keyring-wrapper branch from f1f7fd0 to 47c6e37 Compare April 8, 2026 16:19
@ccharly ccharly changed the title feat(keyring-sdk): add generateEthAccountId + use it in EthKeyringWra… feat(keyring-sdk): add generateEthAccountId + use it in EthKeyringWrapper Apr 8, 2026
@ccharly ccharly marked this pull request as ready for review April 9, 2026 11:25
@ccharly ccharly requested a review from a team as a code owner April 9, 2026 11:25
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 47c6e37. Configure here.

Comment thread packages/keyring-eth-trezor/src/trezor-keyring-v2.test.ts Outdated
@ccharly ccharly added this pull request to the merge queue Apr 9, 2026
Merged via the queue into main with commit 61dbbb4 Apr 9, 2026
39 checks passed
@ccharly ccharly deleted the cc/feat/deterministic-uuid-for-evm-for-keyring-v2-eth-keyring-wrapper branch April 9, 2026 20:23
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