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

constructor

  • new MnemonicKey(options?: MnemonicKeyOptions): MnemonicKey

Properties

mnemonic

mnemonic: string

Space-separated mnemonic phrase.

privateKey

privateKey: Buffer

Raw private key, in bytes.

Optional publicKey

publicKey?: PublicKey

Accessors

accAddress

  • get accAddress(): string
  • Terra account address. terra- prefixed.

    Returns string

valAddress

  • get valAddress(): string
  • Terra validator address. terravaloper- prefixed.

    Returns string

Methods

createSignature

createSignatureAmino

ecdsaSign

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

    • payload: Buffer

    Returns { recid: number; signature: Uint8Array }

    • recid: number
    • signature: Uint8Array

sign

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

signTx