A high-performance, easy-to-use, and feature-rich Solana SDK for Python.
Project description
Solathon
Solathon is a high performance, easy to use and feature-rich Solana SDK for Python. Easy for beginners, powerful for real world applications. Fully compatible with Solana Agave v2.0.
✨ Getting started
Installation
pip install solathon
Client example
from solathon import Client
# Works with any RPC endpoint — devnet, mainnet, or custom (Helius, QuickNode, etc.)
client = Client("https://api.devnet.solana.com")
Basic usage example
from solathon import Client, PublicKey
client = Client("https://api.devnet.solana.com")
public_key = PublicKey("B3BhJ1nvPvEhx3hq3nfK8hx4WYcKZdbhavSobZEA44ai")
balance = client.get_balance(public_key)
print(balance)
📋 Supported RPC Methods
All methods are available on both Client (sync) and AsyncClient (async).
Account
| Method | Description |
|---|---|
get_account_info |
Returns all account info for a public key |
get_balance |
Returns lamport balance |
get_multiple_accounts |
Returns account info for multiple keys |
get_program_accounts |
Returns all accounts owned by a program |
get_largest_accounts |
Returns 20 largest accounts by balance |
get_minimum_balance_for_rent_exemption |
Min balance for rent exemption |
Block
| Method | Description |
|---|---|
get_block |
Returns block info for a slot |
get_block_height |
Current block height |
get_block_production |
Block production info |
get_block_commitment |
Commitment for a block |
get_blocks |
List of confirmed blocks in range |
get_blocks_with_limit |
Confirmed blocks from start slot |
get_block_time |
Estimated production time of a block |
get_latest_blockhash |
Latest blockhash |
is_blockhash_valid |
Check if blockhash is still valid |
Cluster & Node
| Method | Description |
|---|---|
get_cluster_nodes |
All nodes in the cluster |
get_epoch_info |
Current epoch info |
get_epoch_schedule |
Epoch schedule |
get_first_available_block |
Lowest confirmed block |
get_genesis_hash |
Genesis hash |
get_health |
Node health status |
get_identity |
Node identity pubkey |
get_version |
Node software version |
get_highest_snapshot_slot |
Highest snapshot slot |
get_leader_schedule |
Leader schedule for epoch |
get_max_retransmit_slot |
Max retransmit slot |
get_max_shred_insert_slot |
Max shred insert slot |
get_slot |
Current slot |
get_slot_leader |
Current slot leader |
get_slot_leaders |
Slot leaders for range |
minimum_ledger_slot |
Min slot in ledger |
get_vote_accounts |
Vote account info |
get_recent_performance_samples |
Recent performance samples |
Transaction
| Method | Description |
|---|---|
get_transaction |
Transaction details by signature |
get_transaction_count |
Total transaction count |
get_signatures_for_address |
Transaction signatures for an address |
get_signature_statuses |
Statuses for transaction signatures |
send_transaction |
Sign and send a transaction |
simulate_transaction |
Simulate without broadcasting |
request_airdrop |
Request SOL airdrop (devnet/testnet) |
Token (SPL)
| Method | Description |
|---|---|
get_token_accounts_by_owner |
SPL token accounts by owner |
get_token_accounts_by_delegate |
SPL token accounts by delegate |
get_token_account_balance |
Token balance of an account |
get_token_supply |
Total supply of an SPL token |
get_token_largest_accounts |
Top 20 holders of an SPL token |
Fees & Staking
| Method | Description |
|---|---|
get_fee_for_message |
Fee for a message |
get_recent_prioritization_fees |
Recent priority fee data |
get_stake_minimum_delegation |
Minimum stake delegation |
Inflation & Supply
| Method | Description |
|---|---|
get_inflation_governor |
Inflation governor |
get_inflation_rate |
Current inflation rate |
get_inflation_reward |
Staking rewards for addresses |
get_supply |
SOL supply info |
🔑 Keypair & Transaction
from solathon import Keypair, Transaction, PublicKey
from solathon.core.instructions import transfer
# Generate new keypair
sender = Keypair()
print(f"Public key: {sender.public_key}")
# Or load from private key
sender = Keypair.from_private_key("your_base58_private_key")
# Or from Solana CLI JSON file
sender = Keypair.from_file("~/.config/solana/id.json")
# Build and send a transfer
receiver = PublicKey("ReceiverPublicKeyHere")
instruction = transfer(sender.public_key, receiver, lamports=1000000)
transaction = Transaction(instructions=[instruction], signers=[sender])
client.send_transaction(transaction)
⚡ Async Client
import asyncio
from solathon import AsyncClient
async def main():
client = AsyncClient("https://api.devnet.solana.com")
balance = await client.get_balance("B3BhJ1nvPvEhx3hq3nfK8hx4WYcKZdbhavSobZEA44ai")
print(balance)
asyncio.run(main())
💸 Solana Pay
from solathon.solana_pay import encode_url
url = encode_url(recipient="ReceiverPubkey", amount=1.5, label="My Store")
🗃️ Contribution
Drop a pull request for anything which seems wrong or can be improved, could be a small typo or an entirely new feature! Checkout CONTRIBUTING.md for guidelines on how to proceed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file solathon-1.1.0.tar.gz.
File metadata
- Download URL: solathon-1.1.0.tar.gz
- Upload date:
- Size: 32.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.9.6 Darwin/25.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cca27ed5d3f19e6544dc04b94132d260e060aa16882e41928c35db0b47b25907
|
|
| MD5 |
bed70beed77c5222d94467a24b7c0ba6
|
|
| BLAKE2b-256 |
3fa79ceae65b775f1f2db6b27dd9a7dd7312c5465ca61bb84923ab8a5c203b9d
|
File details
Details for the file solathon-1.1.0-py3-none-any.whl.
File metadata
- Download URL: solathon-1.1.0-py3-none-any.whl
- Upload date:
- Size: 40.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.9.6 Darwin/25.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4537b48476cbc02551cddb881ffc962af00ea2a99040454823d5168379e15b2a
|
|
| MD5 |
58e326b3bcc58044ff9744a1f1d87e83
|
|
| BLAKE2b-256 |
b8def4b646b21c8e07612c2df4e0e7069ed3ba2ccd0e721ea6d816bdc1d4dbd4
|