@@ -53,7 +53,7 @@ pub struct GetBlockVerboseOne {
5353 pub nonce : u32 ,
5454 /// The bits.
5555 pub bits : CompactTarget ,
56- /// The difficulty target
56+ /// The difficulty target.
5757 pub target : Option < Target > , // Only from v29 onwards
5858 /// The difficulty.
5959 pub difficulty : f64 ,
@@ -78,7 +78,7 @@ pub struct GetBlockchainInfo {
7878 pub headers : u32 ,
7979 /// The hash of the currently best block.
8080 pub best_block_hash : BlockHash ,
81- /// The compact representation of the block difficulty target
81+ /// The compact representation of the block difficulty target.
8282 pub bits : Option < CompactTarget > , // Only from v29 onwards
8383 /// The difficulty target.
8484 pub target : Option < Target > , // Only from v29 onwards
@@ -227,7 +227,7 @@ pub struct GetBlockHeaderVerbose {
227227 pub nonce : u32 ,
228228 /// The target value below which the blockhash must lie.
229229 pub bits : CompactTarget ,
230- /// The difficulty target
230+ /// The difficulty target.
231231 pub target : Option < Target > , // Only from v29 onwards
232232 /// The difficulty.
233233 pub difficulty : f64 ,
@@ -508,24 +508,33 @@ pub struct GetDescriptorActivity {
508508 pub activity : Vec < ActivityEntry > ,
509509}
510510
511+ /// Enum representing either a spend or receive activity entry using model types.
512+ #[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
513+ pub enum ActivityEntry {
514+ /// The spend activity using `model::SpendActivity`.
515+ Spend ( SpendActivity ) ,
516+ /// The receive activity using `model::ReceiveActivity`.
517+ Receive ( ReceiveActivity ) ,
518+ }
519+
511520/// Models a 'spend' activity event with strongly typed fields.
512521#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
513522pub struct SpendActivity {
514- /// The total amount in BTC of the spent output, converted to `bitcoin::Amount` .
523+ /// The total amount of the spent output.
515524 pub amount : Amount ,
516- /// The blockhash (omitted if unconfirmed), parsed into `bitcoin::BlockHash` .
525+ /// The blockhash (omitted if unconfirmed).
517526 pub block_hash : Option < BlockHash > ,
518527 /// Height of the spend (omitted if unconfirmed).
519528 pub height : Option < u32 > ,
520- /// The txid of the spending transaction, parsed into `bitcoin::Txid` .
529+ /// The txid of the spending transaction.
521530 pub spend_txid : Txid ,
522531 /// The vout of the spend.
523532 pub spend_vout : u32 ,
524- /// The txid of the prevout, parsed into `bitcoin::Txid` .
533+ /// The txid of the prevout.
525534 pub prevout_txid : Txid ,
526535 /// The vout of the prevout.
527536 pub prevout_vout : u32 ,
528- /// The prev scriptPubKey, converted to `model::ScriptPubkey` .
537+ /// The prev scriptPubKey.
529538 pub prevout_spk : ScriptPubkey ,
530539}
531540
@@ -545,13 +554,3 @@ pub struct ReceiveActivity {
545554 /// The ScriptPubKey, converted to `model::ScriptPubkey`.
546555 pub output_spk : ScriptPubkey ,
547556}
548-
549- /// Enum representing either a spend or receive activity entry using model types.
550- #[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
551- #[ serde( tag = "type" , rename_all = "lowercase" ) ]
552- pub enum ActivityEntry {
553- /// The spend activity using `model::SpendActivity`.
554- Spend ( SpendActivity ) ,
555- /// The receive activity using `model::ReceiveActivity`.
556- Receive ( ReceiveActivity ) ,
557- }
0 commit comments