Package 

Interface LeafNodeInterface

    • Method Summary

      Modifier and Type Method Description
      abstract UByte depth() Returns the depth of this script leaf in the tap tree.
      abstract String leafHash() Computes a leaf hash for this ScriptLeaf if the leaf is known.
      abstract UByte leafVersion() Returns leaf version of the script if the leaf is known.
      abstract List<String> merkleBranch() Returns reference to the merkle proof (hashing partners) to get this node in form of `TaprootMerkleBranch`.
      abstract String nodeHash() Computes the `TapNodeHash` for this `ScriptLeaf`.
      abstract Script script() Returns reference to the leaf script if the leaf is known.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • depth

         abstract UByte depth()

        Returns the depth of this script leaf in the tap tree.

      • leafHash

         abstract 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

         abstract UByte leafVersion()

        Returns leaf version of the script if the leaf is known.

      • merkleBranch

         abstract List<String> merkleBranch()

        Returns reference to the merkle proof (hashing partners) to get this node in form of `TaprootMerkleBranch`.

      • nodeHash

         abstract 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`.

      • script

         abstract Script script()

        Returns reference to the leaf script if the leaf is known.