Python binding to the Solana Rust SDK
Project description
Solders
solders
is a Python binding to the
Solana Rust SDK.
It provides robust, high-performance solutions to core Solana tasks such as transaction signing and serialization, and saves us from reimplementing Solana logic in pure Python.
Installation
pip install solders
Note: Requires Python >= 3.7.
Example Usage
>>> from solders.message import Message
>>> from solders.keypair import Keypair
>>> from solders.instruction import Instruction
>>> from solders.hash import Hash
>>> from solders.transaction import Transaction
>>> from solders.pubkey import Pubkey
>>> program_id = Pubkey.default()
>>> arbitrary_instruction_data = bytes([1])
>>> accounts = []
>>> instruction = Instruction(program_id, arbitrary_instruction_data, accounts)
>>> payer = Keypair()
>>> message = Message([instruction], payer.pubkey())
>>> blockhash = Hash.default() # replace with a real blockhash
>>> tx = Transaction([payer], message, blockhash)
Development
Setup
- Install poetry
- Install dev dependencies:
poetry install
- Activate the poetry shell:
poetry shell
Testing
- Run
maturin develop
to compile the Rust code. - Run
make fmt
,make lint
, andmake test
.
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
solders-0.8.0.tar.gz
(120.3 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.8.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da755dcafee41c998fbc43674fc56e12c9780f1ec398922850714d347043e5cd |
|
MD5 | bcdfec954eaf6fa9338d0023f55d54a3 |
|
BLAKE2b-256 | ee34d3286b7750af4711995da50d7d9a0b9e29bc4dea06dd7ba88e3a82c9208c |
Close
Hashes for solders-0.8.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f81e2633d345358581d21913d24dd9cb9fe9b23e5cdf8f7230557abf9cba0c41 |
|
MD5 | 6365e58484957b5d2e4b4d7f33373dea |
|
BLAKE2b-256 | 8151c3abc49cb048584df5aa017782d692a711ea3351c2a78fde4a5fe2e514b0 |
Close
Hashes for solders-0.8.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 463f291588e59c6a97505d4e444468f0f72c5630984bb22bf6bab6a9d6193d91 |
|
MD5 | 3c2ca12a598c968a564a55210856a5c1 |
|
BLAKE2b-256 | fe1d266e03d2b69b2a24d4021e3f6271e54e285d8a67ed88732292d5d18497f2 |
Close
Hashes for solders-0.8.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96bdc2d1ebc44c5582a6a431477a5816bc03f92b2b22a61ccc5c8643194cae83 |
|
MD5 | 80fdd9d60f48b3d0600af587582e6053 |
|
BLAKE2b-256 | d5e45ce9c8b2d564ad6c7d557eb83d15da3fef6cee32851f8647b689d379fa6e |
Close
Hashes for solders-0.8.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b85a76b4f2bf04588833e541675b2e0b7248f8fa8294158c4df21859d6dcaae |
|
MD5 | 42cd76cdadbbb57802eac3b309a01a51 |
|
BLAKE2b-256 | d1899a5071a6042959fee60d43e81f2c7aa17497a71f1ead717d33bf2a53ca67 |
Close
Hashes for solders-0.8.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1de007c8872e245dce5305cb7db4d316686fc7327c325cf5addb3e1a44dcf65 |
|
MD5 | 124fe6ec319f6cfd64202a67c6824f1b |
|
BLAKE2b-256 | 09adf1fc9af294fbeb101cc9b8a03e47c03e1004b0045675728b7114b5c9d401 |
Close
Hashes for solders-0.8.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1e436c4ab46dc619fdc37afd0b4cf1a3678f7b37f6275effddcf32dae293bb8 |
|
MD5 | 2a1fbb9a70ec6fdfb166c1249ca02087 |
|
BLAKE2b-256 | 6936c864eef773ecda8bf5adb6ecf6cdd25cb9fbd4c20c257a1b91e3677c2174 |
Close
Hashes for solders-0.8.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdf6f82422ecd2b2f5bfc05f5dcb3058551eb5016d68fd8a01968ad7f0cfcaa7 |
|
MD5 | a5de3ef108adf4823d0b92dd232e62fb |
|
BLAKE2b-256 | 6ac628571c4aa075e8f867f49c10c40382dd8297c3ca9f09e3971e483bf34ee5 |
Close
Hashes for solders-0.8.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dba8d28ca99144b9f48e0179d9ee07e4c6b9cd7fd34dc0be241a7f56d9c84e5b |
|
MD5 | acd3fb36daae4322244582445776107e |
|
BLAKE2b-256 | 3b66966cb7d7c2b739cc58eae410317b6f0048acef6e9f78ad5c362013f52a42 |
Close
Hashes for solders-0.8.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d0cff0cd848ad7fadbd014bb266c69618993272366f5b91c9a30a6eb5c4b159 |
|
MD5 | a831ccadbe221193748147a0c178acb4 |
|
BLAKE2b-256 | d9d7e42ac0ae480cdf9a30d7d48f7fab535d9e6ee1fa1a781e789949e99cb848 |