Learn how to access Soroban API.
Step 1: To access the available Soroban methods, use the following native access endpoint:
- Network: Soroban Testnet
- Request Type: GET / POST
https://svc.blockdaemon.com/soroban/testnet/native
Step 2: You should authorize your request. Learn more: Authentication Guide
Step 3: Specify a Soroban method at the end of the query:
https://svc.blockdaemon.com/soroban/testnet/native/YOUR_METHOD
Step 4: For POST requests, specify the data required by the method in the request body.
Example Request
Here is a cURL example for retrieving the current latest known ledger of this node. This is a subset of the ledger info from Horizon.
curl -X POST \
https://svc.blockdaemon.com/soroban/testnet/native \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id":1,
"method": "getLatestLedger"
}
Here's what a typical response object will look like:
{
"jsonrpc":"2.0",
"id":1,
"result":{
"latestLedger":"123456"
}
}