You can interact directly with the VSL RPC server by sending raw JSON-RPC requests using tools like curl
. This is especially useful for quick queries, automation, or debugging without needing a frontend interface.
How it works
Each curl
request sends a JSON-RPC payload to the RPC server URL (usually http://localhost:44444 during development).
Here's the general format:
Copy curl -X POST \
-H 'Content-Type: application/json' \
-d '<JSON-PAYLOAD>' \
http://localhost:44444
You replace <JSON-PAYLOAD>
with a valid JSON-RPC body.
Example Queries
Below are some example methods you can use to retrieve data from a running VSL node. You can plug in your own account IDs, claim IDs, or addresses as needed.
Check server health
Copy curl -X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"vsl_getHealth"}' \
http://localhost:44444
Get account nonce
Copy curl -X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"vsl_getAccountNonce","params":{"account_id": "0xcd9390ebf4c69c8b091c15a0f4e470880c82e239"}}' \
http://localhost:44444
Get account balance
Copy curl -X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"vsl_getBalance","params":{"account_id": "0xcd9390ebf4c69c8b091c15a0f4e470880c82e239"}}' \
http://localhost:44444
Get all asset balances for an account
Copy curl -X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"vsl_getAssetBalances","params":{"account_id": "0xcd9390ebf4c69c8b091c15a0f4e470880c82e239"}}' \
http://localhost:44444
Get balance for a specific asset
Copy curl -X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"vsl_getAssetBalance","params":{"account_id": "0xcd9390ebf4c69c8b091c15a0f4e470880c82e239", "asset_id": "ba9f90abf46fcf4896b870d82a547a56972d4e05da4e4fdec78acdb3eb91bb48"}}' \
http://localhost:44444
List submitted claims (sender or receiver)
Copy curl -X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"vsl_listSubmittedClaimsForSender","params":{"since": {"seconds": 0, "nanos": 0}, "address": "0x0101010101010101010101010101010101010101"}}' \
http://localhost:44444
Change method to:
vsl_listSubmittedClaimsForReceiver
for receiver side
You can omit the "address
" field to fetch for all accounts.
List settled claims (sender or receiver)
Copy curl -X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"vsl_listSettledClaimsForReceiver","params":{"since": {"seconds": 0, "nanos": 0}, "address": "0x0101010101010101010101010101010101010101"}}' \
http://localhost:44444
Change method to vsl_listSettledClaimsForSender
for sender view.
Get settled claim by ID
Copy curl -X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"vsl_getSettledClaimById","params":{"claim_id": "0xc6dd1fccbd1a2c5616f799cef2158a8eb42be8dcbd6e62491c474b08fb25a6ae"}}' \
http://localhost:44444
Get account state
Copy curl -X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"vsl_getAccountState","params":{"account_id": "0xcd9390ebf4c69c8b091c15a0f4e470880c82e239"}}' \
http://localhost:44444
Additional notes
You must have a local node running and accessible at the target address.
The methods listed above are read-only; they won’t change state or require signatures.
Methods like vsl_getAccount
and vsl_getAssetById
are not yet implemented.