Skip to content

Commit b8f84ad

Browse files
authored
Merge pull request #10 from Inon123/feat/account_info
change ledger response support unclose block
2 parents 4f95040 + 7d024ab commit b8f84ad

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

xrpl_api/src/api/ledger.rs

+14-14
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ impl LedgerExpandRequest {
8686
#[derive(Debug, Deserialize)]
8787
pub struct LedgerResponse<TransactionType> {
8888
/// Unique identifying hash of the entire ledger.
89-
pub ledger_hash: String,
89+
pub ledger_hash: Option<String>,
9090
/// The Ledger Index of this ledger.
91-
pub ledger_index: u32,
91+
pub ledger_index: Option<u32>,
9292
/// (May be omitted) If true, this is a validated ledger version. If omitted or set to false, this ledger's data is not final.
93-
pub validated: bool,
93+
pub validated: Option<bool>,
9494
/// (Omitted unless requested with the queue parameter) Array of objects describing queued transactions, in the same order as the queue.
9595
/// If the request specified expand as true, members contain full representations of the transactions, in either JSON or binary depending on whether the request specified binary as true.
9696
pub queue_data: Option<u64>,
@@ -101,28 +101,28 @@ pub struct LedgerResponse<TransactionType> {
101101
#[derive(Debug, Deserialize)]
102102
pub struct Ledger<TransactionType> {
103103
/// Hash of all account state information in this ledger, as hex.
104-
pub account_hash: String,
105-
pub close_flags: u64,
104+
pub account_hash: Option<String>,
105+
pub close_flags: Option<u64>,
106106
/// The time this ledger was closed, in seconds since the Ripple Epoch.
107-
pub close_time: u64,
107+
pub close_time: Option<u64>,
108108
/// The time this ledger was closed, in human-readable format. Always uses the UTC time zone.
109-
pub close_time_human: String,
109+
pub close_time_human: Option<String>,
110110
/// Ledger close times are rounded to within this many seconds.
111-
pub close_time_resolution: u64,
111+
pub close_time_resolution: Option<u64>,
112112
/// Whether or not this ledger has been closed.
113113
pub closed: bool,
114114
/// Unique identifying hash of the entire ledger.
115-
pub ledger_hash: String,
115+
pub ledger_hash: Option<String>,
116116
/// The Ledger Index of this ledger, as a quoted integer.
117-
pub ledger_index: String,
117+
pub ledger_index: Option<String>,
118118
/// The time at which the previous ledger was closed.
119-
pub parent_close_time: u64,
119+
pub parent_close_time: Option<u64>,
120120
/// Unique identifying hash of the ledger that came immediately before this one.
121-
pub parent_hash: String,
121+
pub parent_hash: Option<String>,
122122
/// Total number of XRP drops in the network, as a quoted integer. (This decreases as transaction costs destroy XRP.)
123-
pub total_coins: String,
123+
pub total_coins: Option<String>,
124124
/// Hash of the transaction information included in this ledger, as hex
125-
pub transaction_hash: String,
125+
pub transaction_hash: Option<String>,
126126
/// (Omitted unless requested) Transactions applied in this ledger version.
127127
/// By default, members are the transactions' identifying Hash strings. If the request specified expand as true,
128128
/// members are full representations of the transactions instead,

0 commit comments

Comments
 (0)