Function deriveHdPrivateNodeIdentifier

  • Derive the public identifier for a given HdPrivateNode. This is used to uniquely identify HD nodes in software. The first 4 bytes of this identifier are considered its "fingerprint".

    Parameters

    • hdPrivateNode: HdPrivateNodeValid

      The HdPrivateNode from which to derive the public identifier.

    • __namedParameters: {
          crypto?: {
              ripemd160: {
                  hash: ((input) => Uint8Array) & ((input) => Uint8Array);
              };
              secp256k1: {
                  derivePublicKeyCompressed: ((privateKey) => string | Uint8Array);
              };
              sha256: {
                  hash: ((input) => Uint8Array) & ((input) => Uint8Array);
              };
          };
      } = {}
      • Optional crypto?: {
            ripemd160: {
                hash: ((input) => Uint8Array) & ((input) => Uint8Array);
            };
            secp256k1: {
                derivePublicKeyCompressed: ((privateKey) => string | Uint8Array);
            };
            sha256: {
                hash: ((input) => Uint8Array) & ((input) => Uint8Array);
            };
        }

        An optional object containing implementations of sha256 hashing, ripemd160 hashing, and secp256k1 compressed public key derivation to use.

        • ripemd160: {
              hash: ((input) => Uint8Array) & ((input) => Uint8Array);
          }
          • hash: ((input) => Uint8Array) & ((input) => Uint8Array)
        • secp256k1: {
              derivePublicKeyCompressed: ((privateKey) => string | Uint8Array);
          }
          • derivePublicKeyCompressed: ((privateKey) => string | Uint8Array)
              • (privateKey): string | Uint8Array
              • Parameters

                • privateKey: Uint8Array

                Returns string | Uint8Array

        • sha256: {
              hash: ((input) => Uint8Array) & ((input) => Uint8Array);
          }
          • hash: ((input) => Uint8Array) & ((input) => Uint8Array)

    Returns string | Uint8Array

Generated using TypeDoc