Using the API#
This is the main runtime integration guide.
All runtime calls use:
- Base URL:
https://api.velarics.com/v1 - Header:
X-API-Key: YOUR_API_KEY
Where endpoints come from#
In console, open Functions tab for your deployed contract.
Each function shows:
- Endpoint path
- Method
- Input parameters
- Example payload
Use those values directly in your app.
Invoke#
Use invoke to write or update ledger state.
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" } }'
Expected:
- State changes
status: committed- Transaction ID returned
Query#
Use query to read state without changing it.
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"
Expected:
- No state change
status: evaluated- Requested data returned
Verify#
Use verify to check business conditions.
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"
Expected:
- Pass/fail style result
- Useful for compliance and trust checks
What just happened#
- You mapped each function type to practical runtime behavior.
- You used only generated endpoints from deployed contracts.
- You now have a clean pattern for app integration.
