Show / Hide Table of Contents

Class TransactionStream

Many subscriptions result in messages about transactions, including the following: The transactions stream
The transactions_proposed stream
accounts subscriptions
accounts_proposed subscriptions
book (Order Book) subscriptions https://xrpl.org/subscribe.html#transaction-streams

Inheritance
object
BaseStream
TransactionStream
Implements
IAccountTransaction
Inherited Members
BaseStream.Type
BaseStream.Raw
BaseStream.UnknownFields
Namespace: Xrpl.Models.Subscriptions
Assembly: Xrpl.dll
Syntax
public class TransactionStream : BaseStream, IAccountTransaction

Properties

| Edit this page View Source

AccountHistoryBoundary

Present and true when this transaction is the last one of its ledger within an account_history stream - the marker a consumer batches on.

Declaration
[JsonPropertyName("account_history_boundary")]
public bool? AccountHistoryBoundary { get; set; }
Property Value
Type Description
bool?
| Edit this page View Source

AccountHistoryTxFirst

Present and true on the earliest transaction that ever touched the subscribed account, which is how a consumer knows the backfill has reached the end.

Declaration
[JsonPropertyName("account_history_tx_first")]
public bool? AccountHistoryTxFirst { get; set; }
Property Value
Type Description
bool?
| Edit this page View Source

AccountHistoryTxIndex

Position of this transaction within an account_history subscription, when the event comes from one.

Declaration
[JsonPropertyName("account_history_tx_index")]
public long? AccountHistoryTxIndex { get; set; }
Property Value
Type Description
long?
Remarks

Signed on purpose. rippled counts forward from zero while streaming new transactions (forwardTxIndex++, a uint32) and counts down through the same zero while backfilling history (txHistoryIndex--, NetworkOPs.cpp), so a backfilled event carries a negative index.

Declared rather than left to UnknownFields along with the two flags below: rippled sends all three on every event of such a subscription, and capture costs about 464 B per member because each unknown value is parsed into its own System.Text.Json.JsonDocument. Measured at ~796 B per event for the three together - paid on every transaction a wallet receives, which is the one path where that is least affordable.

| Edit this page View Source

CloseTimeIso

The ledger close time represented in ISO 8601 time format.

Declaration
[JsonPropertyName("close_time_iso")]
public DateTime? CloseTimeIso { get; set; }
Property Value
Type Description
Nullable
| Edit this page View Source

Ctid

The compact transaction identifier of this transaction, when rippled reports one.

Declaration
[JsonPropertyName("ctid")]
public string Ctid { get; set; }
Property Value
Type Description
string
Remarks

rippled's NetworkOpsImp::transJson writes this at the top level of the stream event (jvObj[jss::ctid] in NetworkOPs.cpp), not inside tx_json/transaction

  • unlike account_tx, which nests it inside the transaction envelope and lands on Ctid instead. A dedicated property rather than leaving it to UnknownFields: a wallet identifying "which transaction is this" needs it typed, the same way Hash is, not fished out of a dictionary.
| Edit this page View Source

EngineResult

String Transaction result code

Declaration
[JsonPropertyName("engine_result")]
public string EngineResult { get; set; }
Property Value
Type Description
string
| Edit this page View Source

EngineResultCode

Numeric transaction response code, if applicable.

Declaration
[JsonPropertyName("engine_result_code")]
public int EngineResultCode { get; set; }
Property Value
Type Description
int
| Edit this page View Source

EngineResultMessage

Human-readable explanation for the transaction response

Declaration
[JsonPropertyName("engine_result_message")]
public string EngineResultMessage { get; set; }
Property Value
Type Description
string
| Edit this page View Source

Hash

The unique hash identifier of the transaction.

Declaration
[JsonPropertyName("hash")]
public string Hash { get; set; }
Property Value
Type Description
string
Remarks

API v1 reports the hash inside the transaction envelope instead of at the top level, so it falls back to the deserialized transaction.

| Edit this page View Source

LedgerCurrentIndex

(Unvalidated transactions only) The ledger index of the current in-progress ledger version for which this transaction is currently proposed.

Declaration
[JsonPropertyName("ledger_current_index")]
public uint? LedgerCurrentIndex { get; set; }
Property Value
Type Description
uint?
| Edit this page View Source

LedgerHash

(Validated transactions only) The identifying hash of the ledger version that includes this transaction

Declaration
[JsonPropertyName("ledger_hash")]
public string LedgerHash { get; set; }
Property Value
Type Description
string
| Edit this page View Source

LedgerIndex

(Validated transactions only) The ledger index of the ledger version that includes this transaction.

Declaration
[JsonPropertyName("ledger_index")]
public ulong? LedgerIndex { get; set; }
Property Value
Type Description
ulong?
| Edit this page View Source

Meta

(Validated transactions only) The transaction metadata, which shows the exact outcome of the transaction in detail.

Declaration
[JsonPropertyName("meta")]
public Meta Meta { get; set; }
Property Value
Type Description
Meta
| Edit this page View Source

RawTransaction

The transaction exactly as the node sent it — tx_json under API v2, transaction under API v1.

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

Empty when this event was never paired with a frame, or the message carried neither envelope (a stream message reporting neither tx_json nor transaction).

| Edit this page View Source

Status

Declaration
[JsonPropertyName("status")]
public string Status { get; set; }
Property Value
Type Description
string
| Edit this page View Source

Transaction

The definition of the transaction in JSON format.

Declaration
[JsonPropertyName("tx_json")]
public TransactionResponse Transaction { get; set; }
Property Value
Type Description
TransactionResponse
Remarks

rippled wraps the transaction in tx_json under API v2 and in transaction under API v1; both envelopes populate this property. It is deserialized once, with the message that carries it - reading it back costs nothing.

| Edit this page View Source

Validated

If true, this transaction is included in a validated ledger and its outcome is final.
Responses from the transaction stream should always be validated.

Declaration
[JsonPropertyName("validated")]
public bool Validated { get; set; }
Property Value
Type Description
bool
| Edit this page View Source

Warnings

May be omitted) If this field is provided, it contains one or more Warnings Objects with important warnings.
For details, see API Warnings (https://xrpl.org/response-formatting.html#api-warnings)

Declaration
[JsonPropertyName("warnings")]
public object Warnings { get; set; }
Property Value
Type Description
object

Implements

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