tapTreeToList
bitcoinjs-lib / tapTreeToList
Function: tapTreeToList()
tapTreeToList(
tree
):TapLeaf
[]
Defined in: ts_src/psbt/bip371.ts:227
Convert a binary tree to a BIP371 type list. Each element of the list is (according to BIP371): One or more tuples representing the depth, leaf version, and script for a leaf in the Taproot tree, allowing the entire tree to be reconstructed. The tuples must be in depth first search order so that the tree is correctly reconstructed.
Parameters
tree
the binary tap tree
Returns
TapLeaf
[]
a list of BIP 371 tapleaves