Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Deliver XAH or IOU from a held payment to the recipient.
[Source]
Added by the [Escrow amendment][].
Owner
String
AccountID
Address of the source account that funded the held payment.
OfferSequence
Number
UInt32
(Optional) Transaction sequence of [EscrowCreate transaction][] that created the held payment to finish.
Condition
String
Blob
Fulfillment
String
Blob
EscrowID
String
Hash256
(Optional) The ID of the Escrow ledger object to finish, as a 64-character hexadecimal string.
Any account may submit an EscrowFinish transaction.
If the held payment has a FinishAfter
time, you cannot execute it before this time. Specifically, if the corresponding [EscrowCreate transaction][] specified a FinishAfter
time that is after the close time of the most recently-closed ledger, the EscrowFinish transaction fails.
If the held payment has a Condition
, you cannot execute it unless you provide a matching Fulfillment
for the condition.
You cannot execute a held payment after it has expired. Specifically, if the corresponding [EscrowCreate transaction][] specified a CancelAfter
time that is before the close time of the most recently-closed ledger, the EscrowFinish transaction fails.
Note: The minimum transaction cost to submit an EscrowFinish transaction increases if it contains a fulfillment. If the transaction has no fulfillment, the transaction cost is the standard 10 drops. If the transaction contains a fulfillment, the transaction cost is 330 [drops of XAH][] plus another 10 drops for every 16 bytes in size of the preimage.
In non-production networks, it may be possible to delete the destination account of a pending escrow. In this case, an attempt to finish the escrow fails with the result tecNO_TARGET
, but the escrow object remains unless it has expired normally. If another payment re-creates the destination account, the escrow can be finished successfully. The destination account of an escrow can only be deleted if the escrow was created before the fix1523 amendment became enabled. No such escrows exist in the production Xahau, so this edge case is not possible on the production Xahau. This edge case is also not possible in test networks that enable both fix1523 and Escrow amendments at the same time, which is the default when you start a new genesis ledger.
(Optional) Hex value matching the previously-supplied of the held payment.
(Optional) Hex value of the matching the held payment's Condition
.
An AccountDelete transaction deletes an account and any objects it owns in Xahau, if possible, sending the account's remaining XAH to a specified destination account.
[Source]
Added by the DeletableAccounts amendment
The DeletableAccounts amendment is not enabled at this time.
Destination
String - [Address][]
AccountID
The address of an account to receive any leftover XAH after deleting the sending account. Must be a funded account in the ledger, and must not be the sending account.
DestinationTag
Number
UInt32
(Optional) Arbitrary destination tag that identifies a hosted recipient or other information for the recipient of the deleted account's leftover XAH.
As an additional deterrent against ledger spam, the AccountDelete transaction requires a much higher than usual transaction cost: instead of the standard minimum of 0.00001 XAH, AccountDelete must destroy at least the owner reserve amount, currently 2 XRP. This discourages excessive creation of new accounts because the reserve requirement cannot be fully recouped by deleting the account.
The transaction cost always applies when a transaction is included in a validated ledger, even if the transaction fails to delete the account. (See Error Cases.) To greatly reduce the chances of paying the high transaction cost if the account cannot be deleted, submit the transaction with fail_hard
enabled.
Besides errors that can occur for all transactions, AccountDelete transactions can result in the following transaction result codes:
temDISABLED
Occurs if the DeletableAccounts amendment is not enabled.
temDST_IS_SRC
Occurs if the Destination
matches the sender of the transaction (Account
field).
tecDST_TAG_NEEDED
Occurs if the Destination
account requires a destination tag, but the DestinationTag
field was not provided.
tecNO_DST
Occurs if the Destination
account is not a funded account in the ledger.
tecNO_PERMISSION
Occurs if the Destination
account requires deposit authorization and the sender is not preauthorized.
tecTOO_SOON
Occurs if the sender's Sequence
number is too high. The transaction's Sequence
number plus 256 must be less than the current [Ledger Index][]. This prevents replay of old transactions if this account is resurrected after it is deleted.
tecHAS_OBLIGATIONS
tefTOO_BIG
Occurs if the sending account is linked to more than 1000 objects in the ledger. The transaction could succeed on retry if some of those objects were deleted separately first.
Create a Check object in the ledger, which is a deferred payment that can be cashed by its intended destination. The sender of this transaction is the sender of the Check.
[]
(Added by the [Checks amendment][].)
If the Destination
account is blocking incoming Checks, the transaction fails with the result code tecNO_PERMISSION
.
If the Destination
is the sender of the transaction, the transaction fails with the result code temREDUNDANT
.
If the Destination
account does not exist in the ledger, the transaction fails with the result code tecNO_DST
.
If the Destination
account has the RequireDest
flag enabled but the transaction does not include a DestinationTag
field, the transaction fails with the result code tecDST_TAG_NEEDED
.
If SendMax
specifies a token which is frozen, the transaction fails with the result tecFROZEN
.
If the Expiration
of the transaction is in the past, the transaction fails with the result tecEXPIRED
.
If the sender does not have enough XAH to meet the owner reserve after adding the Check, the transaction fails with the result tecINSUFFICIENT_RESERVE
.
If either the sender or the destination of the Check cannot own more objects in the ledger, the transaction fails with the result tecDIR_FULL
.
Occurs if the account to be deleted is connected to objects that cannot be deleted in the ledger. (This includes objects created by other accounts, such as escrows and for example NFT's minted, .)
Destination
String
AccountID
The unique address of the account that can cash the Check.
SendMax
Amount
Maximum amount of source currency the Check is allowed to debit the sender, including transfer fees on non-XAH currencies. The Check can only credit the destination with the same currency (from the same issuer, for non-XAH currencies). For non-XAH amounts, the nested field names MUST be lower-case.
DestinationTag
Number
UInt32
(Optional) Arbitrary tag that identifies the reason for the Check, or a hosted recipient to pay.
Expiration
Number
UInt32
(Optional) Time after which the Check is no longer valid, in [seconds since the Ripple Epoch][].
InvoiceID
String
Hash256
(Optional) Arbitrary 256-bit hash representing a specific reason or identifier for this Check.
Attempts to redeem a Check object in the ledger to receive up to the amount authorized by the corresponding CheckCreate transaction.
[Source]
(Added by the [Checks amendment][].)
CheckID
String
Hash256
The ID of the Check ledger object to cash, as a 64-character hexadecimal string.
Amount
Amount
(Optional) Redeem the Check for exactly this amount, if possible. The currency must match that of the SendMax
of the corresponding CheckCreate transaction. You must provide either this field or DeliverMin
.
DeliverMin
[Currency Amount][]
Amount
(Optional) Redeem the Check for at least this amount and for as much as possible. The currency must match that of the SendMax
of the corresponding CheckCreate transaction. You must provide either this field or Amount
.
The transaction must include either Amount
or DeliverMin
, but not both.
If the sender of the CheckCash transaction is not the Destination
of the check, the transaction fails with the result code tecNO_PERMISSION
.
If the Check identified by the CheckID
field does not exist, the transaction fails with the result tecNO_ENTRY
.
If the Check identified by the CheckID
field has already expired, the transaction fails with the result tecEXPIRED
.
If the destination of the Check has the RequireDest
flag enabled but the Check, as created, does not have a destination tag, the transaction fails with the result code tecDST_TAG_NEEDED
.
If the transaction specifies both Amount
and DeliverMin
, or omits both, the transaction fails with the result temMALFORMED
.
If the Amount
or DeliverMin
does not match the currency (and issuer, if not XAH) of the Check, the transaction fails with the result temBAD_CURRENCY
.
A ClaimReward transaction allows an account to claim the rewards it has accumulated. The rewards can be claimed by the account owner or by a specified issuer. The account can also opt-out of rewards.
[]
(Added by the [BalanceRewards amendment][].)
Transactions of the ClaimReward type support additional values in the Flags
field, as follows:
The ClaimReward transaction has a standard transaction cost, which is the minimum transaction cost required for all transactions.
Besides errors that can occur for all transactions, ClaimReward transactions can result in the following transaction result codes:
A DepositPreauth transaction gives another account pre-approval to deliver payments to the sender of this transaction.
Tip: You can use this transaction to preauthorize certain counterparties before you enable Deposit Authorization. This may be useful to ensure a smooth transition from not requiring deposit authorization to requiring it.
[]
Added by the [DepositPreauth amendment][].
You must provide either Authorize
or Unauthorize
, but not both.
An account cannot preauthorize (or unauthorize) its own address. Attempting to do so fails with the result temCANNOT_PREAUTH_SELF
.
Attempting to preauthorize an account which is already preauthorized fails with the result tecDUPLICATE
.
Attempting to unauthorize an account which is not preauthorized fails with the result tecNO_ENTRY
.
Attempting to preauthorize an address that is not funded in the ledger fails with the result tecNO_TARGET
.
Adding authorization adds a DepositPreauth object to the ledger, which counts toward the owner reserve requirement. If the sender of the transaction does not have enough XAH to pay for the increased reserve, the transaction fails with the result tecINSUFFICIENT_RESERVE
. If the sender of the account is already at the maximum number of owned objects, the transaction fails with the result tecDIR_FULL
.
Return escrowed XAH or IOU to the sender.
[]
Added by the [Escrow amendment][].
Any account may submit an EscrowCancel transaction.
If the corresponding [EscrowCreate transaction][] did not specify a CancelAfter
time, the EscrowCancel transaction fails.
Otherwise the EscrowCancel transaction fails if the CancelAfter
time is after the close time of the most recently-closed ledger.
tfOptOut
0x00000001
1
The isOptOut
flag in the ClaimReward code is used to opt-out an account from rewards by removing reward-related fields from the account object in the ledger if the sfFlags
field in the transaction is set to 1.
temDISABLED
Occurs if the feature is not enabled.
temINVALID_FLAG
Occurs if the flag is set to a value other than 1.
temMALFORMED
Occurs if the issuer is the same as the source account or if the flag and issuer are not correctly set.
tecNO_ISSUER
Occurs if the issuer does not exist.
terNO_ACCOUNT
Occurs if the sending account does not exist.
Owner
String
AccountID
Address of the source account that funded the escrow payment.
OfferSequence
Number
UInt32
(Optional) Transaction sequence (or Ticket number) of [EscrowCreate transaction][] that created the escrow to cancel.
EscrowID
String
Hash256
(Optional) The ID of the Escrow ledger object to cancel, as a 64-character hexadecimal string.
Account
String
AccountID
The address of the account that is claiming the reward.
Flags
Number
UInt32
(Optional) Can have flag 1 set to opt-out of rewards.
Issuer
String
AccountID
(Optional) The genesis account.
Authorize
String
AccountID
(Optional) Xahau address of the sender to preauthorize.
Unauthorize
String
AccountID
(Optional) Xahau address of a sender whose preauthorization should be revoked.
The type of a transaction (TransactionType
field) is the most fundamental information about a transaction. This indicates what type of operation the transaction is supposed to do.
All transactions have certain fields in common:
Common Fields
Each transaction type has additional fields relevant to the type of action it causes.
Cancels an unredeemed Check, removing it from the ledger without sending any money. The source or the destination of the check can cancel a Check at any time using this transaction type.
[Source]
(Added by the [Checks amendment][].)
CheckID
String
Hash256
The ID of the Check ledger object to cancel, as a 64-character hexadecimal string.
If the object identified by the CheckID
does not exist or is not a Check, the transaction fails with the result tecNO_ENTRY
.
If the Check is not expired and the sender of the CheckCancel transaction is not the source or destination of the Check, the transaction fails with the result tecNO_PERMISSION
.
Import is a new transaction which accepts an XPOP from the XRPL Mainnet chain (network_id=0) or Testnet (network_id=1) and provides account synchronisation.
[Source]
(Added by the [Import amendment][].)
Blob
String
Blob
Hex value representing an XPOP
Issuer
String
AccountID
(Optional) Address that can be used inside the Hook.
Destination
String
AccountID
(Optional) Address that can be used inside the Hook.
If the account is Non Activated then the Sequence
must be 0 and the Fee
must also be 0
If the account is Activated then the Sequence
and the Fee
are calculated the standard method.
If the Issuer
field is present then the Fee
must be calculated using the standard method.
It is recommended that if you use a SignersList
or RegularKey
to sign your transactions that you key your accounts FIRST before attempting to B2M XAH_._
If the inner (xpop) transaction is AccountSet
the mainet existing flags will be transfered to the new network.
If the inner (xpop) transaction is SetRegularKey
with the RegularKey
field omitted or empty, and a signers list does not exist for the account then the lsfDisableMaster
flag will be set on the account.
If the inner (xpop) transaction is SetRegularKey
then the lsfPasswordSpent
flag will be set on the account.
TicketSequence is not available on Import
For issuers, there are additional steps to follow before their asset holders can import transactions.
Firstly, issuers need to install a hook. There are two options for this: B2MNFToken
or B2MPayment
.
A NFTokenBurn
transaction on mainnet will result in a URITokenMint
transaction on the network.
c hook: https://example.com
A Payment
transaction on mainnet to the Issuer will result in a Payment
transaction from the Issuer on the network.
c hook: https://example.com
Please note that the process of importing for the issuer involves specific transaction types and requires careful configuration. Always ensure that the hooks are correctly set up and that the transactions are valid for the intended operations.
An Invoke transaction is used to call a hook, which is a piece of code that is executed in response to certain ledger operations.
[]
(Added by the [Hooks amendment][].)
The Invoke transaction has a standard transaction cost, plus an additional cost based on the size of the Blob and HookParameters fields.
Besides errors that can occur for all transactions, Invoke transactions can result in the following transaction result codes:
An OfferCancel transaction removes an Offer object from Xahau.
[]
Tip: To remove an old offer and replace it with a new one, you can use an [OfferCreate transaction][] with an OfferSequence
parameter, instead of using OfferCancel and another OfferCreate.
The OfferCancel method returns tesSUCCESS
even if it did not find an offer with the matching sequence number.
Sequester XAH or IOU until the escrow process either finishes or is canceled.
The GenesisMint transaction is used to mint new XAH and distribute it to multiple accounts. This transaction can only be used by the genesis account.
[]
Added by the [XahauGenesis amendment][] and the [Hooks amendment][]
The GenesisMint transaction includes an array of objects called GenesisMints
. Each object represents a destination account and the amount of XAH to be minted and distributed to that account.
The GenesisMint transaction has a standard transaction cost, which is the minimum transaction cost required for all transactions.
Besides errors that can occur for all transactions, the GenesisMint transaction can result in the following transaction result codes:
Claim Amount from a payment channel, adjust the payment channel's expiration, or both. This transaction can be used differently depending on the transaction sender's role in the specified channel:
Added by the [PayChan amendment][].
The source address of a channel can:
Send Amount from the channel to the destination with or without a signed Claim.
Set the channel to expire as soon as the channel's SettleDelay
has passed.
Clear a pending Expiration
time.
Close a channel immediately, with or without processing a claim first. The source address cannot close the channel immediately if the channel has Amount remaining.
The destination address of a channel can:
Receive Amount from the channel using a signed Claim.
Close the channel immediately after processing a Claim, refunding any unclaimed Amount to the channel's source.
Any address sending this transaction can:
Cause a channel to be closed if its Expiration
or CancelAfter
time is older than the previous ledger's close time. Any validly-formed PaymentChannelClaim transaction has this effect regardless of the contents of the transaction.
If the payment channel was created before the fixPayChanRecipientOwnerDir amendment became enabled (on 2020-05-01), it is possible that the destination of the payment channel has been deleted and does not currently exist in the ledger. If the destination has been deleted, the source account cannot send XAH from the channel to the destination; instead, the transaction fails with tecNO_DST
. (And, of course, the deleted account cannot send any transactions at all.) Other uses of this transaction type are unaffected when the destination account has been deleted, including adjusting the channel expiration, closing a channel with no Amount, or removing a channel that has passed its expiration time.
Transactions of the PaymentChannelClaim type support additional values in the Flags
field, as follows:
temDISABLED
Occurs if the Hooks amendment is not enabled.
temMALFORMED
Occurs if the Blob field is larger than 128 KiB.
terNO_ACCOUNT
Occurs if the sending account or the destination account does not exist.
OfferSequence
Number
UInt32
(Optional) The sequence number (or Ticket number) of a previous OfferCreate transaction. If specified, cancel any offer object in the ledger that was created by that transaction. It is not considered an error if the offer specified does not exist.
OfferID
String
Hash256
(Optional) The ID of the Offer ledger object to cancel, as a 64-character hexadecimal string.
Amount
Amount
Amount to deduct from the sender's balance and escrow. Once escrowed, the Amount can either go to the Destination
address (after the FinishAfter
time) or returned to the sender (after the CancelAfter
time).
Destination
String
AccountID
Address to receive escrowed Amount.
CancelAfter
Number
UInt32
(Optional) The time, in [seconds since the Ripple Epoch][], when this escrow expires. This value is immutable; the funds can only be returned to the sender after this time.
FinishAfter
Number
UInt32
(Optional) The time, in [seconds since the Ripple Epoch][], when the escrowed Amount can be released to the recipient. This value is immutable; the funds cannot move until this time is reached.
Condition
String
Blob
(Optional) Hex value representing a PREIMAGE-SHA-256 crypto-condition. The funds can only be delivered to the recipient if this condition is fulfilled.
DestinationTag
Number
UInt32
(Optional) Arbitrary tag to further specify the destination for this escrowed payment, such as a hosted recipient at the destination address.
Destination
String
AccountID
The address of the account that will receive the minted XAH.
Amount
String
Amount
The amount of XAH to be minted and distributed to the destination account.
GovernanceFlags
String
Hash256
(Optional) The governance flags associated with the destination account.
GovernanceMarks
String
Hash256
(Optional) The governance marks associated with the destination account.
temDISABLED
Occurs if the "Hooks" or "XahauGenesis" amendments are not enabled.
temMALFORMED
Occurs if the transaction is malformed, such as missing required fields or invalid values.
Channel
String
Hash256
The unique ID of the channel, as a 64-character hexadecimal string.
Balance
Amount
(Optional) Total amount delivered by this channel after processing this claim. Required to deliver Amount. Must be more than the total amount delivered by the channel so far, but not greater than the Amount
of the signed claim. Must be provided except when closing the channel.
Amount
Amount
(Optional) The amount authorized by the Signature
. This must match the amount in the signed message. This is the cumulative amount of Amount that can be dispensed by the channel, including XAH previously redeemed.
Signature
String
Blob
(Optional) The signature of this claim, as hexadecimal. The signed message contains the channel ID and the amount of the claim. Required unless the sender of the transaction is the source address of the channel.
PublicKey
String
Blob
(Optional) The public key used for the signature, as hexadecimal. This must match the PublicKey
stored in the ledger for the channel. Required unless the sender of the transaction is the source address of the channel and the Signature
field is omitted. (The transaction includes the public key so that rippled
can check the validity of the signature before trying to apply the transaction to the ledger.)
tfRenew
0x00010000
65536
Clear the channel's Expiration
time. (Expiration
is different from the channel's immutable CancelAfter
time.) Only the source address of the payment channel can use this flag.
tfClose
0x00020000
131072
Request to close the channel. Only the channel source and destination addresses can use this flag. This flag closes the channel immediately if it has no more Amount allocated to it after processing the current claim, or if the destination address uses it. If the source address uses this flag when the channel still holds an Amount, this schedules the channel to close after SettleDelay
seconds have passed. (Specifically, this sets the Expiration
of the channel to the close time of the previous ledger plus the channel's SettleDelay
time, unless the channel already has an earlier Expiration
time.) If the destination address uses this flag when the channel still holds an Amount, any Amount that remains after processing the claim is returned to the source address.
Account
String
AccountID
The address of the account that is invoking the hook.
Blob
String
Blob
(Optional) A blob of data that is passed to the hook. (512 byte max)
Destination
String
AccountID
(Optional) The address of the account that is the target of the hook.
InvoiceID
String
Hash256
(Optional) Arbitrary 256-bit hash representing a specific reason or identifier for this payment.
Account
String
AccountID
The address of the genesis account that will mint and distribute XAH.
GenesisMints
Array
Array
An array of objects representing the destinations and amounts of the minted XAH.
A SetRegularKey transaction assigns, changes, or removes the regular key pair associated with an account.
You can protect your account by assigning a regular key pair to it and using it instead of the master key pair to sign transactions whenever possible. If your regular key pair is compromised, but your master key pair is not, you can use a SetRegularKey
transaction to regain control of your account.
RegularKey
String
AccountID
(Optional) A base-58-encoded [Address][] that indicates the regular key pair to be assigned to the account. If omitted, removes any existing regular key pair from the account. Must not match the master key pair for the address.
For more information about regular and master key pairs, see Cryptographic Keys.
For a tutorial on assigning a regular key pair to an account, see Working with a Regular Key Pair.
For even greater security, you can use multi-signing, but multi-signing requires additional XAH for the [transaction cost][] and reserve.
Create a payment channel and fund it with an Amount. The address sending this transaction becomes the "source address" of the payment channel.
Added by the [PayChan amendment][].
Amount
Amount
Amount to deduct from the sender's balance and set aside in this channel. While the channel is open, the Amount can only go to the Destination
address. When the channel closes, any unclaimed Amount is returned to the source address's balance.
Destination
String
AccountID
Address to receive claims against this channel. This is also known as the "destination address" for the channel. Cannot be the same as the sender (Account
).
SettleDelay
Number
UInt32
Amount of time the source address must wait before closing the channel if it has unclaimed Amount.
PublicKey
String
Blob
The 33-byte public key of the key pair the source will use to sign claims against this channel, in hexadecimal. This can be any secp256k1 or Ed25519 public key. For more information on key pairs, see Key Derivation
CancelAfter
Number
UInt32
(Optional) The time, in [seconds since the Ripple Epoch][], when this channel expires. Any transaction that would modify the channel after this time closes the channel without otherwise affecting it. This value is immutable; the channel can be closed earlier than this time but cannot remain open after this time.
DestinationTag
Number
UInt32
(Optional) Arbitrary tag to further specify the destination for this payment channel, such as a hosted recipient at the destination address.
If the Destination
account is blocking incoming payment channels, the transaction fails with result code tecNO_PERMISSION
. (Requires the [DisallowIncoming amendment][] :not_enabled:)
An AccountSet transaction modifies the properties of an account in Xahau.
[Source]
ClearFlag
Number
UInt32
(Optional) Unique identifier of a flag to disable for this account.
Domain
String
Blob
EmailHash
String
Hash128
MessageKey
String
Blob
(Optional) Public key for sending encrypted messages to this account. To set the key, it must be exactly 33 bytes, with the first byte indicating the key type: 0x02
or 0x03
for secp256k1 keys, 0xED
for Ed25519 keys. To remove the key, use an empty value.
NFTokenMinter
String
Blob
(Optional) Another account that can mint NFTokens for you. (Added by the [NonFungibleTokensV1_1 amendment][].)
SetFlag
Number
UInt32
(Optional) Integer flag to enable for this account.
TransferRate
Number
UInt32
(Optional) The fee to charge when users transfer this account's tokens, represented as billionths of a unit. Cannot be more than 2000000000
or less than 1000000000
, except for the special case 0
meaning no fee.
TickSize
Number
UInt8
(Optional) Tick size to use for offers involving a currency issued by this address. The exchange rates of those offers is rounded to this many significant digits. Valid values are 3
to 15
inclusive, or 0
to disable. (Added by the [TickSize amendment][])
WalletLocator
String
Hash256
(Optional) An arbitrary 256-bit value. If specified, the value is stored as part of the account but has no inherent meaning or requirements.
WalletSize
Number
UInt32
(Optional) Not used. This field is valid in AccountSet transactions but does nothing.
If none of these options are provided, then the AccountSet transaction has no effect (beyond destroying the transaction cost). See Cancel or Skip a Transaction for more details.
The Domain
field is represented as the hex string of the lowercase ASCII of the domain. For example, the domain example.com would be represented as "6578616D706C652E636F6D"
.
To remove the Domain
field from an account, send an AccountSet with the Domain set to an empty string.
You can put any domain in your account's Domain
field. To prove that an account and domain belong to the same person or business, you need a "two-way link":
Accounts you own should have a domain you own in the Domain
field.
At that domain, host an xah-ledger.toml file listing accounts you own, and optionally other information about how you use Xahau.
There are several options which can be either enabled or disabled for an account. Account options are represented by different types of flags depending on the situation:
The AccountSet
transaction type has several "AccountSet Flags" (prefixed asf
) that can enable an option when passed as the SetFlag
parameter, or disable an option when passed as the ClearFlag
parameter. Newer options have only this style of flag. You can enable up to one asf
flag per transaction, and disable up to one asf
flag per transaction.
The AccountSet
transaction type has several transaction flags (prefixed tf
) that can be used to enable or disable specific account options when passed in the Flags
parameter. You can enable and disable a combination of settings in one transaction using multiple tf
flags, but not all settings have tf
flags.
The AccountRoot
ledger object type has several ledger-state-flags (prefixed lsf
) which represent the state of particular account options within a particular ledger. These settings apply until a transaction changes them.
To enable or disable Account Flags, use the SetFlag
and ClearFlag
parameters of an AccountSet transaction. AccountSet flags have names that begin with asf
.
All flags are disabled by default.
The available AccountSet flags are:
asfAccountTxnID
5
(None)
Track the ID of this account's most recent transaction. Required for AccountTxnID
asfAuthorizedNFTokenMinter
10
(None)
Enable to allow another account to mint non-fungible tokens (NFTokens) on this account's behalf. Specify the authorized account in the NFTokenMinter
field of the AccountRoot object. To remove an authorized minter, enable this flag and omit the NFTokenMinter
field. (Added by the [NonFungibleTokensV1_1 amendment][].)
asfDefaultRipple
8
lsfDefaultRipple
Enable rippling on this account's trust lines by default.
asfDepositAuth
9
lsfDepositAuth
Enable Deposit Authorization on this account. (Added by the [DepositAuth amendment][].)
asfDisableMaster
4
lsfDisableMaster
Disallow use of the master key pair. Can only be enabled if the account has configured another way to sign transactions, such as a Regular Key or a Signer List.
asfDisallowIncomingCheck
13
lsfDisallowIncomingCheck
Block incoming Checks. Added by the [DisallowIncoming amendment][].
asfDisallowIncomingNFTokenOffer
12
lsfDisallowIncomingNFTokenOffer
Block incoming NFTokenOffers. Added by the [DisallowIncoming amendment][].
asfDisallowIncomingPayChan
14
lsfDisallowIncomingPayChan
Block incoming Payment Channels. Added by the [DisallowIncoming amendment][].
asfDisallowIncomingTrustline
15
lsfDisallowIncomingTrustline
Block incoming trust lines.Added by the [DisallowIncoming amendment][].
asfDisallowIncomingRemit
16
lsfDisallowIncomingRemit
Block incoming Remit txn.Added by the [Remit amendment][].
asfDisallowXRP
3
lsfDisallowXRP
XAH should not be sent to this account. (Advisory; not enforced by Xahau protocol.)
asfGlobalFreeze
7
lsfGlobalFreeze
Freeze all assets issued by this account.
asfNoFreeze
6
lsfNoFreeze
Permanently give up the ability to freeze individual trust lines or disable Global Freeze. This flag can never be disabled after being enabled.
asfRequireAuth
2
lsfRequireAuth
Require authorization for users to hold balances issued by this address. Can only be enabled if the address has no trust lines connected to it.
asfRequireDest
1
lsfRequireDestTag
Require a destination tag to send transactions to this account.
asfTshCollect
11
lsfTshCollect
The TSH pays for the execution of their own Hook Chain. Added by the [Hooks amendment][].
To enable the asfDisableMaster
or asfNoFreeze
flags, you must authorize the transaction by signing it with the master key pair. You cannot use a regular key pair or a multi-signature. You can disable asfDisableMaster
(that is, re-enable the master key pair) using a regular key pair or multi-signature.
The following Transaction flags (tf
flags), specific to the AccountSet transaction type, serve the same purpose. Due to limited space, some settings do not have associated tf
flags, and new tf
flags are not being added to the AccountSet
transaction type. You can use a combination of tf
and asf
flags to enable multiple settings with a single transaction.
tfRequireDestTag
0x00010000
65536
asfRequireDest
(SetFlag
)
tfOptionalDestTag
0x00020000
131072
asfRequireDest
(ClearFlag
)
tfRequireAuth
0x00040000
262144
asfRequireAuth
(SetFlag
)
tfOptionalAuth
0x00080000
524288
asfRequireAuth
(ClearFlag
)
tfDisallowXRP
0x00100000
1048576
asfDisallowXRP
(SetFlag
)
tfAllowXRP
0x00200000
2097152
asfDisallowXRP
(ClearFlag
)
Caution: The numeric values of tf
and asf
flags in transactions do not match up with the values they set in the accounts "at rest" in the ledger. To read the flags of an account in the ledger, see AccountRoot
flags.
Incoming transactions with unclear purposes may be an inconvenience for financial institutions, who would have to recognize when a customer made a mistake, and then potentially refund accounts or adjust balances depending on the mistake. The asfRequireDest
and asfDisallowXRP
flags are intended to protect users from accidentally sending funds in a way that is unclear about the reason the funds were sent.
For example, a destination tag is typically used to identify which hosted balance should be credited when a financial institution receives a payment. If the destination tag is omitted, it may be unclear which account should be credited, creating a need for refunds, among other problems. By using the asfRequireDest
tag, you can ensure that every incoming payment has a destination tag, which makes it harder for others to send you an ambiguous payment by accident.
You can protect against unwanted incoming payments for non-XAH currencies by not creating trust lines in those currencies. Since XAH does not require trust, the asfDisallowXRP
flag is used to discourage users from sending XAH to an account. However, this flag is not enforced in Xahau protocol because it could potentially cause accounts to become unusable if they run out of XAH. Instead, client applications should disallow or discourage XAH payments to accounts with the asfDisallowXRP
flag enabled.
If you want to block all incoming payments, you can enable Deposit Authorization. This prevents any transaction from sending money to you, even XAH, unless your account is below the reserve requirement.
If the [DisallowIncoming amendment][] :not_enabled: is enabled, you also have the option to block all incoming Checks, NFTokenOffers, Payment Channels, and trust lines. It is generally harmless to be on the receiving end of these objects, but they can block you from deleting your account and it can be confusing to have objects you didn't expect mixed in with the list of objects you created. To block incoming objects, use one or more of these account flags:
asfDisallowIncomingCheck
- for Check objects
asfDisallowIncomingNFTOffer
- for NFTokenOffer objects
asfDisallowIncomingPayChan
- for PayChannel objects
asfDisallowIncomingTrustline
- for RippleState (trust line) objects
When a transaction would create one of these ledger entries, if the destination account has the corresponding flag enabled, the transaction fails with the result code tecNO_PERMISSION
. Unlike Deposit Authorization, these settings do not prevent you from receiving payments in general. Also, enabling this setting doesn't stop you from creating these types of objects yourself (unless the destination of your transaction is also using the setting, of course).
The TransferRate
field specifies a fee to charge whenever counterparties transfer the currency you issue.
In the HTTP and WebSocket APIs, the transfer fee is represented as an integer, the amount that must be sent for 1 billion units to arrive. For example, a 20% transfer fee is represented as the value 1200000000
. The value cannot be less than 1000000000. (Less than that would indicate giving away money for sending transactions, which is exploitable.) You can specify 0
as a shortcut for 1000000000
, meaning no fee.
See Transfer Fees for more information.
An OfferCreate transaction places an [Offer](offers.html) in the [decentralized exchange](decentralized-exchange.html).
[Source]
Expiration
Number
UInt32
(Optional) Time after which the Offer is no longer active, in [seconds since the Ripple Epoch][].
OfferSequence
Number
UInt32
(Optional) An Offer to delete first, specified in the same way as [OfferCancel][].
OfferID
String
Hash256
(Optional) The ID of the Offer ledger object to cancel, as a 64-character hexadecimal string.
TakerGets
Amount
The amount and type of currency being sold.
TakerPays
Amount
The amount and type of currency being bought.
Transactions of the OfferCreate type support additional values in the Flags
field, as follows:
tfPassive
0x00010000
65536
If enabled, the Offer does not consume Offers that exactly match it, and instead becomes an Offer object in the ledger. It still consumes Offers that cross it.
tfImmediateOrCancel
0x00020000
131072
tfFillOrKill
0x00040000
262144
tfSell
0x00080000
524288
Exchange the entire TakerGets
amount, even if it means obtaining more than the TakerPays
amount in exchange.
temINVALID_FLAG
Occurs if the transaction specifies both tfImmediateOrCancel
and tfFillOrKill
.
tecEXPIRED
Occurs if the transaction specifies an Expiration
time that has already passed.
tecKILLED
Occurs if the transaction specifies tfFillOrKill
, and the full amount cannot be filled. If the [ImmediateOfferKilled amendment][] is enabled, this result code also occurs when the transaction specifies tfImmediateOrCancel
and executes without moving funds (previously, this would return tesSUCCESS
).
temBAD_EXPIRATION
Occurs if the transaction contains an Expiration
field that is not validly formatted.
temBAD_SEQUENCE
Occurs if the transaction contains an OfferSequence
that is not validly formatted, or is higher than the transaction's own Sequence
number.
temBAD_OFFER
Occurs if the Offer tries to trade XAH for XAH, or tries to trade an invalid or negative amount of a token.
temREDUNDANT
Occurs if the transaction specifies a token for the same token (same issuer and currency code).
temBAD_CURRENCY
Occurs if the transaction specifies a token with the currency code "XAH".
temBAD_ISSUER
Occurs if the transaction specifies a token with an invalid issuer
value.
tecNO_ISSUER
Occurs if the transaction specifies a token whose issuer
value is not a funded account in the ledger.
tecFROZEN
Occurs if the transaction involves a token on a frozen trust line (including local and global freezes).
tecUNFUNDED_OFFER
Occurs if the owner does not hold a positive amount of the TakerGets
currency. (Exception: if TakerGets
specifies a token that the owner issues, the transaction can succeed.)
tecNO_LINE
Occurs if the transaction involves a token whose issuer uses Authorized Trust Lines and the necessary trust line does not exist.
tecNO_AUTH
Occurs if the transaction involves a token whose issuer uses Authorized Trust Lines and the the trust line that would receive the tokens exists but has not been authorized.
tecINSUF_RESERVE_OFFER
Occurs if the owner does not have enough XAH to meet the reserve requirement of adding a new Offer object to the ledger, and the transaction did not convert any currency. (If the transaction successfully traded any amount, the transaction succeeds with the result code tesSUCCESS
, but does not create an Offer object in the ledger for the rest.)
tecDIR_FULL
Occurs if the owner owns too many items in the ledger, or the order book contains too many Offers at the same exchange rate already.
The Remit transaction allows the user to send multiple payment types, mint a URIToken, transfer a list of URITokens and activate an account.
The Remit transaction pays all fees for Account Activation, Trustlines and URIToken Reserves.
[Source]
(Added by the [Remit amendment][].)
Account
String
AccountID
The address of the account that will activate the account, send the payment and/or mint/transfer the URIToken/s.
Destination
String
AccountID
The unique address of the account receiving the payment and/or URIToken/s.
DestinationTag
Number
UInt32
(Optional) A DestinationTag for deposits to a shared custody account.
MintURIToken
Object
STObject
(Optional) A MintURIToken
STObject containing the URIToken details you want to mint on the Destination
.
URITokenIDs
Array
STArray
(Optional) An array of URITokenIDs (256-bit hash) to to be transferred to the Destination
. Limit 32.
Amounts
Array
STArray
(Optional) An array of AmountEntry
STObjects the account wants to send to the Destination
. Limit 32.
Inform
String
AccountID
(Optional) A unique address of an account that can have a hook installed and be informed when a remit occurs.
Blob
String
Blob
(Optional) Arbitrary hex value that can be added to the tx for use in Hooks.
InvoiceID
String
Hash256
(Optional) Arbitrary 256-bit hash representing a specific reason or identifier for this remit.
Amount
Amount
The amount of currency the account wants to send to the Destination
.
URI
String
String
The URI associated with the minted URIToken. (256 byte max)
Digest
String
Hash256
(Optional) The digest of the URIToken.
Flags
Number
UInt32
(Optional) Flags on the mint transaction
The MintURIToken
STObject supports the values in the Flags
field, as follows:
tfBurnable
0x00000001
1
Allow the issuer to destroy the minted URIToken
. (The URIToken
's owner can always do so.)
The Remit transaction has a standard transaction cost, which is the minimum fee required for any transaction in Xahau.
In addition to the minimum fee required the Remit transaction will also deduct the fees for the following:
Account Activation
Standard Reserve Requirement
Create Trustline
Standard Reserve Requirement
URIToken Mint
Standard Reserve Requirement
URIToken Transfer
Standard Reserve Requirement
Besides errors that can occur for all transactions, Remit transactions can result in the following transaction result codes:
temINVALID_FLAG
Occurs if any flag is specific tfFullyCanonicalSig
temREDUNDANT
Occurs if the Account is the same as the Destination
temMALFORMED (Inform & Blob)
Occurs when; sfInform is same as " "source or destination. Blob was more than 128kib.
temMALFORMED (AmountEntry)
Occurs when; AmountEntry count exceeds 32.
Expected AmountEntry. Native Currency appears more than once. Issued Currency appears more than once.
temMALFORMED (MintURIToken)
Occurs when; sfMintURIToken contains invalid field. URI was not provided. URI was too long/short. Invalid UTF8 inside MintURIToken.
temMALFORMED (URITokenIDs)
Occurs when; URITokenIDs too short/long. Duplicate URITokenID.
temBAD_AMOUNT
Occurs when an Amount in the AmountEntry is invalid.
terNO_ACCOUNT
Occurs when the source account does not exist.
tecNO_TARGET
Occurs when the sfInform
field is present but the account does not exist.
tecNO_PERMISSION
Occurs when disallowIncomingRemit
is enabled on the Destination
tecNO_PERMISSION
Occurs when the Destination
has DepositAuthorization
enabled.
tecDST_TAG_NEEDED
Occurs if the destination account requires a destination tag, but the transaction does not include one.
tecDUPLICATE
Occurs when the MintURIToken
URI from that issuer already exists.
tecDIR_FULL
Occurs when the source or destination accouts directory is full.
tecNO_ENTRY
Occurs when the URIToken does not exist.
tecNO_PERMISSION
Occurs when the URIToken is not owned by the source account.
tecUNFUNDED_PAYMENT
Occurs when the source account does not have the required funds to execute the transaction. (XAH or Issued Currencies)
Add additional Amount to an open payment channel, and optionally update the expiration time of the channel. Only the source address of the channel can use this transaction.
Added by the [PayChan amendment][].
Channel
String
Hash256
The unique ID of the channel to fund, as a 64-character hexadecimal string.
Amount
Amount
Amount to add to the channel. Must be a positive amount.
Expiration
Number
UInt32
(Optional) New Expiration
time to set for the channel, in [seconds since the Ripple Epoch][]. This must be later than either the current time plus the SettleDelay
of the channel, or the existing Expiration
of the channel. After the Expiration
time, any transaction that would access the channel closes the channel without taking its normal action. Any unspent Amount is returned to the source address when the channel closes. (Expiration
is separate from the channel's immutable CancelAfter
time.) For more information, see the PayChannel ledger object type.
Besides errors that can occur for all transactions, {{currentpage.name}} transactions can result in the following transaction result codes:
tecINSUFFICIENT_RESERVE
The sending account has less XAH than the reserve requirement.
tecNO_DST
The destination account of the channel has been deleted. This is only possible if the payment channel was created before the fixPayChanRecipientOwnerDir amendment became enabled (on 2020-05-01).
tecNO_ENTRY
The Payment Channel identified by the Channel
field does not exist.
tecNO_PERMISSION
The sender of the transaction is not the source address for the channel.
tecUNFUNDED
The sending account does not have enough Amount to fund the channel with the requested amount and still meet the reserve requirement.
temBAD_AMOUNT
The Amount
field of the transaction is invalid. The amount cannot be zero or negative.
temBAD_EXPIRATION
The Expiration
field is invalid.
A TicketCreate transaction sets aside one or more [sequence numbers][Sequence Number] as Tickets.
(Added by the [TicketBatch amendment][].)
If the transaction cannot create all of the requested Tickets (either due to the 250-Ticket limit or the owner reserve), it fails and creates no Tickets. To look up how many Tickets an account currently owns, use the [account_info method][] and check the account_data.TicketCount
field.
Tip: This transaction increases the sending account's [sequence number][Sequence Number] by 1 plus the number of tickets created (TicketCount
). This is the only transaction that increases an account's sequence number by more than 1.
Besides errors that can occur for all transactions, {{currentpage.name}} transactions can result in the following transaction result codes:
A Payment transaction represents a transfer of value from one account to another. (Depending on the path taken, this can involve additional exchanges of value, which occur atomically.) This transactio
The Payment transaction type is a general-purpose tool that can represent several different types of abstract actions. You can identify the transaction type based on the transaction's fields, as described in the table below:
Most of the time, the issuer
field of a non-XAH [Currency Amount][] indicates the issuer of a token. However, when describing payments, there are special rules for the issuer
field in the Amount
and SendMax
fields of a payment.
There is only ever one balance between two addresses for the same currency code. This means that, sometimes, the issuer
field of an amount actually refers to a counterparty, instead of the address that issued the token.
When the issuer
field of the destination Amount
field matches the Destination
address, it is treated as a special case meaning "any issuer that the destination accepts." This includes all addresses to which the destination has trust lines with a positive limit, as well as tokens with the same currency code issued by the destination.
When the issuer
field of the SendMax
field matches the source account's address, it is treated as a special case meaning "any issuer that the source can use." This includes creating new tokens on trust lines that other accounts have extended to the source account, and sending tokens the source account holds from other issuers.
The Payment transaction type can create new accounts in Xahau by sending enough XAH to an unfunded address. Other transactions to unfunded addresses always fail.
For more information, see Accounts.
If present, the Paths
field must contain a path set - an array of path arrays. Each individual path represents one way value can flow from the sender to receiver through various intermediary accounts and order books. A single transaction can potentially use multiple paths, for example if the transaction exchanges currency using several different order books to achieve the best rate.
You must omit the Paths
field for direct payments, including:
An XAH-to-XAH transfer.
A direct transfer on a trust line that connects the sender and receiver.
If the Paths
field is provided, the server decides at transaction processing time which paths to use, from the provided set plus a default path (the most direct way possible to connect the specified accounts). This decision is deterministic and attempts to minimize costs, but it is not guaranteed to be perfect.
The Paths
field must not be an empty array, nor an array whose members are all empty arrays.
For more information, see Paths.
Transactions of the Payment type support additional values in the Flags
field, as follows:
A partial payment allows a payment to succeed by reducing the amount received. Partial payments are useful for returning payments without incurring additional costs to oneself. However, partial payments can also be used to exploit integrations that naively assume the Amount
field of a successful transaction always describes the exact amount delivered.
A partial payment is any [Payment transaction][] with the tfPartialPayment
flag enabled. A partial payment can be successful if it delivers any positive amount greater than or equal to its DeliverMin
field (or any positive amount at all if DeliverMin
is not specified) without sending more than the SendMax
value.
The delivered_amount
field of a payment's metadata indicates the amount of currency actually received by the destination account.
For more information, see the full article on Partial Payments.
Xahau defines the "quality" of a currency exchange as the ratio of the numeric amount in to the numeric amount out. For example, if you spend $2 USD to receive £1 GBP, then the "quality" of that exchange is 0.5
.
The tfLimitQuality
flag allows you to set a minimum quality of conversions that you are willing to take. This limit quality is defined as the destination Amount
divided by the SendMax
amount (the numeric amounts only, regardless of currency). When set, the payment processing engine avoids using any paths whose quality (conversion rate) is worse (numerically lower) than the limit quality.
By itself, the tfLimitQuality
flag reduces the number of situations in which a transaction can succeed. Specifically, it rejects payments where some part of the payment uses an unfavorable conversion, even if the overall average quality of conversions in the payment is equal or better than the limit quality. If a payment is rejected in this way, the transaction result is tecPATH_DRY
.
Consider the following example. If I am trying to send you 100 Chinese Yuan (Amount
= 100 CNY) for 20 United States dollars (SendMax
= 20 USD) or less, then the limit quality is 5
. Imagine one trader is offering ¥95 for $15 (a ratio of about 6.3
CNY per USD), but the next best offer in the market is ¥5 for $2 (a ratio of 2.5
CNY per USD). If I were to take both offers to send you 100 CNY, then it would cost me 17 USD, for an average quality of about 5.9
.
Without the tfLimitQuality
flag set, this transaction would succeed, because the $17 it costs me is within my specified SendMax
. However, with the tfLimitQuality
flag enabled, the transaction would fail instead, because the path to take the second offer has a quality of 2.5
, which is worse than the limit quality of 5
.
The tfLimitQuality
flag is most useful when combined with partial payments. When both tfPartialPayment
and tfLimitQuality
are set on a transaction, then the transaction delivers as much of the destination Amount
as it can, without using any conversions that are worse than the limit quality.
In the above example with a ¥95/$15 offer and a ¥5/$2 offer, the situation is different if my transaction has both tfPartialPayment
and tfLimitQuality
enabled. If we keep my SendMax
of 20 USD and a destination Amount
of 100 CNY, then the limit quality is still 5
. However, because I am doing a partial payment, the transaction sends as much as it can instead of failing if the full destination amount cannot be sent. This means that my transaction consumes the ¥95/$15 offer, whose quality is about 6.3
, but it rejects the ¥5/$2 offer because that offer's quality of 2.5
is worse than the quality limit of 5
. In the end, my transaction only delivers ¥95 instead of the full ¥100, but it avoids wasting money on poor exchange rates.
The URITokenBurn transaction is used to burn a URIToken in Xahau. Burning a URIToken permanently removes it from circulation.
(Added by the [URIToken amendment][].)
The URITokenBurn transaction is used to burn a URIToken in Xahau. Burning a URIToken permanently removes it from circulation.
The URITokenBurn transaction does not have any special transaction cost requirements.
Besides errors that can occur for all transactions, URITokenBurn transactions can result in the following transaction result codes:
(Optional) The domain that owns this account, as a string of hex representing the ASCII for the domain in lowercase.
(Optional) An arbitrary 128-bit value. Conventionally, clients treat this as the md5 hash of an email address to use for displaying a image.
Treat the Offer as an . The Offer never creates an [Offer object][] in the ledger: it only trades as much as it can by consuming existing Offers at the time the transaction is processed. If no Offers match, it executes "successfully" without trading anything. In this case, the transaction still uses the result code tesSUCCESS
.
Treat the offer as a . The Offer never creates an [Offer object][] in the ledger, and is canceled if it cannot be fully filled at the time of execution. By default, this means that the owner must receive the full TakerPays
amount; if the tfSell
flag is enabled, the owner must be able to spend the entire TakerGets
amount instead.
Payment type
Amount
SendMax
Paths
Address
= Destination
?
Description
Direct XAH-to-XAH Payment
String (XAH)
Omitted
Omitted
No
Transfers XAH directly from one account to another. Always delivers the exact amount. No fee applies other than the basic transaction cost.
Creating or redeeming tokens
Object
Object (optional)
Optional
No
Increases or decreases the amount of a non-XAH currency or asset tracked in Xahau. Transfer fees and freezes do not apply when sending and redeeming directly.
Cross-currency Payment
Object (non-XAH) / String (XAH)
Object (non-XAH) / String (XAH)
Usually required
No
Send tokens from one holder to another. The Amount
or SendMax
can be XAH or tokens, but they cannot both be XAH. These payments ripple through the issuer and can take longer paths through several intermediaries if the transaction specifies a path set. Transfer fees set by the issuer(s) apply to this type of transaction. These transactions consume offers in the decentralized exchange to connect between different currencies, or possibly even between currencies with the same currency code and different issuers.
Partial payment
Object (non-XAH) / String (XAH)
Object (non-XAH) / String (XAH)
Usually required
No
Sends up to a specific amount of any currency. Uses the tfPartialPayment
flag. May include a DeliverMin
amount specifying the minimum that the transaction must deliver to be successful; if the transaction does not specify DeliverMin
, it can succeed by delivering any positive amount.
Currency conversion
Object (non-XAH) / String (XAH)
Object (non-XAH) / String (XAH)
Required
Yes
Consumes offers in the decentralized exchange to convert one currency to another, possibly taking arbitrage opportunities. The Amount
and SendMax
cannot both be XAH. Also called a circular payment because it delivers money to the sender. The Data API tracks this type of transaction as an "exchange" and not a "payment".
tfNoDirectRipple
0x00010000
65536
Do not use the default path; only use paths included in the Paths
field. This is intended to force the transaction to take arbitrage opportunities. Most clients do not need this.
tfPartialPayment
0x00020000
131072
If the specified Amount
cannot be sent without spending more than SendMax
, reduce the received amount instead of failing outright. See Partial Payments for more details.
tfLimitQuality
0x00040000
262144
Only take paths where all the conversions have an input:output ratio that is equal or better than the ratio of Amount
:SendMax
. See Limit Quality for details.
TicketCount
Number
UInt32
How many Tickets to create. This must be a positive number and cannot cause the account to own more than 250 Tickets after executing this transaction.
temINVALID_COUNT
The TicketCount
field is invalid. It must be an integer from 1 to 250.
tecDIR_FULL
This transaction would cause the account to own more than the limit of 250 Tickets at a time, or more than the maximum number of ledger objects in general.
tecINSUFFICIENT_RESERVE
The sending account does not have enough XAH to meet the owner reserve of all the requested Tickets.
Amount
Amount
The amount of currency to deliver. For non-XAH amounts, the nested field names MUST be lower-case. If the tfPartialPayment
flag is set, deliver up to this amount instead.
Destination
String
AccountID
The unique address of the account receiving the payment.
DestinationTag
Number
UInt32
(Optional) Arbitrary tag that identifies the reason for the payment to the destination, or a hosted recipient to pay.
InvoiceID
String
Hash256
(Optional) Arbitrary 256-bit hash representing a specific reason or identifier for this payment.
Paths
Array of path arrays
PathSet
(Optional, auto-fillable) Array of payment paths to be used for this transaction. Must be omitted for XAH-to-XAH transactions.
SendMax
Amount
(Optional) Highest amount of source currency this transaction is allowed to cost, including transfer fees, exchange rates, and slippage. Does not include the XAH destroyed as a cost for submitting the transaction. For non-XAH amounts, the nested field names MUST be lower-case. Must be supplied for cross-currency/cross-issue payments. Must be omitted for XAH-to-XAH payments.
DeliverMin
[Currency Amount][]
Amount
(Optional) Minimum amount of destination currency this transaction should deliver. Only valid if this is a partial payment. For non-XAH amounts, the nested field names are lower-case.
Account
String
AccountID
The address of the account that owns the URIToken to be burned.
URITokenID
String
Hash256
The ID of the URIToken to burn.
tecNO_PERMISSION
Occurs if the account does not have permission to burn the token.
The SetHook transaction allows users to install, update, delete, or perform other operations on hooks in Xahau.
[Source]
(Added by the [Hooks amendment][].)
Account
String
AccountID
The address of the account that will own the hook.
Hooks
Array
Array
The array of hooks to be set.
The SetHook transaction has a standard transaction cost, which is the minimum transaction cost required for all transactions.
Besides errors that can occur for all transactions, SetHook transactions can result in the following transaction result codes:
tecDUPLICATE
Occurs if a hook with the same hash already exists.
tecDIR_FULL
Occurs if the owner's directory is full and cannot accommodate the new hook.
terNO_ACCOUNT
Occurs if the sending account does not exist.
terNO_HOOK
Occurs if no hook exists with the specified hash.
temDISABLED
Occurs if the Hooks Amendment is not enabled.
temMALFORMED
Occurs if the transaction is malformed.
There are six possible operations: No Operation, Create, Update, Delete, Install and Namespace Delete
Each operation is specified by the inclusion or omission of certain HookSet Object fields. This might seem confusing at first but by working through a few examples the reader should find it intuitive; Essentially HookSet operations are a type of diff between a specific Hook's defaults, existing and newly specified fields.
Achieving each type of operation is explained in a subsection below.
Occurs when:
The HookSet Object is empty
Behaviour:
No change of any kind is made.
Example:
JSON
Occurs when:
All of the following conditions are met:
The Corresponding Hook does not exist orFLAG_OVERRIDE
is specified.
CreateCode
field is specified and is not blank and contains the valid web assembly bytecode for a valid Hook.
No instance of the same web assembly bytecode already exists on the XRPL. (If it does and all other requirements are met then interpret as an Install Operation — see below.)
Behaviour:
A reference counted HookDefinition
object is created on the XRPL containing the fields in the HookSet Object, with all specified fields (Namespace, Parameters, HookOn) becoming defaults (but not Grants.)
A Hooks
array is created on the executing account, if it doesn't already exist. (This is the structure that contains the Corresponding Hooks.)
A Hook
object is created at the Corresponding Hook position if one does not already exist.
The Hook
object points at the HookDefinition
.
The Hook
object contains no fields except HookHash
which points at the created HookDefinition
.
If hsfNSDELETE
flag is specified then any HookState entires in the destination namespace are deleted if they currently exist.
Example:
JSON
Occurs when:
All of the following conditions are met:
The Corresponding Hook does not exist orFLAG_OVERRIDE
is specified.
HookHash
field is specified and is not blank and contains the hash of a Hook that already exists as a HookDefinition
on the ledger or CreateCode
field is specified and is not blank and contains the valid web assembly bytecode for a valid hook that already exists on the ledger as a HookDefinition
.
Behaviour:
The reference count of the HookDefinition
object is incremented.
A Hooks
array is created on the executing account, if it doesn't already exist. (This is the structure that contains the Corresponding Hooks.)
A Hook
object is created at the Corresponding Hook position if one does not already exist.
The Hook
object points at the HookDefinition
.
The Hook
object contains all the fields in the HookSet Object, except and unless:
A field or key-pair within a field is identical to the Hook Defaults set on the HookDefinition
, in which case it is omitted due to defaults.
If hsfNSDELETE
flag is specified then any HookState entires in the destination namespace are deleted if they currently exist.
Example:
JSON
Occurs when:
All of the following conditions are met:
The Corresponding Hook exists.
HookHash
is absent.
CreateCode
is absent.
One or more of HookNamespace
, HookParameters
or HookGrants
is present.
General Behaviour:
The Corresponding Hook is updated in such a way that the desired changes are reflected in the Corresponding Hook.
Specific Behaviour:
If HookNamespace
is specified and differs from the Corresponding Hook's Namespace:
the Corresponding Hook's HookNamespace
is updated, and
if the hsfNSDELETE
flag is specified all HookState entires in the old namespace are deleted.
If HookParameters
is specified, then for each entry:
If HookParameterName
exists but HookParameterValue
is absent and the Corresponding Hook's Parameters (either specifically or via defaults) contains this HookParameterName
then the parameter is marked as deleted on the Corresponding Hook.
If HookParameterName
exists and HookParameterValue
exists then the Corresponding Hook's Parameters are modified to include the new or updated parameter.
If HookGrants
is specified then:
The Corresponding Hook's HookGrants
array is replaced with the array.
Example:
JSON
Occurs when:
All of the following conditions are met:
The Corresponding Hook exists.
hsfOVERRIDE
is specified.
optionally hsfNSDELETE
is also specified.
HookHash
is absent.
CreateCode
is present but empty.
Behaviour:
The reference count of the HookDefinition
object is decremented.
If the reference count is now zero the HookDefintion
is removed from the ledger.
The Hook
object in the Corresponding Hook position is deleted, leaving an empty position.
If hsfNSDELETE
is specified the namespace and all HookState entries are also deleted.
Example:
JSON
Occurs when:
All of the following conditions are met:
flags
is present and hsfNSDELETE
is set. hsfOVERRIDE
can optionally also be specified if the Hook at this position is to be deleted.
HookNamespace
is specified.
CreateCode
is absent.
HookHash
is absent.
HookGrants
, HookParameters
, HookOn
and HookApiVersion
are absent.
Behaviour:
If the Corresponding Hook exists, it remains, nothing happens to it.
A subset of HookState objects and the HookState directory for the specified namespace are removed from the ledger, up to the defined limit (512). Further transactions are needed to continue the deletion process until all relevant records are removed. See tesPARTIAL
.
Example:
JSON
The following fields are used in the hook object:
HookHash
String
Hash256
The hash of the hook.
CreateCode
String
Blob
The WebAssembly code for the hook.
HookGrants
Array
Array
The grants associated with the hook.
HookNamespace
String
Hash256
The namespace of the hook.
HookParameters
Array
Array
The parameters of the hook.
HookOn
String
Hash256
The event on which the hook is triggered.
HookApiVersion
Number
UInt16
The API version of the hook.
Flags
Number
UInt32
Additional flags for the hook.
The Flags
field in the hook object specifies additional flags for the hook. The following flags are supported:
hsfOVERRIDE
Allows the hook to be deleted even if it is referenced by other objects.
hsfNSDELETE
Deletes an entire namespace of hooks.
hsfCOLLECT
Collects the hook's associated objects.
The HookGrants
field is an array of objects that specify the grants associated with the hook. Each grant object has the following fields:
HookHash
String
Hash256
The hook to apply the grant to.
Authorize
String
AccountID
The address of the account that is granted access.
Flags
Number
Uint32
Flags
The HookParameters
field is an array of objects that specify the parameters of the hook. Each parameter object has the following fields:
HookParameterName
String
Blob
The name of the parameter.
HookParameterValue
String
Blob
The value of the parameter.
When Hooks execute they leave behind information about the status of that execution. This appears in the Originating Transaction metadata as an sfHookExecutions
block. This block contains the following fields:
HookAccount
String
AccountID
The account the Hook ran on.
HookEmitCount
Number
UInt16
The total number of Emitted Transactions produced by the Hook.
HookExecutionIndex
Number
UInt16
The SHA512H of the Hook at the time it was executed.
HookHash
String
Hash256
The value of the parameter.
HookInstructionCount
String
UInt64
The total number of webassembly instructions that were executed when the Hook ran.
HookResult
Number
UInt8
Hooks can end in three ways: accept
, rollback
and error
.
This is not the same as sfHookReturnCode!
HookReturnCode
String
UInt64
The integer returned as the third parameter of accept
or rollback
.
HookReturnString
String
Blob
The string returned in the first two parameters of accept
or rollback
, if any.
HookStateChangeCount
Number
UInt16
The number of Hook State changes the Hook made during execution.
An URITokenCancelSellOffer transaction cancels a sell offer for a URIToken in Xahau.
[Source]
(Added by the [URIToken amendment][].)
Account
String
AccountID
The address of the account that owns the sell offer to cancel.
URITokenID
String
Hash256
The ID of the URIToken to cancel the sell offer.
Besides errors that can occur for all transactions, {{currentpage.name}} transactions can result in the following transaction result codes:
tecNO_PERMISSION
Occurs when the account executing the tx is not the owner of the token.
The SignerListSet transaction creates, replaces, or removes a list of signers that can be used to multi-sign a transaction. This transaction type was introduced by the [MultiSign amendment][].
SignerQuorum
Number
UInt32
A target number for the signer weights. A multi-signature from this list is valid only if the sum weights of the signatures provided is greater than or equal to this value. To delete a signer list, use the value 0
.
SignerEntries
Array
Array
(Omitted when deleting) Array of SignerEntry
objects, indicating the addresses and weights of signers in this list. This signer list must have at least 1 member and no more than 32 members. No address may appear more than once in the list, nor may the Account
submitting the transaction appear in the list. (Updated by the [ExpandedSignerList amendment][].)
A successful SignerListSet transaction replaces the account's SignerList
object in the ledger, or adds one if it did not exist before. An account may not have more than one signer list. To delete a signer list, you must set SignerQuorum
to 0
and omit the SignerEntries
field. Otherwise, the transaction fails with the error temMALFORMED
. A transaction to delete a signer list is considered successful even if there was no signer list to delete.
You cannot create a signer list such that the SignerQuorum
could never be met. The SignerQuorum
must be greater than 0 but less than or equal to the sum of the SignerWeight
values in the list. Otherwise, the transaction fails with the error temMALFORMED
.
You can create, update, or remove a signer list using the master key, regular key, or the current signer list, if those methods of signing transactions are available.
You cannot remove the last method of signing transactions from an account. If an account's master key is disabled (the account has the lsfDisableMaster
flag enabled) and the account does not have a Regular Key configured, then you cannot delete the signer list from the account. Instead, the transaction fails with the error tecNO_ALTERNATIVE_KEY
.
Creating or replacing a signer list enables the lsfOneOwnerCount
flag on the SignerList object. Lists that were created before the [MultiSignReserve amendment][] became enabled do not have this flag and have a higher owner reserve. You can decrease the owner reserve for these lists by replacing the list with the same list. For more information, see SignerList Flags.
The URITokenBuy transaction allows a user to buy a URIToken from the issuer. This transaction is used to transfer ownership of a URIToken from the issuer to the buyer.
[Source]
(Added by the [URIToken amendment][].)
Account
String
AccountID
The address of the buyer's account.
URITokenID
String
Hash256
The unique identifier of the URIToken to be bought.
Amount
Amount
The amount of currency to pay for the URIToken.
The URITokenBuy transaction has a standard transaction cost, which is the minimum fee required for any transaction in Xahau.
Besides errors that can occur for all transactions, URITokenBuy transactions can result in the following transaction result codes:
tecCANT_ACCEPT_OWN_NFTOKEN_OFFER
Occurs if the owner of the token is the one claiming the offer.
tecDST_TAG_NEEDED
Occurs if the destination account requires a destination tag, but the transaction does not include one.
tecNO_PERMISSION
Occurs if the seller does not have the token listed for sale or the token Destination
is not the account buying the token.
temBAD_CURRENCY
Occurs when the buying currency does not match the offer currency.
tecINSUFFICIENT_PAYMENT
Occurs when the buy amount is less than the offer amount.
tecINSUFFICIENT_FUNDS
Occurs when the buyer doesn't have sufficient funds including the Fee
to purchase the token.
Create or modify a trust line linking two accounts.
LimitAmount
Object
Amount
Object defining the trust line to create or modify, in the format of a [Currency Amount][].
LimitAmount
.currency
String
(Amount.currency)
LimitAmount
.value
String
(Amount.value)
Quoted decimal representation of the limit to set on this trust line.
LimitAmount
.issuer
String
(Amount.issuer)
The address of the account to extend trust to.
QualityIn
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 0
is shorthand for treating balances at face value.
QualityOut
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 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:
tfSetfAuth
0x00010000
65536
Authorize the other party to hold currency issued by this account. (No effect unless using the asfRequireAuth
AccountSet flag.) Cannot be unset.
tfSetNoRipple
0x00020000
131072
Enable the No Ripple flag, which blocks rippling between two trust lines of the same currency if this flag is enabled on both.
tfClearNoRipple
0x00040000
262144
Disable the No Ripple flag, allowing rippling on this trust line.
tfSetFreeze
0x00100000
1048576
Freeze the trust line.
tfClearFreeze
0x00200000
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.
An URITokenCreateSellOffer transaction allows a user to create a sell offer for a URIToken on Xahau's decentralized exchange.
[Source]
(Added by the [URIToken amendment][].)
Account
String
AccountID
The address of the account creating the sell offer.
URITokenID
String
Hash256
The ID of the URIToken being sold.
Destination
String
AccountID
(Optional) The address of the account to receive the sell offer.
Amount
Amount
The amount of currency the account wants to receive in exchange for the URIToken.
Besides errors that can occur for all transactions, URITokenCreateSellOffer transactions can result in the following transaction result codes:
tecNO_TARGET
Occurs if the target account does not exist.
tecNO_PERMISSION
Occurs if the account does not have permission to create a sell offer.
tecINSUF_RESERVE_LINE
Occurs if the account does not have a sufficient reserve to create a sell offer.
tecINSUF_RESERVE_OFFER
Occurs if the account does not have a sufficient reserve to create a sell offer.
tecUNFUNDED_OFFER
Occurs if the account does not have a sufficient balance to create a sell offer.
tecOFFER_INVALID
Occurs if the sell offer is invalid.
An URIToken Mint transaction mints a new URIToken and assigns ownership to the specified account. The URIToken represents a unique digital asset that can be used in various applications.
[Source]
(Added by the [URIToken amendment][].)
Account
String
AccountID
The address of the account that will own the minted URIToken.
URI
String
String
The URI associated with the minted URIToken. (256 byte max)
Digest
String
Hash256
(Optional) The digest of the URIToken.
Destination
String
AccountID
(Optional) The address of the account that can buy the minted URIToken.
Amount
Amount
(Optional) The amount of currency the account wants to receive in exchange for the URIToken.
Transactions of the URITokenMint type support additional values in the Flags
field, as follows:
tfBurnable
0x00000001
1
Allow the issuer (or an entity authorized by the issuer) to destroy the minted URIToken
. (The URIToken
's owner can always do so.)
The URIToken Mint transaction has a standard transaction cost, which is the minimum transaction cost required for all transactions.
Besides errors that can occur for all transactions, URIToken Mint transactions can result in the following transaction result codes:
tecDUPLICATE
Occurs if a URIToken with the same URI from the same issuer already exists.
tecDIR_FULL
Occurs if the owner's directory is full and cannot accommodate the new URIToken.
temINVALID_FLAG
Occurs when the user specified an incorrect Flag
.
terNO_ACCOUNT
Occurs if the sending account does not exist.
The currency to this trust line applies to, as a three-letter or a 160-bit hex value according to currency format. "XAH" is invalid.