Options
All
  • Public
  • Public/Protected
  • All
Menu

A wallet for protobuf based signing using SIGN_MODE_DIRECT

Hierarchy

  • DirectSecp256k1HdWallet

Implements

Index

Constructors

  • new DirectSecp256k1HdWallet(mnemonic: EnglishMnemonic, options: DirectSecp256k1HdWalletConstructorOptions): DirectSecp256k1HdWallet

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>

  • 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<DirectSecp256k1HdWallet>

Generated using TypeDoc