API Reference#
This reference is runtime-only.
Base URL:
https://api.velarics.com/v1
Header for all runtime calls:
X-API-Key: YOUR_API_KEY
Invoke#
POST /projects/:project_id/contracts/:contract_id/invoke/:function_name
Use for state-changing functions.
Example:
bashcurl -X POST https://api.velarics.com/v1/projects/YOUR_PROJECT_ID/contracts/YOUR_CONTRACT_ID/invoke/CreateAsset \ -H "X-API-Key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "params": { "id": "asset-1001", "owner": "alice" } }'
Typical success shape:
json{ "success": true, "status": "committed", "transactionId": "tx-id", "result": { "success": true, "data": { "id": "asset-1001" } } }
Query#
GET /projects/:project_id/contracts/:contract_id/query/:function_name
Use for read-only functions.
Example:
bashcurl -X GET "https://api.velarics.com/v1/projects/YOUR_PROJECT_ID/contracts/YOUR_CONTRACT_ID/query/GetAsset?id=asset-1001" \ -H "X-API-Key: YOUR_API_KEY"
Typical success shape:
json{ "success": true, "status": "evaluated", "result": { "success": true, "data": { "id": "asset-1001", "owner": "alice" } } }
Verify#
GET /projects/:project_id/contracts/:contract_id/verify/:function_name
Use for verification checks.
Example:
bashcurl -X GET "https://api.velarics.com/v1/projects/YOUR_PROJECT_ID/contracts/YOUR_CONTRACT_ID/verify/VerifyAssetOwner?id=asset-1001&owner=alice" \ -H "X-API-Key: YOUR_API_KEY"
Typical verify shape:
json{ "success": true, "status": "evaluated", "result": { "verified": true, "reason": "owner matches" } }
Common error shape#
json{ "success": false, "code": "INVALID_PARAMS", "message": "Missing required parameter: id" }
