policy.preflight
preflight(agentId, to, amount) → PreflightResult Simulate a transfer against the agent's policy off-chain to confirm if it will pass, without actually submitting a transaction.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
agentId | string | ✓ | The agent's UUID. |
to | string | ✓ | Destination EVM address. |
amount | string | ✓ | OKRW amount as a decimal string. |
Returns
Type:
object Returns { allowed: boolean, reason?: string }.
Examples
Check Transfer Validity
{
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"to": "0xDestinationAddress",
"amount": "100"
}