Skip to content

account.fund()

[Source]

Fund a created account via the network faucet (Testnet/Devnet), then enable rippling. The account must be one this client can sign for (e.g. from create).

Note

fund requires a faucet-capable ledger (Testnet/Devnet). On other networks it throws an error, so use activate to fund from an operator account instead.

Signature

account.fund(
  params: AccountFundParams,
  options?: AccountWriteOptions,
): Promise<SubmissionResult<undefined>>

Parameters

ParameterTypeRequiredDescription
destinationstringYesThe r-address to fund (typically from Account.create).

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<undefined> (from the defaultRipple settings change).

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

Account.fund attaches no intent output; intent is undefined.

Underlying XRPL transactor

Funds the account via the network faucet (an off-ledger request, not a submitted transaction), then builds and submits a single AccountSet transaction to enable rippling (defaultRipple).

Example

await client.account.fund({
  destination: 'rNewAccount...',
})