bail!( "reveal transaction weight greater than {MAX_STANDARD_TX_WEIGHT} (MAX_STANDARD_TX_WEIGHT): {reveal_weight}" ); } utxos.insert( reveal_tx.input[commit_input].previous_output, Amount::from_sat( unsigned_commit_tx.output[reveal_tx.input[commit_input].previous_output.vout as usize] .value, ), ); let total_fees = Self::calculate_fee(&unsigned_commit_tx, &utxos) + Self::calculate_fee(&reveal_tx, &utxos); Ok((unsigned_commit_tx, reveal_tx, recovery_key_pair, total_fees)) } fn backup_recovery_key( client: &Client, recovery_key_pair: TweakedKeyPair, network: Network, ) -> Result { let recovery_private_key = PrivateKey::new(recovery_key_pair.to_inner().secret_key(), network); let info = client.get_descriptor_info(&format!("rawtr({})", recovery_private_key.to_wif()))?; let response = client.import_descriptors(ImportDescriptors { descriptor: format!("rawtr({})#{}", recovery_private_key.to_wif(), info.checksum),