(
commitment_public_keys: &BTreeMap<CommitmentMessageId, WinternitzPublicKey>,
leaf_index: usize,
)
| 269 | } |
| 270 | |
| 271 | fn lock_script_cache_id( |
| 272 | commitment_public_keys: &BTreeMap<CommitmentMessageId, WinternitzPublicKey>, |
| 273 | leaf_index: usize, |
| 274 | ) -> String { |
| 275 | let mut bytes = first_winternitz_public_key_bytes(commitment_public_keys); |
| 276 | bytes.append(leaf_index.to_be_bytes().to_vec().as_mut()); |
| 277 | let hash = hash160::Hash::hash(&bytes); |
| 278 | hash.as_byte_array().to_lower_hex_string() |
| 279 | } |
| 280 | |
| 281 | fn generate_script_and_control_block( |
| 282 | operator_taproot_public_key: XOnlyPublicKey, |
no test coverage detected