MerkleProof class

MerkleProof

A proof that a transaction was included in a block.

Based on the Merkle Proof Standardized Format:

https://tsc.bitcoinassociation.net/standards/merkle-proof-standardised-format/

Reference implementation:

https://github.com/bitcoin-sv-specs/merkle-proof-standard-example/

Constructors

MerkleProof({int? flagsNum, int? indexNum, int? txLengthNum, List<int>? txOrIdBuf, List<int>? targetBuf, int? nodeCount, List<Map<String, dynamic>>? nodes})
MerkleProof.fromBuffer(List<int> buf)
factory
MerkleProof.fromHex(String str)
factory
MerkleProof.fromJSON(Map json)
factory

Properties

flagsNum int
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
indexNum int?
getter/setter pair
nodeCount int?
getter/setter pair
nodes List<Map<String, dynamic>>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
targetBuf List<int>?
getter/setter pair
txLengthNum int?
getter/setter pair
txOrIdBuf List<int>?
getter/setter pair

Methods

calculateMerkleRoot(Hash h) String
fromBr(Br br) MerkleProof
fromBuffer(List<int> buf) MerkleProof
fromHex(String str) MerkleProof
fromJSON(Map json) MerkleProof
getFlagsComposite() bool
getFlagsHasTx() bool
getFlagsProofType() String
getFlagsTargetType() String
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setDefaultFlags() → void
setFlagsComposite([bool? composite]) MerkleProof
setFlagsHasTx([bool hasTx = true]) → void
setFlagsProofType([String? proofType]) MerkleProof
setFlagsTargetType([String? targetType]) MerkleProof
toBuffer() List<int>
toBw([Bw? bw]) Bw
toHex() String
toJSON() Map<String, dynamic>
toString() String
A string representation of this object.
inherited
verificationError(BlockHeader blockHeader, Tx tx) → dynamic
verificationErrorBuffer(List<int> merkleRootBuf, Hash c) → dynamic
verify(BlockHeader blockHeader, Tx tx) bool

Operators

operator ==(Object other) bool
The equality operator.
inherited