) -> Result { assert_eq!(locktime, None, "locktime param not supported"); assert_eq!(replaceable, None, "replaceable param not supported"); let tx = Transaction { version: 0, lock_time: LockTime::ZERO, input: utxos .iter() .map(|input| TxIn { previous_output: OutPoint::new(input.txid, input.vout), script_sig: ScriptBuf::new(), sequence: Sequence::MAX, witness: Witness::new(), }) .collect(), output: outs .values() .map(|amount| TxOut { value: (*amount * COIN_VALUE as f64) as u64, script_pubkey: ScriptBuf::new(), }) .collect(), }; Ok(hex::encode(serialize(&tx))) } fn create_wallet( &self, name: String, _disable_private_keys: Option, _blank: Option, _passphrase: Option, _avoid_reuse: Option, ) -> Result { self.state().wallets.insert(name.clone());