HDKey handles hierarchical key generation according to ADR 0008 https://github.com/oasisprotocol/adrs/blob/main/0008-standard-account-key-generation.md

Properties

keypair: SignKeyPair

Methods

  • Generates a mnemonic

    Parameters

    • strength: number = 256

      Length in bits of the generated mnemonic

    Returns string

    Generated BIP-0039 Mnemonic

  • Generates the keypair matching the supplied parameters

    Parameters

    • mnemonic: string

      BIP-0039 Mnemonic

    • index: number = 0

      Account index

    • Optionalpassphrase: string

      Optional BIP-0039 passphrase

    Returns Promise<SignKeyPair>

    SignKeyPair for these parameters