};
let unsigned_transaction = TransactionBuilder::new(
satpoint,
inscriptions,
unspent_outputs,
locked_outputs,
address.clone(),
change,
self.fee_rate,
postage,
)
.build_transaction()?;
let signed_tx = client
.sign_raw_transaction_with_wallet(&unsigned_transaction, None, None)?
.hex;
let txid = client.send_raw_transaction(&signed_tx)?;
Ok(Box::new(Output { transaction: txid }))
}
fn lock_inscriptions(
client: &Client,
inscriptions: BTreeMap<SatPoint, InscriptionId>,
unspent_outputs: BTreeMap<bitcoin::OutPoint, bitcoin::Amount>,
) -> Result {
let all_inscription_outputs = inscriptions
.keys()
.map(|satpoint| satpoint.outpoint)
.collect::<HashSet<OutPoint>>();
let wallet_inscription_outputs = unspent_outputs
.keys()
.filter(|utxo| all_inscription_outputs.contains(utxo))
.cloned()
.collect::<Vec<OutPoint>>();
if !client.lock_unspent(&wallet_inscription_outputs)? {