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 keyWALLET_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 approvalid: the transaction IDstatus: 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 reasoningorion[0].confidence: confidence score (0-1)
Workflow
- Call
POST /transactionswith the transaction details. - Extract
requestHashfrom the response. - Poll
GET /transactions/{requestHash}/approval-statusevery 2-3 seconds. - Stop when
orion[0].decisionis"APPROVED","REJECTED", or"UNDECIDED". - If approved, proceed with execution. If rejected, read the analysis and adapt.