Function decodePrivateKeyWif

  • Decode a private key using Wallet Import Format (WIF). See encodePrivateKeyWif for details.


    • wifKey: string

      the private key to decode (in Wallet Import Format)

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

      an implementation of sha256

      • hash: ((input: Uint8Array) => Uint8Array)
          • (input: Uint8Array): Uint8Array
          • Returns the sha256 hash of the provided input.

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


            • input: Uint8Array

              a Uint8Array to be hashed using sha256

            Returns Uint8Array

    Returns unknownCharacter | tooShort | invalidChecksum | {
        privateKey: Uint8Array;
        type: WalletImportFormatType;

Generated using TypeDoc