@@ -19,7 +19,6 @@ use crate::ScriptPubkey;
1919
2020/// Models the result of JSON-RPC method `dumptxoutset`.
2121#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
22- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
2322pub struct DumpTxOutSet {
2423 /// The number of coins written in the snapshot.
2524 pub coins_written : Amount ,
@@ -37,17 +36,14 @@ pub struct DumpTxOutSet {
3736
3837/// Models the result of JSON-RPC method `getbestblockhash`.
3938#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
40- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
4139pub struct GetBestBlockHash ( pub BlockHash ) ;
4240
4341/// Models the result of JSON-RPC method `getblock` with verbosity set to 0.
4442#[ derive( Clone , Debug , PartialEq , Eq , Deserialize , Serialize ) ]
45- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
4643pub struct GetBlockVerboseZero ( pub Block ) ;
4744
4845/// Models the result of JSON-RPC method `getblock` with verbosity set to 1.
4946#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
50- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
5147pub struct GetBlockVerboseOne {
5248 /// The block hash (same as provided) in RPC call.
5349 pub hash : BlockHash ,
@@ -91,7 +87,6 @@ pub struct GetBlockVerboseOne {
9187
9288/// Models the result of JSON-RPC method `getblockchaininfo`.
9389#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
94- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
9590pub struct GetBlockchainInfo {
9691 /// Current network name as defined in BIP70 (main, test, signet, regtest).
9792 pub chain : Network ,
@@ -137,7 +132,6 @@ pub struct GetBlockchainInfo {
137132
138133/// Softfork status. Part of `getblockchaininfo`.
139134#[ derive( Clone , Debug , PartialEq , Eq , Deserialize , Serialize ) ]
140- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
141135pub struct Softfork {
142136 /// The [`SoftforkType`]: one of "buried", "bip9".
143137 #[ serde( rename = "type" ) ]
@@ -166,7 +160,6 @@ pub enum SoftforkType {
166160
167161/// BIP-9 softfork info. Part of `getblockchaininfo`.
168162#[ derive( Clone , PartialEq , Eq , Debug , Deserialize , Serialize ) ]
169- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
170163pub struct Bip9SoftforkInfo {
171164 /// One of "defined", "started", "locked_in", "active", "failed".
172165 pub status : Bip9SoftforkStatus ,
@@ -201,7 +194,6 @@ pub enum Bip9SoftforkStatus {
201194
202195/// BIP-9 softfork statistics. Part of `getblockchaininfo`.
203196#[ derive( Clone , PartialEq , Eq , Debug , Deserialize , Serialize ) ]
204- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
205197pub struct Bip9SoftforkStatistics {
206198 /// The length in blocks of the BIP9 signalling period.
207199 pub period : u32 ,
@@ -217,12 +209,10 @@ pub struct Bip9SoftforkStatistics {
217209
218210/// Models the result of JSON-RPC method `getblockcount`.
219211#[ derive( Clone , Debug , PartialEq , Eq , Deserialize , Serialize ) ]
220- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
221212pub struct GetBlockCount ( pub u64 ) ;
222213
223214/// Models the result of JSON-RPC method `getblockfilter`.
224215#[ derive( Clone , Debug , PartialEq , Eq , Deserialize , Serialize ) ]
225- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
226216pub struct GetBlockFilter {
227217 /// The filter data.
228218 pub filter : Vec < u8 > ,
@@ -232,17 +222,14 @@ pub struct GetBlockFilter {
232222
233223/// Models the result of JSON-RPC method `getblockhash`.
234224#[ derive( Clone , Debug , PartialEq , Eq , Deserialize , Serialize ) ]
235- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
236225pub struct GetBlockHash ( pub BlockHash ) ;
237226
238227/// Models the result of JSON-RPC method `getblockheader`.
239228#[ derive( Clone , Debug , PartialEq , Eq , Deserialize , Serialize ) ]
240- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
241229pub struct GetBlockHeader ( pub block:: Header ) ;
242230
243231/// Models the result of JSON-RPC method `getblockheader`.
244232#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
245- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
246233pub struct GetBlockHeaderVerbose {
247234 /// the block hash (same as provided).
248235 pub hash : BlockHash ,
@@ -278,7 +265,6 @@ pub struct GetBlockHeaderVerbose {
278265
279266/// Models the result of JSON-RPC method `getblockstats`.
280267#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
281- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
282268pub struct GetBlockStats {
283269 /// Average fee in the block.
284270 pub average_fee : Amount ,
@@ -348,7 +334,6 @@ pub struct GetBlockStats {
348334
349335/// Models the result of JSON-RPC method `getchainstates`.
350336#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
351- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
352337pub struct GetChainStates {
353338 /// The number of headers seen so far.
354339 pub headers : u32 ,
@@ -358,7 +343,6 @@ pub struct GetChainStates {
358343
359344/// A single chainstate. Part of `getchainstates`.
360345#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
361- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
362346pub struct ChainState {
363347 /// Number of blocks in this chainstate.
364348 pub blocks : u32 ,
@@ -384,12 +368,10 @@ pub struct ChainState {
384368
385369/// Models the result of JSON-RPC method `getchaintips`.
386370#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
387- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
388371pub struct GetChainTips ( pub Vec < ChainTips > ) ;
389372
390373/// An individual list item from the result of JSON-RPC method `getchaintips`.
391374#[ derive( Clone , PartialEq , Eq , Debug , Deserialize , Serialize ) ]
392- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
393375pub struct ChainTips {
394376 /// Height of the chain tip.
395377 pub height : u32 ,
@@ -419,7 +401,6 @@ pub enum ChainTipsStatus {
419401
420402/// Models the result of JSON-RPC method `getchaintxstats`.
421403#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
422- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
423404pub struct GetChainTxStats {
424405 /// The timestamp for the final block in the window in UNIX format.
425406 pub time : u32 ,
@@ -441,7 +422,6 @@ pub struct GetChainTxStats {
441422
442423/// Models the result of JSON-RPC method `getdeploymentinfo`.
443424#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
444- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
445425pub struct GetDeploymentInfo {
446426 /// Requested block hash (or tip).
447427 pub hash : BlockHash ,
@@ -453,7 +433,6 @@ pub struct GetDeploymentInfo {
453433
454434/// Deployment info. Part of `getdeploymentinfo`.
455435#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
456- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
457436pub struct DeploymentInfo {
458437 /// One of "buried", "bip9".
459438 pub deployment_type : String ,
@@ -467,7 +446,6 @@ pub struct DeploymentInfo {
467446
468447/// Status of bip9 softforks. Part of `getdeploymentinfo`.
469448#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
470- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
471449pub struct Bip9Info {
472450 /// The bit (0-28) in the block version field used to signal this softfork (only for "started" and "locked_in" status).
473451 pub bit : Option < u8 > ,
@@ -491,7 +469,6 @@ pub struct Bip9Info {
491469
492470/// Numeric statistics about signalling for a softfork. Part of `getdeploymentinfo`.
493471#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
494- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
495472pub struct Bip9Statistics {
496473 /// The length in blocks of the signalling period.
497474 pub period : u32 ,
@@ -507,7 +484,6 @@ pub struct Bip9Statistics {
507484
508485/// Models the result of the JSON-RPC method `getdescriptoractivity`.
509486#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
510- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
511487pub struct GetDescriptorActivity {
512488 /// A list of activity events related to the descriptors.
513489 pub activity : Vec < ActivityEntry > ,
@@ -524,7 +500,6 @@ pub enum ActivityEntry {
524500
525501/// Models a 'spend' activity event. Part of `getdescriptoractivity`.
526502#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
527- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
528503pub struct SpendActivity {
529504 /// The total amount of the spent output.
530505 pub amount : Amount ,
@@ -546,7 +521,6 @@ pub struct SpendActivity {
546521
547522/// Models a 'receive' activity event. Part of `getdescriptoractivity`
548523#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
549- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
550524pub struct ReceiveActivity {
551525 /// The total amount in BTC of the new output.
552526 pub amount : Amount ,
@@ -564,37 +538,30 @@ pub struct ReceiveActivity {
564538
565539/// Models the result of JSON-RPC method `getdifficulty`.
566540#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
567- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
568541pub struct GetDifficulty ( pub f64 ) ;
569542
570543/// Models the result of JSON-RPC method `getmempoolancestors` with verbose set to false.
571544#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
572- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
573545pub struct GetMempoolAncestors ( pub Vec < Txid > ) ;
574546
575547/// Models the result of JSON-RPC method `getmempoolancestors` with verbose set to true.
576548#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
577- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
578549pub struct GetMempoolAncestorsVerbose ( pub BTreeMap < Txid , MempoolEntry > ) ;
579550
580551/// Models the result of JSON-RPC method `getmempooldescendants` with verbose set to false.
581552#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
582- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
583553pub struct GetMempoolDescendants ( pub Vec < Txid > ) ;
584554
585555/// Models the result of JSON-RPC method `getmempooldescendants` with verbose set to true.
586556#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
587- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
588557pub struct GetMempoolDescendantsVerbose ( pub BTreeMap < Txid , MempoolEntry > ) ;
589558
590559/// Models the result of JSON-RPC method `getmempoolentry`.
591560#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
592- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
593561pub struct GetMempoolEntry ( pub MempoolEntry ) ;
594562
595563/// Mempool data. Part of `getmempoolentry`.
596564#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
597- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
598565pub struct MempoolEntry {
599566 /// Virtual transaction size as defined in BIP 141. v0.19 and later only.
600567 ///
@@ -637,7 +604,6 @@ pub struct MempoolEntry {
637604
638605/// Fee object. Part of `getmempoolentry`.
639606#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
640- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
641607pub struct MempoolEntryFees {
642608 /// Transaction fee in BTC.
643609 pub base : Amount ,
@@ -651,7 +617,6 @@ pub struct MempoolEntryFees {
651617
652618/// Models the result of JSON-RPC method `getmempoolinfo` with verbose set to true.
653619#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
654- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
655620pub struct GetMempoolInfo {
656621 /// True if the mempool is fully loaded. v0.19 and later only.
657622 pub loaded : Option < bool > ,
@@ -685,17 +650,14 @@ pub struct GetMempoolInfo {
685650
686651/// Models the result of JSON-RPC method `getrawmempool` with verbose set to false.
687652#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
688- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
689653pub struct GetRawMempool ( pub Vec < Txid > ) ;
690654
691655/// Models the result of JSON-RPC method `getrawmempool` with verbose set to true.
692656#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
693- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
694657pub struct GetRawMempoolVerbose ( pub BTreeMap < Txid , MempoolEntry > ) ;
695658
696659/// Models the result of JSON-RPC method `gettxout`.
697660#[ derive( Clone , Debug , PartialEq , Eq , Deserialize , Serialize ) ]
698- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
699661pub struct GetTxOut {
700662 /// The hash of the block at the tip of the chain.
701663 pub best_block : BlockHash ,
@@ -713,7 +675,6 @@ pub struct GetTxOut {
713675
714676/// Models the result of JSON-RPC method `gettxoutsetinfo`.
715677#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
716- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
717678pub struct GetTxOutSetInfo {
718679 /// The current block height (index).
719680 pub height : u32 ,
@@ -740,12 +701,10 @@ pub struct GetTxOutSetInfo {
740701
741702/// Models the result of JSON-RPC method `gettxspendingprevout`.
742703#[ derive( Clone , Debug , PartialEq , Eq , Deserialize , Serialize ) ]
743- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
744704pub struct GetTxSpendingPrevout ( pub Vec < GetTxSpendingPrevoutItem > ) ;
745705
746706/// A transaction item. Part of `gettxspendingprevout`.
747707#[ derive( Clone , Debug , PartialEq , Eq , Deserialize , Serialize ) ]
748- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
749708pub struct GetTxSpendingPrevoutItem {
750709 /// The outpoint containing the transaction id and vout value of the checked output.
751710 pub outpoint : OutPoint ,
@@ -755,7 +714,6 @@ pub struct GetTxSpendingPrevoutItem {
755714
756715/// Models the result of JSON-RPC method `loadtxoutset`.
757716#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
758- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
759717pub struct LoadTxOutSet {
760718 /// The number of coins loaded from the snapshot.
761719 pub coins_loaded : Amount ,
@@ -780,5 +738,4 @@ pub struct ScanBlocksStart {
780738
781739/// Models the result of JSON-RPC method `verifytxoutproof`.
782740#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
783- #[ cfg_attr( feature = "serde-deny-unknown-fields" , serde( deny_unknown_fields) ) ]
784741pub struct VerifyTxOutProof ( pub Vec < Txid > ) ;
0 commit comments