Skip to content

TrustSet

[Source]

{
"TransactionType": "TrustSet",
"Account": "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX",
"Fee": "12",
"Flags": 262144,
"LastLedgerSequence": 8007750,
"LimitAmount": {
"currency": "USD",
"issuer": "rsP3mgGb2tcYUrxiLFiHJiQXhsziegtwBc",
"value": "100"
},
"Sequence": 12
}
FieldJSON TypeInternal TypeDescription
LimitAmountObjectAmountObject defining the trust line to create or modify, in the format of a Currency Amount.
LimitAmount.currencyString(Amount.currency)The currency to this trust line applies to, as a three-letter ISO 4217 Currency Code or a 160-bit hex value according to currency format. “XAH” is invalid.
LimitAmount.valueString(Amount.value)Quoted decimal representation of the limit to set on this trust line.
LimitAmount.issuerString(Amount.issuer)The address of the account to extend trust to.
QualityInNumberUInt32(Optional) Value incoming balances on this trust line at the ratio of this number per 1,000,000,000 units. A value of 0 is shorthand for treating balances at face value.
QualityOutNumberUInt32(Optional) Value outgoing balances on this trust line at the ratio of this number per 1,000,000,000 units. A value of 0 is shorthand for treating balances at face value.

If the account specified in LimitAmount.issuer is blocking incoming trust lines, the transaction fails with the result code tecNO_PERMISSION. (Requires the [DisallowIncoming amendment][] :not_enabled:)

Transactions of the TrustSet type support additional values in the Flags field, as follows:

Flag NameHex ValueDecimal ValueDescription
tfSetfAuth0x0001000065536Authorize the other party to hold currency issued by this account. (No effect unless using the asfRequireAuth AccountSet flag.) Cannot be unset.
tfSetNoRipple0x00020000131072Enable the No Ripple flag, which blocks rippling between two trust lines of the same currency if this flag is enabled on both.
tfClearNoRipple0x00040000262144Disable the No Ripple flag, allowing rippling on this trust line.
tfSetFreeze0x001000001048576Freeze the trust line.
tfClearFreeze0x002000002097152Unfreeze the trust line.
tfSetDeepFreeze0x004000004194304Deep freeze the trust line. (Requires the DeepFreeze amendment)
tfClearDeepFreeze0x008000008388608Clear a deep-freeze on the trust line. (Requires the DeepFreeze amendment)

If a transaction tries to enable No Ripple but cannot, it fails with the result code tecNO_PERMISSION. Before the [fix1578 amendment][] became enabled, such a transaction would result in tesSUCCESS (making any other changes it could) instead.

The Auth flag of a trust line does not determine whether the trust line counts towards its owner’s XAH reserve requirement. However, an enabled Auth flag prevents the trust line from being in its default state. An authorized trust line can never be deleted. An issuer can pre-authorize a trust line with the tfSetfAuth flag only, even if the limit and balance of the trust line are 0.

With the DeepFreeze amendment enabled, the following rules apply to deep freeze operations:

A TrustSet transaction trying to set tfSetDeepFreeze succeeds if and only if one of the following is true:

  • The holder is already frozen, indicated by lsfLowFreeze/lsfHighFreeze on the trust line.
  • tfSetFreeze is also set in the same TrustSet transaction.

If the trust line is deep-frozen by the issuer (indicated by lsfLowDeepFreeze/lsfHighDeepFreeze), the TrustSet transaction fails if the issuer sets the tfClearFreeze flag without also setting the tfClearDeepFreeze flag. In other words, the issuer cannot clear the regular freeze on a trust line without also clearing the deep freeze.

See High vs. Low Account for information about how the low and high accounts are determined.