# Optional real settlement (human only)

Hand these steps to the human. The coding agent stops before wallet setup, real quotes tied to user addresses, or signing. Run everything here in your own terminal, not through a coding agent, after `sh start.sh` (or `sh setup.sh`) has built the pinned starter.

This starter supports public Base (8453) USDC to Ethereum (1) USDC through Xochi's public EVM intent API. The payer and recipient must be checked by the human, and the payer must own and fund a dedicated wallet with sufficient Base USDC. The ERC-3009 flow uses a one-time origin pull and requires no blanket token allowance, Member JWT, paid x402 call or delegation.

## 1. Review

1. From the starter directory, create a new private order directory outside the project (`mkdir -m 700`).
2. Write `order.json` there in your own editor. Its fields:
   - `wallet`: the payer's 0x EVM address
   - `recipient`: the confirmed Ethereum destination address
   - `amount_atomic`
   - `max_payment_atomic`: Raxol spending cap
   - `min_receive_atomic`
   - `max_difference_atomic`: maximum input minus minimum output

   Amount fields are positive decimal strings in micro-USDC; for 25 USDC the amount is "25000000". A 30 USDC cap is "30000000". Set the receive floor and cost cap, choosing terms you would accept.
3. Review at 50 basis points of quote slippage with `sh settle.sh review` followed by the private directory path. Review obtains a wallet-bound quote but never loads a signer or executes.
4. Check both token contracts, both chains, the payer, recipient, debit, minimum receipt, maximum deduction, collection contract and both deadlines locally.

A route refusal, short expiry or cost above your bounds means stop; do not relax your policy to force a quote.

## 2. Submit

1. Install 1Password CLI and connect your local desktop vault.
2. In the order directory, create a mode-0600 `wallet-ref` file containing only the 1Password item reference for your dedicated wallet's hex private-key field. Never put the reference or key into the agent, terminal command, repo or logs. The pinned Raxol 1Password adapter reads it directly.
3. From the starter directory, run `sh settle.sh submit` followed by the private order directory. It fetches and displays a fresh exact quote.
4. Review it again and type SUBMIT in your terminal. The signer is not accessed before that.

It checks that the signer matches the payer, reserves the order directory before signing, validates the ERC-3009 pull and intent, and uses the pinned first-party submitter once. Local and on-chain validity windows are shown separately; the pull can outlive the trade quote.

## 3. Status

Use `sh settle.sh status` followed by the same directory to read the recorded intent.

- If submission is ambiguous, unavailable or already reserved, preserve the directory and check status only.
- Never rerun, delete the reservation, create a replacement order or change the nonce to get around an unresolved result.
- Even a terminal result must be checked for applicable finality before reporting settlement.
- An anonymous status or public Web3 read cannot recover owner-only information.

Optional stealth settlement and claiming or spending from an owned stealth account are separate flows outside this public-route starter.

Keep keys, JWTs, private handles, RPC credentials and wallet authorizations out of source, prompts, logs and model context. If later needed, use a user-managed local secret store wired directly to the authorized program, never to the coding agent.

## References

- Raxol source: https://github.com/DROOdotFOO/raxol-agent/tree/74c5796f33b449310e841d6325c647f6d7a83952
- Xochi discovery: https://xochi.fi/.well-known/agents.json
- Xochi API schema: https://xochi.fi/openapi.yaml
- Xochi settlement reference: https://xochi.fi/appendix/
