Skip to content

94.0.0

Choose a tag to compare

@github-actions github-actions released this 01 Apr 11:03
8414400

@metamask/eth-money-keyring 2.0.0

Added

  • Support custom cryptographic functions (#491)
    • Those functions are forwarded to the inner HdKeyring.

Changed

  • BREAKING: Replace inheritance with composition; MoneyKeyring now wraps an inner HdKeyring instead of extending it (#484), (#492, #488)
    • Constructor now requires a MoneyKeyringOptions object with a getMnemonic callback. The entropySource is set by deserialize() from the serialized state.
    • The inner HdKeyring is created on the first signing call (lazily), protected by a mutex to ensure single initialization under concurrency.
    • Serialized state now stores entropySource instead of mnemonic; the mnemonic is resolved at deserialization time via the callback.
    • Serialized state now stores account (the derived address) instead of numberOfAccounts; the account is restored directly from state without calling getMnemonic.
    • hdPath is no longer part of the serialized state; it is always MONEY_DERIVATION_PATH.
    • signMessage, getEncryptionPublicKey, decryptMessage, exportAccount, and getAppKeyAddress are no longer exposed.
    • removeAccount() has been removed; accounts are permanent once added.
    • getAccounts() is now a cheap synchronous-like read that never triggers getMnemonic.
    • New exports: GetMnemonicCallback, MoneyKeyringOptions types.
    • New dependency: @metamask/keyring-utils (for Keyring interface).
    • New dependency: async-mutex.