<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "BitcoinKernel",
  "identifier" : "/documentation/BitcoinKernel/Transaction/txid",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "BitcoinKernel"
    ],
    "preciseIdentifier" : "s:13BitcoinKernel11TransactionC4txidAA4TxidCvp"
  },
  "title" : "txid"
}
-->

# txid

The transaction ID — double-SHA256 of the transaction’s
non-witness bytes. Returns an owned copy that outlives this
transaction.

```
var txid: Txid { get }
```

## Discussion

TXID vs. WTXID distinction: this is the TXID (excludes witness
data), the stable identifier used by `prevout.hash` references.
Witness transactions additionally have a WTXID that includes
witness data — the kernel does not currently expose WTXID on this
type.