@@ -115,40 +115,49 @@ pub enum Covenant {
115
115
#[ derive( Copy , Clone , PartialEq , Debug ) ]
116
116
#[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
117
117
#[ cfg_attr( feature = "bincode" , derive( Encode , Decode ) ) ]
118
- #[ cfg_attr( feature = "serde" , serde( rename_all = "snake_case" ) ) ]
118
+ #[ cfg_attr(
119
+ feature = "serde" ,
120
+ serde( rename_all = "snake_case" , tag = "reason" )
121
+ ) ]
119
122
pub enum RevokeReason {
120
- BidPsbt ( BidPsbtReason ) ,
121
123
/// Space was prematurely spent during the auctions phase
122
124
PrematureClaim ,
123
125
/// Space output was spent either by spending it directly
124
126
/// Space was transferred without following Input N => Output N+1 rule
125
127
BadSpend ,
126
128
Expired ,
129
+ #[ cfg_attr( feature = "serde" , serde( untagged) ) ]
130
+ BidPsbt ( BidPsbtReason )
127
131
}
128
132
129
133
#[ derive( Copy , Clone , PartialEq , Debug , Eq ) ]
130
134
#[ cfg_attr(
131
135
feature = "serde" ,
132
136
derive( Serialize , Deserialize ) ,
133
- serde( rename_all = "snake_case" )
137
+ serde( rename_all = "snake_case" , tag= "reason" )
134
138
) ]
135
139
#[ cfg_attr( feature = "bincode" , derive( Encode , Decode ) ) ]
136
140
pub enum RejectReason {
137
141
AlreadyExists ,
142
+ #[ cfg_attr( feature = "serde" , serde( untagged) ) ]
138
143
BidPsbt ( BidPsbtReason ) ,
139
144
}
140
145
141
146
#[ derive( Copy , Clone , Debug , PartialEq , Eq ) ]
142
147
#[ cfg_attr(
143
148
feature = "serde" ,
144
149
derive( Serialize , Deserialize ) ,
145
- serde( rename_all = "snake_case " )
150
+ serde( tag = "reason " )
146
151
) ]
147
152
#[ cfg_attr( feature = "bincode" , derive( Encode , Decode ) ) ]
148
153
pub enum BidPsbtReason {
154
+ #[ cfg_attr( feature = "serde" , serde( rename = "bid_psbt_required" ) ) ]
149
155
Required ,
156
+ #[ cfg_attr( feature = "serde" , serde( rename = "bid_psbt_low_bid_amount" ) ) ]
150
157
LowBidAmount ,
158
+ #[ cfg_attr( feature = "serde" , serde( rename = "bid_psbt_bad_signature" ) ) ]
151
159
BadSignature ,
160
+ #[ cfg_attr( feature = "serde" , serde( rename = "bid_psbt_output_spent" ) ) ]
152
161
OutputSpent ,
153
162
}
154
163
0 commit comments