✳ Lambatoken / Mobile DocsAUTH 0.7.0 · WALLET 0.2.0
Wallet / 16

Send LBT and track transfers

Quote, review, create an intent, sign and submit, then reconcile the final status.

1. Quote and review

Use raw integer units, not a decimal JS number. Review recipient, chain, token, amount, fee, total and expiry. Resolve the local or backend wallet ID through the SDK. Never auto-submit from the quote screen.

typescript
const input = { walletId: localWalletId, toAddress, amountRaw };
const quote = await sdk.getTransferQuote(input);

2. Create intent after confirmation

The returned CreateTransferIntentResponse includes typed signing data and chain/contract details. Retain the complete response, not a reduced TransferIntent projection. Verify it matches the user-approved details.

typescript
const intent = await sdk.createTransferIntent(input);
// Keep the entire intent object until the signing operation.

3. Sign and submit (test environment only until authorization validated)

The SDK signs permit and transfer typed data using local keys, then submits signatures to the Wallet API. The backend must enforce any required transaction-bound MFA. Do not use the combined method to skip explicit review.

typescript
const submission = await sdk.signAndSubmitTransferIntent(intent, {
  onStage: (stage) => { /* update progress UI; do not log secrets */ },
});

Production transaction authorization is an outstanding gate. The current wallet helper does not demonstrate Central Auth challenge consumption. Never bypass required assurance or retry an uncertain mutation automatically.

4. Poll and reconcile

Submission is not confirmation. Poll the original transfer ID. Terminal states are confirmed, failed, expired or cancelled. Poll timeout means unknown/pending, not failed; reconcile with the backend before retrying.

typescript
const final = await sdk.waitForTransferFinalStatus(intent.transferId, {
  intervalMs: 5000, timeoutMs: 120000,
});
// Read final.status and render the appropriate result.