testnet
GitHub

transfer.send

send(agentId, to, amount) → TransferReceipt

Make the agent send OKRW to another address. Enforces the agent's on-chain policy server-side before submitting. The transaction is signed by WaaS on the agent's behalf.

Parameters

Name Type Required Description
agentId string The agent's UUID.
to string Destination EVM address (0x-prefixed 40 hex chars).
amount string OKRW amount as a decimal string (e.g. '50' or '0.25').

Returns

Type: object

Returns txHash, gasUsed, gasCostOKRW, and userCostOKRW after the tx confirms on-chain.

Errors

Code Name Description
AGENT_NOT_ACTIVE AgentNotActive Agent is PENDING, FROZEN, or REVOKED.
INSUFFICIENT_BALANCE InsufficientBalance Agent balance is less than the requested amount.
POLICY_REJECTED PolicyRejected Transfer violates spendingLimit or allowedTargets.

Examples

Send 10 OKRW

{
  "agentId": "123e4567-e89b-12d3-a456-426614174000",
  "to": "0xRecipientAddress",
  "amount": "10"
}
ESC
Type to search