Appearance
Submit
Submit a transfer plan. The user confirms in the wallet. Amount and quote: Amount & quote.
Ready to submit
Use this checklist to enable the confirm button. submit still validates the same things and will throw if something is missing — this is only for UI.
- Session view is
active - Connection
status === 'connected' - Token is
eligible plan.flow !== 'unavailable'- Amount is valid (
validateAmount) - Quote is present when the flow needs one (see below)
- Not already in
requires_retry(then show Retry instead)
Quote
Direct can omit quote. Swap and bridge need a current quote — if the amount changed, refetch and do not submit a stale one.
Pass the whole quote object into submit. Do not build or edit fields.
submit
ts
const result = await client.wallets.transfer.submit({
plan,
amount,
quote,
onStatus: event => {
event.status;
event.hash;
event.error;
},
});ExecuteWalletTransferRequest:
| Field | Meaning |
|---|---|
plan | From getPlan / getPlanSync |
amount | Human-readable source crypto |
quote? | From getQuote. Required for swap / bridge; optional for direct |
clientTxId? | Correlation id for status events. Generated when omitted |
onClientTxId? | Called with the id that will be used |
onStatus? | Per-call status events. Same payload as wallets:transferStatus |
Result
ts
result.status; // 'completed' | 'requires_retry'
result.hash;
result.type; // 'evm' | 'solana' | 'bitcoin'
result.flow;
result.isSponsored;
result.clientTxId;status | Meaning |
|---|---|
completed | Transfer finished |
requires_retry | The wallet already signed and sent. Registering that deposit with Swapped failed. Call retry() — do not submit again |
submit throws WALLET_TRANSFER_REQUIRES_RETRY if a previous submit already returned requires_retry.
requires_retry
The wallet already signed / sent. Registration with Swapped failed. Show Retry, not “Start over” and not a new deposit.
ts
if (result.status === 'requires_retry') {
await client.wallets.transfer.retry({
onStatus: event => {
event.status;
},
});
}retry throws WALLET_TRANSFER_REGISTER_FAILED if it fails again. Call retry() once more. WALLET_TRANSFER_NO_PENDING_RETRY means there is nothing to retry.
Status
onStatus and client.on('wallets:transferStatus') receive WalletTransferStatusEvent. Each event also has clientTxId, optional hash, isSponsored, and error: { code, message? }.
| Status | What it means |
|---|---|
initiating | Deposit is starting |
waiting_for_a_signature | Ask the user to confirm / sign in the wallet |
waiting_for_confirmation | Wallet popup is open for a normal send |
sending | Transaction was submitted; hash may be present |
in_progress | Waiting for on-chain confirmation |
swap_started_waiting_for_second_confirmation | First swap tx sent; another confirmation may be needed |
registering | On-chain send succeeded; telling Swapped about the deposit |
completed | Deposit finished — show the success screen |
requires_retry | Wallet already sent; registering with Swapped failed — show Retry |
failed | Transfer failed — show the error |
ts
const off = client.wallets.transfer.on('transferStatus', event => {
// same as client.on('wallets:transferStatus', event)
});Errors
Submit rejects with WALLET_TRANSACTION_REJECTED (user cancelled in the wallet), WALLET_TRANSFER_INVALID_AMOUNT, WALLET_TRANSFER_EXECUTE_FAILED, WALLET_TRANSFER_INSUFFICIENT_FEE, WALLET_TRANSFER_REQUIRES_RETRY, WALLET_NOT_CONNECTED, SESSION_NOT_ACTIVE, and others. See Errors.