8
8
use std:: collections:: HashMap ;
9
9
10
10
use bitcoin:: { Amount , FeeRate , Txid , Wtxid } ;
11
- use serde:: { Deserialize , Serialize } ;
12
11
13
12
/// Models the result of JSON-RPC method `sendrawtransaction`.
14
- #[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
13
+ #[ derive( Clone , Debug , PartialEq ) ]
15
14
pub struct SendRawTransaction ( pub Txid ) ;
16
15
17
- #[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
16
+ #[ derive( Clone , Debug , PartialEq ) ]
18
17
pub struct SubmitPackage {
19
18
/// The transaction package result message. "success" indicates all transactions were accepted into or are already in the mempool.
20
19
pub package_msg : String ,
21
20
/// Transaction results keyed by [`Wtxid`].
22
- #[ serde( rename = "tx-results" ) ]
23
21
pub tx_results : HashMap < Wtxid , SubmitPackageTxResult > ,
24
22
/// List of txids of replaced transactions.
25
- #[ serde( rename = "replaced-transactions" ) ]
26
23
pub replaced_transactions : Vec < Txid > ,
27
24
}
28
25
29
26
/// Models the per-transaction result included in the JSON-RPC method `submitpackage`.
30
- #[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
27
+ #[ derive( Clone , Debug , PartialEq ) ]
31
28
pub struct SubmitPackageTxResult {
32
29
/// The transaction id.
33
30
pub txid : Txid ,
34
31
/// The [`Wtxid`] of a different transaction with the same [`Txid`] but different witness found in the mempool.
35
32
///
36
33
/// If set, this means the submitted transaction was ignored.
37
- #[ serde( rename = "other-wtxid" ) ]
38
34
pub other_wtxid : Option < Wtxid > ,
39
35
/// Sigops-adjusted virtual transaction size.
40
36
pub vsize : Option < usize > ,
@@ -45,20 +41,17 @@ pub struct SubmitPackageTxResult {
45
41
}
46
42
47
43
/// Models the fees included in the per-transaction result of the JSON-RPC method `submitpackage`.
48
- #[ derive( Clone , Debug , PartialEq , Deserialize , Serialize ) ]
44
+ #[ derive( Clone , Debug , PartialEq ) ]
49
45
pub struct SubmitPackageTxResultFees {
50
46
/// Transaction fee.
51
- #[ serde( rename = "base" ) ]
52
47
pub base_fee : Amount ,
53
48
/// The effective feerate.
54
49
///
55
50
/// Will be `None` if the transaction was already in the mempool.
56
51
///
57
52
/// For example, the package feerate and/or feerate with modified fees from the `prioritisetransaction` JSON-RPC method.
58
- #[ serde( rename = "effective-feerate" ) ]
59
53
pub effective_feerate : Option < FeeRate > ,
60
54
/// If [`Self::effective_feerate`] is provided, this holds the [`Wtxid`]s of the transactions
61
55
/// whose fees and vsizes are included in effective-feerate.
62
- #[ serde( rename = "effective-includes" ) ]
63
56
pub effective_includes : Vec < Wtxid > ,
64
57
}
0 commit comments