Secret Network Validator Tools & Infrastructure Documentation
Complete infrastructure toolkit for Secret Network validators and developers. Access our professional-grade services including RPC nodes, API endpoints, daily snapshots, and real-time metrics. Our secretnetwork infrastructure features optimized pruning configurations, automated backups, and comprehensive monitoring solutions. Supporting both mainnet and testnet environments with dedicated endpoints, state-sync services, and detailed technical documentation for seamless network participation and development.
Learn how to interact with secretnetwork nodes using different endpoint types.
#Available Endpoints
Service | Endpoint |
---|---|
REST API | https://rest.lavenderfive.com:443/secretnetwork |
RPC | https://rpc.lavenderfive.com:443/secretnetwork |
gRPC | secretnetwork.lavenderfive.com:443 |
WebSocket | wss://rpc.lavenderfive.com:443/secretnetwork/ws |
JSON-RPC | Not available |
WS-JSON-RPC | Not available |
#🌐 API Documentation
Interactive Swagger documentation for secretnetwork endpoints is available at: https://rest.lavenderfive.com:443/secretnetwork/swagger/
This documentation provides a comprehensive overview of all available endpoints, their parameters, and response formats. You can test API calls directly from the Swagger interface. It might however not be available for all networks due to how their RPC interface is coded.
#🌐 REST API Examples
#Cosmos SDK < v0.50
# Query Validators
curl -X GET "https://rest.lavenderfive.com:443/secretnetwork/cosmos/staking/v1beta1/validators" \
-H "x-api-key: your-api-key-uuid"
# Query Bank Balance
curl -X GET "https://rest.lavenderfive.com:443/secretnetwork/cosmos/bank/v1beta1/balances/cosmos1..." \
-H "x-api-key: your-api-key-uuid"
#Cosmos SDK >= v0.50
# Query Validators
curl -X GET "https://rest.lavenderfive.com:443/secretnetwork/staking/validators" \
-H "x-api-key: your-api-key-uuid"
# Query Delegations
curl -X GET "https://rest.lavenderfive.com:443/secretnetwork/staking/validators/secretvaloper1.../delegations/secret1..." \
-H "x-api-key: your-api-key-uuid"
#Query Account Balance (JavaScript)
const address = "cosmos1..."; // Your address
const endpoint = "https://rest.lavenderfive.com:443/secretnetwork";
async function getBalance() {
// For SDK >= v0.50
const path = `/bank/balances/${address}`;
// For SDK < v0.50
// const path = `/cosmos/bank/v1beta1/balances/${address}`;
const response = await fetch(
`${endpoint}${path}`,
{
headers: {
'x-api-key': 'your-api-key-uuid'
}
}
);
const data = await response.json();
console.log(data);
}
#Query Validators (Python)
import requests
def get_validators():
headers = {
'x-api-key': 'your-api-key-uuid'
}
# For SDK >= v0.50
endpoint = f"{api}/staking/validators"
# For SDK < v0.50
# endpoint = f"{api}/cosmos/staking/v1beta1/validators"
response = requests.get(endpoint, headers=headers)
return response.json()
#🔄 RPC Examples
#Get Network Status (curl)
curl -X GET "https://rpc.lavenderfive.com:443/secretnetwork/status" \
-H "x-api-key: your-api-key-uuid"
#Get Latest Block (JavaScript)
const endpoint = "https://rpc.lavenderfive.com:443/secretnetwork";
async function getLatestBlock() {
const response = await fetch(
`${endpoint}/block`,
{
headers: {
'x-api-key': 'your-api-key-uuid'
}
}
);
const data = await response.json();
console.log(data.result);
}
#📡 gRPC Examples
#Query Validator Set (grpcurl)
# For SDK >= v0.50
grpcurl -H "x-api-key: your-api-key-uuid" \
secretnetwork.lavenderfive.com:443 \
staking.Query/Validators
# For SDK < v0.50
grpcurl -H "x-api-key: your-api-key-uuid" \
secretnetwork.lavenderfive.com:443 \
cosmos.staking.v1beta1.Query/Validators
#Query Bank Balance (Python with grpcio)
import grpc
# For SDK >= v0.50
from staking import query_pb2, query_pb2_grpc
# For SDK < v0.50
# from cosmos.bank.v1beta1 import query_pb2, query_pb2_grpc
def get_balance(address):
credentials = grpc.metadata_call_credentials(
lambda context, callback: callback([("x-api-key", "your-api-key-uuid")], None)
)
channel = grpc.secure_channel(
"secretnetwork.lavenderfive.com:443",
grpc.composite_channel_credentials(
grpc.ssl_channel_credentials(),
credentials
)
)
stub = query_pb2_grpc.QueryStub(channel)
request = query_pb2.QueryBalanceRequest(address=address)
response = stub.Balance(request)
return response
#🔑 Common Response Codes
Code | Description |
---|---|
200 | Successful request |
400 | Bad request / Invalid parameters |
401 | Unauthorized / Invalid API key |
404 | Resource not found |
429 | Too many requests |
500 | Internal server error |
secret-4
v1.12.1