diff --git a/src/bitcoin.udl b/src/bitcoin.udl index 04905ef..c4ddc21 100644 --- a/src/bitcoin.udl +++ b/src/bitcoin.udl @@ -47,6 +47,13 @@ dictionary OutPoint { u32 vout; }; +dictionary TxIn { + OutPoint previous_output; + Script script_sig; + u32 sequence; + sequence> witness; +}; + [NonExhaustive] enum Network { "Bitcoin", diff --git a/src/lib.rs b/src/lib.rs index dcfd1fb..1a2a2a5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,7 +3,9 @@ use bitcoin::Address as BitcoinAddress; use bitcoin::Amount as BitcoinAmount; use bitcoin::FeeRate as BitcoinFeeRate; use bitcoin::ScriptBuf as BitcoinScriptBuf; +use bitcoin::TxIn as BitcoinTxIn; use bitcoin::TxOut as BitcoinTxOut; +use bitcoin::Sequence; pub use bitcoin::BlockHash; pub use bitcoin::OutPoint; @@ -174,6 +176,40 @@ impl Amount { impl_from_core_type!(Amount, BitcoinAmount); impl_from_ffi_type!(Amount, BitcoinAmount); +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct TxIn { + pub previous_output: OutPoint, + pub script_sig: Arc