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.6.0.tar.gz
(110.8 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.6.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c45193509d4c95d171a30cf9b742a00e69b5056196b1b90f59d3c43c8e31640 |
|
MD5 | 579d92c775e063a9c61ab24d44e7603c |
|
BLAKE2b-256 | 76b5d1d6c5b8b39cf3abf6b2c1c3d1d1fcf3ab817447be0dbc6889e9079874fa |
Close
Hashes for solders-0.6.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dd9ea5f166d938846fd43b906f0ebf313238271bd07462e9a8999799dfe32c7 |
|
MD5 | 33c1e80138fe673dbe4a388453d6d6e1 |
|
BLAKE2b-256 | 9ee60c5f237be14e2680a69014dbde2e1e086c2626ddc82f52a541486b506d7b |
Close
Hashes for solders-0.6.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5f0120986f830bbb1d83250130064c9f5e1c4c578b85919391c2df890235663 |
|
MD5 | 501da9f173d7eb6db156690651e2b7ce |
|
BLAKE2b-256 | 2e38da477dfc1ca02276044b550447355fec094565d41a89a5e8a88916ae5b88 |
Close
Hashes for solders-0.6.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f076225ef57fc228de23ad135d4395db7b1e2ec90f7cc0be9eee5b455d00ed8 |
|
MD5 | 3c6caf3510c1fd44d32c445e36c2b476 |
|
BLAKE2b-256 | 205824cffe2bbb5d1a4165e02760ebd2965daa2e9c64f6510d947afbb72de403 |
Close
Hashes for solders-0.6.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09179a5754467c70a04da91ceeeabea893da915eca3dd7669d6ab141f177fb7b |
|
MD5 | c70390d7304dc64217caf6234aa065b2 |
|
BLAKE2b-256 | eb70efa56b0ad18d3eac92a75e1c8c273bb1731abd179f019da61974c2cbbf9e |
Close
Hashes for solders-0.6.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0430f71fcc17319aa13297f6aedd185a6cfd7f23ccb0c98b8447ff91fc96ab2a |
|
MD5 | 9d90aaf500fe0d655453bf7440f12911 |
|
BLAKE2b-256 | 1ff457258419cbc5367fb7236b45cbb08b3d097e02ea1b8e8648e67d609da52e |
Close
Hashes for solders-0.6.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4764e241bcb765e933a1df327a342dae6c687d4e80d29fd3390f78ec1913ded |
|
MD5 | 0e717f73c4da3ecca04f7105136d0919 |
|
BLAKE2b-256 | cf15efb3ae296675cbe22bce8bf6eb421e8b662432e236f2d165f445de36fde4 |
Close
Hashes for solders-0.6.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2376ab342f88e929f8e9e3b5dccf09c209771f282889e60bac204d19c936847 |
|
MD5 | c80ac22a7e832bfc024ac59b120f05ee |
|
BLAKE2b-256 | 3be87083a81509b1ae670f23ccc92bb4a1a0a1410f38423c378f8acb00e4c93b |
Close
Hashes for solders-0.6.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9720aedff3455d7539c577f0cae7064aa575e8b8ac9167aa6e6cfbd3319a701a |
|
MD5 | 9d312a78d2dfb4d3763650ae041006ba |
|
BLAKE2b-256 | 83777788f29d5ef54474b0b11a9e197d5c4a721e6a6447fd1df785d51475d1bc |
Close
Hashes for solders-0.6.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b949838fa9295c8ca0e5c93b35620f06ea4e38aae4a51d76d86b39907a7894ac |
|
MD5 | 75e4d0e8cd4929a7a9c09527e32db312 |
|
BLAKE2b-256 | c8471248f1db2c2f7d1af6149d2b74e80ce941401477c9b873011000f664d047 |