pub fn create_taproot_address(
scripts: &[ScriptBuf],
internal_key: Option<XOnlyPublicKey>,
network: Network,
) -> (Address, TaprootSpendInfo)Expand description
Creates a taproot address with given scripts and internal key.
§Arguments
scripts: If empty, it is most likely a key path spend addressinternal_key: If not given, will be defaulted to an unspendable x-only public keynetwork: Bitcoin network- If both
scriptsandinternal_keyare given, it means one can spend using both script and key path. - If none given, it is an unspendable address.
§Returns
- [
Address]: Generated taproot address - [
TaprootSpendInfo]: Taproot spending information
§Panics
Will panic if some of the operations have invalid parameters.