A Rust-based HTTP server providing Solana-related endpoints for keypair generation, SPL token operations, message signing/verification, and transaction instruction creation.
- POST /keypair - Generate new Solana keypairs
- POST /token/create - Create SPL token mint instructions
- POST /token/mint - Create mint-to instructions
- POST /message/sign - Sign messages with Ed25519
- POST /message/verify - Verify signed messages
- POST /send/sol - Create SOL transfer instructions
- POST /send/token - Create SPL token transfer instructions
- Rust 1.70+ installed
- Cargo
# Build and run
cargo run
# The server will start on http://localhost:3000# Generate a keypair
curl -X POST http://localhost:3000/keypair
# Sign a message (use the secret from keypair generation)
curl -X POST http://localhost:3000/message/sign \
-H "Content-Type: application/json" \
-d '{"message": "Hello, Solana!", "secret": "YOUR_SECRET_KEY"}'Download and install from https://devcenter.heroku.com/articles/heroku-cli
heroku create your-app-nameheroku buildpacks:set emk/rustgit add .
git commit -m "Initial commit"
git push heroku mainheroku ps:scale web=1Your API will be available at https://your-app-name.herokuapp.com
{
"success": true,
"data": {
/* endpoint-specific data */
}
}{
"success": false,
"error": "Error description"
}PORT- Server port (defaults to 3000, automatically set by Heroku)
- axum - Modern async web framework
- solana-sdk - Official Solana SDK
- spl-token - SPL Token program utilities
- ed25519-dalek - Ed25519 cryptographic operations
- serde - JSON serialization/deserialization