dash-platform-sdk
    Preparing search index...

    Class KeyPairController

    Collection of functions to work with private keys and seed phrases

    Index

    Methods

    • Allows to derive child HD Key

      Parameters

      • hdKey: HDKey

        {HDKey} - The HDKey parent instance

      • index: number

        {number} - Index of child

      Returns Promise<HDKey>

      A promise that resolves child key

    • Derives an {HDKey} child by identity index and key index from an {HDKey}

      Usually used to get a identity private key from seed

      Parameters

      • hdKey: HDKey

        {HDKey}

      • identityIndex: number

        {number}

      • keyIndex: number

        {number}

      • network: Network

        {Network}

      Returns HDKey

    • Allows to derive HD key by path

      Parameters

      • hdKey: HDKey

        {HDKey} - The HDKey parent instance

      • path: string

        {string} - Path of children

      Returns Promise<HDKey>

      A promise that resolves key by path

    • Returns seed from mnemonic phrase

      Parameters

      • mnemonic: string

        {string} - The BIP39 mnemonic phrase.

      • Optionalsalt: string

        {string=} - Optional salt for seed derivation.

      Returns Uint8Array

      Seed bytes

    • Converts {PublicKey} to a Dash network address (P2PKH)

      Parameters

      • publicKey: Uint8Array

        {Uint8Array}

      • network: Network

        {Network}

      Returns string

    • Returns seed from mnemonic phrase

      Parameters

      • seed: Uint8Array

        {Uint8Array}

      • network: Network = 'mainnet'

        {Network} network

      Returns HDKey

      HDKey