An agent holds two balances on NEAR Intents: a public balance and a confidential balance. Fund either one from any supported chain with a one-time deposit address, then move funds between them with shield and unshield.
At a glance
  • Deposit address: POST /v1/agents/{agent_id}/deposit with your API key and an Idempotency-Key. No grant, no owner signature, never spends the agent’s funds.
  • Refunds: always to the agent’s own balance. There’s no refund address to choose.
  • Shield and unshield: need a grant and confidential: true in the policy.
  • Limit: 100 deposit addresses per agent per rolling 24 hours.

Create a deposit address

A deposit address needs your partner API key and an Idempotency-Key. It needs no grant and no owner signature, and the policy’s destinations, USD budget, timelock and schedule do not apply. It never spends the agent’s funds.

Request

Response

The status is PENDING_DEPOSIT until funds arrive.
The correlation_id (op_…) is a tracking id. It is never an address. Send funds only to details.deposit_address.
Without amount, the address stays open for 3 days and credits any payment at or above min_amount. With an amount, it is quoted for exactly that amount for about a day. details.expires_at is always the authoritative deadline.

Follow the deposit

Send the funds to the address, then follow the correlation_id with GET /v1/status. Check the result with the agent’s balance:
Use source=confidential for the confidential balance. balance_raw is the exact atomic amount for arithmetic. balance is the exact decimal amount for display, or null when the token’s decimals are unknown. Use balance_raw then. available_raw and available are the same two formats for what a new request can still spend: the balance less queued or timelocked work that has not been dispatched yet. Dispatched work leaves the balance when the provider’s balance reflects it, a few seconds after dispatch; a request for all of available_raw sent in that window is refused once it does. Read available instead of working it out yourself.

Refunds

There is no refund address to choose. A wrong amount, a late payment or a failed conversion refunds into the agent’s own balance, in the same balance type (public or confidential) that the deposit targeted. A payment that lands on an address after it ended FAILED with deposit_expired is refunded to details.refund_to too. The refund shows up as REFUNDED with details.refund_tx_hash.

Retries and keys

  • One key makes one address. Retrying with the same key returns the same operation. A new key creates a new address.
  • Save the key before you send the request. If the connection drops, reuse it.
  • An address creation is never replayed automatically after a lost provider response, and a deposit cannot be revived with recover. Only use an address that a successful response returned.

Other ways to fund an agent

  • From another NEAR Intents account: send a transfer to agent.wallet.near_account_id, from any NEAR Intents account.
  • From another agent: use transfer under a grant, subject to the policy’s destinations.

Shield and unshield

shield moves a public balance to the confidential balance. unshield moves it back. Both move funds between the agent’s own balances, so they need no destination. They do need a grant, and the policy must have confidential: true.
Moving funds between the two balances does not refund earlier USD budget usage.

Quotas

Each agent can be issued at most 100 deposit addresses per rolling 24 hours, whichever of your keys asks; other agents are not affected. Over that, the API answers deposit_quota_exceeded (HTTP 429) with errors[0].meta.available_at, the time the oldest address leaves the window, and a Retry-After header. See Network & Quotas.

Errors

See Status & Errors for every code.