Class LedgerStreamResponse
This response mirrors the LedgerStream, except it does NOT include the 'type' nor 'txn_count' fields.
Inherited Members
Namespace: Xrpl.Models.Methods
Assembly: Xrpl.dll
Syntax
public class LedgerStreamResponse : BaseResponse
Remarks
Models the subscribe command's own synchronous reply when the client subscribes to
the ledger stream (rippled NetworkOpsImp::subLedger), a different code path
from the async ledgerClosed push that LedgerStream models. There,
ledger_index/reserve_base/reserve_inc (with ledger_hash,
ledger_time and fee_base) are all gated on
ledgerMaster_.getValidatedLedger() returning non-null - if the node has no validated
ledger yet, the initial reply omits every one of them.
Properties
| Edit this page View SourceFeeBase
The reference transaction cost as of this ledger version, in drops of XRP.
If this ledger version includes a SetFee pseudo-transaction the new transaction cost applies starting with the following ledger version.
Declaration
[JsonPropertyName("fee_base")]
public uint? FeeBase { get; set; }
Property Value
| Type | Description |
|---|---|
| uint? |
Remarks
See LedgerIndex remarks - same conditional gate.
FeeRef
The reference transaction cost in "fee units".
Declaration
[JsonPropertyName("fee_ref")]
public uint? FeeRef { get; set; }
Property Value
| Type | Description |
|---|---|
| uint? |
Remarks
Doubly conditional in NetworkOpsImp::subLedger: inside the
getValidatedLedger() gate AND only when the XRPFees amendment is disabled.
Since that amendment is active on mainnet, a current node never sends this field.
LedgerHash
The identifying hash of the ledger version that was closed.
Declaration
[JsonPropertyName("ledger_hash")]
public string LedgerHash { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
LedgerIndex
The ledger index of the ledger that was closed.
Declaration
[JsonPropertyName("ledger_index")]
public ulong? LedgerIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| ulong? |
Remarks
rippled's NetworkOpsImp::subLedger only sets this (with ledger_hash,
reserve_base and reserve_inc below) when
ledgerMaster_.getValidatedLedger() returns a ledger; a node with no validated
ledger yet omits it from the initial subscribe reply.
LedgerTime
The time this ledger was closed, in seconds since the Ripple Epoch
Declaration
[JsonPropertyName("ledger_time")]
public ulong? LedgerTime { get; set; }
Property Value
| Type | Description |
|---|---|
| ulong? |
Remarks
See LedgerIndex remarks - same conditional gate.
ReserveBase
The minimum reserve, in drops of XRP, that is required for an account.
If this ledger version includes a SetFee pseudo-transaction the new base reserve applies starting with the following ledger version.
Declaration
[JsonPropertyName("reserve_base")]
public uint? ReserveBase { get; set; }
Property Value
| Type | Description |
|---|---|
| uint? |
Remarks
See LedgerIndex remarks - same conditional gate.
ReserveInc
The owner reserve for each object an account owns in the ledger, in drops of XRP.
If the ledger includes a SetFee pseudo-transaction the new owner reserve applies after this ledger.
Declaration
[JsonPropertyName("reserve_inc")]
public uint? ReserveInc { get; set; }
Property Value
| Type | Description |
|---|---|
| uint? |
Remarks
See LedgerIndex remarks - same conditional gate.
TxnCount
Number of new transactions included in this ledger version.
Declaration
[JsonPropertyName("txn_count")]
public uint? TxnCount { get; set; }
Property Value
| Type | Description |
|---|---|
| uint? |
Remarks
Never sent on this path at all: NetworkOpsImp::subLedger emits no
txn_count, which is what this type's own summary says. Only the asynchronous
ledgerClosed push (LedgerStream) carries it.
UnknownFields
Members of the subscribe reply's result that no declared property claims
- for example
network_id, whichNetworkOpsImp::subLedgersets unconditionally (NetworkOPs.cpp) alongsideledger_hash/ledger_index. BaseResponse carries no capture of its own (itsid/resultmembers are byte-range slices, not parsed values), so this class declares one directly rather than inheriting it - mirroring UnknownFields for the RPC-result family.
Declaration
[JsonExtensionData]
public Dictionary<string, JsonElement> UnknownFields { get; set; }
Property Value
| Type | Description |
|---|---|
| Dictionary<string, JsonElement> |
ValidatedLedgers
(May be omitted) Range of ledgers that the server has available.
This may be a disjoint sequence such as 24900901-24900984,24901116-24901158.
This field is not returned if the server is not connected to the network, or if it is connected but has not yet obtained a ledger from the network.
Declaration
[JsonPropertyName("validated_ledgers")]
public string ValidatedLedgers { get; set; }
Property Value
| Type | Description |
|---|---|
| string |