23

Submit an on-chain intent

Guides & tutorials2 min read

Move a wallet action from proposal to receipt through simulation, policy, and approval.

Check a wallet, let a run propose an on-chain action, resolve the resulting approval with step-up, and confirm the receipt, all without the model ever holding signing authority. Prerequisites: an embedded or connected wallet provisioned for the account.

Check the wallet before you start
const status = await client.getWalletStatus();const caps = await client.getWalletCapabilities();
  1. 1

    Check the wallet

    Confirm status and capabilities before proposing anything that spends from it.

  2. 2

    Propose the intent through a run

    Describe the on-chain action in the run prompt; the agent proposes the intent, it does not sign it.

  3. 3

    Handle the interrupt

    The runtime persists RunState and emits approval.required once policy calls for a human decision.

  4. 4

    Review the action summary

    Render chain, asset, amount, recipient or contract, fees, slippage, warnings, and expiry before deciding.

  5. 5

    Resolve with step-up

    Approve or reject with a fresh step-up token bound to that exact decision.

  6. 6

    Confirm the receipt

    Wait for broadcast and confirmation in the event ledger. Do not treat approval itself as execution.

Propose the action
const run = await client.createRun({  prompt: 'Swap 250 USDC for ETH on Base within 1% slippage',  idempotencyKey: crypto.randomUUID(),});
Required lifecycle
intent -> simulation -> policy decision -> approval       -> signer verification -> broadcast -> receipt reconciliation

Review the approval payload

  • The approval is bound to the exact payload hash, simulation hash, actor, wallet, and expiry. It cannot be reused for a different transaction.
  • Any payload change after approval is rejected outright, and broadcast is blocked entirely while the kill switch is active.
Resolve the approval
await client.resolveApproval(approvalId, 'approved', stepUpToken);

Do not report success early

Never treat the run as having executed the action until a broadcast or confirmation record exists in the event ledger. An approved decision is not the same as a settled transaction.

Was this page helpful?

Edit on GitHub