RPC Access
AllenHark provides standard Solana RPC endpoints optimized for high performance.
Documentation
For full API documentation, please refer to the standard Solana JSON RPC documentation.
Connection
You connect to our RPC endpoints utilizing IP Whitelisting instead of API keys. Once your server IP is whitelisted, you can access the endpoint directly.
Endpoints
http://[IP_ADDRESS]:[PORT]
ws://[IP_ADDRESS]:[PORT]
Usage Example
Node.js (@solana/web3.js)
1import { Connection } from '@solana/web3.js';
2
3const connection = new Connection(
4 'http://[IP_ADDRESS]:[PORT]',
5 'confirmed'
6);
7
8const version = await connection.getVersion();
9console.log('Connection established:', version);Rust (solana-client)
1use solana_client::rpc_client::RpcClient;
2
3let rpc_url = "http://[IP_ADDRESS]:[PORT]";
4let client = RpcClient::new(rpc_url.to_string());
5
6let version = client.get_version().unwrap();
7println!("Connection established: {:?}", version);cURL
1curl http://[IP_ADDRESS]:[PORT] \
2 -X POST \
3 -H "Content-Type: application/json" \
4 -d '{
5 "jsonrpc": "2.0",
6 "id": 1,
7 "method": "getHealth"
8 }'