@@ -6,7 +6,8 @@ pub use bitcoin::consensus::{deserialize, serialize};
66pub use bitcoin:: hex:: FromHex ;
77use bitcoin:: Weight ;
88pub use bitcoin:: {
9- transaction, Amount , BlockHash , OutPoint , ScriptBuf , Transaction , TxIn , TxOut , Txid , Witness ,
9+ transaction, Amount , BlockHash , OutPoint , ScriptBuf , ScriptHash , Transaction , TxIn , TxOut ,
10+ Txid , Witness ,
1011} ;
1112
1213use serde:: Deserialize ;
@@ -123,6 +124,19 @@ pub struct AddressTxsSummary {
123124 pub tx_count : u32 ,
124125}
125126
127+ /// [`ScriptHash`] statistics, includes the script hash, and the [`TxOut`] information for the
128+ /// script hash.
129+ #[ derive( Debug , Copy , Clone , PartialEq , Eq , Deserialize ) ]
130+ pub struct ScriptHashStats {
131+ /// The summary of confirmed transactions for this [`ScriptHash`].
132+ pub chain_stats : ScriptHashTxsSummary ,
133+ /// The summary of mempool transactions for this [`ScriptHash`].
134+ pub mempool_stats : ScriptHashTxsSummary ,
135+ }
136+
137+ /// Contains a summary of the transactions for a [`ScriptHash`].
138+ pub type ScriptHashTxsSummary = AddressTxsSummary ;
139+
126140/// Information about an UTXO's status: confirmation status,
127141/// confirmation height, confirmation block hash and confirmation block time.
128142#[ derive( Debug , Copy , Clone , PartialEq , Eq , Deserialize ) ]
0 commit comments