@@ -505,6 +505,63 @@ pub struct Bip9Statistics {
505505 pub possible : Option < bool > ,
506506}
507507
508+ /// Models the result of the JSON-RPC method `getdescriptoractivity`.
509+ #[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
510+ #[ serde( deny_unknown_fields) ]
511+ pub struct GetDescriptorActivity {
512+ /// A list of activity events related to the descriptors.
513+ pub activity : Vec < ActivityEntry > ,
514+ }
515+
516+ /// A spend or receive activity entry. Part of `getdescriptoractivity`.
517+ #[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
518+ pub enum ActivityEntry {
519+ /// The spend activity using `model::SpendActivity`.
520+ Spend ( SpendActivity ) ,
521+ /// The receive activity using `model::ReceiveActivity`.
522+ Receive ( ReceiveActivity ) ,
523+ }
524+
525+ /// Models a 'spend' activity event. Part of `getdescriptoractivity`.
526+ #[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
527+ #[ serde( deny_unknown_fields) ]
528+ pub struct SpendActivity {
529+ /// The total amount of the spent output.
530+ pub amount : Amount ,
531+ /// The blockhash (omitted if unconfirmed).
532+ pub block_hash : Option < BlockHash > ,
533+ /// Height of the spend (omitted if unconfirmed).
534+ pub height : Option < u32 > ,
535+ /// The txid of the spending transaction.
536+ pub spend_txid : Txid ,
537+ /// The vout of the spend.
538+ pub spend_vout : u32 ,
539+ /// The txid of the prevout.
540+ pub prevout_txid : Txid ,
541+ /// The vout of the prevout.
542+ pub prevout_vout : u32 ,
543+ /// The prev scriptPubKey.
544+ pub prevout_spk : ScriptPubkey ,
545+ }
546+
547+ /// Models a 'receive' activity event. Part of `getdescriptoractivity`
548+ #[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
549+ #[ serde( deny_unknown_fields) ]
550+ pub struct ReceiveActivity {
551+ /// The total amount in BTC of the new output.
552+ pub amount : Amount ,
553+ /// The block that this receive is in (omitted if unconfirmed).
554+ pub block_hash : Option < BlockHash > ,
555+ /// The height of the receive (omitted if unconfirmed).
556+ pub height : Option < u32 > ,
557+ /// The txid of the receiving transaction.
558+ pub txid : Txid ,
559+ /// The vout of the receiving output.
560+ pub vout : u32 ,
561+ /// The ScriptPubKey.
562+ pub output_spk : ScriptPubkey ,
563+ }
564+
508565/// Models the result of JSON-RPC method `getdifficulty`.
509566#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
510567#[ serde( deny_unknown_fields) ]
@@ -696,68 +753,6 @@ pub struct GetTxSpendingPrevoutItem {
696753 pub spending_txid : Option < Txid > ,
697754}
698755
699- /// Models the result of JSON-RPC method `verifytxoutproof`.
700- #[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
701- #[ serde( deny_unknown_fields) ]
702- pub struct VerifyTxOutProof ( pub Vec < Txid > ) ;
703-
704- /// Models the result of the JSON-RPC method `getdescriptoractivity`.
705- #[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
706- #[ serde( deny_unknown_fields) ]
707- pub struct GetDescriptorActivity {
708- /// A list of activity events related to the descriptors.
709- pub activity : Vec < ActivityEntry > ,
710- }
711-
712- /// A spend or receive activity entry. Part of `getdescriptoractivity`.
713- #[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
714- pub enum ActivityEntry {
715- /// The spend activity using `model::SpendActivity`.
716- Spend ( SpendActivity ) ,
717- /// The receive activity using `model::ReceiveActivity`.
718- Receive ( ReceiveActivity ) ,
719- }
720-
721- /// Models a 'spend' activity event. Part of `getdescriptoractivity`.
722- #[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
723- #[ serde( deny_unknown_fields) ]
724- pub struct SpendActivity {
725- /// The total amount of the spent output.
726- pub amount : Amount ,
727- /// The blockhash (omitted if unconfirmed).
728- pub block_hash : Option < BlockHash > ,
729- /// Height of the spend (omitted if unconfirmed).
730- pub height : Option < u32 > ,
731- /// The txid of the spending transaction.
732- pub spend_txid : Txid ,
733- /// The vout of the spend.
734- pub spend_vout : u32 ,
735- /// The txid of the prevout.
736- pub prevout_txid : Txid ,
737- /// The vout of the prevout.
738- pub prevout_vout : u32 ,
739- /// The prev scriptPubKey.
740- pub prevout_spk : ScriptPubkey ,
741- }
742-
743- /// Models a 'receive' activity event. Part of `getdescriptoractivity`
744- #[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
745- #[ serde( deny_unknown_fields) ]
746- pub struct ReceiveActivity {
747- /// The total amount in BTC of the new output.
748- pub amount : Amount ,
749- /// The block that this receive is in (omitted if unconfirmed).
750- pub block_hash : Option < BlockHash > ,
751- /// The height of the receive (omitted if unconfirmed).
752- pub height : Option < u32 > ,
753- /// The txid of the receiving transaction.
754- pub txid : Txid ,
755- /// The vout of the receiving output.
756- pub vout : u32 ,
757- /// The ScriptPubKey.
758- pub output_spk : ScriptPubkey ,
759- }
760-
761756/// Models the result of JSON-RPC method `loadtxoutset`.
762757#[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
763758#[ serde( deny_unknown_fields) ]
@@ -782,3 +777,8 @@ pub struct ScanBlocksStart {
782777 /// Blocks that may have matched a scanobject
783778 pub relevant_blocks : Vec < BlockHash > ,
784779}
780+
781+ /// Models the result of JSON-RPC method `verifytxoutproof`.
782+ #[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
783+ #[ serde( deny_unknown_fields) ]
784+ pub struct VerifyTxOutProof ( pub Vec < Txid > ) ;
0 commit comments