A lightweight Rust-based HTTP server built with Poem to interact with the Solana blockchain.
Currently supports:
- ✅ Get wallet balance
- 🚰 Request SOL airdrop (devnet)
🔗 Live API: https://sol-rust.onrender.com
- Built in Rust using the
Poemweb framework - Connects with the Solana Devnet using
solana-client - JSON API with clear input/output
- Deployed and ready for testing
Returns the balance (in SOL) of a given wallet address.
Request
{
"wallet": "YourWalletPublicKey"
}Example cURL
curl -X GET 'https://sol-rust.onrender.com/get_balance' \
-H 'Content-Type: application/json' \
-d '{ "wallet": "YourWalletPublicKey" }'Requests SOL airdrop (devnet only) for the given wallet.
Request
{
"wallet": "WalletPublicKey",
"sol": 1
}Example cURL
curl -X GET 'https://sol-rust.onrender.com/get_airdrop' \
-H 'Content-Type: application/json' \
-d '{ "wallet": "CqjcHGE7g9ngSUvTupqdXoWnfo8jcAgZPqjNr6qZREEU", "sol": 1 }'- Rust
- Solana CLI (for local development)
git clone https://github.com/prince981620/sol-rust
cd sol-rust
cargo runThe server will start on 127.0.0.1:3000 by default.
You can also import the endpoints into Postman using raw JSON or cURL.
Try it live:
https://sol-rust.onrender.com
- Quick Solana devnet balance checks
- Easy SOL airdrop for development/testing
- Lightweight backend for Solana apps
Feel free to open issues or PRs to add more endpoints (e.g., transaction status, token balances, etc.).
MIT © Prince Yadav
Thanks to:
- @SuperteamIN
- @100xDevs
- @solanaturbine
for the motivation and support.