MCPcopy Create free account
hub / github.com/BitVM/BitVM / generate_taproot_leaf_0_script

Method generate_taproot_leaf_0_script

bridge/src/connectors/connector_1.rs:62–77  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

60 }
61
62 fn generate_taproot_leaf_0_script(&self) -> ScriptBuf {
63 let superblock_public_key = &self.commitment_public_keys[&CommitmentMessageId::Superblock];
64 let superblock_hash_public_key =
65 &self.commitment_public_keys[&CommitmentMessageId::SuperblockHash];
66
67 script! {
68 { winternitz_message_checksig_verify(superblock_hash_public_key, SUPERBLOCK_HASH_MESSAGE_LENGTH * 2) }
69 { winternitz_message_checksig_verify(superblock_public_key, SUPERBLOCK_MESSAGE_LENGTH * 2) }
70 { self.num_blocks_timelock_leaf_0 }
71 OP_CSV
72 OP_DROP
73 { self.operator_taproot_public_key }
74 OP_CHECKSIG
75 }
76 .compile()
77 }
78
79 fn generate_taproot_leaf_0_tx_in(&self, input: &Input) -> TxIn {
80 generate_timelock_tx_in(input, self.num_blocks_timelock_leaf_0)

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected