Function generateHdPrivateNode

  • Securely generate a valid HdPrivateNode, returning both the source seed and the HdPrivateNodeValid.

    By default, this function uses crypto.getRandomValues to produce sufficiently-random key material, but another source of randomness may also be provided.

    To generate a single Secp256k1 private key, use generatePrivateKey.

    Parameters

    • secureRandom: (() => Uint8Array) = generateRandomSeed
        • (): Uint8Array
        • Securely generate a 32-byte, cryptographically random seed (Uint8Array) for use in Hierarchical Deterministic (HD) Key derivation (see deriveHdPrivateNodeFromSeed).

          To generate a single Secp256k1 private key, use generatePrivateKey.

          Returns Uint8Array

    Returns {
        hdPrivateNode: HdPrivateNodeValid;
        seed: Uint8Array;
    }

Generated using TypeDoc