TrustSet
Create or modify a trust line linking two accounts.
Example
Field | JSON Type | [Internal Type][] | Description |
---|---|---|---|
| Object | Amount | Object defining the trust line to create or modify, in the format of a [Currency Amount][]. |
| String | (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. |
| String | (Amount.value) | Quoted decimal representation of the limit to set on this trust line. |
| String | (Amount.issuer) | The address of the account to extend trust to. |
| Number | UInt32 | (Optional) Value incoming balances on this trust line at the ratio of this number per 1,000,000,000 units. A value of |
| Number | UInt32 | (Optional) Value outgoing balances on this trust line at the ratio of this number per 1,000,000,000 units. A value of |
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:)
TrustSet Flags
Transactions of the TrustSet type support additional values in the Flags
field, as follows:
Flag Name | Hex Value | Decimal Value | Description |
---|---|---|---|
|
| 65536 | Authorize the other party to hold currency issued by this account. (No effect unless using the |
|
| 131072 | Enable the No Ripple flag, which blocks rippling between two trust lines of the same currency if this flag is enabled on both. |
|
| 262144 | Disable the No Ripple flag, allowing rippling on this trust line. |
|
| 1048576 | Freeze the trust line. |
|
| 2097152 | Unfreeze the trust line. |
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.
Last updated