Skip to content

Commit 41ba946

Browse files
committed
Rename some fields for readability
1 parent 9fa612d commit 41ba946

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

types/src/v18/blockchain/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ pub struct ScanTxOutSetUnspent {
9696
#[serde(rename = "scriptPubKey")]
9797
pub script_pubkey: String,
9898
/// A specialized descriptor for the matched scriptPubKey
99-
pub desc: String,
99+
#[serde(rename = "desc")]
100+
pub descriptor: String,
100101
/// The total amount in BTC of unspent output
101102
pub amount: f64,
102103
/// Height of the unspent transaction output

types/src/v19/blockchain/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,8 @@ pub struct ScanTxOutSetStart {
358358
/// The current block height (index)
359359
pub height: u64,
360360
/// The hash of the block at the tip of the chain
361-
pub bestblock: String,
361+
#[serde(rename = "bestblock")]
362+
pub best_block: String,
362363
/// The unspents
363364
pub unspents: Vec<ScanTxOutSetUnspent>,
364365
/// The total amount of all found unspent outputs in BTC
@@ -375,7 +376,8 @@ pub struct ScanTxOutSetUnspent {
375376
#[serde(rename = "scriptPubKey")]
376377
pub script_pubkey: String,
377378
/// An output descriptor
378-
pub desc: String,
379+
#[serde(rename = "desc")]
380+
pub descriptor: String,
379381
/// The total amount in BTC of unspent output
380382
pub amount: f64,
381383
/// Height of the unspent transaction output

types/src/v25/blockchain/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ pub struct ScanTxOutSetStart {
461461
/// The current block height (index)
462462
pub height: u64,
463463
/// The hash of the block at the tip of the chain
464-
pub bestblock: String,
464+
#[serde(rename = "bestblock")]
465+
pub best_block: String,
465466
/// The unspents
466467
pub unspents: Vec<ScanTxOutSetUnspent>,
467468
/// The total amount of all found unspent outputs in BTC
@@ -478,7 +479,8 @@ pub struct ScanTxOutSetUnspent {
478479
#[serde(rename = "scriptPubKey")]
479480
pub script_pubkey: String,
480481
/// An output descriptor
481-
pub desc: String,
482+
#[serde(rename = "desc")]
483+
pub descriptor: String,
482484
/// The total amount in BTC of unspent output
483485
pub amount: f64,
484486
/// Whether this is a coinbase output

types/src/v28/blockchain/mod.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,8 @@ pub struct ScanTxOutSetStart {
122122
/// The current block height (index)
123123
pub height: u64,
124124
/// The hash of the block at the tip of the chain
125-
pub bestblock: String,
125+
#[serde(rename = "bestblock")]
126+
pub best_block: String,
126127
/// The unspents
127128
pub unspents: Vec<ScanTxOutSetUnspent>,
128129
/// The total amount of all found unspent outputs in BTC
@@ -139,15 +140,17 @@ pub struct ScanTxOutSetUnspent {
139140
#[serde(rename = "scriptPubKey")]
140141
pub script_pubkey: String,
141142
/// An output descriptor
142-
pub desc: String,
143+
#[serde(rename = "desc")]
144+
pub descriptor: String,
143145
/// The total amount in BTC of unspent output
144146
pub amount: f64,
145147
/// Whether this is a coinbase output
146148
pub coinbase: bool,
147149
/// Height of the unspent transaction output
148150
pub height: u64,
149151
/// Blockhash of the unspent transaction output
150-
pub blockhash: String,
152+
#[serde(rename = "blockhash")]
153+
pub block_hash: String,
151154
/// Number of confirmations of the unspent transaction output when the scan was done
152155
pub confirmations: u64,
153156
}

0 commit comments

Comments
 (0)