Function deriveHdPrivateNodeFromSeed

  • Derive an HdPrivateNode from the provided seed following the BIP32 specification. A seed should include between 16 bytes and 64 bytes of entropy (recommended: 32 bytes).

    Type Parameters

    • AssumedValidity extends undefined | boolean

    Parameters

    • seed: Uint8Array

      the entropy from which to derive the HdPrivateNode

    • Optional assumeValidity: AssumedValidity

      if set, the derived private key will not be checked for validity, and will be assumed valid if true or invalid if false (this is useful for testing)

    • crypto: {
          sha512: {
              hash: ((input: Uint8Array) => Uint8Array);
          };
      } = ...

      an optional object containing an implementation of sha512 to use

      • sha512: {
            hash: ((input: Uint8Array) => Uint8Array);
        }
        • hash: ((input: Uint8Array) => Uint8Array)
            • (input: Uint8Array): Uint8Array
            • Returns the sha512 hash of the provided input.

              To incrementally construct a sha512 hash (e.g. for streaming), use init, update, and final.

              Parameters

              • input: Uint8Array

                a Uint8Array to be hashed using sha512

              Returns Uint8Array

    Returns AssumedValidity extends true ? HdPrivateNodeValid : AssumedValidity extends false ? HdPrivateNodeInvalid : HdPrivateNode

Generated using TypeDoc