pub output_values: &'a [u64], pub outputs: usize, } #[derive(Clone, Debug, PartialEq)] pub struct Sent { pub amount: f64, pub address: Address, pub locked: Vec, } #[derive(Serialize, Deserialize)] pub struct JsonOutPoint { txid: bitcoin::Txid, vout: u32, } impl From for JsonOutPoint { fn from(outpoint: OutPoint) -> Self { Self { txid: outpoint.txid, vout: outpoint.vout, } } } impl<'a> Default for TransactionTemplate<'a> { fn default() -> Self { Self { fee: 0, inputs: &[], op_return: None, op_return_index: None, output_values: &[], outputs: 1, } } } pub struct Handle { close_handle: Option, port: u16, state: Arc>, } impl Handle { pub fn url(&self) -> String { format!("http://127.0.0.1:{}", self.port) } fn state(&self) -> MutexGuard { self.state.lock().unwrap() } pub fn wallets(&self) -> BTreeSet { self.state().wallets.clone() }