Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MnemonicKey

Implements a BIP39 mnemonic wallet with standard key derivation from a word list. Note that this implementation exposes the private key in memory, so it is not advised to use for applications requiring high security.

Hierarchy

Index

Constructors

Properties

mnemonic: string

Space-separated mnemonic phrase.

privateKey: Buffer

Raw private key, in bytes.

publicKey?: PublicKey

Methods

  • accAddress(prefix: string): string
  • ecdsaSign(payload: Buffer): { recid: number; signature: Uint8Array }
  • Parameters

    • payload: Buffer

    Returns { recid: number; signature: Uint8Array }

    • recid: number
    • signature: Uint8Array
  • etherSign(payload: Buffer): { signature: Uint8Array }
  • sign(payload: Buffer): Promise<Buffer>
  • You will need to supply sign, which produces a signature for an arbitrary bytes payload with the ECDSA curve secp256pk1.

    Parameters

    • payload: Buffer

    Returns Promise<Buffer>

  • Signs a Tx and adds the signature to a generated StdTx that is ready to be broadcasted.

    Parameters

    Returns Promise<Tx>

  • valAddress(prefix: string): string