[][src]Module bitcoin_spv::validatespv

validatespv provides higher-levels of abstraction for evaluating SPV proofs, transactions, and headers.

Functions

calculate_txid

Hashes transaction to get txid.

parse_header

Parses a block header struct from a bytestring. Note: Block headers are always 80 bytes, see Bitcoin docs.

parse_input

Parses a tx input from raw input bytes. Supports LEGACY and WITNESS inputs.

parse_output

Parses a tx output from raw output bytes.

prove

Validates a tx inclusion in the block.

validate_header_chain

Checks validity of header chain. Compares the hash of each header to the prevHash in the next header.

validate_header_prev_hash

Checks validity of header chain.

validate_header_work

Checks validity of header work.