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.1.tar.gz
(120.5 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.8.1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49f336c2e1e7e07b0e52887fa8c256c4f526ea71ea6db2ac4667f06512f58e3c |
|
MD5 | ab2d1de4f34b7046b878f273efcded56 |
|
BLAKE2b-256 | 976bd1689fc4bbef07073b6cba22464c835263a98434951dea895f6bef4d27cb |
Close
Hashes for solders-0.8.1-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ad0da0e8be401eb5ae7c1e0748c584aff9091107b13424b1bb8b6516b95f825 |
|
MD5 | c2b44101888a973a72973ec8a10f4606 |
|
BLAKE2b-256 | 4d29a19823c059cffe096351c350bb95992a93cb4f2ef1c3f4ca40f191baebb0 |
Close
Hashes for solders-0.8.1-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b67923baca68d5c0ab0674d0121270e3e0368ae5155ece2b32472ea0a2214526 |
|
MD5 | b0be27a835848cc15b8e67eefa5c8af8 |
|
BLAKE2b-256 | a06b82cdc51116e72514f9b58f1a882f464ceabe3f1dc5fefceabc4f83aace1c |
Close
Hashes for solders-0.8.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20e9b2231766021d41986c35f078a683efe4ef0f72fadca3a55ca3f916fcfc77 |
|
MD5 | 5d821febe00bc854234daaad744742b3 |
|
BLAKE2b-256 | c2ed1e21472247578600e306e7d77b772b1fff1da4d91a2afc6037bd2c510799 |
Close
Hashes for solders-0.8.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbd0a2a0cf5dfec2d361643c5d6703badbb7924dc5ae976176102a9d3ca1b64a |
|
MD5 | e30e7b39fc1c126f0bedcc177d6d8bab |
|
BLAKE2b-256 | c415d1e0557bca4197037053adacec1eac8575e8222f4f090afe8239730ea277 |
Close
Hashes for solders-0.8.1-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d9d847d32c49ef9a0d6d8a00869a372ad7c1d61a53ea265bacc2c3185643967 |
|
MD5 | b1407d927a529d1810b49a465138bffc |
|
BLAKE2b-256 | ffaa39a83a8940da43d2c2a9cbabd973549883ebf61eee97da00ea3a84dbe3a4 |
Close
Hashes for solders-0.8.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb828e184b0427374acfa03b7335f8b8a6203d2e8b2e8635541e9265934c1274 |
|
MD5 | c8bf6dd00c2b232328687c14ded9b1af |
|
BLAKE2b-256 | 50d2680b78c28e107d4fe5b4da1c9251d9b7260d2741a2f67ca7c45f64fbb89a |
Close
Hashes for solders-0.8.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95b7526d026d7fa4cfc383283a8d866a6303360ac1df7b8fd9d3ab4d49293d37 |
|
MD5 | d1f64676d2def361e34e772d256a7786 |
|
BLAKE2b-256 | edd144dd25e24c56bf8690b300bf06f597ad361787853fc4685b871c58a8c694 |
Close
Hashes for solders-0.8.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d693a54dd8495f972f0868395c5949d7a1befe1879b231fe88b9bd255a2c7bb5 |
|
MD5 | 81938dfaeb824b244bfb0dbeba060887 |
|
BLAKE2b-256 | 2f841a2e6e448a34f6791f5f8a2948aa161c2e48361d9b8677567e0f4ad7d3f7 |
Close
Hashes for solders-0.8.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3232e294445c821e65a9cda0f6fb789d7d6a687e8cbc31c345f1129defe1f86 |
|
MD5 | cff929ff6b00ec0ce8c5fb88c5634c3a |
|
BLAKE2b-256 | 0ea0ea285e330e6567443415fe4711f94487f7af5955171bf42c3047ebdd6d1f |