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