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.5.2.tar.gz
(110.2 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.5.2-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75dabf6f489d493860b88b7f5efdbdf417f6c4c05f0f9a6f4be51c447eff6ac2 |
|
MD5 | c03bf1c5152e94a7bcf50393edc7b9c0 |
|
BLAKE2b-256 | a948be6712ee703f388ee9fbef3d67d3d3d30caed6d9ca666fc6f608bc30c68d |
Close
Hashes for solders-0.5.2-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e617560bd88d53f393e1a78d6a6b20c2000d7c6b60d1fc8cf890b06253296ab |
|
MD5 | 01ea7d221f9371bc1e44c6223a63840f |
|
BLAKE2b-256 | 1b654b5349a177dd711c827343f318e261b617186d317c7d48573ffd93d62c52 |
Close
Hashes for solders-0.5.2-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d7e490c39218c650ee67be3e8674d7cd246695354ab91deb53bd991210c6db5 |
|
MD5 | 34e28d48d81bc83fa196c235c1ff72e0 |
|
BLAKE2b-256 | b49aad3eed80ab1aa22a315f6f0927497196861753722c0a7a0fde6c4f965df1 |
Close
Hashes for solders-0.5.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad0ef5d51ddbf2545d16b981dd78bba03b9cfe178cd27cebd88c287e909df194 |
|
MD5 | 27fca902db1c460c822040d7797e637b |
|
BLAKE2b-256 | 18098b8fdad5d663ac3c2e9fa34585a6e76f9d13416924ccbd2ef33edac3d532 |
Close
Hashes for solders-0.5.2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9e37af09a8eec4ad6e8a49128b099d9de57571e57e98f90feb3bbb84f29327a |
|
MD5 | 22a545d2ce24f779c7a52af03dfb72d0 |
|
BLAKE2b-256 | b3d1e6c00436aca437460c631ec4021b59b7b288c3026fb5e242421fe19b7cb6 |
Close
Hashes for solders-0.5.2-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d76dfa993399b419abfbf86369b26e2f587f57c11400d9f563f71a7abdee21b |
|
MD5 | 83b95f08f31650f8a1cbbdeeaffc6f5f |
|
BLAKE2b-256 | c1992bd9cbf369c57adcbc03f3d725f50001d10790b3a19b86fb304b4322a7bc |
Close
Hashes for solders-0.5.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c4b88660837725d11f1189a79825c4acbf33fe614ba0375f4c8ebf203085041 |
|
MD5 | 3054698ffbd0e4257dd60857e412a73e |
|
BLAKE2b-256 | 028f2205a898cefe2c78bc7292cc5524bc415436739967b20e2adcf0582e458c |
Close
Hashes for solders-0.5.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c34eb59f1a1a75180712e7dc94ed7f71c8077b57309e2049f995e114a9315ad9 |
|
MD5 | 5c07e3ae076017ae45c9ab0a63bc1b2d |
|
BLAKE2b-256 | 9a3f389d7aebd46851f4cde3fff514f7d536671648ac1918e403cd1d6ded39a4 |
Close
Hashes for solders-0.5.2-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f908b6a8a8410d1a40acfaea319b31b9301ebf9d177c6f5161aab897259df9c |
|
MD5 | dbe1faf03c1f0fbe6983014f004ea8b5 |
|
BLAKE2b-256 | 1569252f5f83ac0d6ea9cebc581fe86fd88f5e6e958511affa2a18c413d81087 |
Close
Hashes for solders-0.5.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0a133f0c7e18ed94fc635f88481fe119a1e3b2544ea8ef65ba5f0676b55f537 |
|
MD5 | f14c336d2138f6f860887a705fce2548 |
|
BLAKE2b-256 | 2b80127000e765d9857d43ac28b7b96d83fadaba7c24d3af18f442dba73afa65 |