Unified Trustline

Event type triggered when a trustline is created, updated, or removed on the Stellar or XRP Ledger networks.

The unified_trustline is a Stellar-specific event type that tracks trustline changes on the Stellar network. A trustline is an explicit opt-in by a Stellar account to hold a particular asset issued by another account.

This event is triggered when:

  • A customer has a rule with the address variable type, and the variable contains the trustline address (data.address) as its value.
  • A trustline is created, updated, or removed on the Stellar blockchain.

Supported Protocols

  • stellar/mainnet
  • stellar/testnet
  • xrp/mainnet
  • xrp/testnet

Schema

{
  "id": "string",
  "protocol": "string",
  "network": "string",
  "chain_id": "string",
  "event_type": "unified_trustline",
  "data": {
    "address": "string",
    "asset": "object",
    "balance": "integer",
    "flags": "integer",
    "limit": "string"
  }
}
FieldTypeDescription
idstringUnique identifier for the event message.
protocolstringThe blockchain protocol (stellar or xrp).
networkstringThe network name (e.g. mainnet, testnet).
chain_idstringThe CAIP-2 chain identifier (e.g. stellar:pubnet).
event_typestringAlways unified_trustline for this event type.

data Object

FieldTypeDescription
addressstringThe account address that holds the trustline.
assetobject or stringOn Stellar, an object with a key indicating the asset type (e.g. credit_alphanum12) and nested asset_code/issuer fields. On XRP Ledger, a single currency:issuer string instead.
balanceintegerThe current balance of the asset held by the account. On Stellar this is in stroops (1 stroop = 0.0000001 XLM); on XRP Ledger it can be negative, representing the account's net position on that trustline.
flagsintegerTrustline flags set by the asset issuer. See the Stellar trustline flags documentation for possible values.
limitstringThe maximum amount of the asset the account is willing to hold. Only present on Stellar — see the note below for how XRP Ledger represents limits.
📘

Info

XRP Ledger doesn't use a single limit field. Instead, its data includes a limits array with low/high entries (one per side of the trust line) and block_number/block_hash, since a trustline update on XRP Ledger is tied to a specific ledger. See the XRP Ledger example below.

This schema applies to the UNIFIED_V1 and UNIFIED_V1_RAW templates. ALL_DATA returns the chain's native trustline payload unmodified, with its own fields, shown below per protocol.

Examples

Stellar

MainnetTestnet

Stellar's raw trustline entry is a full Soroban/Horizon TrustLineEntry: account_id maps to address, and the ext object (liabilities, liquidity_pool_use_count) is dropped from the unified schema since it's implementation detail rather than trustline state.

{
  "id": "a1d36d63-0ccf-5656-9db7-7da7c9d5904a",
  "chain_id": "stellar:pubnet",
  "protocol": "stellar",
  "network": "mainnet",
  "event_type": "unified_trustline",
  "data": {
    "address": "GCROB2O5QFBJ7DZZ6FMJNMGVCF7TGGJMUMY56G6LMTNTQ3FLCJ6XBDTR",
    "asset": {
      "credit_alphanum12": {
        "asset_code": "R3FL3cT",
        "issuer": "GDKS7XTNEVCPGVUT2ZPPOU5CHHF3NH6NX7P3ROSFSDAO6NQDS3C74Y6C"
      }
    },
    "balance": 1777516540065984300,
    "flags": 1,
    "limit": "9223372036854775807"
  }
}

👋 Need Help?

Contact us through email or our support page for any issues, bugs, or assistance you may need.


Did this page help you?