Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Secp256k1HdWallet

Implements

Index

Constructors

  • new Secp256k1HdWallet(mnemonic: EnglishMnemonic, options: Secp256k1HdWalletConstructorOptions): Secp256k1HdWallet

Accessors

  • get mnemonic(): string

Methods

  • serialize(password: string): Promise<string>
  • Generates an encrypted serialization of this wallet.

    Parameters

    • password: string

      The user provided password used to generate an encryption key via a KDF. This is not normalized internally (see "Unicode normalization" to learn more).

    Returns Promise<string>

  • serializeWithEncryptionKey(encryptionKey: Uint8Array, kdfConfiguration: KdfConfiguration): Promise<string>
  • Generates an encrypted serialization of this wallet.

    This is an advanced alternative to calling serialize(password) directly, which allows you to offload the KDF execution to a non-UI thread (e.g. in a WebWorker).

    The caller is responsible for ensuring the key was derived with the given KDF options. If this is not the case, the wallet cannot be restored with the original password.

    Parameters

    Returns Promise<string>

  • Request signature from whichever key corresponds to provided bech32-encoded address. Rejects if not enabled.

    The signer implementation may offer the user the ability to override parts of the signDoc. It must return the doc that was signed in the response.

    Parameters

    Returns Promise<AminoSignResponse>

  • Restores a wallet from an encrypted serialization.

    Parameters

    • serialization: string
    • password: string

      The user provided password used to generate an encryption key via a KDF. This is not normalized internally (see "Unicode normalization" to learn more).

    Returns Promise<Secp256k1HdWallet>

  • deserializeWithEncryptionKey(serialization: string, encryptionKey: Uint8Array): Promise<Secp256k1HdWallet>
  • Restores a wallet from an encrypted serialization.

    This is an advanced alternative to calling deserialize(serialization, password) directly, which allows you to offload the KDF execution to a non-UI thread (e.g. in a WebWorker).

    The caller is responsible for ensuring the key was derived with the given KDF configuration. This can be done using extractKdfConfiguration(serialization) and executeKdf(password, kdfConfiguration) from this package.

    Parameters

    • serialization: string
    • encryptionKey: Uint8Array

    Returns Promise<Secp256k1HdWallet>

  • Restores a wallet from the given BIP39 mnemonic.

    Parameters

    • mnemonic: string

      Any valid English mnemonic.

    • options: Partial<Secp256k1HdWalletOptions> = {}

      An optional Secp256k1HdWalletOptions object optionally containing a bip39Password, hdPaths, and prefix.

    Returns Promise<Secp256k1HdWallet>

  • Generates a new wallet with a BIP39 mnemonic of the given length.

    Parameters

    • length: 12 | 15 | 18 | 21 | 24 = 12

      The number of words in the mnemonic (12, 15, 18, 21 or 24).

    • options: Partial<Secp256k1HdWalletOptions> = {}

      An optional Secp256k1HdWalletOptions object optionally containing a bip39Password, hdPaths, and prefix.

    Returns Promise<Secp256k1HdWallet>

Generated using TypeDoc