Swap one asset for another
Swaps on the confidential balance; confidential: false is refused with public_balance_exit_only, live and dry, before any provider call. A live swap requires X-Grant-Token for a live grant, and the account policy must allow swap and confidential. With dry: true it returns a quote and needs only the API key: no grant and no Idempotency-Key. An archived, deleted or frozen account, or one whose applied policy does not parse (policy_not_ready), gets no quote, and an asset GET /v1/tokens does not list is refused with unsupported_token as a live swap is. The account’s rules never refuse a dry swap: each one a live swap would fail (policy_action_denied, policy_asset_denied, schedule, USD budget, per-asset limits, actions per hour, policy_usage_unavailable when unreconciled history keeps the limits from being judged, or insufficient_balance with available_amount when the balance it sells from holds less) is listed in warnings under the live request’s code, beside spend (USD value and budget left) and fee. The agent’s account is its confidential balance. It, and the transfers and swaps made from it, live on intents.far, the NEAR Intents confidential deployment on FAR: a permissioned NEAR-protocol chain run by a small validator set with no public RPC. That keeps them off the public NEAR chain. It is access control, not cryptography, and the API cannot prove it: FAR’s operators and Defuse can read confidential state and grant others access, the 1Click solver layer sees each intent in plaintext, shielding and unshielding appear on the public chain, cross-chain deposits and withdrawals are public on their own chains and can be matched by amount and timing, and the agent has one confidential identity, its custody wallet. Wherever X-Grant-Token is required, a public_key grant may send X-Grant-Proof instead (never both): a JWT its key signs for this grant ID and request (URL, method, body and Idempotency-Key). The proof is spent on first use. A retry signs a new proof for the same grant ID and Idempotency-Key. A refused proof reads grant_proof_invalid.