Skip to main content

Skill Integration (Non-Interactive)

Teach any agent (Cursor, ChatGPT with code execution, custom agents) to call the Nava API directly using curl. No SDK installation required, only shell access and environment variables.

Prerequisites

The following environment variables must be set:

  • NAVA_API_KEY: your Nava API key
  • WALLET_ADDRESS: your wallet address

Submit a Transaction for Verification

curl -s -X POST "https://internal.navalabs.dev/api/transactions" \
-H "Content-Type: application/json" \
-H "x-api-key:$NAVA_API_KEY" \
-d '{
"escrowAddress": "'"$WALLET_ADDRESS"'",
"userPrompt": "<human-readable description of the transaction>",
"tx": {
"to": "<target address>",
"value": "<value in Wei>",
"data": "<encoded calldata>"
},
"chainId": 11155111
}'

On success, the response contains:

  • requestHash: use this to poll for approval
  • id: the transaction ID
  • status: initial status (typically "PENDING")

Check Verification Status

curl -s -X GET "https://internal.navalabs.dev/api/transactions/<requestHash>/approval-status" \
-H "Content-Type: application/json" \
-H "x-api-key:$NAVA_API_KEY"

The response contains an orion array. If empty, the transaction is still pending; wait 2-3 seconds and poll again. When populated:

  • orion[0].decision: "APPROVED", "REJECTED", or "UNDECIDED"
  • orion[0].analysis: the arbiter’s reasoning
  • orion[0].confidence: confidence score (0-1)

Workflow

  1. Call POST /transactions with the transaction details.
  2. Extract requestHash from the response.
  3. Poll GET /transactions/{requestHash}/approval-status every 2-3 seconds.
  4. Stop when orion[0].decision is "APPROVED", "REJECTED", or "UNDECIDED".
  5. If approved, proceed with execution. If rejected, read the analysis and adapt.