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

Function generate_timelock_taproot_script

bridge/src/scripts.rs:137–149  ·  view source on GitHub ↗
(
    public_key: &XOnlyPublicKey,
    num_blocks_timelock: u32,
)

Source from the content-addressed store, hash-verified

135}
136
137pub fn generate_timelock_taproot_script(
138 public_key: &XOnlyPublicKey,
139 num_blocks_timelock: u32,
140) -> ScriptBuf {
141 script! {
142 { num_blocks_timelock }
143 OP_CSV
144 OP_DROP
145 { *public_key }
146 OP_CHECKSIG
147 }
148 .compile()
149}
150
151pub fn generate_timelock_taproot_script_address(
152 network: Network,

Calls

no outgoing calls

Tested by

no test coverage detected