-
- All Implemented Interfaces:
-
java.lang.AutoCloseable,org.bitcoindevkit.Disposable,org.bitcoindevkit.LeafNodeInterface
public class LeafNode implements Disposable, AutoCloseable, LeafNodeInterface
Store information about taproot leaf node.
-
-
Method Summary
Modifier and Type Method Description Unitdestroy()Unitclose()UBytedepth()Returns the depth of this script leaf in the tap tree. StringleafHash()Computes a leaf hash for this ScriptLeaf if the leaf is known. UByteleafVersion()Returns leaf version of the script if the leaf is known. List<String>merkleBranch()Returns reference to the merkle proof (hashing partners) to get this node in form of `TaprootMerkleBranch`. StringnodeHash()Computes the `TapNodeHash` for this `ScriptLeaf`. Scriptscript()Returns reference to the leaf script if the leaf is known. StringtoString()-
-
Method Detail
-
leafHash
String leafHash()
Computes a leaf hash for this ScriptLeaf if the leaf is known. This TapLeafHash is useful while signing taproot script spends. See LeafNode::node_hash for computing the TapNodeHash which returns the hidden node hash if the node is hidden.
-
leafVersion
UByte leafVersion()
Returns leaf version of the script if the leaf is known.
-
merkleBranch
List<String> merkleBranch()
Returns reference to the merkle proof (hashing partners) to get this node in form of `TaprootMerkleBranch`.
-
nodeHash
String nodeHash()
Computes the `TapNodeHash` for this `ScriptLeaf`. This returns the leaf hash if the leaf is known and the hidden node hash if the leaf is hidden. See also, `bdk_electrum::bdk_core::bitcoin::taproot::LeafNode::leaf_hash`.
-
-
-
-