Function encodeHdPrivateKeyPayload

  • Encode an HD private key (as defined by BIP32) payload (without the checksum) given a valid HdPrivateNode and network.

    Note that this function defaults to throwing encoding errors. To handle errors in a type-safe way, set throwErrors to false.

    Type Parameters

    • ThrowErrors extends boolean = true

    Parameters

    • keyParameters: DecodedHdKey<HdPrivateNodeValid>

      A valid HD private node and the network for which to encode the key.

    • __namedParameters: {
          throwErrors?: ThrowErrors;
      } = {}
      • Optional throwErrors?: ThrowErrors

        If true, this function will throw an Error when the provided HD node has a depth exceeding the maximum depth that can be encoded using the BIP32 serialization format rather than returning the error as a string (defaults to true).

    Returns ThrowErrors extends true
        ? Uint8Array
        : string | Uint8Array

Generated using TypeDoc