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

Function generate_timelock_script

bridge/src/scripts.rs:115–124  ·  view source on GitHub ↗
(public_key: &PublicKey, num_blocks_timelock: u32)

Source from the content-addressed store, hash-verified

113}
114
115pub fn generate_timelock_script(public_key: &PublicKey, num_blocks_timelock: u32) -> ScriptBuf {
116 script! {
117 { num_blocks_timelock }
118 OP_CSV
119 OP_DROP
120 { *public_key }
121 OP_CHECKSIG
122 }
123 .compile()
124}
125
126pub fn generate_timelock_script_address(
127 network: Network,

Callers 3

generate_scriptMethod · 0.85
generate_scriptMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected