MCPcopy Create free account
hub / github.com/BitVM/BitVM / txid

Method txid

final-spv/src/transaction.rs:29–32  ·  view source on GitHub ↗

Returns the transaction id, in big-endian byte order. One must be careful when dealing with Bitcoin transaction ids, as they are little-endian in the Bitcoin protocol.

(&self)

Source from the content-addressed store, hash-verified

27 /// Returns the transaction id, in big-endian byte order. One must be careful when dealing with
28 /// Bitcoin transaction ids, as they are little-endian in the Bitcoin protocol.
29 pub fn txid(&self) -> [u8; 32] {
30 let mid_state = self.mid_state_txid();
31 calculate_sha256(&mid_state)
32 }
33
34 /// Returns the first digest of the transaction to be used in SPV
35 pub fn mid_state_txid(&self) -> [u8; 32] {

Callers 7

final_circuitFunction · 0.80
test_merkle_tree_0Function · 0.80
test_merkle_tree_1Function · 0.80
verifyMethod · 0.80
test_spvFunction · 0.80
test_txid_legacyFunction · 0.80
test_txid_segwitFunction · 0.80

Calls 2

mid_state_txidMethod · 0.80
calculate_sha256Function · 0.70

Tested by 5

test_merkle_tree_0Function · 0.64
test_merkle_tree_1Function · 0.64
test_spvFunction · 0.64
test_txid_legacyFunction · 0.64
test_txid_segwitFunction · 0.64