Trustline Events
Trust lines are the authorization mechanism on the XRPL that links an account to a token issuer. An account must hold an open trust line before it can receive or hold any issued token. XRNotify tracks trust line creation, modification, and removal across the entire ledger.
trustline.created
TrustSet (new)Fires when a TrustSet transaction creates a brand new trust line with a non-zero limit. This signals that an account has opted in to holding a specific issued token from a specific issuer.
Payload schema
| Field | Type | Description |
|---|---|---|
| account | string | Account address that created the trust line |
| issuer | string | Account address of the token issuer being trusted |
| currency | string | Currency code — 3-letter ASCII or 40-character hex |
| limit | string | Maximum token amount the account is willing to hold (decimal string) |
| balance | string | Current token balance (typically "0" on creation) |
| no_ripple | boolean | True if rippling (token routing) is disabled on this trust line |
| freeze | boolean | True if the issuer has frozen this trust line |
| authorized | boolean | True if the issuer has authorized this trust line (required for tokens with RequireAuth enabled) |
| ledger_index | number | Ledger in which the trust line was created |
| tx_hash | string | Transaction hash of the TrustSet transaction |
Example payload
{
"event_id": "xrpl:89570000:C5D6E7F8A9B0:trustline.created",
"event_type": "trustline.created",
"ledger_index": 89570000,
"timestamp": "2024-01-15T16:00:00Z",
"network": "mainnet",
"payload": {
"account": "rN7n3473SaZBCG4dFL83w7PB2bBdDiAkzN",
"issuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq",
"currency": "USD",
"limit": "10000",
"balance": "0",
"no_ripple": true,
"freeze": false,
"authorized": false,
"ledger_index": 89570000,
"tx_hash": "C5D6E7F8A9B0C5D6E7F8A9B0C5D6E7F8A9B0C5D6E7F8A9B0C5D6E7F8A9B0C5D6"
}
}trustline.modified
TrustSet (update)Fires when a TrustSet transaction changes an existing trust line — for example, updating the limit amount, toggling the NoRipple flag, or when an issuer freezes or unfreezes the line. The payload includes both the new values and the previous values so you can see exactly what changed.
Freeze note: When freeze: true appears in this event, the issuer has frozen this trust line. The account cannot send tokens until the issuer unfreezes it, though they can still receive tokens.
Payload schema
All fields from trustline.created are present, plus the following "previous" fields showing what changed:
| Field | Type | Description |
|---|---|---|
| previous_limit | string | Trust line limit before this transaction |
| previous_no_ripple | boolean | NoRipple flag value before this transaction |
| previous_freeze | boolean | Freeze flag value before this transaction |
Example payload
{
"event_id": "xrpl:89572000:D6E7F8A9B0C1:trustline.modified",
"event_type": "trustline.modified",
"ledger_index": 89572000,
"timestamp": "2024-01-15T16:30:00Z",
"network": "mainnet",
"payload": {
"account": "rN7n3473SaZBCG4dFL83w7PB2bBdDiAkzN",
"issuer": "rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq",
"currency": "USD",
"limit": "50000",
"balance": "250.00",
"no_ripple": true,
"freeze": false,
"authorized": false,
"previous_limit": "10000",
"previous_no_ripple": true,
"previous_freeze": false,
"ledger_index": 89572000,
"tx_hash": "D6E7F8A9B0C1D6E7F8A9B0C1D6E7F8A9B0C1D6E7F8A9B0C1D6E7F8A9B0C1D6E7"
}
}trustline.deleted
TrustSet (remove)Fires when a trust line is removed from the ledger. This happens when an account submits a TrustSet with a limit of 0 and the balance is also 0, or when the balance reaches 0 and the ledger automatically removes the trust line object to reclaim the reserve.
Payload schema
| Field | Type | Description |
|---|---|---|
| account | string | Account that held the trust line |
| issuer | string | Issuer address the trust line was with |
| currency | string | Currency code of the removed trust line |
| final_balance | string | Token balance at the time of deletion (should be "0") |
| ledger_index | number | Ledger in which the trust line was deleted |
| tx_hash | string | Transaction hash |