Skip to content

iou.transfer()

[Source]

Send a specified amount of this IOU to a destination account.

Signature

iou.transfer(
  params: IOUTransferParams,
  options?: IOUWriteOptions,
): Promise<SubmissionResult<IOUTransferIntent>>

Parameters

ParameterTypeRequiredDescription
tickerstringYesThe currency code (3-character ISO-4217-style or 40-character hex; other codes are auto-encoded to hex).
tostringYesThe destination r-address.
amountstringYesThe amount to send, as a decimal string (e.g. '10', '0.25'). Must be non-negative, with at most 15 significant digits.

Options

options is an optional second argument that sets the source account and overrides the fee.

OptionTypeRequiredDescription
fromAccountSelectorNoThe account to act as — an r-address string, or an object { address } or { signer, account? }. Defaults to the primary signer's primary account. (For IOU operations, this is the issuer.)
feeFeeIntentNoFee override — a priority tier and/or a maxFeeDrops cap.
idempotencyKeystringNoA prior submission's idempotencyKey, to retry to the same intent instead of creating a duplicate. Auto-generated when omitted.

Returns

Resolves to a SubmissionResult<IOUTransferIntent>.

Every simpleXRPL write resolves to a SubmissionResult<T> — a union tagged by source, with the backend's raw response preserved verbatim. Its common fields are:

FieldTypeDescription
intentTThe operation-specific output — see the operation's own return fields.
source'xrpld' | 'custody' | 'palisade'Which backend produced the result; discriminates response.
responseTxResponse | custody record | Palisade recordThe backend's raw response, preserved verbatim.
txHashstring (optional)The XRPL transaction hash, once the transaction is on-ledger.
intentIdstring (optional)The custodian intent id, when the path produced one. Hold onto this to resume via client.intent.
idempotencyKeystring (optional)The UUIDv7 this submission carried. Pass it back as a later call's idempotencyKey to retry to the same intent rather than creating a duplicate.

Return fields

For IOU.transfer, the intent (IOUTransferIntent) echoes:

FieldTypeDescription
tostringDestination r-address.
amountstringAmount sent.

Underlying XRPL transactor

Builds and submits a single Payment transaction.

Example

await client.iou.transfer({
  ticker: 'USD',
  to: 'rHolder...',
  amount: '100',
})