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
addressvariable 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/mainnetstellar/testnetxrp/mainnetxrp/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"
}
}| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the event message. |
protocol | string | The blockchain protocol (stellar or xrp). |
network | string | The network name (e.g. mainnet, testnet). |
chain_id | string | The CAIP-2 chain identifier (e.g. stellar:pubnet). |
event_type | string | Always unified_trustline for this event type. |
data Object
data Object| Field | Type | Description |
|---|---|---|
address | string | The account address that holds the trustline. |
asset | object or string | On 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. |
balance | integer | The 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. |
flags | integer | Trustline flags set by the asset issuer. See the Stellar trustline flags documentation for possible values. |
limit | string | The 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. |
InfoXRP Ledger doesn't use a single
limitfield. Instead, itsdataincludes alimitsarray withlow/highentries (one per side of the trust line) andblock_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
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.
Updated 10 days ago
