A high-level Python library to effortlessly interact with the Solana blockchain (wip)
Project description
solanace
A high-level Python library to effortlessly interact with the Solana Blockchain (work in progress).
Features
- Simplistic syntax
- Full support for Asyncio & Gevent (but can also run synchronous)
- Fallback clients
- Swapping functionality using Jupiter Aggregator (raydium, orca, etc.)
- High performance (uses solders, written in Rust, under the hood)
- Meaningful error messages
- RPC Performance Testing & Profiling
- Full support for Type Hints
For support, drop me a DM on my X.
Following is the goal, this library is WIP
Get Started
from solanace import Tokens, Metrics
from solanace import Wallet, Client
my_wallet = Wallet.from_private_key("xyzxyzxyz") # base58 encoded private key
my_client = Client("https://sola.na/rpc", "https://mainnet-beta.solana.com/rpc")
# send and recieve solana & spl tokens
my_client.get_balance()
my_client.send_sol(wallet=my_wallet, to="bob.sol", amount=0.1)
my_client.send_token(wallet=my_wallet, token=Tokens.USDC, to="bob.sol", amount=2)
my_wallet_address = my_wallet.address()
# swap 0.1 solana to usdc
my_client.swap(wallet=my_wallet, from_currency=Tokens.Solana, to_currency=Tokens.USDC, amount_from_currency=0.1)
my_client.swap(wallet=my_wallet, from_currency=Tokens.Solana, to_currency=Tokens.USDC, amount_to_currency=5)
# nft utility
my_client.send_nft(wallet=my_wallet, nft_address="xyz", to="abc")
my_client.burn_nft(wallet=my_wallet, nft_address="uvw")
# test rpcs
Metrics.test(urls=["rpc1", "rpc2", "rpc3"], limit=10)
Upcoming Features
- Mint NFTs
- Mint Tokens
- List, Buy & Bid on NFTs
- Whitelist Wallets & Limit amounts sent
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
solanace-0.0.2.tar.gz
(4.6 kB
view details)
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 solanace-0.0.2.tar.gz.
File metadata
- Download URL: solanace-0.0.2.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.11.2 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56d9a79a69bdcbcb879636a6fe969791a1a709adc71d70880ca3cd33b6899d98
|
|
| MD5 |
2516482815b17f7d3a8a8e423f10633b
|
|
| BLAKE2b-256 |
ca1b6da229a6d1b3df0f45d1f23d6f5ddfc35898b0fb8c1884e7c4e6ddff281d
|
File details
Details for the file solanace-0.0.2-py3-none-any.whl.
File metadata
- Download URL: solanace-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.4.0 CPython/3.11.2 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4c48a94f3314df93dc6c74e74d63db00846a927c3eefa8a17407a51e9574181
|
|
| MD5 |
8785899afffc4b6a077183441e807bf3
|
|
| BLAKE2b-256 |
bf453e7a95bdc4a65de4d938434480aedd56b51d6a9de6a1ffa6d239887383f7
|