Skip to content

Add BIP-39 mnemonic phrase support for deterministic wallet recovery workflows #2315

Description

@iron-prog

Problem

The SDK currently exposes key primitives such as PrivateKey and PublicKey, but does not provide a mnemonic-based workflow for seed phrase generation, validation, recovery, or deterministic key derivation.
Mnemonic phrases are the standard backup and recovery mechanism across modern wallet ecosystems. Without native SDK support, developers must integrate third-party libraries and custom logic themselves, which can lead to inconsistent implementations and fragmented developer experience.
This gap also makes deterministic local development and integration testing workflows more difficult.

Solution

Introduce a MnemonicPhrase crypto utility that supports:

  • BIP-39 mnemonic generation
  • Phrase validation and normalization
  • Seed derivation with optional passphrase support
  • Deterministic Ed25519 private key derivation from generated seeds
  • The utility should also be exported through:
  • the crypto package exports
  • the top-level SDK exports

Benefits

  • Simplifies developer onboarding
  • Enables deterministic test environments
  • Provides SDK-native wallet recovery workflows
  • Reduces reliance on external mnemonic handling logic
  • Improves consistency across applications using the SDK

Initial Scope

  • English BIP-39 support
  • Deterministic seed derivation
  • Deterministic Ed25519 key derivation
  • Unit tests for:
    • mnemonic generation
    • normalization/validation
    • invalid checksum rejection
    • deterministic derivation behavior

Alternatives

No response

Metadata

Metadata

Assignees

Labels

approvedIssue has been approved by team membernotes: extra carerequires extra attention to detail or requirementsskill: advancedrequires knowledge of multiple areas in the codebase without defined steps to implement or examples

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions