<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "BitcoinKernel",
  "identifier" : "/documentation/BitcoinKernel/Txid",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "BitcoinKernel"
    ],
    "preciseIdentifier" : "s:13BitcoinKernel4TxidC"
  },
  "title" : "Txid"
}
-->

# Txid

A 32-byte transaction identifier — double-SHA256 of a transaction’s
non-witness serialization.

```
final class Txid
```

## Overview

TXID (this type) is stable across witness malleation and is what
`prevout.hash` fields reference. WTXID (not exposed on this type)
additionally includes witness data. Like block hashes, TXIDs are
stored internally in kernel byte order — reverse for the display-order
hex used by block explorers.

Obtained via [`txid`](/documentation/BitcoinKernel/Transaction/txid) or [`txid`](/documentation/BitcoinKernel/TransactionOutPoint/txid);
there is no public `create` initializer.

Wraps the opaque `btck_Txid` type; `deinit` calls `btck_txid_destroy`
when the last Swift reference drops.