Function hashTransactionP2pOrder

  • Compute a transaction hash (A.K.A. "transaction ID" or "TXID") from an encoded transaction in P2P network message order. This is the byte order produced by most sha256 libraries and used by encoded P2P network messages. It is also the byte order produced by OP_SHA256 and OP_HASH256 in the virtual machine.


    • transaction: Uint8Array

      the encoded transaction

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

      an implementation of sha256

      • hash: ((input) => Uint8Array) & ((input) => Uint8Array)

    Returns Uint8Array

    the transaction hash in P2P network message byte order

Generated using TypeDoc