taproot
Bitcoin Taproot (BIP-341) Implementation
This module provides Taproot functionality including key tweaking, script trees, and proper P2TR address generation using BIP-340 Schnorr signatures.
Fully qualified path: alexandria_btc::taproot
Free functions
| tagged_hash | Create a tagged hash according to BIP-340 tagged hash specification… |
| tagged_hash_byte_array | Create a tagged hash from byte arrays according to BIP-340 tagged hash specification… |
| tagged_hash_u256 | Create a tagged hash from byte arrays according to BIP-340 tagged hash specification… |
| tweak_public_key | Tweak a public key for Taproot according to BIP-341… |
| lift_x_coordinate | Lift an x-coordinate to a valid secp256k1 point… |
| u256_to_32_bytes_be | Convert u256 to 32-byte array (big-endian) |
| create_script_tree | Create a Taproot script tree from a single script… |
| calculate_merkle_root | Calculate the Merkle root of a script tree… |
| verify_taproot_signature | Verify a BIP-340 Schnorr signature for Taproot… |
| create_key_path_output | Generate a key-path only Taproot output… |
| create_script_path_output | Generate a script-path Taproot output… |
Structs
| TweakedPublicKey | Taproot tweaked public key result |
| ScriptLeaf | Script tree leaf |
| TapTree | Taproot script tree (simplified - single leaf for now) |