Documentation
¶
Overview ¶
Package taproot builds Simplicity P2TR addresses for Elements/Liquid.
Simplicity uses leaf version 0xBE (not 0xC4 which is standard Elements tapscript). The internal key is a NUMS point (key-path spend disabled).
Index ¶
Constants ¶
const SimplicityLeafVersion txscript.TapscriptLeafVersion = 0xBE
SimplicityLeafVersion is the Simplicity tapscript leaf version on Elements.
Variables ¶
This section is empty.
Functions ¶
func Address ¶
Address derives the P2TR bech32m address for a Simplicity contract. cmrBytes must be the 32-byte Commitment Merkle Root — this is what goes in the taproot leaf, NOT the full program binary.
func AddressDual ¶
AddressDual derives a P2TR address for a 2-leaf Simplicity taproot tree. Both cmr1 and cmr2 are 32-byte Simplicity CMRs (e.g., swap and remove variants). The resulting UTXO can be spent using either program.
func ControlBlock ¶
ControlBlock returns the serialised taproot control block for a Simplicity spend. cmrBytes must be the 32-byte CMR used as the taproot leaf script.
func ControlBlockDual ¶
ControlBlockDual returns the control block for spending the leaf identified by targetCMR from a 2-leaf tree built from (cmr1, cmr2).
Types ¶
This section is empty.