No project description provided
Project description
solanace
A high-level Python library to interact with the Solana Blockchain.
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
Following is the goal, this library is WIP
Get Started
from soltastic 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
Sponsors
This project was made possible thanks to Eternity.
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.1.tar.gz
(4.4 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.1.tar.gz.
File metadata
- Download URL: solanace-0.0.1.tar.gz
- Upload date:
- Size: 4.4 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 |
5f7b6b24421ba443783a1abcdb7ef5e23ecf3db64b43e7feeef014bd7ad4ac7f
|
|
| MD5 |
594817e14cfac06ae3e1b7910570ddea
|
|
| BLAKE2b-256 |
3208415a793d50cb749de8b010617cf8411ba7d9bbc9a0f99fd16498a091711e
|
File details
Details for the file solanace-0.0.1-py3-none-any.whl.
File metadata
- Download URL: solanace-0.0.1-py3-none-any.whl
- Upload date:
- Size: 6.1 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 |
8266ac068ef8c591488b64519b11404e291835308be126910cbcde3f94046677
|
|
| MD5 |
68aaf89c8f84fbeb599f79a53bfdb307
|
|
| BLAKE2b-256 |
993064db25f0acf7601318aecef9c1be4f6b90c8d6027be94b29723677eb2ba5
|