diff --git a/bdk-ffi/src/bdk.udl b/bdk-ffi/src/bdk.udl index 287b541..09195ab 100644 --- a/bdk-ffi/src/bdk.udl +++ b/bdk-ffi/src/bdk.udl @@ -188,7 +188,7 @@ dictionary OutPoint { dictionary TxOut { u64 value; - string address; + Script script_pubkey; }; enum KeychainKind { diff --git a/bdk-ffi/src/lib.rs b/bdk-ffi/src/lib.rs index 6cef73a..a90403d 100644 --- a/bdk-ffi/src/lib.rs +++ b/bdk-ffi/src/lib.rs @@ -17,9 +17,7 @@ use crate::wallet::{BumpFeeTxBuilder, TxBuilder, Wallet}; use bdk::bitcoin::blockdata::script::Script as BdkScript; use bdk::bitcoin::consensus::Decodable; use bdk::bitcoin::psbt::serialize::Serialize; -use bdk::bitcoin::{ - Address as BdkAddress, Network, OutPoint as BdkOutPoint, Transaction as BdkTransaction, Txid, -}; +use bdk::bitcoin::{Address as BdkAddress, Network, OutPoint as BdkOutPoint, Transaction as BdkTransaction, Txid}; use bdk::blockchain::Progress as BdkProgress; use bdk::database::any::{SledDbConfiguration, SqliteDbConfiguration}; use bdk::keys::bip39::WordCount; @@ -79,7 +77,7 @@ pub enum AddressIndex { /// Use with caution, if an index is given that is less than the current descriptor index /// then the returned address and subsequent addresses returned by calls to `AddressIndex::New` /// and `AddressIndex::LastUsed` may have already been used. Also if the index is reset to a - /// value earlier than the [`crate::blockchain::Blockchain`] stop_gap (default is 20) then a + /// value earlier than the [`Blockchain`] stop_gap (default is 20) then a /// larger stop_gap should be used to monitor for all possibly used addresses. Reset { index: u32 }, } @@ -175,11 +173,12 @@ impl From for Balance { } /// A transaction output, which defines new coins to be created from old ones. +#[derive(Debug)] pub struct TxOut { /// The value of the output, in satoshis. value: u64, /// The address of the output. - address: String, + script_pubkey: Arc