Function generateSigningSerializationBCH

  • Generate the signing serialization for a particular transaction input following the algorithm required by the provided signingSerializationType.

    Note: When validating transactions with multiple signatures, performance-critical applications should use a memoized sha256 implementation to avoid re-computing hashes.


    • context: CompilationContextBCH
    • __namedParameters: {
          coveredBytecode: Uint8Array;
          signingSerializationType: Uint8Array;
      • coveredBytecode: Uint8Array

        The encoded script currently being executed, beginning at the lastCodeSeparator.

      • signingSerializationType: Uint8Array

        The signing serialization type of the signature (A.K.A. sighash type).

    • sha256: {
          hash: ((input: Uint8Array) => Uint8Array);
      } = internalSha256
      • 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 Uint8Array

Generated using TypeDoc