native block. Each one has its own route under POST /v1/agents/{agent_id}/native/….
The agent’s addresses
GET /v1/agents/{agent_id}/wallet returns the agent’s addresses.
The EVM and Solana keys are separate keys. Nothing they sign can reach the NEAR Intents balance. The NEAR Intents contracts (
intents.near, intents.far) can never be signed for, called or sent to, so the NEAR key can’t reach it either.
The EVM routes take a chain: ethereum, polygon, base, arbitrum, optimism, bsc, avalanche, hyperevm or hood. The address is the same on all of them.
Turn methods on
The owner addsnative to the policy. Read the current policy, set native, and send the complete policy as a policy_update:
- Omitted means every method is off. When
nativeis present, every key in it is required. An empty list is off. - Lists hold up to 256 unique NEAR accounts (
near.sign_message,near.call) or up to 64 domain entries, unique by domain (evm.sign_typed_data). intents.nearandintents.farcan never be listed. A policy that lists them is refused withvalidation_failed.- Transactions are checked before anything is signed.
native/evm/sign-transactiontakes one serialized unsigned EIP-2718 typed or EIP-155 legacy transaction whose chain id is that ofchain.native/solana/sign-transactiontakes one legacy or v0 transaction message. Anything else is refused withvalidation_failed, so neither route signs a message. - Every grant on the agent can use a method once it is on. Revoking a grant stops only that grant.
- The wallet provider enforces the switches too, so changing
nativeis an on-chain policy change. A NEAR owner signs it asnep366, the API pays the gas, and the policy cooldown applies. A method works once the revision isAPPLIEDandprovider_policy_syncedistrue. - The owner’s
preview.summarynames every method the policy switches on and says they skip the account’s money rules.
What applies
Every native request needs a live grant token (X-Grant-Token) and an applied policy, and is refused while the agent is frozen. The policy switch is the whole fence.
Every native request is recorded in the agent’s history (
GET /v1/agents/{agent_id}/history) as type native, signatures included. See History.
Native signatures share the API’s delegated signing limit: by default 4 at once per server and 2 per partner account. More answer rate_limited (429), retryable.
Sign a message (NEAR)
An agent can sign a NEP-413 message with its NEAR key, which is how a site or dApp logs in a NEAR account (signMessage). The service, the relying party, issues a message and a random 32-byte nonce and names itself as the recipient. Your backend has the API sign exactly those, and the relying party checks the signature. It moves no money.
Turn it on by listing the relying party in native.near.sign_message. An entry is a NEAR account or a domain (printable ASCII, up to 128 characters), matched exactly, with no wildcard.
This route signs a NEP-413 message only. It never signs a transaction or an intent, and never for the NEAR Intents contracts (
intents.near, intents.far), in any letter case.Sign a message
Your backend receivesmessage, recipient and nonce from the relying party and sends them unchanged with the grant token. The API key alone is refused with agent_grant_required.
callback_url is not supported. The response is 200. It answers at once, with nothing to poll. correlation_id names the history record.
Verify a signature (relying party)
The relying party checks, in order:recipientis its own account or domain, andnonceis one it issued, unused.- The signature (base64) verifies with
public_keyover the NEP-413 payload: the exactmessageit issued, the decoded 32-bytenonce,recipient, and no callback URL. public_keycontrolsnear_account_id: a full-access key on that account, read atfinal. For an implicit account that doesn’t exist on-chain yet, the account ID is the hex of that key.
Turn it off
Remove an entry from a list, set a switch tofalse, or omit native to turn every method off. Each is an on-chain policy change, like turning it on. Freezing the agent stops every native route at once (wallet_frozen). Revoking a grant stops only that grant.
Deleting the agent doesn’t sweep funds at its EVM or Solana address to the owner, and native NEAR left in its NEAR account goes to the sponsor. Move them first. See Deleting an agent.
Errors
signing_recipient_forbidden is checked first, before the grant and the policy.
See Status & Errors for the error format and every other code.