@@ -1810,6 +1810,26 @@ pub enum GetChainTipsResultStatus {
18101810 Active ,
18111811}
18121812
1813+ #[ derive( Clone , PartialEq , Debug , Deserialize , Serialize ) ]
1814+ pub struct GetChainTxStatsResult {
1815+ /// The timestamp for the final block in the window, expressed in UNIX epoch time
1816+ pub time : u64 ,
1817+ /// The total number of transactions in the chain up to that point
1818+ pub txcount : u64 ,
1819+ /// The hash of the final block in the window
1820+ pub window_final_block_hash : bitcoin:: BlockHash ,
1821+ /// The height of the final block in the window.
1822+ pub window_final_block_height : u64 ,
1823+ /// Size of the window in number of blocks
1824+ pub window_block_count : u64 ,
1825+ /// The number of transactions in the window. Only returned if "window_block_count" is > 0
1826+ pub window_tx_count : Option < u64 > ,
1827+ /// The elapsed time in the window in seconds. Only returned if "window_block_count" is > 0
1828+ pub window_interval : Option < u64 > ,
1829+ /// The average rate of transactions per second in the window. Only returned if "window_interval" is > 0
1830+ pub txrate : Option < f64 > ,
1831+ }
1832+
18131833impl FinalizePsbtResult {
18141834 pub fn transaction ( & self ) -> Option < Result < Transaction , encode:: Error > > {
18151835 self . hex . as_ref ( ) . map ( |h| encode:: deserialize ( h) )
0 commit comments