{"openapi":"3.1.0","info":{"title":"NEAR Intents Agent API","version":"1.0.0","description":"Backend API for AI agents that trade on NEAR Intents under an owner-signed policy.\n\nThe Agent API is an experimental, mainnet-only beta. You and your users may lose all assets used with it, or lose access to them. It is operated by NEAR Technologies Limited.\n\nBefore an owner signs `agent_create`, show the Owner Terms, OutLayer's terms and the required risk notice, and keep evidence of acceptance. Show the notice again before the owner funds the wallet. `preview.summary` ends with the notice.\n\nAuthenticate with `X-API-Key`. Create and revoke keys at partners.demo.agentsonintents.com; each expires after 365 days. Keep the key on your backend.\n\nOwner actions use generate-intent → owner wallet signs `intent.payload` unchanged → submit-intent → GET /v1/status. Agent actions (swap, withdraw, transfer, …) need no owner signature, only `X-Grant-Token` for a live owner grant (who may act); the account policy decides what every grant may do, and return a `correlation_id` for GET /v1/status.\n\nThe agent's account is its confidential balance: swaps, limit orders, transfers, deposit addresses, withdrawals and balance reads use it by default. The legacy public balance can only be emptied, by shield or a withdrawal with `confidential: false`; any other request on it is refused with `public_balance_exit_only`.\n\nErrors are JSON:API documents. Every field, parameter and error code is snake_case. Branch on `errors[].code`, never on `title`. `UNCERTAIN` means the outcome is not yet proven: keep polling the same `correlation_id` and never resubmit under a new `Idempotency-Key`. `PENDING_DEPOSIT` is a deposit address waiting for funds; a withdrawal's bridge leg reads `PROCESSING`. `NEEDS_REVIEW` stops routine polling: inspect `details.reason`, never retry, then use `refresh=true` after provider/manual resolution."},"servers":[{"url":"https://api.demo.agentsonintents.com"}],"tags":[{"name":"Owner intents"},{"name":"Status"},{"name":"Agents"},{"name":"Policy"},{"name":"Grants"},{"name":"Approvals"},{"name":"Executions"},{"name":"Native accounts"},{"name":"Meta"}],"paths":{"/v1/generate-intent":{"post":{"operationId":"generateIntent","tags":["Owner intents"],"summary":"Generate an owner intent for signing","description":"Builds the exact payload the owner's wallet must sign for one owner action and returns it as `intent: {standard, payload}`. Sign `intent.payload` unchanged with the wallet named by `standard`, then call submit-intent with the wallet's output. `agent_create` creates a pending agent and returns its id.","security":[{"ApiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`.","schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"agent_create"},"name":{"type":"string","minLength":1,"maxLength":100},"external_user_id":{"type":"string","minLength":1,"maxLength":200},"owner":{"$ref":"#/components/schemas/OwnerWallet"},"policy":{"$ref":"#/components/schemas/Policy"}},"required":["type","name","owner","policy"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"policy_update"},"agent_id":{"type":"string","pattern":"^[0-9a-f]{64}$"},"policy":{"$ref":"#/components/schemas/Policy"},"expected_revision":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","agent_id","policy","expected_revision"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"agent_freeze"},"agent_id":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["type","agent_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"agent_unfreeze"},"agent_id":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["type","agent_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"grant_issue"},"agent_id":{"type":"string","pattern":"^[0-9a-f]{64}$"},"label":{"type":"string","minLength":1,"maxLength":64,"allOf":[{"pattern":"^[^\\p{Cc}]+$"},{"pattern":"^[\\x20-\\x7e]+$"}]},"credential":{"type":"string","pattern":"^[0-9a-f]{64}$"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["type","agent_id","label","credential","expires_at"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"grant_revoke"},"agent_id":{"type":"string","pattern":"^[0-9a-f]{64}$"},"grant_id":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["type","agent_id","grant_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"execution_cancel"},"agent_id":{"type":"string","pattern":"^[0-9a-f]{64}$"},"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"}},"required":["type","agent_id","correlation_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"agent_archive"},"agent_id":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["type","agent_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"agent_restore"},"agent_id":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["type","agent_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"agent_delete"},"agent_id":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["type","agent_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"approval_vote"},"agent_id":{"type":"string","pattern":"^[0-9a-f]{64}$"},"approval_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"verdict":{"type":"string","enum":["approve","reject"]}},"required":["type","agent_id","approval_id","verdict"],"additionalProperties":false}]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateIntentResponse"}}}},"400":{"description":"Error document. Documented codes: `agent_not_bound`, `agent_not_found`, `policy_revision_conflict`, `policy_storage_beneficiary_mismatch`, `policy_owner_mismatch`, `policy_locked`, `approval_closed`, `owner_type_unsupported`, `agent_creation_quota_exceeded`, `policy_change_throttled`, `agent_unfreeze_throttled`, `wallet_already_frozen`, `wallet_already_unfrozen`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_not_bound`, `agent_not_found`, `policy_revision_conflict`, `policy_storage_beneficiary_mismatch`, `policy_owner_mismatch`, `policy_locked`, `approval_closed`, `owner_type_unsupported`, `agent_creation_quota_exceeded`, `policy_change_throttled`, `agent_unfreeze_throttled`, `wallet_already_frozen`, `wallet_already_unfrozen`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_not_bound`, `agent_not_found`, `policy_revision_conflict`, `policy_storage_beneficiary_mismatch`, `policy_owner_mismatch`, `policy_locked`, `approval_closed`, `owner_type_unsupported`, `agent_creation_quota_exceeded`, `policy_change_throttled`, `agent_unfreeze_throttled`, `wallet_already_frozen`, `wallet_already_unfrozen`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_not_bound`, `agent_not_found`, `policy_revision_conflict`, `policy_storage_beneficiary_mismatch`, `policy_owner_mismatch`, `policy_locked`, `approval_closed`, `owner_type_unsupported`, `agent_creation_quota_exceeded`, `policy_change_throttled`, `agent_unfreeze_throttled`, `wallet_already_frozen`, `wallet_already_unfrozen`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_not_bound`, `agent_not_found`, `policy_revision_conflict`, `policy_storage_beneficiary_mismatch`, `policy_owner_mismatch`, `policy_locked`, `approval_closed`, `owner_type_unsupported`, `agent_creation_quota_exceeded`, `policy_change_throttled`, `agent_unfreeze_throttled`, `wallet_already_frozen`, `wallet_already_unfrozen`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_not_bound`, `agent_not_found`, `policy_revision_conflict`, `policy_storage_beneficiary_mismatch`, `policy_owner_mismatch`, `policy_locked`, `approval_closed`, `owner_type_unsupported`, `agent_creation_quota_exceeded`, `policy_change_throttled`, `agent_unfreeze_throttled`, `wallet_already_frozen`, `wallet_already_unfrozen`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_not_bound`, `agent_not_found`, `policy_revision_conflict`, `policy_storage_beneficiary_mismatch`, `policy_owner_mismatch`, `policy_locked`, `approval_closed`, `owner_type_unsupported`, `agent_creation_quota_exceeded`, `policy_change_throttled`, `agent_unfreeze_throttled`, `wallet_already_frozen`, `wallet_already_unfrozen`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_not_bound`, `agent_not_found`, `policy_revision_conflict`, `policy_storage_beneficiary_mismatch`, `policy_owner_mismatch`, `policy_locked`, `approval_closed`, `owner_type_unsupported`, `agent_creation_quota_exceeded`, `policy_change_throttled`, `agent_unfreeze_throttled`, `wallet_already_frozen`, `wallet_already_unfrozen`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_not_bound`, `agent_not_found`, `policy_revision_conflict`, `policy_storage_beneficiary_mismatch`, `policy_owner_mismatch`, `policy_locked`, `approval_closed`, `owner_type_unsupported`, `agent_creation_quota_exceeded`, `policy_change_throttled`, `agent_unfreeze_throttled`, `wallet_already_frozen`, `wallet_already_unfrozen`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/submit-intent":{"post":{"operationId":"submitIntent","tags":["Owner intents"],"summary":"Submit a signed owner intent","description":"Submits the wallet's signature over a generated intent. `signed_data.payload` must equal the generated payload. Resubmitting the same signature is idempotent. Returns the current status; poll GET /v1/status for settlement.","security":[{"ApiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["agent_create","policy_update","agent_freeze","agent_unfreeze","grant_issue","grant_revoke","execution_cancel","agent_archive","agent_restore","agent_delete","approval_vote"]},"correlation_id":{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"},"signed_data":{"$ref":"#/components/schemas/SignedData"}},"required":["type","correlation_id","signed_data"],"additionalProperties":false}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"Error document. Documented codes: `intent_not_found`, `intent_expired`, `intent_payload_mismatch`, `intent_type_mismatch`, `signature_invalid`, `policy_revision_conflict`, `policy_delegate_expired`, `policy_storage_changed`, `deletion_assets_remaining`, `policy_locked`, `sponsor_balance_insufficient`, `sponsor_busy`, `policy_change_throttled`, `agent_unfreeze_throttled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `intent_not_found`, `intent_expired`, `intent_payload_mismatch`, `intent_type_mismatch`, `signature_invalid`, `policy_revision_conflict`, `policy_delegate_expired`, `policy_storage_changed`, `deletion_assets_remaining`, `policy_locked`, `sponsor_balance_insufficient`, `sponsor_busy`, `policy_change_throttled`, `agent_unfreeze_throttled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `intent_not_found`, `intent_expired`, `intent_payload_mismatch`, `intent_type_mismatch`, `signature_invalid`, `policy_revision_conflict`, `policy_delegate_expired`, `policy_storage_changed`, `deletion_assets_remaining`, `policy_locked`, `sponsor_balance_insufficient`, `sponsor_busy`, `policy_change_throttled`, `agent_unfreeze_throttled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `intent_not_found`, `intent_expired`, `intent_payload_mismatch`, `intent_type_mismatch`, `signature_invalid`, `policy_revision_conflict`, `policy_delegate_expired`, `policy_storage_changed`, `deletion_assets_remaining`, `policy_locked`, `sponsor_balance_insufficient`, `sponsor_busy`, `policy_change_throttled`, `agent_unfreeze_throttled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `intent_not_found`, `intent_expired`, `intent_payload_mismatch`, `intent_type_mismatch`, `signature_invalid`, `policy_revision_conflict`, `policy_delegate_expired`, `policy_storage_changed`, `deletion_assets_remaining`, `policy_locked`, `sponsor_balance_insufficient`, `sponsor_busy`, `policy_change_throttled`, `agent_unfreeze_throttled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `intent_not_found`, `intent_expired`, `intent_payload_mismatch`, `intent_type_mismatch`, `signature_invalid`, `policy_revision_conflict`, `policy_delegate_expired`, `policy_storage_changed`, `deletion_assets_remaining`, `policy_locked`, `sponsor_balance_insufficient`, `sponsor_busy`, `policy_change_throttled`, `agent_unfreeze_throttled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `intent_not_found`, `intent_expired`, `intent_payload_mismatch`, `intent_type_mismatch`, `signature_invalid`, `policy_revision_conflict`, `policy_delegate_expired`, `policy_storage_changed`, `deletion_assets_remaining`, `policy_locked`, `sponsor_balance_insufficient`, `sponsor_busy`, `policy_change_throttled`, `agent_unfreeze_throttled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `intent_not_found`, `intent_expired`, `intent_payload_mismatch`, `intent_type_mismatch`, `signature_invalid`, `policy_revision_conflict`, `policy_delegate_expired`, `policy_storage_changed`, `deletion_assets_remaining`, `policy_locked`, `sponsor_balance_insufficient`, `sponsor_busy`, `policy_change_throttled`, `agent_unfreeze_throttled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `intent_not_found`, `intent_expired`, `intent_payload_mismatch`, `intent_type_mismatch`, `signature_invalid`, `policy_revision_conflict`, `policy_delegate_expired`, `policy_storage_changed`, `deletion_assets_remaining`, `policy_locked`, `sponsor_balance_insufficient`, `sponsor_busy`, `policy_change_throttled`, `agent_unfreeze_throttled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/status":{"get":{"operationId":"getStatus","tags":["Status"],"summary":"Get the status of an intent or execution","description":"Reads the status of any correlation id and reconciles it with chain and provider state. `wait_ms` stops at terminal, signature-needed or review-required status. `NEEDS_REVIEW` stops routine provider polling; after review, `refresh=true` explicitly observes the original request. It can also repair a historical failed execution's spend charge when the provider proves no funds moved.","security":[{"ApiKey":[]}],"parameters":[{"name":"correlation_id","in":"query","required":true,"schema":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]}},{"name":"wait_ms","in":"query","required":false,"schema":{"default":0,"type":"integer","minimum":0,"maximum":30000}},{"name":"refresh","in":"query","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"Error document. Documented codes: `operation_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `operation_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `operation_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `operation_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `operation_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `operation_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `operation_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `operation_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `operation_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/history":{"get":{"operationId":"getHistory","tags":["Status"],"summary":"List an agent's intents and executions, newest first","description":"Deposit addresses nothing was paid into, still open or already closed, are left out unless `include_unpaid=true`; read one by its `correlation_id` with `GET /v1/status`.","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":128}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"include_unpaid","in":"query","required":false,"schema":{"default":false,"type":"boolean"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/StatusResponse"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/operations/{correlation_id}/proof":{"get":{"operationId":"getOperationProof","tags":["Status"],"summary":"Prove an execution's audit trail from the attested transparency log","description":"Returns the retained audit events of one execution. A `PROVEN` event carries a `c2sp.org/tlog-proof@v1` inclusion proof; its evidence hashes to the opening's evidenceHash. The top-level checkpoint carries the log and notary signatures, bound to the notary's birth attestation. Send from_size from an independently trusted checkpoint and pass that checkpoint to verifyOperationProof: signatures alone do not reject a coordinated rollback. A server behind that checkpoint returns 409 transparency_checkpoint_behind. Consistency proves continuation from the trusted state, not response completeness or global freshness. A recent event reads PENDING until the next publication.","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"correlation_id","in":"path","required":true,"schema":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"}},{"name":"from_size","in":"query","required":false,"schema":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","pattern":"^[0-9a-f]{64}$"},"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"origin":{"type":"string"},"checkpoint":{"type":["string","null"]},"consistency":{"anyOf":[{"type":"object","properties":{"from_size":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"hashes":{"maxItems":64,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9+/]+={0,2}$"}}},"required":["from_size","hashes"],"additionalProperties":false},{"type":"null"}]},"notary":{"anyOf":[{"type":"object","properties":{"log_key":{"type":"string"},"notary_key":{"type":"string"},"signing_address":{"type":"string","pattern":"^[0-9a-f]{128}$"},"birth":{"type":"object","properties":{"attestation":{"type":"string","pattern":"^(?:[0-9a-f]{2})+$"},"report_data":{"type":"string","pattern":"^[0-9a-f]{128}$"},"previous":{"anyOf":[{"type":"object","properties":{"note":{"type":"string"},"log_key":{"type":"string"},"notary_key":{"type":"string"}},"required":["note","log_key","notary_key"],"additionalProperties":false},{"type":"null"}]}},"required":["attestation","report_data","previous"],"additionalProperties":false},"ita":{"anyOf":[{"type":"object","properties":{"token":{"type":"string"},"nonce":{"type":"string","pattern":"^[0-9a-f]{64}$"},"checkpoint":{"type":"string"},"verifier_nonce":{"type":"object","properties":{"val":{"type":"string","pattern":"^[A-Za-z0-9+/]+={0,2}$"},"iat":{"type":"string","pattern":"^[A-Za-z0-9+/]+={0,2}$"},"signature":{"type":"string","pattern":"^[A-Za-z0-9+/]+={0,2}$"}},"required":["val","iat","signature"],"additionalProperties":false},"runtime_data":{"type":"string","pattern":"^[A-Za-z0-9+/]+={0,2}$"},"event_log":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"imr":{"type":"number","const":3},"event_type":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"digest":{"type":"string","pattern":"^[0-9a-f]{96}$"},"event":{"type":"string","maxLength":256},"event_payload":{"type":"string","maxLength":8192,"pattern":"^(?:[0-9a-f]{2})*$"}},"required":["imr","event_type","digest","event","event_payload"],"additionalProperties":false}},"signing_key":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["token","nonce","checkpoint","verifier_nonce","runtime_data","event_log","signing_key"],"additionalProperties":false},{"type":"null"}]}},"required":["log_key","notary_key","signing_address","birth","ita"],"additionalProperties":false},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"status":{"type":"string","enum":["PROVEN","PENDING","UNLOGGED"]},"proof":{"type":["string","null"]},"evidence":{"type":["string","null"]}},"required":["action","created_at","status","proof","evidence"],"additionalProperties":false}}},"required":["agent_id","correlation_id","origin","checkpoint","consistency","notary","events"],"additionalProperties":false}}}},"400":{"description":"Error document. Documented codes: `operation_not_found`, `transparency_log_disabled`, `transparency_checkpoint_behind`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `operation_not_found`, `transparency_log_disabled`, `transparency_checkpoint_behind`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `operation_not_found`, `transparency_log_disabled`, `transparency_checkpoint_behind`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `operation_not_found`, `transparency_log_disabled`, `transparency_checkpoint_behind`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `operation_not_found`, `transparency_log_disabled`, `transparency_checkpoint_behind`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `operation_not_found`, `transparency_log_disabled`, `transparency_checkpoint_behind`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `operation_not_found`, `transparency_log_disabled`, `transparency_checkpoint_behind`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `operation_not_found`, `transparency_log_disabled`, `transparency_checkpoint_behind`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `operation_not_found`, `transparency_log_disabled`, `transparency_checkpoint_behind`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/operations/{correlation_id}/receipt":{"get":{"operationId":"getReceipt","tags":["Status"],"summary":"Get the receipt of a completed transfer, withdrawal, swap, limit order or deposit","description":"Returns the receipt of a completed transfer, withdrawal, swap, limit order or deposit: a leaf of the log written with the completion event, which anyone can verify with verifyReceipt (or, for a transfer or withdrawal a payee expects, verifyPaymentReceipt) against a trusted checkpoint and the log's public tiles. The receipt commits only to the settled terms, the execution's id and the time; it names no tenant, agent, account, wallet, key or grant, so it is safe to hand to a payee. `details` is the account's own view: those terms plus `usd_value`, the agent's `note`, `grant_id` and `policy_epoch`, which are never in the receipt. A limit order is completed when funded and placed (not filled), and its receipt proves only that; a deposit's proves the funds arrived and were credited, not who sent them. `receipt` is null while `PENDING` (the latest checkpoint does not cover it yet; read again later) and for `UNLOGGED` (recorded before the log started), which never becomes `PROVEN`. It is read from the audit log alone, so it stays readable for the audit retention period whatever became of the operation's history. An operation of another type or one that has not completed is refused with 409 receipt_not_available; other executions are proved with getOperationProof.","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"correlation_id","in":"path","required":true,"schema":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"type":{"type":"string","const":"transfer"},"status":{"type":"string","enum":["PROVEN","PENDING","UNLOGGED"]},"details":{"type":"object","properties":{"asset":{"type":"string"},"amount":{"type":"string"},"recipient":{"type":"string"},"confidential":{"type":"boolean"},"reference":{"type":"string"},"settled_at":{"type":"string"},"usd_value":{"type":"string","pattern":"^[0-9]{1,24}\\.[0-9]{6}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"grant_id":{"type":"string"},"policy_epoch":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"intent_hash":{"type":"string"},"transfer_intent_hash":{"type":"string"},"tx_hash":{"type":"string"},"destination_tx_hash":{"type":"string"},"settlement_tx_hash":{"type":"string"},"receipt_hash":{"type":"string"}},"required":["asset","amount","recipient","confidential","settled_at"],"additionalProperties":false},"receipt":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","const":1},"origin":{"type":"string"},"leaf_index":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"opening":{"type":"string"},"terms":{"type":"string"}},"required":["version","origin","leaf_index","opening","terms"],"additionalProperties":false},{"type":"null"}]}},"required":["correlation_id","type","status","details","receipt"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"type":{"type":"string","const":"withdraw"},"status":{"type":"string","enum":["PROVEN","PENDING","UNLOGGED"]},"details":{"type":"object","properties":{"asset":{"type":"string"},"amount":{"type":"string"},"recipient":{"type":"string"},"confidential":{"type":"boolean"},"reference":{"type":"string"},"chain":{"type":"string"},"memo":{"type":"string"},"amount_out":{"type":"string"},"settled_at":{"type":"string"},"usd_value":{"type":"string","pattern":"^[0-9]{1,24}\\.[0-9]{6}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"grant_id":{"type":"string"},"policy_epoch":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"intent_hash":{"type":"string"},"transfer_intent_hash":{"type":"string"},"tx_hash":{"type":"string"},"destination_tx_hash":{"type":"string"},"settlement_tx_hash":{"type":"string"},"receipt_hash":{"type":"string"}},"required":["asset","amount","recipient","confidential","chain","settled_at"],"additionalProperties":false},"receipt":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","const":1},"origin":{"type":"string"},"leaf_index":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"opening":{"type":"string"},"terms":{"type":"string"}},"required":["version","origin","leaf_index","opening","terms"],"additionalProperties":false},{"type":"null"}]}},"required":["correlation_id","type","status","details","receipt"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"type":{"type":"string","const":"swap"},"status":{"type":"string","enum":["PROVEN","PENDING","UNLOGGED"]},"details":{"type":"object","properties":{"origin_asset":{"type":"string"},"destination_asset":{"type":"string"},"amount":{"type":"string"},"confidential":{"type":"boolean"},"amount_out":{"type":"string"},"min_amount_out":{"type":"string"},"settled_at":{"type":"string"},"usd_value":{"type":"string","pattern":"^[0-9]{1,24}\\.[0-9]{6}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"grant_id":{"type":"string"},"policy_epoch":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"intent_hash":{"type":"string"},"transfer_intent_hash":{"type":"string"},"tx_hash":{"type":"string"},"destination_tx_hash":{"type":"string"},"settlement_tx_hash":{"type":"string"},"receipt_hash":{"type":"string"}},"required":["origin_asset","destination_asset","amount","confidential","settled_at"],"additionalProperties":false},"receipt":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","const":1},"origin":{"type":"string"},"leaf_index":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"opening":{"type":"string"},"terms":{"type":"string"}},"required":["version","origin","leaf_index","opening","terms"],"additionalProperties":false},{"type":"null"}]}},"required":["correlation_id","type","status","details","receipt"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"type":{"type":"string","const":"limit_order"},"status":{"type":"string","enum":["PROVEN","PENDING","UNLOGGED"]},"details":{"type":"object","properties":{"origin_asset":{"type":"string"},"destination_asset":{"type":"string"},"amount":{"type":"string"},"confidential":{"type":"boolean"},"amount_out":{"type":"string"},"side":{"type":"string","enum":["sell","buy"]},"price":{"type":"string"},"quantity":{"type":"string"},"deadline":{"type":"string"},"order_id":{"type":"string"},"settled_at":{"type":"string"},"usd_value":{"type":"string","pattern":"^[0-9]{1,24}\\.[0-9]{6}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"grant_id":{"type":"string"},"policy_epoch":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"intent_hash":{"type":"string"},"transfer_intent_hash":{"type":"string"},"tx_hash":{"type":"string"},"destination_tx_hash":{"type":"string"},"settlement_tx_hash":{"type":"string"},"receipt_hash":{"type":"string"}},"required":["origin_asset","destination_asset","amount","confidential","side","price","quantity","order_id","settled_at"],"additionalProperties":false},"receipt":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","const":1},"origin":{"type":"string"},"leaf_index":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"opening":{"type":"string"},"terms":{"type":"string"}},"required":["version","origin","leaf_index","opening","terms"],"additionalProperties":false},{"type":"null"}]}},"required":["correlation_id","type","status","details","receipt"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"type":{"type":"string","const":"deposit"},"status":{"type":"string","enum":["PROVEN","PENDING","UNLOGGED"]},"details":{"type":"object","properties":{"origin_asset":{"type":"string"},"destination_asset":{"type":"string"},"amount":{"type":"string"},"confidential":{"type":"boolean"},"deposited_amount":{"type":"string"},"amount_out":{"type":"string"},"deposit_address":{"type":"string"},"deposit_tx_hash":{"type":"string"},"settled_at":{"type":"string"},"usd_value":{"type":"string","pattern":"^[0-9]{1,24}\\.[0-9]{6}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"grant_id":{"type":"string"},"policy_epoch":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"intent_hash":{"type":"string"},"transfer_intent_hash":{"type":"string"},"tx_hash":{"type":"string"},"destination_tx_hash":{"type":"string"},"settlement_tx_hash":{"type":"string"},"receipt_hash":{"type":"string"}},"required":["origin_asset","confidential","settled_at"],"additionalProperties":false},"receipt":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","const":1},"origin":{"type":"string"},"leaf_index":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"opening":{"type":"string"},"terms":{"type":"string"}},"required":["version","origin","leaf_index","opening","terms"],"additionalProperties":false},{"type":"null"}]}},"required":["correlation_id","type","status","details","receipt"],"additionalProperties":false}]}}}},"400":{"description":"Error document. Documented codes: `operation_not_found`, `receipt_not_available`, `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `operation_not_found`, `receipt_not_available`, `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `operation_not_found`, `receipt_not_available`, `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `operation_not_found`, `receipt_not_available`, `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `operation_not_found`, `receipt_not_available`, `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `operation_not_found`, `receipt_not_available`, `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `operation_not_found`, `receipt_not_available`, `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `operation_not_found`, `receipt_not_available`, `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `operation_not_found`, `receipt_not_available`, `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/receipts":{"get":{"operationId":"listReceipts","tags":["Status"],"summary":"List an agent's completed executions with their receipts, newest first","description":"Every completed transfer, withdrawal, swap, limit order (completed: funded and placed, not filled) and deposit of the agent whose receipt is retained, newest first, in the shape getReceipt returns; `type` keeps one type. Page with `cursor` and `limit`: with `type`, a page may hold fewer than `limit` items while `next_cursor` is set, so read on until it is null.","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":128}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["transfer","withdraw","swap","limit_order","deposit"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"type":{"type":"string","const":"transfer"},"status":{"type":"string","enum":["PROVEN","PENDING","UNLOGGED"]},"details":{"type":"object","properties":{"asset":{"type":"string"},"amount":{"type":"string"},"recipient":{"type":"string"},"confidential":{"type":"boolean"},"reference":{"type":"string"},"settled_at":{"type":"string"},"usd_value":{"type":"string","pattern":"^[0-9]{1,24}\\.[0-9]{6}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"grant_id":{"type":"string"},"policy_epoch":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"intent_hash":{"type":"string"},"transfer_intent_hash":{"type":"string"},"tx_hash":{"type":"string"},"destination_tx_hash":{"type":"string"},"settlement_tx_hash":{"type":"string"},"receipt_hash":{"type":"string"}},"required":["asset","amount","recipient","confidential","settled_at"],"additionalProperties":false},"receipt":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","const":1},"origin":{"type":"string"},"leaf_index":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"opening":{"type":"string"},"terms":{"type":"string"}},"required":["version","origin","leaf_index","opening","terms"],"additionalProperties":false},{"type":"null"}]}},"required":["correlation_id","type","status","details","receipt"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"type":{"type":"string","const":"withdraw"},"status":{"type":"string","enum":["PROVEN","PENDING","UNLOGGED"]},"details":{"type":"object","properties":{"asset":{"type":"string"},"amount":{"type":"string"},"recipient":{"type":"string"},"confidential":{"type":"boolean"},"reference":{"type":"string"},"chain":{"type":"string"},"memo":{"type":"string"},"amount_out":{"type":"string"},"settled_at":{"type":"string"},"usd_value":{"type":"string","pattern":"^[0-9]{1,24}\\.[0-9]{6}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"grant_id":{"type":"string"},"policy_epoch":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"intent_hash":{"type":"string"},"transfer_intent_hash":{"type":"string"},"tx_hash":{"type":"string"},"destination_tx_hash":{"type":"string"},"settlement_tx_hash":{"type":"string"},"receipt_hash":{"type":"string"}},"required":["asset","amount","recipient","confidential","chain","settled_at"],"additionalProperties":false},"receipt":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","const":1},"origin":{"type":"string"},"leaf_index":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"opening":{"type":"string"},"terms":{"type":"string"}},"required":["version","origin","leaf_index","opening","terms"],"additionalProperties":false},{"type":"null"}]}},"required":["correlation_id","type","status","details","receipt"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"type":{"type":"string","const":"swap"},"status":{"type":"string","enum":["PROVEN","PENDING","UNLOGGED"]},"details":{"type":"object","properties":{"origin_asset":{"type":"string"},"destination_asset":{"type":"string"},"amount":{"type":"string"},"confidential":{"type":"boolean"},"amount_out":{"type":"string"},"min_amount_out":{"type":"string"},"settled_at":{"type":"string"},"usd_value":{"type":"string","pattern":"^[0-9]{1,24}\\.[0-9]{6}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"grant_id":{"type":"string"},"policy_epoch":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"intent_hash":{"type":"string"},"transfer_intent_hash":{"type":"string"},"tx_hash":{"type":"string"},"destination_tx_hash":{"type":"string"},"settlement_tx_hash":{"type":"string"},"receipt_hash":{"type":"string"}},"required":["origin_asset","destination_asset","amount","confidential","settled_at"],"additionalProperties":false},"receipt":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","const":1},"origin":{"type":"string"},"leaf_index":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"opening":{"type":"string"},"terms":{"type":"string"}},"required":["version","origin","leaf_index","opening","terms"],"additionalProperties":false},{"type":"null"}]}},"required":["correlation_id","type","status","details","receipt"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"type":{"type":"string","const":"limit_order"},"status":{"type":"string","enum":["PROVEN","PENDING","UNLOGGED"]},"details":{"type":"object","properties":{"origin_asset":{"type":"string"},"destination_asset":{"type":"string"},"amount":{"type":"string"},"confidential":{"type":"boolean"},"amount_out":{"type":"string"},"side":{"type":"string","enum":["sell","buy"]},"price":{"type":"string"},"quantity":{"type":"string"},"deadline":{"type":"string"},"order_id":{"type":"string"},"settled_at":{"type":"string"},"usd_value":{"type":"string","pattern":"^[0-9]{1,24}\\.[0-9]{6}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"grant_id":{"type":"string"},"policy_epoch":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"intent_hash":{"type":"string"},"transfer_intent_hash":{"type":"string"},"tx_hash":{"type":"string"},"destination_tx_hash":{"type":"string"},"settlement_tx_hash":{"type":"string"},"receipt_hash":{"type":"string"}},"required":["origin_asset","destination_asset","amount","confidential","side","price","quantity","order_id","settled_at"],"additionalProperties":false},"receipt":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","const":1},"origin":{"type":"string"},"leaf_index":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"opening":{"type":"string"},"terms":{"type":"string"}},"required":["version","origin","leaf_index","opening","terms"],"additionalProperties":false},{"type":"null"}]}},"required":["correlation_id","type","status","details","receipt"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"type":{"type":"string","const":"deposit"},"status":{"type":"string","enum":["PROVEN","PENDING","UNLOGGED"]},"details":{"type":"object","properties":{"origin_asset":{"type":"string"},"destination_asset":{"type":"string"},"amount":{"type":"string"},"confidential":{"type":"boolean"},"deposited_amount":{"type":"string"},"amount_out":{"type":"string"},"deposit_address":{"type":"string"},"deposit_tx_hash":{"type":"string"},"settled_at":{"type":"string"},"usd_value":{"type":"string","pattern":"^[0-9]{1,24}\\.[0-9]{6}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"grant_id":{"type":"string"},"policy_epoch":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"intent_hash":{"type":"string"},"transfer_intent_hash":{"type":"string"},"tx_hash":{"type":"string"},"destination_tx_hash":{"type":"string"},"settlement_tx_hash":{"type":"string"},"receipt_hash":{"type":"string"}},"required":["origin_asset","confidential","settled_at"],"additionalProperties":false},"receipt":{"anyOf":[{"type":"object","properties":{"version":{"type":"number","const":1},"origin":{"type":"string"},"leaf_index":{"type":"string","pattern":"^(0|[1-9][0-9]{0,19})$"},"opening":{"type":"string"},"terms":{"type":"string"}},"required":["version","origin","leaf_index","opening","terms"],"additionalProperties":false},{"type":"null"}]}},"required":["correlation_id","type","status","details","receipt"],"additionalProperties":false}]}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Error document. Documented codes: `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `transparency_log_disabled`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents":{"get":{"operationId":"listAgents","tags":["Agents"],"summary":"List agents","security":[{"ApiKey":[]}],"parameters":[{"name":"external_user_id","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/AgentView"}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}":{"get":{"operationId":"getAgent","tags":["Agents"],"summary":"Get an agent","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentView"}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/wallet":{"get":{"operationId":"getWallet","tags":["Agents"],"summary":"Get the agent's custody wallet identity","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"wallet_id":{"type":"string","minLength":1,"maxLength":256},"near_account_id":{"type":"string","minLength":2,"maxLength":64},"evm_account_id":{"type":["string","null"]},"solana_account_id":{"type":["string","null"]}},"required":["wallet_id","near_account_id","evm_account_id","solana_account_id"],"additionalProperties":false}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/balances":{"get":{"operationId":"getBalances","tags":["Agents"],"summary":"Get the agent's balances","description":"`source=confidential` (default), the agent's account, and `source=public`, the legacy public balance that can only be shielded or withdrawn, list every non-zero asset. Amounts are atomic.","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"source","in":"query","required":false,"schema":{"default":"confidential","type":"string","enum":["public","confidential"]}},{"name":"asset","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":256}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"near_account_id":{"type":"string","minLength":2,"maxLength":64},"source":{"type":"string","enum":["public","confidential"]},"balances":{"maxItems":4096,"type":"array","items":{"type":"object","properties":{"asset_id":{"type":"string","minLength":1,"maxLength":256},"symbol":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"decimals":{"anyOf":[{"type":"integer","minimum":0,"maximum":36},{"type":"null"}]},"blockchain":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"price":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"price_updated_at":{"type":["string","null"]},"price_expires_at":{"type":["string","null"]},"balance_raw":{"type":"string","pattern":"^[0-9]{1,78}$"},"balance":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$"},{"type":"null"}]},"available_raw":{"type":"string","pattern":"^[0-9]{1,78}$"},"available":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$"},{"type":"null"}]}},"required":["asset_id","symbol","decimals","blockchain","price","price_updated_at","price_expires_at","balance_raw","balance","available_raw","available"],"additionalProperties":false}}},"required":["near_account_id","source","balances"],"additionalProperties":false}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/policy":{"get":{"operationId":"getPolicy","tags":["Policy"],"summary":"Get the complete policy, active budget usage and scheduling status","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyView"}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/policy/history":{"get":{"operationId":"getPolicyHistory","tags":["Policy"],"summary":"List signed policy revisions, newest first","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"wallet_id":{"type":"string","minLength":1,"maxLength":256},"revision":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"policy_hash":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["NONE","SIGNED","APPLIED","FAILED"]},"applied_at":{"type":["string","null"]},"transaction_hash":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"policy":{"anyOf":[{"$ref":"#/components/schemas/Policy"},{"type":"null"}]}},"required":["wallet_id","revision","policy_hash","status","applied_at","transaction_hash","policy"],"additionalProperties":false}},"next_cursor":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/grants":{"get":{"operationId":"listGrants","tags":["Grants"],"summary":"List every grant for the agent, including revoked ones","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/GrantView"}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/executions/scheduled":{"get":{"operationId":"listScheduledExecutions","tags":["Grants"],"summary":"List executions the timelock holds, earliest release first","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":128}},{"name":"limit","in":"query","required":false,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"execute_after":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"state":{"type":"string","enum":["waiting","dispatching"]},"action":{"type":["string","null"]}},"required":["correlation_id","execute_after","state","action"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["data","next_cursor"],"additionalProperties":false}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/containment":{"get":{"operationId":"getContainment","tags":["Grants"],"summary":"Get the agent's API enforcement state and open work","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"grants_cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"operations_cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"generated_at":{"type":"string"},"wallet":{"anyOf":[{"type":"object","properties":{"wallet_id":{"type":["string","null"]},"near_account_id":{"type":["string","null"]},"status":{"type":"string"}},"required":["wallet_id","near_account_id","status"],"additionalProperties":false},{"type":"null"}]},"grants":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"grant_id":{"type":"string","pattern":"^[0-9a-f]{64}$"},"label":{"type":"string"},"owner_epoch":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"issued_at":{"type":"string"},"expires_at":{"type":"string"},"revoked_at":{"type":["string","null"]},"grant_record_current":{"type":"boolean"},"findings":{"type":"array","items":{"type":"string"}}},"required":["grant_id","label","owner_epoch","issued_at","expires_at","revoked_at","grant_record_current","findings"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"additionalProperties":false},"pending_operations":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"operation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"kind":{"type":"string","enum":["execute","policy","native"]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"action":{"type":["string","null"]},"disposition":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["operation_id","kind","status","failure_code","action","disposition","created_at","updated_at"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["data","next_cursor","has_more"],"additionalProperties":false},"provider_boundary":{"type":"object","properties":{"enforcement":{"type":"string","const":"unverified"},"direct_provider_key_bypass":{"type":"string","const":"unverified"}},"required":["enforcement","direct_provider_key_bypass"],"additionalProperties":false}},"required":["generated_at","wallet","grants","pending_operations","provider_boundary"],"additionalProperties":false}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/approvals":{"get":{"operationId":"listApprovals","tags":["Approvals"],"summary":"List requests waiting for approval","description":"The wallet's pending approvals, at most 100. Under `owner_approval` an agent can have at most 100 requests waiting for the owner (`approval_backlog_full` refuses the next), so `truncated` is true only when the provider holds more than the API created: approve or reject some to see the rest. A listing may be up to 10 seconds old; a vote always reads its approval live.","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"approval_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"wallet_id":{"type":"string","minLength":1},"wallet_pubkey":{"type":"string","minLength":1},"request_hash":{"type":"string","minLength":1},"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED","EXPIRED"]},"request_type":{"type":"string"},"request_data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"required_approvals":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"expires_at":{"type":"string"}},"required":["approval_id","wallet_id","wallet_pubkey","request_hash","status","request_type","request_data","required_approvals","expires_at"],"additionalProperties":false}},"truncated":{"type":"boolean"}},"required":["data","truncated"],"additionalProperties":false}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/approvals/{approval_id}":{"get":{"operationId":"getApproval","tags":["Approvals"],"summary":"Get one approval request","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"approval_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"approval_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"wallet_id":{"type":"string","minLength":1},"wallet_pubkey":{"type":"string","minLength":1},"request_hash":{"type":"string","minLength":1},"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED","EXPIRED"]},"request_type":{"type":"string"},"request_data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"required_approvals":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"expires_at":{"type":"string"}},"required":["approval_id","wallet_id","wallet_pubkey","request_hash","status","request_type","request_data","required_approvals","expires_at"],"additionalProperties":false}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/addresses/{chain}":{"get":{"operationId":"getAddress","tags":["Agents"],"summary":"Get the custody wallet's NEAR address","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"chain","in":"path","required":true,"schema":{"type":"string","const":"near"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string","const":"near"},"address":{"type":"string"}},"required":["chain","address"],"additionalProperties":{}}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/provider/{kind}":{"get":{"operationId":"listProviderRecords","tags":["Agents"],"summary":"Read the wallet provider's request, audit or deposit records for reconciliation","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["requests","audit","deposits","deposit_history"]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":10000}},{"name":"type","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":256}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/swap":{"post":{"operationId":"swap","tags":["Executions"],"summary":"Swap one asset for another","description":"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.","security":[{"ApiKey":[],"GrantToken":[]},{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`. Required for a live request; a `dry` preview needs none.","schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"origin_asset":{"type":"string","minLength":1,"maxLength":256},"destination_asset":{"type":"string","minLength":1,"maxLength":256},"amount":{"type":"string","pattern":"^(?!0+$)[0-9]{1,78}$"},"min_amount_out":{"type":"string","pattern":"^[0-9]{1,78}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"confidential":{"default":true,"type":"boolean"},"dry":{"default":false,"type":"boolean"}},"required":["origin_asset","destination_asset","amount"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success: a `dry` preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/limit-orders":{"post":{"operationId":"placeLimitOrder","tags":["Executions"],"summary":"Place a resting limit order","description":"Places a limit order on the agent's confidential balance and funds it in full; `confidential: false` is refused with `public_balance_exit_only`, live and dry, before any provider call. A `sell` spends `quantity` of `base_asset`; a `buy` spends the `quote_asset` that `quantity` costs at `price`, rounded up. The order rests until it fills, is cancelled or reaches `deadline` (default and maximum seven days); proceeds and refunds return to the balance that funded it. A live order requires `X-Grant-Token` for a live grant, and the account policy must allow `limit_order` and `confidential`. It then runs through the same rules as a swap on the asset it spends: assets, per-asset limits, actions per hour, the USD budget (charged on the spent value when the order is placed, and not given back when it is cancelled), `timelock_ms`, `schedule` and `owner_approval`. `destinations` does not apply. Its price is judged against the market when it is placed (and again when a timelock or approval releases it): a sell at most `limit_order.max_deviation_bps` (100 when omitted) below the base asset's USD price over the quote asset's, a buy at most that far above, or it is refused with `policy_price_deviation_exceeded`; with no fresh price for either asset it is refused with `market_price_unavailable`. A timelocked order whose release finds no fresh price waits and is released again for a few minutes before it fails with `market_price_unavailable`; one priced outside the bound at release fails at once. An owner's approve vote refused for the price releases nothing: the order stays held (see `owner_approval`). A better price than the market is not limited. The order must be worth at least 0.1 USD (`amount_too_low`); an order whose spent asset has no fresh USD price skips this check, and the provider applies its own minimum. `SUCCESS` means the order is funded and resting, not filled: `details.order_id` names it, and the limit-orders reads below follow its fills. 1Click adds its own app fee to every order (`app_fees` on the order), which is not an API fee. With `dry: true` it needs only the API key (no grant, no `Idempotency-Key`), places no order and returns `spend` (USD value and budget left), `quote` (what the order spends and what a full fill delivers) and `warnings` listing each rule a live order would fail under its code. 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.","security":[{"ApiKey":[],"GrantToken":[]},{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`. Required for a live request; a `dry` preview needs none.","schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"base_asset":{"type":"string","minLength":1,"maxLength":256},"quote_asset":{"type":"string","minLength":1,"maxLength":256},"side":{"type":"string","enum":["sell","buy"]},"quantity":{"type":"string","pattern":"^(?!0+$)[0-9]{1,78}$"},"price":{"type":"string","maxLength":40,"pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$"},"deadline":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"confidential":{"default":true,"type":"boolean"},"dry":{"default":false,"type":"boolean"}},"required":["base_asset","quote_asset","side","quantity","price"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success: a `dry` preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `policy_price_deviation_exceeded`, `market_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `policy_price_deviation_exceeded`, `market_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `policy_price_deviation_exceeded`, `market_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `policy_price_deviation_exceeded`, `market_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `policy_price_deviation_exceeded`, `market_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `policy_price_deviation_exceeded`, `market_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `policy_price_deviation_exceeded`, `market_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `policy_price_deviation_exceeded`, `market_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `policy_price_deviation_exceeded`, `market_price_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}},"get":{"operationId":"listLimitOrders","tags":["Executions"],"summary":"List the agent's limit orders","description":"The custody provider's list of this agent's orders, newest first, in 1Click's own snake_case fields. `open=true` lists only orders still resting; `limit` (1 to 100) and `offset` page it. The list does not refresh an order's status; read one order for its live state.","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"open","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"order_id":{"type":"string","maxLength":128},"order_type":{"type":"string","maxLength":32},"side":{"type":"string","enum":["sell","buy"]},"base_asset":{"type":"string","maxLength":256},"quote_asset":{"type":"string","maxLength":256},"quantity":{"type":"string","pattern":"^[0-9]{1,78}$"},"price":{"type":"string","maxLength":64},"fill_status":{"type":"string","maxLength":64},"payout_status":{"type":"string","maxLength":64},"is_payout_status_final":{"type":"boolean"},"deposited_amount":{"type":"string","pattern":"^[0-9]{1,78}$"},"partial_fills":{"anyOf":[{"type":"array","items":{}},{"type":"null"}]},"payouts":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"app_fees":{"type":"array","items":{"type":"object","properties":{"recipient":{"type":"string"},"fee":{"type":"number"}},"additionalProperties":{}}},"deadline":{"type":["string","null"]},"created_at":{"type":"string"},"transfer_intent_hash":{"type":["string","null"]}},"required":["order_id"],"additionalProperties":{}}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Error document. Documented codes: `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/limit-orders/{order_id}":{"get":{"operationId":"getLimitOrder","tags":["Executions"],"summary":"Get one limit order","description":"The order's live state from 1Click: `fill_status`, `partial_fills`, `payouts` and `is_payout_status_final`, which is true once nothing more can be paid out or refunded for it.","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"order_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"order_id":{"type":"string","maxLength":128},"order_type":{"type":"string","maxLength":32},"side":{"type":"string","enum":["sell","buy"]},"base_asset":{"type":"string","maxLength":256},"quote_asset":{"type":"string","maxLength":256},"quantity":{"type":"string","pattern":"^[0-9]{1,78}$"},"price":{"type":"string","maxLength":64},"fill_status":{"type":"string","maxLength":64},"payout_status":{"type":"string","maxLength":64},"is_payout_status_final":{"type":"boolean"},"deposited_amount":{"type":"string","pattern":"^[0-9]{1,78}$"},"partial_fills":{"anyOf":[{"type":"array","items":{}},{"type":"null"}]},"payouts":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"app_fees":{"type":"array","items":{"type":"object","properties":{"recipient":{"type":"string"},"fee":{"type":"number"}},"additionalProperties":{}}},"deadline":{"type":["string","null"]},"created_at":{"type":"string"},"transfer_intent_hash":{"type":["string","null"]}},"required":["order_id"],"additionalProperties":{}}}}},"400":{"description":"Error document. Documented codes: `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/limit-orders/{order_id}/cancel":{"post":{"operationId":"cancelLimitOrder","tags":["Executions"],"summary":"Cancel one limit order","description":"Cancels a resting order; what is unfilled is refunded to the balance that funded it, the legacy public balance for an order recorded there. Requires `X-Grant-Token` for a live grant. Cancelling spends no budget and waits for no timelock, schedule or approval, and it works while the agent is frozen and after the policy stops allowing `limit_order`: the owner's rules never trap an order. Only an archived or deleted agent is refused. The USD budget charged when the order was placed is not given back. The reply is the order as the provider reports it with every field optional, and `{}` when the reply carries none: read the order for its state.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"order_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"order_id":{"type":"string","maxLength":128},"order_type":{"type":"string","maxLength":32},"side":{"type":"string","enum":["sell","buy"]},"base_asset":{"type":"string","maxLength":256},"quote_asset":{"type":"string","maxLength":256},"quantity":{"type":"string","pattern":"^[0-9]{1,78}$"},"price":{"type":"string","maxLength":64},"fill_status":{"type":"string","maxLength":64},"payout_status":{"type":"string","maxLength":64},"is_payout_status_final":{"type":"boolean"},"deposited_amount":{"type":"string","pattern":"^[0-9]{1,78}$"},"partial_fills":{"anyOf":[{"type":"array","items":{}},{"type":"null"}]},"payouts":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"app_fees":{"type":"array","items":{"type":"object","properties":{"recipient":{"type":"string"},"fee":{"type":"number"}},"additionalProperties":{}}},"deadline":{"type":["string","null"]},"created_at":{"type":"string"},"transfer_intent_hash":{"type":["string","null"]}},"additionalProperties":{}}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `limit_order_not_found`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/limit-orders/cancel-all":{"post":{"operationId":"cancelAllLimitOrders","tags":["Executions"],"summary":"Cancel all of the agent's limit orders","description":"Cancels up to 50 resting orders a call; repeat until `complete` is true. Requires `X-Grant-Token` for a live grant and has the same exemptions as cancelling one order: it works while frozen and after the policy drops `limit_order`.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"known":{"type":"integer","minimum":0,"maximum":9007199254740991},"cancelled":{"type":"integer","minimum":0,"maximum":9007199254740991},"failed":{"type":"integer","minimum":0,"maximum":9007199254740991},"remaining":{"type":"integer","minimum":0,"maximum":9007199254740991},"complete":{"type":"boolean"}},"required":["known","cancelled","failed","remaining","complete"],"additionalProperties":false}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `provider_unavailable`, `provider_rate_limited`, `provider_limit_reached`, `wallet_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/withdraw":{"post":{"operationId":"withdraw","tags":["Executions"],"summary":"Withdraw an asset to an address on any supported chain","description":"Pays from the confidential balance by default; `confidential: false` pays from the legacy public balance, which only a withdrawal or a shield can empty. Both live withdrawals and `dry: true` previews require `X-Grant-Token` and `Idempotency-Key`; a live withdrawal also needs an account policy allowing withdrawal to the destination. An archived, deleted or frozen account, or one whose applied policy does not parse (`policy_not_ready`), gets no preview, and an asset `GET /v1/tokens` does not list (`unsupported_token`) or a recipient that is not a valid address (`invalid_address`) is refused before any provider call, as a live withdrawal is. The account's rules never refuse a preview: it answers with `spend` (USD value and budget left), `fee` (on chain `near`, the provider's estimate when stated in the withdrawn asset, otherwise `amount` minus `quote.amount_out`; on a confidential bridged route, `amount` minus `quote.amount_out` valued in the asset of the same symbol 1Click lists on that chain; null for a public bridged route, when the quote states no `amount_out`, when the chain lists no single asset of that symbol, when either asset has no fresh price, or when the delivery is worth more than `amount`) and `warnings`, which list each rule the live withdrawal would fail under its code (`policy_action_denied`, `policy_destination_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`) beside `high_fee` (above 5%, only where `fee` is valued) and `asset_delivered_as_is` (a non-USDC asset to `hypercore`). Identical previews reuse a result for 60 seconds; an expired preview needs a new key. The API sets no preview cap; each preview that reaches the provider counts toward the wallet's 1,000 custody operations per rolling 24 hours (`provider_limit_reached`). NEAR (`nep141:wrap.near`, or `near`) withdrawn to chain `near` always arrives as native NEAR, from either balance. 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.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`.","schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"string","minLength":1,"maxLength":256},"amount":{"type":"string","pattern":"^(?!0+$)[0-9]{1,78}$"},"chain":{"type":"string","minLength":1,"maxLength":64},"recipient":{"type":"string","minLength":1,"maxLength":128},"memo":{"type":"string","maxLength":256},"reference":{"type":"string","pattern":"^[\\x21-\\x7e]{1,128}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"confidential":{"default":true,"type":"boolean"},"async":{"default":false,"type":"boolean"},"dry":{"default":false,"type":"boolean"}},"required":["asset","amount","chain","recipient"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success: a `dry` preview","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteResponse"}}}},"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `withdraw_preview_expired`, `withdraw_preview_pending`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `withdraw_preview_expired`, `withdraw_preview_pending`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `withdraw_preview_expired`, `withdraw_preview_pending`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `withdraw_preview_expired`, `withdraw_preview_pending`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `withdraw_preview_expired`, `withdraw_preview_pending`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `withdraw_preview_expired`, `withdraw_preview_pending`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `withdraw_preview_expired`, `withdraw_preview_pending`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `withdraw_preview_expired`, `withdraw_preview_pending`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `withdraw_preview_expired`, `withdraw_preview_pending`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/transfer":{"post":{"operationId":"transfer","tags":["Executions"],"summary":"Transfer an asset to another NEAR Intents account","description":"Transfers from the agent's confidential balance to the recipient's confidential balance; `confidential: false` is refused with `public_balance_exit_only` before any provider call. Requires `X-Grant-Token` for a live grant; the account policy must allow `transfer` and `confidential`, and its destination rule the recipient. 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.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`.","schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"string","minLength":1,"maxLength":256},"amount":{"type":"string","pattern":"^(?!0+$)[0-9]{1,78}$"},"recipient":{"type":"string","minLength":2,"maxLength":64,"pattern":"^(?:[a-z\\d]+[-_])*[a-z\\d]+(?:\\.(?:[a-z\\d]+[-_])*[a-z\\d]+)*$"},"reference":{"type":"string","pattern":"^[\\x21-\\x7e]{1,128}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"confidential":{"default":true,"type":"boolean"}},"required":["asset","amount","recipient"],"additionalProperties":false}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `spend_budget_exceeded`, `spend_price_unavailable`, `near_rpc_unavailable`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/shield":{"post":{"operationId":"shield","tags":["Executions"],"summary":"Move the legacy public balance to the confidential balance","description":"Moves an amount from the agent's legacy public balance to its confidential balance. With a withdrawal (`confidential: false`), it is the only way to empty the public balance; nothing moves funds back. Requires `X-Grant-Token` for a live grant, and the account policy must have `confidential`: an agent whose stored policy has it off needs an owner-signed `policy_update` that turns it on first. 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.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`.","schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"string","minLength":1,"maxLength":256},"amount":{"type":"string","pattern":"^(?!0+$)[0-9]{1,78}$"}},"required":["asset","amount"],"additionalProperties":false}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/unshield":{"post":{"operationId":"unshield","tags":["Executions"],"summary":"Move a confidential balance back to public","description":"Refused. Every request, whatever its body (`dry` included), is answered 400 `public_balance_exit_only` before anything is read or sent. The agent's account is its confidential balance, and the legacy public balance can only be emptied: shield moves it to the confidential balance and a withdrawal with `confidential: false` pays it out. Unshields recorded earlier still read and settle through `GET /v1/status` and history. 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.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`.","schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"string","minLength":1,"maxLength":256},"amount":{"type":"string","pattern":"^(?!0+$)[0-9]{1,78}$"}},"required":["asset","amount"],"additionalProperties":false}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_schedule_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `refund_address_required`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/deposit":{"post":{"operationId":"deposit","tags":["Executions"],"summary":"Get a deposit address that funds the agent from another chain","description":"Requires an API key, not an owner grant. Creates a NEAR Intents 1Click deposit address that credits the agent's confidential balance (`confidential: false` is refused with `public_balance_exit_only` before any provider call), which the account policy's `confidential` must allow (`policy_action_denied`): a policy without it could not spend what arrives. It runs without spending agent funds or applying an execution delay. Send only `origin_asset` to fund the agent with any amount at or above `details.min_amount` until `details.expires_at`; add `amount` for an exact deposit. A failed or late deposit refunds into the agent's own balance (`details.refund_to`); no request field chooses a refund address. The status reads `PENDING_DEPOSIT` with `details.deposit_address` (and `details.memo` where the chain needs one) until funds arrive; without `amount` it stays open 3 days, and an address still unpaid a day after `details.expires_at` ends `FAILED` with `deposit_expired`. History lists an address only once something was paid into it. Funds go only to that address. `correlation_id` (`op_…`) is a tracking id and never an address. 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.","security":[{"ApiKey":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`.","schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"origin_asset":{"type":"string","minLength":1,"maxLength":256},"destination_asset":{"type":"string","minLength":1,"maxLength":256},"amount":{"type":"string","pattern":"^(?!0+$)[0-9]{1,78}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"confidential":{"default":true,"type":"boolean"}},"required":["origin_asset"],"additionalProperties":false}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `deposit_quota_exceeded`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `deposit_quota_exceeded`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `deposit_quota_exceeded`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `deposit_quota_exceeded`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `deposit_quota_exceeded`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `deposit_quota_exceeded`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `deposit_quota_exceeded`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `deposit_quota_exceeded`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_action_denied`, `policy_asset_denied`, `policy_transaction_limit_exceeded`, `policy_limit_exceeded`, `policy_action_limit_exceeded`, `policy_usage_unavailable`, `policy_destination_denied`, `policy_not_ready`, `policy_denied`, `insufficient_balance`, `amount_too_low`, `route_unavailable`, `provider_refused`, `provider_unavailable`, `unsupported_chain`, `unsupported_token`, `invalid_address`, `provider_limit_reached`, `wallet_busy`, `wallet_frozen`, `idempotency_conflict`, `authorization_stale`, `deposit_quota_exceeded`, `public_balance_exit_only`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/recover":{"post":{"operationId":"recover","tags":["Executions"],"summary":"Dispatch an UNCERTAIN execution that provably never reached the provider","description":"Only for executions with no provider reference and no dispatch commitment. `request` must equal the original body, `Idempotency-Key` the original key, and `X-Grant-Token` the token of the grant that admitted it.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`.","schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"request":{"oneOf":[{"type":"object","properties":{"origin_asset":{"type":"string","minLength":1,"maxLength":256},"destination_asset":{"type":"string","minLength":1,"maxLength":256},"amount":{"type":"string","pattern":"^(?!0+$)[0-9]{1,78}$"},"min_amount_out":{"type":"string","pattern":"^[0-9]{1,78}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"confidential":{"default":true,"type":"boolean"},"dry":{"default":false,"type":"boolean"},"type":{"type":"string","const":"swap"}},"required":["origin_asset","destination_asset","amount","type"],"additionalProperties":false},{"type":"object","properties":{"base_asset":{"type":"string","minLength":1,"maxLength":256},"quote_asset":{"type":"string","minLength":1,"maxLength":256},"side":{"type":"string","enum":["sell","buy"]},"quantity":{"type":"string","pattern":"^(?!0+$)[0-9]{1,78}$"},"price":{"type":"string","maxLength":40,"pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$"},"deadline":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"confidential":{"default":true,"type":"boolean"},"dry":{"default":false,"type":"boolean"},"type":{"type":"string","const":"limit_order"}},"required":["base_asset","quote_asset","side","quantity","price","type"],"additionalProperties":false},{"type":"object","properties":{"asset":{"type":"string","minLength":1,"maxLength":256},"amount":{"type":"string","pattern":"^(?!0+$)[0-9]{1,78}$"},"chain":{"type":"string","minLength":1,"maxLength":64},"recipient":{"type":"string","minLength":1,"maxLength":128},"memo":{"type":"string","maxLength":256},"reference":{"type":"string","pattern":"^[\\x21-\\x7e]{1,128}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"confidential":{"default":true,"type":"boolean"},"async":{"default":false,"type":"boolean"},"dry":{"default":false,"type":"boolean"},"type":{"type":"string","const":"withdraw"}},"required":["asset","amount","chain","recipient","type"],"additionalProperties":false},{"type":"object","properties":{"asset":{"type":"string","minLength":1,"maxLength":256},"amount":{"type":"string","pattern":"^(?!0+$)[0-9]{1,78}$"},"recipient":{"type":"string","minLength":2,"maxLength":64,"pattern":"^(?:[a-z\\d]+[-_])*[a-z\\d]+(?:\\.(?:[a-z\\d]+[-_])*[a-z\\d]+)*$"},"reference":{"type":"string","pattern":"^[\\x21-\\x7e]{1,128}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"confidential":{"default":true,"type":"boolean"},"type":{"type":"string","const":"transfer"}},"required":["asset","amount","recipient","type"],"additionalProperties":false},{"type":"object","properties":{"asset":{"type":"string","minLength":1,"maxLength":256},"amount":{"type":"string","pattern":"^(?!0+$)[0-9]{1,78}$"},"type":{"type":"string","const":"shield"}},"required":["asset","amount","type"],"additionalProperties":false},{"type":"object","properties":{"asset":{"type":"string","minLength":1,"maxLength":256},"amount":{"type":"string","pattern":"^(?!0+$)[0-9]{1,78}$"},"type":{"type":"string","const":"unshield"}},"required":["asset","amount","type"],"additionalProperties":false}]}},"required":["correlation_id","request"],"additionalProperties":false}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"Error document. Documented codes: `operation_not_recoverable`, `operation_recovery_unavailable`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `operation_not_recoverable`, `operation_recovery_unavailable`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `operation_not_recoverable`, `operation_recovery_unavailable`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `operation_not_recoverable`, `operation_recovery_unavailable`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `operation_not_recoverable`, `operation_recovery_unavailable`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `operation_not_recoverable`, `operation_recovery_unavailable`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `operation_not_recoverable`, `operation_recovery_unavailable`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `operation_not_recoverable`, `operation_recovery_unavailable`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `operation_not_recoverable`, `operation_recovery_unavailable`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/native/near/sign-message":{"post":{"operationId":"nativeNearSignMessage","tags":["Native accounts"],"summary":"Sign a NEP-413 message with the agent's NEAR key","description":"Requires `X-Grant-Token` for a live grant, and the account policy must list `recipient` in `native.near.sign_message`. Takes what a dApp's `signMessage({ message, recipient, nonce })` takes: `message` (the text to sign, `encoding` `hex` signs the UTF-8 text the bytes decode to), the relying party's base64 32-byte `nonce` and `recipient`. Returns `near_account_id`, `public_key` and the base64 `signature` over the NEP-413 payload, which the API checks before it answers. `callbackUrl` is not supported: the provider signs without one. The relying party must still check `nonce`, `recipient` and `public_key` (a full-access key of `near_account_id`, once that account exists on chain). The NEAR Intents contracts (`intents.near`, `intents.far`) are never recipients. Not delayed by `timelock_ms` or `schedule`. Recorded in history as type `native`, with the recipient.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":32768},"encoding":{"default":"utf8","type":"string","enum":["utf8","hex"]},"recipient":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x7e]+$"},"nonce":{"type":"string","pattern":"^[A-Za-z0-9+/]{43}=$"}},"required":["message","recipient","nonce"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"near_account_id":{"type":"string","minLength":2,"maxLength":64},"public_key":{"type":"string","maxLength":80,"format":"starts_with","pattern":"^ed25519:.*"},"signature":{"type":"string","pattern":"^[A-Za-z0-9+/]{86}==$"},"nonce":{"type":"string","pattern":"^[A-Za-z0-9+/]{43}=$"},"recipient":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x7e]+$"}},"required":["correlation_id","near_account_id","public_key","signature","nonce","recipient"],"additionalProperties":false}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `signing_policy_denied`, `signing_recipient_forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `signing_policy_denied`, `signing_recipient_forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `signing_policy_denied`, `signing_recipient_forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `signing_policy_denied`, `signing_recipient_forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `signing_policy_denied`, `signing_recipient_forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `signing_policy_denied`, `signing_recipient_forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `signing_policy_denied`, `signing_recipient_forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `signing_policy_denied`, `signing_recipient_forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `signing_policy_denied`, `signing_recipient_forbidden`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/native/near/transfer":{"post":{"operationId":"nativeNearTransfer","tags":["Native accounts"],"summary":"Send native NEAR from the agent's NEAR account","description":"Needs `native.near.transfer`. Sends from the agent's NEAR account (`wallet.near_account_id`), outside NEAR Intents. Requires `X-Grant-Token` for a live grant and is refused while the agent is frozen. The NEAR it sends must land where `destinations` allows, judged as a `withdraw` on chain `near` to the receiving account (`policy_destination_denied`); `budget`, `timelock_ms`, `schedule` and `owner_approval` do not apply. Recorded in history as type `native`. OutLayer still applies the policy's `assets` (wNEAR covers native NEAR), `limits` and `max_actions_per_hour`. A retry with the same `Idempotency-Key` returns the same request and never sends twice.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`.","schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","minLength":2,"maxLength":64,"pattern":"^(?:[a-z\\d]+[-_])*[a-z\\d]+(?:\\.(?:[a-z\\d]+[-_])*[a-z\\d]+)*$"},"amount":{"type":"string","pattern":"^[0-9]{1,78}$"}},"required":["to","amount"],"additionalProperties":false}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/native/near/call":{"post":{"operationId":"nativeNearCall","tags":["Native accounts"],"summary":"Call a NEAR contract from the agent's NEAR account","description":"Needs `receiver_id` listed in `native.near.call`. The NEAR Intents contracts are never callable (`native_contract_forbidden`). Requires `X-Grant-Token` for a live grant and is refused while the agent is frozen. The NEAR it sends must land where `destinations` allows, judged as a `withdraw` on chain `near` to the receiving account (`policy_destination_denied`); `budget`, `timelock_ms`, `schedule` and `owner_approval` do not apply. Recorded in history as type `native`. A call that attaches no deposit sends no NEAR. Listing a token contract lets the agent send that token anywhere from its NEAR account. A retry with the same `Idempotency-Key` returns the same request and never calls twice.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Stable key for one logical request. Replays with the same key and body return the original result; a different body is refused with `idempotency_conflict`.","schema":{"type":"string","minLength":8,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"receiver_id":{"type":"string","minLength":2,"maxLength":64,"pattern":"^(?:[a-z\\d]+[-_])*[a-z\\d]+(?:\\.(?:[a-z\\d]+[-_])*[a-z\\d]+)*$"},"method_name":{"type":"string","minLength":1,"maxLength":256,"pattern":"^[A-Za-z0-9_]+$"},"args":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"args_base64":{"type":"string","pattern":"^[A-Za-z0-9+/]*={0,2}$"},"gas":{"type":"string","pattern":"^[0-9]{1,20}$"},"deposit":{"type":"string","pattern":"^[0-9]{1,78}$"}},"required":["receiver_id","method_name"],"additionalProperties":false}}}},"responses":{"202":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `native_contract_forbidden`, `insufficient_balance`, `idempotency_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/native/evm/sign-typed-data":{"post":{"operationId":"nativeEvmSignTypedData","tags":["Native accounts"],"summary":"Sign EIP-712 typed data with the agent's EVM key","description":"Needs the typed data's `domain` listed in `native.evm.sign_typed_data`: every field the domain carries (name, version, chainId, verifyingContract, salt) must match one listed entry exactly, and an extra or missing field is another domain. A listed entry with `primary_types` signs only those message types, so `primaryType` must be one of them; without it any message type is signed. That narrows the kind of message, never its fields: destinations and amounts inside the message are not checked. `types.EIP712Domain` may be omitted, and the API then derives it; when sent, it must declare exactly the domain's fields in EIP-712 order with their standard types, since the signed digest covers only declared fields. `message` is at most 65536 bytes as canonical JSON. The record (status and history, type `native`) carries `details.domain`, the matched domain, and `details.message_json`, the signed message as canonical JSON. Signs as `wallet.evm_account_id`, the same address on every EVM chain. Typed data can authorize transfers (EIP-3009) and approvals (EIP-2612 Permit) of anything that address holds. Requires `X-Grant-Token` for a live grant and is refused while the agent is frozen; `destinations`, `budget`, `timelock_ms`, `schedule` and `owner_approval` do not apply. Recorded in history as type `native`.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string","enum":["ethereum","polygon","base","arbitrum","optimism","bsc","avalanche","hyperevm","hood"]},"typed_data":{"type":"object","properties":{"domain":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}},"primaryType":{"type":"string","minLength":1,"maxLength":256},"message":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["domain","types","primaryType","message"],"additionalProperties":{}}},"required":["chain","typed_data"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"chain":{"type":"string","enum":["near","ethereum","polygon","base","arbitrum","optimism","bsc","avalanche","hyperevm","hood","solana"]},"account_id":{"type":"string"},"signature":{"type":"string"}},"required":["correlation_id","chain","account_id","signature"],"additionalProperties":false}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/native/evm/sign-message":{"post":{"operationId":"nativeEvmSignMessage","tags":["Native accounts"],"summary":"Sign an EIP-191 message with the agent's EVM key","description":"Needs `native.evm.sign_message`. Text or bytes that are a NEAR Intents payload (they hold `verifying_contract`, or `signer_id` with `intents`) are refused with `intents_payload_use_sign_intent`: sign those with `sign-intent`. A deployment that sets `SIGN_MESSAGE_INTENTS_ENABLED` signs them here instead, with none of `sign-intent`'s checks, so this switch then amounts to full control of the key's NEAR Intents account. Requires `X-Grant-Token` for a live grant and is refused while the agent is frozen; `destinations`, `budget`, `timelock_ms`, `schedule` and `owner_approval` do not apply. Recorded in history as type `native`.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string","enum":["ethereum","polygon","base","arbitrum","optimism","bsc","avalanche","hyperevm","hood"]},"message":{"type":"string","minLength":1,"maxLength":32768},"encoding":{"default":"utf8","type":"string","enum":["utf8","hex"]}},"required":["chain","message"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"chain":{"type":"string","enum":["near","ethereum","polygon","base","arbitrum","optimism","bsc","avalanche","hyperevm","hood","solana"]},"account_id":{"type":"string"},"signature":{"type":"string"}},"required":["correlation_id","chain","account_id","signature"],"additionalProperties":false}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/native/evm/sign-intent":{"post":{"operationId":"nativeEvmSignIntent","tags":["Native accounts"],"summary":"Sign a NEAR Intents transfer payload with the agent's EVM key","description":"Needs `native.evm.sign_intent`; `sign_message` does not open it. Signs `payload` as an ERC-191 message with the key behind `wallet.evm_account_id`, which, as a lowercase `0x` address (the spelling NEAR Intents uses), must be the payload `signer_id` (`intents_signer_mismatch`). `payload` is the exact JSON text of a NEAR Intents payload `{ signer_id, verifying_contract, deadline, nonce, intents }`, in canonical form: `JSON.stringify` of the object, with no whitespace and no repeated or unknown keys (`intents_payload_invalid`, with the field in `source.pointer`). It signs only `transfer` intents, `{ intent, receiver_id, tokens: { <token_id>: \"<amount>\" }, memo?, msg?, min_gas? }` with `min_gas` within u64, or none (`intents: []`); any other intent type, such as `add_public_key`, `token_diff` or a withdrawal, is refused by name (`intents_type_forbidden`). `verifying_contract` must be `intents.near` or `intents.far` (`intents_contract_forbidden`), `deadline` an RFC 3339 UTC time ending in `Z` that is still ahead and at most 300 seconds from now unless the deposit rule below allows more (`intents_deadline_invalid`), `nonce` standard base64 of 32 bytes, and each `receiver_id` a NEAR account other than the signer and the NEAR Intents contracts. Receivers are judged by the key's own `sign_intent` rules, not by the policy's `destinations` or actions: each must be listed in `sign_intent.receivers` or be a 1Click deposit address (at most 2 per payload) proven by its quote in `one_click_quotes`: 1Click's answer to `POST /v0/quote`, sent unchanged, one per deposit address the payload pays outside `receivers` (a quote for any other address, or a second one for the same address, is `validation_failed` with its `source.pointer`). The API does not ask 1Click about the deposit: it checks the quote's `signature` against 1Click's quote-signing key (`ed25519:reYaWhvwu8Jzo3WUM3zhn6VrhuMEF4eADL17qtRVifc`), so a quote changed after 1Click signed it, a dry quote or a deposit address with no quote is refused. The quote's `recipient` must be, when `sign_intent.one_click_deposits` is on, the payload `signer_id` or an account in `sign_intent.receivers` with `recipientType` the contract's account type (`INTENTS`, or `CONFIDENTIAL_INTENTS` for `intents.far`), or, with `recipientType` `DESTINATION_CHAIN`, an address in `sign_intent.withdrawals` on the chain 1Click's token listing gives the quote's `destinationAsset` (compared in canonical spelling; an unreadable listing refuses with `provider_unavailable`), with the `signer_id` as `refundTo`, `refundType` and `depositType` the contract's account type, no `customRecipientMsg`, `virtualChainRecipient` or `virtualChainRefundRecipient`, and at most `sign_intent.max_slippage_bps` (0 to 300 basis points, 100 when omitted) of value lost: what the deposit returns at `minAmountOut`, valued by the quote's `amountOutUsd`, against its `amountInUsd`, so every fee and the slippage count (1Click does not sign `appFees`, so they are not read; a quote with no USD value is refused). It must be paid by one plain transfer (no `msg` or `min_gas`) of exactly the quote's `amountIn` of its `originAsset` (on `intents.far` the confidential token `imt:51e8f94d77b5e90dc9852ca6113771e11e8382ce69473a75e313e41665de7cbe:<originAsset>`, as 1Click generates it) and be due no later than the quote's `deadline`. A deposit 1Click has since closed is not seen; a payment into it refunds to the `signer_id`. Anything else is `policy_destination_denied`, with the reason in `detail`. A signed payload can be published by anyone who holds it until its `deadline`, so it may be at most 300 seconds away, except that one paying only such deposits may be due as late as their quotes, at most 96 hours ahead: 1Click's `generate-intent` writes the quote's own deadline, and a late publication can only fund a swap that pays the agent, a listed receiver or a listed withdrawal address. `assets`, `limits`, `budget`, `timelock_ms` and `schedule` do not apply. The signature the provider returns is verified against the agent key and the payload bytes before it is released; one that does not verify is discarded with 502 `provider_signature_invalid`. Bytes sent to `sign-message` that are a NEAR Intents payload are refused (`intents_payload_use_sign_intent`). A freeze refuses new payloads but cannot recall one already signed: it stays publishable until its own deadline, up to 96 hours for one paying only 1Click deposits. Answers the usual signature fields and `signed_data`, `{ standard: \"erc191\", payload, signature }` with the signature as `secp256k1:` and base58: publish it as is to `intents.near` (`execute_intents`), 1Click or a solver relay. Recorded in history as type `native`, with the contract as `details.target` and the payload's hash; the payload itself is not kept. Requires `X-Grant-Token` for a live grant and is refused while the agent is frozen; `budget`, `timelock_ms`, `schedule` and `owner_approval` do not apply. Recorded in history as type `native`.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"string","minLength":1,"maxLength":32768},"one_click_quotes":{"maxItems":2,"type":"array","items":{"type":"object","properties":{"quote":{"type":"object","properties":{"depositAddress":{"type":"string","minLength":1,"maxLength":256}},"required":["depositAddress"],"additionalProperties":{}},"quoteRequest":{"type":"object","properties":{},"additionalProperties":{}},"signature":{"type":"string","minLength":1,"maxLength":256},"timestamp":{"type":"string","minLength":1,"maxLength":64}},"required":["quote","quoteRequest","signature","timestamp"],"additionalProperties":{}}}},"required":["payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"chain":{"type":"string","enum":["near","ethereum","polygon","base","arbitrum","optimism","bsc","avalanche","hyperevm","hood","solana"]},"account_id":{"type":"string"},"signature":{"type":"string"},"signed_data":{"type":"object","properties":{"standard":{"type":"string","const":"erc191"},"payload":{"type":"string"},"signature":{"type":"string","format":"starts_with","pattern":"^secp256k1:.*"}},"required":["standard","payload","signature"],"additionalProperties":false}},"required":["correlation_id","chain","account_id","signature","signed_data"],"additionalProperties":false}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/native/evm/sign-transaction":{"post":{"operationId":"nativeEvmSignTransaction","tags":["Native accounts"],"summary":"Sign a serialized EVM transaction with the agent's EVM key","description":"Needs `native.evm.sign_transaction`, which gives full control of the EVM address. Nothing is broadcast; the caller sends the signed transaction. Requires `X-Grant-Token` for a live grant and is refused while the agent is frozen; `destinations`, `budget`, `timelock_ms`, `schedule` and `owner_approval` do not apply. Recorded in history as type `native`.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string","enum":["ethereum","polygon","base","arbitrum","optimism","bsc","avalanche","hyperevm","hood"]},"unsigned_tx":{"type":"string","maxLength":262144,"pattern":"^0x[0-9a-fA-F]+$"}},"required":["chain","unsigned_tx"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"chain":{"type":"string","enum":["near","ethereum","polygon","base","arbitrum","optimism","bsc","avalanche","hyperevm","hood","solana"]},"account_id":{"type":"string"},"signature":{"type":"string"}},"required":["correlation_id","chain","account_id","signature"],"additionalProperties":false}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/native/solana/sign-in":{"post":{"operationId":"nativeSolanaSignIn","tags":["Native accounts"],"summary":"Sign in with Solana to a listed domain","description":"Needs `domain` listed in `native.solana.sign_in`. Takes the fields of a wallet's Sign-In-With-Solana `signIn` input and writes the message itself, as the wallet standard's `createSignInMessageText` does, with `wallet.solana_account_id` as the address: `domain`, `statement` (one line of printable ASCII), `uri` (an `https` URI on `domain`), `version` (`1`), `chain_id` (`mainnet` or `solana:mainnet`), `nonce` (8 to 64 letters and digits), `issued_at` (RFC 3339 UTC ending in `Z`, within 300 seconds of now) and `expiration_time` (required, still ahead, at most 10 minutes after `issued_at`). `not_before`, `request_id` and `resources` are not taken. The message always ends with a time the API checked, so the signature serves only as this login: never as a NEAR Intents payload, nor as a passkey (WebAuthn) signature for the key's NEAR Intents account. Answers the signature and `signed_message`, the exact text signed: hand the relying party its UTF-8 bytes, the base58 `signature` and `account_id`. The provider's signature is checked against the agent's key and that text before it is released; one that does not verify is discarded with 502 `provider_signature_invalid`. Recorded in history as type `native`, with the domain as `details.target`. Requires `X-Grant-Token` for a live grant and is refused while the agent is frozen; `destinations`, `budget`, `timelock_ms`, `schedule` and `owner_approval` do not apply. Recorded in history as type `native`.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?::[1-9][0-9]{0,4})?$"},"statement":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[\\x20-\\x7e]+$"},"uri":{"type":"string","maxLength":1024,"pattern":"^[A-Za-z0-9\\-._~:/?#[\\]@!$&'()*+,;=%]+$"},"version":{"type":"string","const":"1"},"chain_id":{"type":"string","enum":["mainnet","solana:mainnet"]},"nonce":{"type":"string","pattern":"^[A-Za-z0-9]{8,64}$"},"issued_at":{"type":"string","maxLength":40},"expiration_time":{"type":"string","maxLength":40}},"required":["domain","nonce","issued_at","expiration_time"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"chain":{"type":"string","enum":["near","ethereum","polygon","base","arbitrum","optimism","bsc","avalanche","hyperevm","hood","solana"]},"account_id":{"type":"string"},"signature":{"type":"string"},"signed_message":{"type":"string"}},"required":["correlation_id","chain","account_id","signature","signed_message"],"additionalProperties":false}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/native/solana/sign-message":{"post":{"operationId":"nativeSolanaSignMessage","tags":["Native accounts"],"summary":"Sign an off-chain message with the agent's Solana key","description":"Needs `native.solana.sign_message`. Signs as `wallet.solana_account_id`. Bytes that parse as a Solana transaction message are refused (`validation_failed`), and so are bytes that are a NEAR Intents payload (`intents_payload_use_sign_intent`, unless the deployment sets `SIGN_MESSAGE_INTENTS_ENABLED`): sign those with `sign-intent`. Any other bytes are signed as sent. The check reads the bytes, and a 32-byte digest that its standard hashes first cannot be read, so the other signature standards NEAR Intents accepts can be signed here: this switch amounts to full control of this key's NEAR Intents account (the lowercase hex of the public key behind `wallet.solana_account_id`), without the receiver checks of `sign-intent`. Give it only to an agent trusted with that account. Requires `X-Grant-Token` for a live grant and is refused while the agent is frozen; `destinations`, `budget`, `timelock_ms`, `schedule` and `owner_approval` do not apply. Recorded in history as type `native`.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":32768},"encoding":{"default":"utf8","type":"string","enum":["utf8","hex","base64"]}},"required":["message"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"chain":{"type":"string","enum":["near","ethereum","polygon","base","arbitrum","optimism","bsc","avalanche","hyperevm","hood","solana"]},"account_id":{"type":"string"},"signature":{"type":"string"}},"required":["correlation_id","chain","account_id","signature"],"additionalProperties":false}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `intents_payload_use_sign_intent`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/native/solana/sign-intent":{"post":{"operationId":"nativeSolanaSignIntent","tags":["Native accounts"],"summary":"Sign a NEAR Intents transfer payload with the agent's Solana key","description":"Needs `native.solana.sign_intent`; `sign_message` does not open it. Signs the UTF-8 bytes of `payload` with the agent's Ed25519 key. The payload's `signer_id` must be that key's NEAR Intents account, the lowercase hex of the 32-byte key behind `wallet.solana_account_id` (`intents_signer_mismatch`). `payload` is the exact JSON text of a NEAR Intents payload `{ signer_id, verifying_contract, deadline, nonce, intents }`, in canonical form: `JSON.stringify` of the object, with no whitespace and no repeated or unknown keys (`intents_payload_invalid`, with the field in `source.pointer`). It signs only `transfer` intents, `{ intent, receiver_id, tokens: { <token_id>: \"<amount>\" }, memo?, msg?, min_gas? }` with `min_gas` within u64, or none (`intents: []`); any other intent type, such as `add_public_key`, `token_diff` or a withdrawal, is refused by name (`intents_type_forbidden`). `verifying_contract` must be `intents.near` or `intents.far` (`intents_contract_forbidden`), `deadline` an RFC 3339 UTC time ending in `Z` that is still ahead and at most 300 seconds from now unless the deposit rule below allows more (`intents_deadline_invalid`), `nonce` standard base64 of 32 bytes, and each `receiver_id` a NEAR account other than the signer and the NEAR Intents contracts. Receivers are judged by the key's own `sign_intent` rules, not by the policy's `destinations` or actions: each must be listed in `sign_intent.receivers` or be a 1Click deposit address (at most 2 per payload) proven by its quote in `one_click_quotes`: 1Click's answer to `POST /v0/quote`, sent unchanged, one per deposit address the payload pays outside `receivers` (a quote for any other address, or a second one for the same address, is `validation_failed` with its `source.pointer`). The API does not ask 1Click about the deposit: it checks the quote's `signature` against 1Click's quote-signing key (`ed25519:reYaWhvwu8Jzo3WUM3zhn6VrhuMEF4eADL17qtRVifc`), so a quote changed after 1Click signed it, a dry quote or a deposit address with no quote is refused. The quote's `recipient` must be, when `sign_intent.one_click_deposits` is on, the payload `signer_id` or an account in `sign_intent.receivers` with `recipientType` the contract's account type (`INTENTS`, or `CONFIDENTIAL_INTENTS` for `intents.far`), or, with `recipientType` `DESTINATION_CHAIN`, an address in `sign_intent.withdrawals` on the chain 1Click's token listing gives the quote's `destinationAsset` (compared in canonical spelling; an unreadable listing refuses with `provider_unavailable`), with the `signer_id` as `refundTo`, `refundType` and `depositType` the contract's account type, no `customRecipientMsg`, `virtualChainRecipient` or `virtualChainRefundRecipient`, and at most `sign_intent.max_slippage_bps` (0 to 300 basis points, 100 when omitted) of value lost: what the deposit returns at `minAmountOut`, valued by the quote's `amountOutUsd`, against its `amountInUsd`, so every fee and the slippage count (1Click does not sign `appFees`, so they are not read; a quote with no USD value is refused). It must be paid by one plain transfer (no `msg` or `min_gas`) of exactly the quote's `amountIn` of its `originAsset` (on `intents.far` the confidential token `imt:51e8f94d77b5e90dc9852ca6113771e11e8382ce69473a75e313e41665de7cbe:<originAsset>`, as 1Click generates it) and be due no later than the quote's `deadline`. A deposit 1Click has since closed is not seen; a payment into it refunds to the `signer_id`. Anything else is `policy_destination_denied`, with the reason in `detail`. A signed payload can be published by anyone who holds it until its `deadline`, so it may be at most 300 seconds away, except that one paying only such deposits may be due as late as their quotes, at most 96 hours ahead: 1Click's `generate-intent` writes the quote's own deadline, and a late publication can only fund a swap that pays the agent, a listed receiver or a listed withdrawal address. `assets`, `limits`, `budget`, `timelock_ms` and `schedule` do not apply. The signature the provider returns is verified against the agent key and the payload bytes before it is released; one that does not verify is discarded with 502 `provider_signature_invalid`. Bytes sent to `sign-message` that are a NEAR Intents payload are refused (`intents_payload_use_sign_intent`). A freeze refuses new payloads but cannot recall one already signed: it stays publishable until its own deadline, up to 96 hours for one paying only 1Click deposits. Answers the usual signature fields and `signed_data`, `{ standard: \"raw_ed25519\", payload, public_key, signature }` with both keys in `ed25519:` and base58 form: publish it as is to `intents.near` (`execute_intents`), 1Click or a solver relay. Recorded in history as type `native`, with the contract as `details.target` and the payload's hash; the payload itself is not kept. Requires `X-Grant-Token` for a live grant and is refused while the agent is frozen; `budget`, `timelock_ms`, `schedule` and `owner_approval` do not apply. Recorded in history as type `native`.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"string","minLength":1,"maxLength":32768},"one_click_quotes":{"maxItems":2,"type":"array","items":{"type":"object","properties":{"quote":{"type":"object","properties":{"depositAddress":{"type":"string","minLength":1,"maxLength":256}},"required":["depositAddress"],"additionalProperties":{}},"quoteRequest":{"type":"object","properties":{},"additionalProperties":{}},"signature":{"type":"string","minLength":1,"maxLength":256},"timestamp":{"type":"string","minLength":1,"maxLength":64}},"required":["quote","quoteRequest","signature","timestamp"],"additionalProperties":{}}}},"required":["payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"chain":{"type":"string","enum":["near","ethereum","polygon","base","arbitrum","optimism","bsc","avalanche","hyperevm","hood","solana"]},"account_id":{"type":"string"},"signature":{"type":"string"},"signed_data":{"type":"object","properties":{"standard":{"type":"string","const":"raw_ed25519"},"payload":{"type":"string"},"public_key":{"type":"string","format":"starts_with","pattern":"^ed25519:.*"},"signature":{"type":"string","format":"starts_with","pattern":"^ed25519:.*"}},"required":["standard","payload","public_key","signature"],"additionalProperties":false}},"required":["correlation_id","chain","account_id","signature","signed_data"],"additionalProperties":false}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_action_denied`, `policy_destination_denied`, `intents_payload_invalid`, `intents_deadline_invalid`, `intents_type_forbidden`, `intents_signer_mismatch`, `intents_contract_forbidden`, `provider_unavailable`, `provider_rate_limited`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/native/solana/sign-transfer":{"post":{"operationId":"nativeSolanaSignTransfer","tags":["Native accounts"],"summary":"Sign one SOL or token transfer to a listed destination with the agent's Solana key","description":"Needs `native.solana.sign_transfer`; the full-control `sign_transaction` is not needed. Reads `unsigned_tx`, a base64 legacy or version 0 transaction message, before anything is signed, and signs it only as one transfer: SOL by a System Program `Transfer` to `recipient`, or one SPL Token or Token-2022 `TransferChecked` into the associated token account of `recipient`, with the agent as its authority. Besides the transfer the message may hold one associated-token-account `CreateIdempotent` for that account, paid by the agent, and a compute unit limit and price whose priority fee is at most 1,000,000 lamports; nothing else. The agent (`wallet.solana_account_id`) must be the only signer and pay the fee, every account must be in the message (no address lookup tables) and no account may appear twice. Anything else is refused with 403 `solana_transaction_forbidden`, the reason in `detail`. `recipient` must be a destination the policy allows, judged as a `withdraw` on chain `sol` with no memo (`policy_destination_denied`). Amounts, `assets`, `limits` and `budget` are not checked yet: this stops transfers to arbitrary recipients, but does not yet limit how much is sent. A durable nonce is not a transfer, so a signed transaction lands only while its blockhash is recent. Nothing is broadcast; the caller sends the signed transaction. The provider's signature is checked against the agent's key and the message before it is released; one that does not verify is discarded with 502 `provider_signature_invalid`. The record carries `recipient` as `details.target`, the amount as `details.amount` and the transfer as read in `details.message_json`. Requires `X-Grant-Token` for a live grant and is refused while the agent is frozen; `budget`, `timelock_ms`, `schedule` and `owner_approval` do not apply. Recorded in history as type `native`.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"unsigned_tx":{"type":"string","minLength":1,"maxLength":1644,"pattern":"^[A-Za-z0-9+/]*={0,2}$"},"recipient":{"type":"string","pattern":"^[1-9A-HJ-NP-Za-km-z]{32,44}$"}},"required":["unsigned_tx","recipient"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"chain":{"type":"string","enum":["near","ethereum","polygon","base","arbitrum","optimism","bsc","avalanche","hyperevm","hood","solana"]},"account_id":{"type":"string"},"signature":{"type":"string"}},"required":["correlation_id","chain","account_id","signature"],"additionalProperties":false}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `solana_transaction_forbidden`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `solana_transaction_forbidden`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `solana_transaction_forbidden`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `solana_transaction_forbidden`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `solana_transaction_forbidden`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `solana_transaction_forbidden`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `solana_transaction_forbidden`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `solana_transaction_forbidden`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`, `policy_destination_denied`, `solana_transaction_forbidden`, `provider_signature_invalid`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/agents/{agent_id}/native/solana/sign-transaction":{"post":{"operationId":"nativeSolanaSignTransaction","tags":["Native accounts"],"summary":"Sign a Solana transaction message with the agent's Solana key","description":"Needs `native.solana.sign_transaction`, which gives full control of the Solana address. Nothing is broadcast; the caller sends the signed transaction. Requires `X-Grant-Token` for a live grant and is refused while the agent is frozen; `destinations`, `budget`, `timelock_ms`, `schedule` and `owner_approval` do not apply. Recorded in history as type `native`.","security":[{"ApiKey":[],"GrantToken":[]}],"parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[0-9a-f]{64}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"unsigned_tx":{"type":"string","minLength":1,"maxLength":1644,"pattern":"^[A-Za-z0-9+/]*={0,2}$"}},"required":["unsigned_tx"],"additionalProperties":false}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},"chain":{"type":"string","enum":["near","ethereum","polygon","base","arbitrum","optimism","bsc","avalanche","hyperevm","hood","solana"]},"account_id":{"type":"string"},"signature":{"type":"string"}},"required":["correlation_id","chain","account_id","signature"],"additionalProperties":false}}}},"400":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `agent_grant_required`, `policy_not_ready`, `native_method_denied`, `authorization_stale`, `wallet_frozen`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/tokens":{"get":{"operationId":"getTokens","tags":["Meta"],"summary":"List the assets agents can hold and trade, with USD prices","description":"Assets advertised by the wallet provider, with chain display hints and usable USD prices. Catalog presence does not guarantee support or availability for a particular route. `blockchain` preserves the existing market-chain, first-provider-chain, then near fallback; a fallback is not authoritative asset origin. `asset_id` is passed unchanged to executions. Public; the provider list is cached for 30 minutes, retained after refresh failure, and prices for one.","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"maxItems":4096,"type":"array","items":{"type":"object","properties":{"asset_id":{"type":"string","minLength":1,"maxLength":256},"symbol":{"type":"string","minLength":1,"maxLength":64},"decimals":{"type":"integer","minimum":0,"maximum":36},"blockchain":{"type":"string","minLength":1,"maxLength":64},"price":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"price_updated_at":{"type":["string","null"]},"price_expires_at":{"type":["string","null"]}},"required":["asset_id","symbol","decimals","blockchain","price","price_updated_at","price_expires_at"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/network":{"get":{"operationId":"getNetwork","tags":["Meta"],"summary":"Get the network, supported owner types and live dependency status","description":"`status` reports 1Click, custody (OutLayer) and NEAR health from background probes, refreshed about once a minute. It is advisory: no request is refused because of it. Read it before acting, or after `provider_unavailable`, to tell a provider outage from a problem with the request.","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"network":{"type":"string","const":"mainnet"},"contract_id":{"type":"string","minLength":2,"maxLength":64},"supported_owner_types":{"type":"array","items":{"type":"string","enum":["near","evm","passkey"]}},"status":{"type":"object","properties":{"overall":{"type":"string","enum":["operational","degraded","down","unknown"]},"checked_at":{"type":["string","null"]},"components":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["one_click","custody","near"]},"status":{"type":"string","enum":["operational","degraded","down","unknown"]},"reason":{"type":["string","null"]},"affects":{"type":"array","items":{"type":"string"}},"since":{"type":["string","null"]},"checked_at":{"type":["string","null"]}},"required":["id","status","reason","affects","since","checked_at"],"additionalProperties":false}}},"required":["overall","checked_at","components"],"additionalProperties":false}},"required":["network","contract_id","supported_owner_types","status"],"additionalProperties":false}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/releases":{"get":{"operationId":"listReleases","tags":["Meta"],"summary":"List this deployment's releases, newest first","description":"Newest `announced_at` first: `announced` releases not yet running, the `active` one the attested CVM runs, then `retired` and `withdrawn` ones. A release is announced at least `notice_hours` before it may run, so read `changes`, `breaking_changes` and `action_required` and adapt before `effective_at`. A `security` release may run earlier only with `expedite`, a note its security quorum signed. The feed describes; the chain decides: a release counts once the app contract on Ethereum has allowed its `compose_hash` for `notice_hours`, or the quorum signed its expedite, which the release verifier checks without trusting this feed. Public.","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"releases":{"maxItems":1000,"type":"array","items":{"type":"object","properties":{"version":{"type":"string","pattern":"^(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})$"},"status":{"type":"string","enum":["announced","active","retired","withdrawn"]},"type":{"type":"string","enum":["standard","security"]},"announced_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"effective_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"notice_hours":{"type":"integer","minimum":1,"maximum":720},"changes":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":280}},"breaking_changes":{"type":"boolean"},"action_required":{"type":"boolean"},"compose_hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"manifest_digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"revision":{"type":"string","pattern":"^[0-9a-f]{40}$"},"images":{"type":"object","properties":{"server":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"backup":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"attestation":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"edge":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"}},"required":["server","backup","attestation","edge"],"additionalProperties":false},"expedite":{"anyOf":[{"type":"string","minLength":1,"maxLength":2048},{"type":"null"}]}},"required":["version","status","type","announced_at","effective_at","notice_hours","changes","breaking_changes","action_required","compose_hash","manifest_digest","revision","images","expedite"],"additionalProperties":false}}},"required":["releases"],"additionalProperties":false}}}},"400":{"description":"Error document. Documented codes: `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/releases/latest":{"get":{"operationId":"getLatestRelease","tags":["Meta"],"summary":"Get the most recently announced release that was not withdrawn","description":"The first entry of `GET /v1/releases` that is not `withdrawn`: an `announced` release while one waits, otherwise the `active` one. Public.","security":[],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string","pattern":"^(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})$"},"status":{"type":"string","enum":["announced","active","retired","withdrawn"]},"type":{"type":"string","enum":["standard","security"]},"announced_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"effective_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"notice_hours":{"type":"integer","minimum":1,"maximum":720},"changes":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":280}},"breaking_changes":{"type":"boolean"},"action_required":{"type":"boolean"},"compose_hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"manifest_digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"revision":{"type":"string","pattern":"^[0-9a-f]{40}$"},"images":{"type":"object","properties":{"server":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"backup":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"attestation":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"edge":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"}},"required":["server","backup","attestation","edge"],"additionalProperties":false},"expedite":{"anyOf":[{"type":"string","minLength":1,"maxLength":2048},{"type":"null"}]}},"required":["version","status","type","announced_at","effective_at","notice_hours","changes","breaking_changes","action_required","compose_hash","manifest_digest","revision","images","expedite"],"additionalProperties":false}}}},"400":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/releases/{version}":{"get":{"operationId":"getRelease","tags":["Meta"],"summary":"Get one release by its version","security":[],"parameters":[{"name":"version","in":"path","required":true,"schema":{"type":"string","pattern":"^(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})$"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string","pattern":"^(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})\\.(0|[1-9][0-9]{0,8})$"},"status":{"type":"string","enum":["announced","active","retired","withdrawn"]},"type":{"type":"string","enum":["standard","security"]},"announced_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"effective_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"notice_hours":{"type":"integer","minimum":1,"maximum":720},"changes":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":280}},"breaking_changes":{"type":"boolean"},"action_required":{"type":"boolean"},"compose_hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"manifest_digest":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"revision":{"type":"string","pattern":"^[0-9a-f]{40}$"},"images":{"type":"object","properties":{"server":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"backup":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"attestation":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"},"edge":{"type":"string","pattern":"^sha256:[0-9a-f]{64}$"}},"required":["server","backup","attestation","edge"],"additionalProperties":false},"expedite":{"anyOf":[{"type":"string","minLength":1,"maxLength":2048},{"type":"null"}]}},"required":["version","status","type","announced_at","effective_at","notice_hours","changes","breaking_changes","action_required","compose_hash","manifest_digest","revision","images","expedite"],"additionalProperties":false}}}},"400":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document. Documented codes: `release_not_found`, `releases_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/whoami":{"get":{"operationId":"whoami","tags":["Meta"],"summary":"Identify the calling API key","security":[{"ApiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"api_key_id":{"type":"string"},"tenant_id":{"type":"string"}},"required":["api_key_id","tenant_id"],"additionalProperties":false}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}},"/v1/quotas":{"get":{"operationId":"getPartnerQuota","tags":["Meta"],"summary":"Read effective partner resource quotas and usage","security":[{"ApiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"overrides":{"type":"object","properties":{"requests_per_minute":{"type":"integer","minimum":0,"maximum":9007199254740991},"key_requests_per_minute":{"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false},"limits":{"type":"object","properties":{"daily_agents":{"type":"integer","minimum":0,"maximum":9007199254740991},"requests_per_minute":{"type":"integer","minimum":0,"maximum":9007199254740991},"key_requests_per_minute":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["daily_agents","requests_per_minute","key_requests_per_minute"],"additionalProperties":false},"usage":{"type":"object","properties":{"agents_last_24_hours":{"type":"integer","minimum":0,"maximum":9007199254740991},"requests_this_minute":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["agents_last_24_hours","requests_this_minute"],"additionalProperties":false},"observed_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"}},"required":["revision","overrides","limits","usage","observed_at"],"additionalProperties":false}}}},"400":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"401":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"403":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"404":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"409":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"410":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"429":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"502":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}},"503":{"description":"Error document.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorDocument"}}}}}}}},"components":{"schemas":{"ErrorDocument":{"type":"object","properties":{"errors":{"minItems":1,"type":"array","items":{"type":"object","properties":{"status":{"type":"string","pattern":"^[1-5][0-9]{2}$"},"code":{"type":"string","pattern":"^[a-z0-9]+(?:_[a-z0-9]+)*$"},"layer":{"type":"string","enum":["request","auth","grant","policy","budget","balance","provider","api"]},"title":{"type":"string"},"detail":{"type":"string"},"source":{"type":"object","properties":{"pointer":{"type":"string"}},"required":["pointer"],"additionalProperties":false},"meta":{"type":"object","properties":{"retryable":{"type":"boolean"},"available_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"min_amount":{"type":"string","pattern":"^[0-9]{1,78}$"},"available_amount":{"type":"string","pattern":"^[0-9]{1,78}$"}},"required":["retryable"],"additionalProperties":false}},"required":["status","code","layer","title"],"additionalProperties":false}},"meta":{"type":"object","properties":{"request_id":{"type":"string"}},"additionalProperties":false}},"required":["errors","meta"],"additionalProperties":false},"OwnerWallet":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"near"},"account_id":{"type":"string","minLength":2,"maxLength":64},"public_key":{"type":"string","pattern":"^ed25519:[1-9A-HJ-NP-Za-km-z]{32,44}$"}},"required":["type","account_id","public_key"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"evm"},"address":{"type":"string","pattern":"^0x[0-9a-f]{40}$"},"chain_id":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"public_key":{"type":"string","pattern":"^0x[0-9a-f]{128}$"}},"required":["type","address","chain_id","public_key"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"passkey"},"credential_id":{"type":"string","pattern":"^[A-Za-z0-9_-]+$"},"public_key":{"type":"string","pattern":"^MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE[A-Za-z0-9_-]{85}[AQgw]$"},"rp_id":{"type":"string","minLength":1,"maxLength":253},"origin":{"type":"string","format":"uri"}},"required":["type","credential_id","public_key","rp_id","origin"],"additionalProperties":false}]},"Policy":{"type":"object","properties":{"frozen":{"type":"boolean"},"actions":{"maxItems":4,"type":"array","items":{"type":"string","enum":["swap","transfer","withdraw","limit_order"]}},"confidential":{"type":"boolean"},"owner_approval":{"type":"boolean"},"assets":{"anyOf":[{"type":"string","const":"any"},{"maxItems":128,"type":"array","items":{"type":"string","minLength":1,"maxLength":256}}]},"limits":{"type":"object","properties":{"per_transaction":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":256},"additionalProperties":{"type":"string","pattern":"^[0-9]{1,78}$"}},"hourly":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":256},"additionalProperties":{"type":"string","pattern":"^[0-9]{1,78}$"}},"daily":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":256},"additionalProperties":{"type":"string","pattern":"^[0-9]{1,78}$"}},"monthly":{"type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":256},"additionalProperties":{"type":"string","pattern":"^[0-9]{1,78}$"}}},"additionalProperties":false},"max_actions_per_hour":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":1000000},{"type":"null"}]},"destinations":{"type":"object","properties":{"mode":{"type":"string","enum":["any","only","except"]},"list":{"maxItems":256,"type":"array","items":{"oneOf":[{"type":"object","properties":{"action":{"type":"string","const":"withdraw"},"chain":{"type":"string","pattern":"^[a-z][a-z0-9_-]{0,63}$"},"address":{"type":"string","minLength":1,"maxLength":256},"memo":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}]}},"required":["action","chain","address","memo"],"additionalProperties":false},{"type":"object","properties":{"action":{"type":"string","const":"transfer"},"address":{"type":"string","minLength":2,"maxLength":64},"confidential":{"type":"boolean"}},"required":["action","address","confidential"],"additionalProperties":false}]}}},"required":["mode","list"],"additionalProperties":false},"budget":{"type":"object","properties":{"daily_usd":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,8})(\\.[0-9]{1,2})?$"},{"type":"null"}]},"weekly_usd":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,8})(\\.[0-9]{1,2})?$"},{"type":"null"}]},"monthly_usd":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,8})(\\.[0-9]{1,2})?$"},{"type":"null"}]}},"required":["daily_usd","weekly_usd","monthly_usd"],"additionalProperties":false},"timelock_ms":{"type":"integer","minimum":0,"maximum":2592000000},"schedule":{"type":"object","properties":{"mode":{"type":"string","enum":["only","except"]},"time_zone":{"type":"string","minLength":1,"maxLength":64},"windows":{"minItems":1,"maxItems":28,"type":"array","items":{"type":"object","properties":{"days":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"]}},"start":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^(?:(?:[01]\\d|2[0-3]):[0-5]\\d|24:00)$"}},"required":["days","start","end"],"additionalProperties":false}}},"required":["mode","time_zone","windows"],"additionalProperties":false},"native":{"type":"object","properties":{"near":{"type":"object","properties":{"sign_message":{"maxItems":256,"type":"array","items":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x7e]+$"}},"transfer":{"type":"boolean"},"call":{"maxItems":256,"type":"array","items":{"type":"string","minLength":2,"maxLength":64,"pattern":"^(?:[a-z\\d]+[-_])*[a-z\\d]+(?:\\.(?:[a-z\\d]+[-_])*[a-z\\d]+)*$"}}},"required":["sign_message","transfer","call"],"additionalProperties":false},"evm":{"type":"object","properties":{"sign_typed_data":{"maxItems":64,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"version":{"type":"string","minLength":1,"maxLength":64},"chain_id":{"type":"integer","minimum":0,"maximum":9007199254740991},"verifying_contract":{"type":"string","pattern":"^0x[0-9a-f]{40}$"},"salt":{"type":"string","pattern":"^0x[0-9a-f]{64}$"},"primary_types":{"minItems":1,"maxItems":32,"type":"array","items":{"type":"string","minLength":1,"maxLength":256}}},"additionalProperties":false}},"sign_message":{"type":"boolean"},"sign_intent":{"type":"object","properties":{"receivers":{"maxItems":256,"type":"array","items":{"type":"string","minLength":2,"maxLength":64,"pattern":"^(?:[a-z\\d]+[-_])*[a-z\\d]+(?:\\.(?:[a-z\\d]+[-_])*[a-z\\d]+)*$"}},"one_click_deposits":{"type":"boolean"},"withdrawals":{"maxItems":256,"type":"array","items":{"type":"object","properties":{"chain":{"type":"string"},"address":{"type":"string"}},"required":["chain","address"],"additionalProperties":false}},"max_slippage_bps":{"type":"integer","minimum":0,"maximum":300}},"required":["receivers","one_click_deposits"],"additionalProperties":false},"sign_transaction":{"type":"boolean"}},"required":["sign_typed_data","sign_message","sign_transaction"],"additionalProperties":false},"solana":{"type":"object","properties":{"sign_in":{"maxItems":256,"type":"array","items":{"type":"string","maxLength":253,"pattern":"^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?::[1-9][0-9]{0,4})?$"}},"sign_message":{"type":"boolean"},"sign_intent":{"type":"object","properties":{"receivers":{"maxItems":256,"type":"array","items":{"type":"string","minLength":2,"maxLength":64,"pattern":"^(?:[a-z\\d]+[-_])*[a-z\\d]+(?:\\.(?:[a-z\\d]+[-_])*[a-z\\d]+)*$"}},"one_click_deposits":{"type":"boolean"},"withdrawals":{"maxItems":256,"type":"array","items":{"type":"object","properties":{"chain":{"type":"string"},"address":{"type":"string"}},"required":["chain","address"],"additionalProperties":false}},"max_slippage_bps":{"type":"integer","minimum":0,"maximum":300}},"required":["receivers","one_click_deposits"],"additionalProperties":false},"sign_transfer":{"type":"boolean"},"sign_transaction":{"type":"boolean"}},"required":["sign_message","sign_transaction"],"additionalProperties":false}},"required":["near","evm","solana"],"additionalProperties":false},"limit_order":{"type":"object","properties":{"max_deviation_bps":{"type":"integer","minimum":0,"maximum":300}},"required":["max_deviation_bps"],"additionalProperties":false}},"required":["frozen","actions","confidential","owner_approval","assets","limits","max_actions_per_hour","destinations","budget","timelock_ms"],"additionalProperties":false},"GenerateIntentResponse":{"type":"object","properties":{"correlation_id":{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"},"type":{"type":"string","enum":["agent_create","policy_update","agent_freeze","agent_unfreeze","grant_issue","grant_revoke","execution_cancel","agent_archive","agent_restore","agent_delete","approval_vote"]},"agent_id":{"type":"string","pattern":"^[0-9a-f]{64}$"},"status":{"type":"string","const":"PENDING_SIGNATURE"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"signer":{"$ref":"#/components/schemas/OwnerWallet"},"intent":{"$ref":"#/components/schemas/Intent"},"preview":{"$ref":"#/components/schemas/IntentPreview"}},"required":["correlation_id","type","agent_id","status","expires_at","signer","intent","preview"],"additionalProperties":false},"Intent":{"oneOf":[{"type":"object","properties":{"standard":{"type":"string","const":"nep413"},"payload":{"type":"object","properties":{"message":{"type":"string"},"recipient":{"type":"string"},"nonce":{"type":"string","pattern":"^[A-Za-z0-9+/]{43}=$"}},"required":["message","recipient","nonce"],"additionalProperties":false}},"required":["standard","payload"],"additionalProperties":false},{"type":"object","properties":{"standard":{"type":"string","const":"nep366"},"payload":{"type":"object","properties":{"receiverId":{"type":"string","minLength":2,"maxLength":64},"actions":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"FunctionCall"},"params":{"type":"object","properties":{"methodName":{"type":"string","minLength":1,"maxLength":128},"args":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"gas":{"type":"string","pattern":"^[0-9]+$"},"deposit":{"type":"string","pattern":"^[0-9]+$"}},"required":["methodName","args","gas","deposit"],"additionalProperties":false}},"required":["type","params"],"additionalProperties":false}}},"required":["receiverId","actions"],"additionalProperties":false}},"required":["standard","payload"],"additionalProperties":false},{"type":"object","properties":{"standard":{"type":"string","const":"eip712"},"payload":{"type":"object","properties":{"domain":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}},"primaryType":{"type":"string"},"message":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["domain","types","primaryType","message"],"additionalProperties":false}},"required":["standard","payload"],"additionalProperties":false},{"type":"object","properties":{"standard":{"type":"string","const":"webauthn"},"payload":{"type":"object","properties":{"challenge":{"type":"string","pattern":"^[A-Za-z0-9_-]+$"},"rpId":{"type":"string","minLength":1,"maxLength":253},"allowCredentials":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"public-key"}},"required":["id","type"],"additionalProperties":false}},"userVerification":{"type":"string","const":"required"},"timeout":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["challenge","rpId","allowCredentials","userVerification","timeout"],"additionalProperties":false}},"required":["standard","payload"],"additionalProperties":false}]},"IntentPreview":{"type":"object","properties":{"summary":{"type":"string"},"revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"previous_revision":{"type":"integer","minimum":0,"maximum":9007199254740991},"policy_hash":{"type":"string"},"policy":{"$ref":"#/components/schemas/Policy"},"deletion":{"$ref":"#/components/schemas/DeletionPreview"},"approval":{"type":"object","properties":{"approval_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"request_type":{"type":"string"},"request_hash":{"type":"string"},"verdict":{"type":"string","enum":["approve","reject"]}},"required":["approval_id","request_type","request_hash","verdict"],"additionalProperties":false}},"required":["summary"],"additionalProperties":false},"DeletionPreview":{"type":"object","properties":{"near_account_id":{"type":"string","minLength":2,"maxLength":64},"beneficiary":{"type":"string","minLength":2,"maxLength":64},"public":{"type":"array","items":{"type":"object","properties":{"asset_id":{"type":"string","minLength":1,"maxLength":256},"symbol":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"decimals":{"anyOf":[{"type":"integer","minimum":0,"maximum":36},{"type":"null"}]},"blockchain":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"price":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"price_updated_at":{"type":["string","null"]},"price_expires_at":{"type":["string","null"]},"balance_raw":{"type":"string","pattern":"^[0-9]{1,78}$"},"balance":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$"},{"type":"null"}]}},"required":["asset_id","symbol","decimals","blockchain","price","price_updated_at","price_expires_at","balance_raw","balance"],"additionalProperties":false}},"confidential":{"type":"array","items":{"type":"object","properties":{"asset_id":{"type":"string","minLength":1,"maxLength":256},"symbol":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"decimals":{"anyOf":[{"type":"integer","minimum":0,"maximum":36},{"type":"null"}]},"blockchain":{"anyOf":[{"type":"string","minLength":1,"maxLength":64},{"type":"null"}]},"price":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"price_updated_at":{"type":["string","null"]},"price_expires_at":{"type":["string","null"]},"balance_raw":{"type":"string","pattern":"^[0-9]{1,78}$"},"balance":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]*)(\\.[0-9]+)?$"},{"type":"null"}]}},"required":["asset_id","symbol","decimals","blockchain","price","price_updated_at","price_expires_at","balance_raw","balance"],"additionalProperties":false}},"assets_lost":{"type":"boolean"},"open_limit_orders":{"type":"integer","minimum":0,"maximum":9007199254740991},"retirement":{"type":"string","enum":["provider_delete","credential_erase"]}},"required":["near_account_id","beneficiary","public","confidential","assets_lost","open_limit_orders","retirement"],"additionalProperties":false},"SignedData":{"oneOf":[{"type":"object","properties":{"standard":{"type":"string","const":"nep413"},"payload":{"type":"object","properties":{"message":{"type":"string"},"recipient":{"type":"string"},"nonce":{"type":"string","pattern":"^[A-Za-z0-9+/]{43}=$"}},"required":["message","recipient","nonce"],"additionalProperties":false},"public_key":{"type":"string","maxLength":80,"format":"starts_with","pattern":"^ed25519:.*"},"signature":{"type":"string","minLength":64,"maxLength":256}},"required":["standard","payload","public_key","signature"],"additionalProperties":false},{"type":"object","properties":{"standard":{"type":"string","const":"nep366"},"payload":{"type":"object","properties":{"receiverId":{"type":"string","minLength":2,"maxLength":64},"actions":{"minItems":1,"maxItems":2,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"FunctionCall"},"params":{"type":"object","properties":{"methodName":{"type":"string","minLength":1,"maxLength":128},"args":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"gas":{"type":"string","pattern":"^[0-9]+$"},"deposit":{"type":"string","pattern":"^[0-9]+$"}},"required":["methodName","args","gas","deposit"],"additionalProperties":false}},"required":["type","params"],"additionalProperties":false}}},"required":["receiverId","actions"],"additionalProperties":false},"signed_delegate":{"type":"string","minLength":32,"maxLength":50000}},"required":["standard","payload","signed_delegate"],"additionalProperties":false},{"type":"object","properties":{"standard":{"type":"string","const":"eip712"},"payload":{"type":"object","properties":{"domain":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"types":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"}},"required":["name","type"],"additionalProperties":false}}},"primaryType":{"type":"string"},"message":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["domain","types","primaryType","message"],"additionalProperties":false},"signature":{"type":"string","pattern":"^0x[0-9a-fA-F]{130}$"}},"required":["standard","payload","signature"],"additionalProperties":false},{"type":"object","properties":{"standard":{"type":"string","const":"webauthn"},"payload":{"type":"object","properties":{"challenge":{"type":"string","pattern":"^[A-Za-z0-9_-]+$"},"rpId":{"type":"string","minLength":1,"maxLength":253},"allowCredentials":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"public-key"}},"required":["id","type"],"additionalProperties":false}},"userVerification":{"type":"string","const":"required"},"timeout":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["challenge","rpId","allowCredentials","userVerification","timeout"],"additionalProperties":false},"credential":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9_-]+$"},"rawId":{"type":"string","pattern":"^[A-Za-z0-9_-]+$"},"type":{"type":"string","const":"public-key"},"response":{"type":"object","properties":{"clientDataJSON":{"type":"string","pattern":"^[A-Za-z0-9_-]+$"},"authenticatorData":{"type":"string","pattern":"^[A-Za-z0-9_-]+$"},"signature":{"type":"string","pattern":"^[A-Za-z0-9_-]+$"},"userHandle":{"type":"string","pattern":"^[A-Za-z0-9_-]+$"}},"required":["clientDataJSON","authenticatorData","signature"]},"clientExtensionResults":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"authenticatorAttachment":{"type":"string","enum":["platform","cross-platform"]}},"required":["id","rawId","type","response","clientExtensionResults"]}},"required":["standard","payload","credential"],"additionalProperties":false}]},"StatusResponse":{"oneOf":[{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"agent_create"},"details":{"type":"object","properties":{"revision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"policy_hash":{"type":["string","null"]},"transaction_hash":{"type":["string","null"]},"agent_id":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["revision","policy_hash","transaction_hash","agent_id"],"additionalProperties":false}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"policy_update"},"details":{"type":"object","properties":{"revision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"policy_hash":{"type":["string","null"]},"transaction_hash":{"type":["string","null"]}},"required":["revision","policy_hash","transaction_hash"],"additionalProperties":false}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"agent_freeze"},"details":{"type":"object","properties":{"revision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"policy_hash":{"type":["string","null"]},"transaction_hash":{"type":["string","null"]}},"required":["revision","policy_hash","transaction_hash"],"additionalProperties":false}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"agent_unfreeze"},"details":{"type":"object","properties":{"revision":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"policy_hash":{"type":["string","null"]},"transaction_hash":{"type":["string","null"]}},"required":["revision","policy_hash","transaction_hash"],"additionalProperties":false}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"grant_issue"},"details":{"type":"object","properties":{"grant":{"anyOf":[{"$ref":"#/components/schemas/GrantView"},{"type":"null"}]}},"required":["grant"],"additionalProperties":false}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"grant_revoke"},"details":{"type":"object","properties":{"grant_id":{"type":["string","null"]},"committed_correlation_ids":{"anyOf":[{"type":"array","items":{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"}},{"type":"null"}]},"committed_cancellations":{"anyOf":[{"maxItems":100,"type":"array","items":{"type":"object","properties":{"order_id":{"type":["string","null"]},"committed_at":{"type":"string"}},"required":["order_id","committed_at"],"additionalProperties":false}},{"type":"null"}]},"committed_truncated":{"type":["boolean","null"]}},"required":["grant_id","committed_correlation_ids","committed_cancellations","committed_truncated"],"additionalProperties":false}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"execution_cancel"},"details":{"type":"object","properties":{"cancelled_correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"null"}]}},"required":["cancelled_correlation_id"],"additionalProperties":false}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"agent_archive"},"details":{"type":"object","properties":{"archived":{"type":["boolean","null"]}},"required":["archived"],"additionalProperties":false}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"agent_restore"},"details":{"type":"object","properties":{"archived":{"type":["boolean","null"]}},"required":["archived"],"additionalProperties":false}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"agent_delete"},"details":{"$ref":"#/components/schemas/ExecutionDetails"}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"approval_vote"},"details":{"type":"object","properties":{"approval_id":{"type":["string","null"]},"verdict":{"anyOf":[{"type":"string","enum":["approve","reject"]},{"type":"null"}]}},"required":["approval_id","verdict"],"additionalProperties":false}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"swap"},"details":{"$ref":"#/components/schemas/ExecutionDetails"}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"limit_order"},"details":{"$ref":"#/components/schemas/ExecutionDetails"}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"withdraw"},"details":{"$ref":"#/components/schemas/ExecutionDetails"}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"transfer"},"details":{"$ref":"#/components/schemas/ExecutionDetails"}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"shield"},"details":{"$ref":"#/components/schemas/ExecutionDetails"}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"unshield"},"details":{"$ref":"#/components/schemas/ExecutionDetails"}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"deposit"},"details":{"$ref":"#/components/schemas/ExecutionDetails"}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false},{"type":"object","properties":{"correlation_id":{"anyOf":[{"type":"string","pattern":"^op_[A-Za-z0-9_-]{43}$"},{"type":"string","pattern":"^intent_[A-Za-z0-9_-]{43}$"}]},"agent_id":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["PENDING_SIGNATURE","QUEUED","PENDING_APPROVAL","PENDING_DEPOSIT","PROCESSING","SUCCESS","REFUNDED","FAILED","UNCERTAIN","NEEDS_REVIEW"]},"failure_code":{"type":["string","null"]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"dispatch_committed_at":{"type":["string","null"]},"grant":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"label":{"type":"string"}},"required":["id","label"],"additionalProperties":false},{"type":"null"}]},"type":{"type":"string","const":"native"},"details":{"type":"object","properties":{"method":{"type":"string","enum":["near_sign_message","near_transfer","near_call","evm_sign_typed_data","evm_sign_message","evm_sign_intent","evm_sign_transaction","solana_sign_in","solana_sign_message","solana_sign_intent","solana_sign_transfer","solana_sign_transaction"]},"chain":{"type":"string","enum":["near","ethereum","polygon","base","arbitrum","optimism","bsc","avalanche","hyperevm","hood","solana"]},"account_id":{"type":["string","null"]},"target":{"type":["string","null"]},"amount":{"type":["string","null"]},"method_name":{"type":["string","null"]},"primary_type":{"type":["string","null"]},"domain":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"version":{"type":"string","minLength":1,"maxLength":64},"chain_id":{"type":"integer","minimum":0,"maximum":9007199254740991},"verifying_contract":{"type":"string","pattern":"^0x[0-9a-f]{40}$"},"salt":{"type":"string","pattern":"^0x[0-9a-f]{64}$"}},"additionalProperties":false},{"type":"null"}]},"message_json":{"anyOf":[{"type":"string","maxLength":65536},{"type":"null"}]},"request_sha256":{"type":"string"},"signature":{"type":["string","null"]},"tx_hash":{"type":["string","null"]},"provider_request_id":{"type":["string","null"]},"provider_status":{"type":["string","null"]},"failure_reason":{"type":["string","null"]}},"required":["method","chain","account_id","target","amount","method_name","primary_type","domain","message_json","request_sha256","signature","tx_hash","provider_request_id","provider_status","failure_reason"],"additionalProperties":false}},"required":["correlation_id","agent_id","status","failure_code","created_at","updated_at","dispatch_committed_at","grant","type","details"],"additionalProperties":false}]},"GrantView":{"type":"object","properties":{"grant_id":{"type":"string","pattern":"^[0-9a-f]{64}$"},"agent_id":{"type":"string","pattern":"^[0-9a-f]{64}$"},"wallet_id":{"type":"string"},"label":{"type":"string"},"issued_at":{"type":"string"},"expires_at":{"type":"string"},"revoked_at":{"type":["string","null"]},"revoked_reason":{"type":["string","null"]},"owner_epoch":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"owner_message":{"type":"object","properties":{"domain":{"type":"string","const":"near-intents-agent-api.agent-grant.v6"},"owner":{"$ref":"#/components/schemas/OwnerWallet"},"tenant_id":{"type":"string","minLength":1,"maxLength":64},"agent_id":{"type":"string","pattern":"^[0-9a-f]{64}$"},"wallet_id":{"type":"string","minLength":1,"maxLength":256},"label":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[^\\p{Cc}]+$"},"credential":{"type":"string","pattern":"^[0-9a-f]{64}$"},"network":{"type":"string","const":"mainnet"},"issued_at_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"expires_at_ms":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"owner_epoch":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"nonce":{"type":"string","minLength":16,"maxLength":64},"recipient":{"type":"string","minLength":1,"maxLength":253}},"required":["domain","owner","tenant_id","agent_id","wallet_id","label","credential","network","issued_at_ms","expires_at_ms","owner_epoch","nonce","recipient"],"additionalProperties":false}},"required":["grant_id","agent_id","wallet_id","label","issued_at","expires_at","revoked_at","revoked_reason","owner_epoch","owner_message"],"additionalProperties":false},"ExecutionDetails":{"type":"object","properties":{"action":{"type":"string"},"request":{"type":"object","properties":{"origin_asset":{"type":"string","maxLength":256},"destination_asset":{"type":"string","maxLength":256},"asset":{"type":"string","maxLength":256},"amount":{"type":"string","pattern":"^[0-9]{1,78}$"},"min_amount_out":{"type":"string","pattern":"^[0-9]{1,78}$"},"chain":{"type":"string","maxLength":64},"recipient":{"type":"string","maxLength":128},"memo":{"type":"string","maxLength":256},"reference":{"type":"string","pattern":"^[\\x21-\\x7e]{1,128}$"},"note":{"type":"string","pattern":"^[^\\p{Cc}\\p{Cs}\\p{Zl}\\p{Zp}]{1,500}$"},"side":{"type":"string","enum":["sell","buy"]},"price":{"type":"string","maxLength":40},"quantity":{"type":"string","pattern":"^[0-9]{1,78}$"},"deadline":{"type":"string","maxLength":40},"confidential":{"type":"boolean"}},"additionalProperties":false},"near_account_id":{"type":"string"},"provider_request_id":{"type":["string","null"]},"provider_status":{"type":"string"},"confidential":{"type":"boolean"},"chain":{"type":"string"},"execute_after":{"type":"string"},"delay_ms":{"type":"number"},"approval_id":{"type":["string","null"]},"intent_hash":{"type":["string","null"]},"tx_hash":{"type":["string","null"]},"destination_tx_hash":{"type":["string","null"]},"amount_out":{"type":["string","null"]},"expected_amount_out":{"type":"string"},"deposit_address":{"type":["string","null"]},"memo":{"type":["string","null"]},"available_amount":{"type":"string"},"min_amount":{"type":["string","null"]},"min_amount_out":{"type":["string","null"]},"requested_min_amount_out":{"type":"string"},"requested_asset":{"type":"string"},"usd_value":{"type":"string","pattern":"^[0-9]{1,24}\\.[0-9]{6}$"},"order_id":{"type":["string","null"]},"delivered":{"type":["string","null"]},"expires_at":{"type":["string","null"]},"refund_to":{"type":["string","null"]},"deposit_seen_at":{"type":"string"},"refund_tx_hash":{"type":["string","null"]},"failure_reason":{"type":["string","null"]},"policy_record":{"type":"object","properties":{"status":{"type":"string","enum":["pending","deleted","absent","kept","unknown"]},"transaction_hash":{"type":["string","null"]},"refund_to":{"type":["string","null"]},"storage_deposit_yocto":{"type":["string","null"]},"reason":{"type":"string"}},"required":["status","transaction_hash","refund_to","storage_deposit_yocto"],"additionalProperties":false}},"required":["action"],"additionalProperties":{}},"AgentView":{"type":"object","properties":{"id":{"type":"string","pattern":"^[0-9a-f]{64}$"},"name":{"type":"string"},"external_user_id":{"type":["string","null"]},"status":{"type":"string","enum":["PENDING","ACTIVE","ARCHIVED","DELETED","ABANDONED"]},"archived":{"type":"boolean"},"deleted":{"type":"boolean"},"owner":{"anyOf":[{"$ref":"#/components/schemas/OwnerWallet"},{"type":"null"}]},"owner_account":{"anyOf":[{"type":"object","properties":{"account_id":{"type":"string","minLength":2,"maxLength":64},"public_key":{"type":"string","pattern":"^(?:ed25519:[1-9A-HJ-NP-Za-km-z]{32,44}|p256:[1-9A-HJ-NP-Za-km-z]{43,46}|secp256k1:[1-9A-HJ-NP-Za-km-z]{80,90})$"},"authority":{"type":"string","const":"wallet"}},"required":["account_id","public_key","authority"],"additionalProperties":false},{"type":"null"}]},"wallet":{"anyOf":[{"type":"object","properties":{"wallet_id":{"type":"string","minLength":1,"maxLength":256},"near_account_id":{"type":"string","minLength":2,"maxLength":64},"evm_account_id":{"type":["string","null"]},"solana_account_id":{"type":["string","null"]}},"required":["wallet_id","near_account_id","evm_account_id","solana_account_id"],"additionalProperties":false},{"type":"null"}]},"created_at":{"type":"string"},"cooldowns":{"type":"object","properties":{"policy_change_available_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"unfreeze_available_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["policy_change_available_at","unfreeze_available_at"],"additionalProperties":false}},"required":["id","name","external_user_id","status","archived","deleted","owner","owner_account","wallet","created_at","cooldowns"],"additionalProperties":false},"PolicyView":{"type":"object","properties":{"wallet_id":{"type":"string","minLength":1,"maxLength":256},"revision":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"policy_hash":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{64}$"},{"type":"null"}]},"status":{"type":"string","enum":["NONE","SIGNED","APPLIED","FAILED"]},"applied_at":{"type":["string","null"]},"transaction_hash":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"provider_policy_synced":{"type":"boolean"},"cooldowns":{"type":"object","properties":{"policy_change_available_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]},"unfreeze_available_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["policy_change_available_at","unfreeze_available_at"],"additionalProperties":false},"policy":{"anyOf":[{"$ref":"#/components/schemas/Policy"},{"type":"null"}]},"usage":{"type":"object","properties":{"budget":{"$ref":"#/components/schemas/BudgetView"},"timelock":{"$ref":"#/components/schemas/TimelockView"}},"required":["budget","timelock"],"additionalProperties":false}},"required":["wallet_id","revision","policy_hash","status","applied_at","transaction_hash","provider_policy_synced","cooldowns","policy","usage"],"additionalProperties":false},"BudgetView":{"type":"object","properties":{"daily":{"type":"object","properties":{"limit_usd":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,8})(\\.[0-9]{1,2})?$"},{"type":"null"}]},"spent_usd":{"type":["string","null"]},"remaining_usd":{"type":["string","null"]},"resets_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["limit_usd","spent_usd","remaining_usd","resets_at"],"additionalProperties":false},"weekly":{"type":"object","properties":{"limit_usd":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,8})(\\.[0-9]{1,2})?$"},{"type":"null"}]},"spent_usd":{"type":["string","null"]},"remaining_usd":{"type":["string","null"]},"resets_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["limit_usd","spent_usd","remaining_usd","resets_at"],"additionalProperties":false},"monthly":{"type":"object","properties":{"limit_usd":{"anyOf":[{"type":"string","pattern":"^(0|[1-9][0-9]{0,8})(\\.[0-9]{1,2})?$"},{"type":"null"}]},"spent_usd":{"type":["string","null"]},"remaining_usd":{"type":["string","null"]},"resets_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}]}},"required":["limit_usd","spent_usd","remaining_usd","resets_at"],"additionalProperties":false}},"required":["daily","weekly","monthly"],"additionalProperties":false},"TimelockView":{"type":"object","properties":{"delay_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"scheduled_count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["delay_ms","scheduled_count"],"additionalProperties":false},"QuoteResponse":{"type":"object","properties":{"dry":{"type":"boolean","const":true},"type":{"type":"string","enum":["swap","withdraw","limit_order"]},"quote":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"spend":{"type":"object","properties":{"amount_usd":{"type":["string","null"]},"budget":{"$ref":"#/components/schemas/BudgetView"}},"required":["amount_usd","budget"],"additionalProperties":false},"owner_approval":{"type":"boolean"},"fee":{"anyOf":[{"type":"object","properties":{"amount_usd":{"type":"string"},"percent":{"type":"string"}},"required":["amount_usd","percent"],"additionalProperties":false},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","enum":["policy_action_denied","policy_destination_denied","unsupported_token","invalid_address","insufficient_balance","policy_asset_denied","policy_transaction_limit_exceeded","policy_schedule_denied","spend_price_unavailable","spend_budget_exceeded","policy_limit_exceeded","policy_action_limit_exceeded","policy_usage_unavailable","approval_backlog_full","amount_too_low","policy_price_deviation_exceeded","market_price_unavailable","high_fee","asset_delivered_as_is"]},"detail":{"type":"string"},"available_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},"available_amount":{"type":"string","pattern":"^[0-9]{1,78}$"}},"required":["code","detail"],"additionalProperties":false}}},"required":["dry","type","quote","spend","owner_approval","fee","warnings"],"additionalProperties":false}},"securitySchemes":{"ApiKey":{"type":"apiKey","in":"header","name":"X-API-Key"},"GrantToken":{"type":"apiKey","in":"header","name":"X-Grant-Token","description":"Token of the owner grant a delegated request runs under. The partner creates it and the owner signs its commitment; keep it on your backend."}}}}