Show / Hide Table of Contents

Class BaseStream

Inheritance
object
BaseStream
LedgerStream
ValidationStream
BookChangesStream
ConsensusStream
ManifestStream
OrderBookStream
PathFindStream
PeerStatusStream
ServerStatusStream
TransactionStream
Namespace: Xrpl.Models.Subscriptions
Assembly: Xrpl.dll
Syntax
public class BaseStream

Properties

| Edit this page View Source

Raw

This event exactly as the node sent it.

Declaration
[JsonIgnore]
public RawJson Raw { get; }
Property Value
Type Description
RawJson
Remarks

Unlike a query response, a stream message carries no result envelope to slice a member out of — the frame passed to Xrpl.Models.Subscriptions.BaseStream.AttachFrame(byte[]) already is the event, so this spans the whole of it via Xrpl.Client.Json.JsonSlice.OfDocument(byte[]). Empty when the event was never paired with a frame (built by hand, or deserialized through a bare JsonSerializer.Deserialize call rather than the stream pipeline).

| Edit this page View Source

Type

consensusPhase indicates this is from the consensus stream
consensusPhase - type

Declaration
[JsonPropertyName("type")]
[JsonConverter(typeof(JsonStringEnumConverter))]
public ResponseStreamType? Type { get; set; }
Property Value
Type Description
ResponseStreamType?
Remarks

Nullable because absence is meaningful: an event built by hand rather than deserialized off the wire never had a type member to read. A non-nullable enum defaults to UNKNOWN (0), which JsonSerializer.Serialize then wrote back out as the literal member "type":"UNKNOWN" - a value the node never sent, fabricated purely because the CLR type could not represent "no type at all".

| Edit this page View Source

UnknownFields

Members of this stream event that no declared property on the concrete subclass claims

  • rippled sends several fields unconditionally on every push of a given stream (network_id on ledgerClosed/the ledger stream's subscribe reply, ctid and the account_history_* trio on transaction events) that no model here declared a property for, and they vanished on the way to a caller. Declared on the shared base, mirroring UnknownFields, UnknownFields and UnknownFields for their own families, so every stream type - LedgerStream, ValidationStream, TransactionStream - picks it up without repeating the attribute per class.
Declaration
[JsonExtensionData]
public Dictionary<string, JsonElement> UnknownFields { get; set; }
Property Value
Type Description
Dictionary<string, JsonElement>
Remarks

This is not a substitute for Raw: values here have already gone through JSON parsing (numbers, strings, nested objects as System.Text.Json.JsonElement), while Raw is the exact bytes the node sent. Use Raw when byte-for-byte fidelity matters; use this when a caller just needs to read a field the model does not yet declare - see UnknownFields's remarks for the retention cost of doing so.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX