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.10.0.tar.gz
(124.9 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.10.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a56905e96dded9605d48ad1a04874fcb5c48862ade20303ef1b380ef02bda7dd |
|
MD5 | fa11f65c8a9de0add36f527614f4e122 |
|
BLAKE2b-256 | 70365d0a0c8e9dbcf9071f8b91f356ce5422caf920b7fc7073879ed14d994f3c |
Close
Hashes for solders-0.10.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a135df7e151c7fa36b717030444b83cc5e6bf8e6d376a53a8161d84e2444e133 |
|
MD5 | 926da164ce846d96a0fbc4a90078fa37 |
|
BLAKE2b-256 | b6f88e55cc6c1d27968b586bbf2cb85c5b1694db40e5bfbd4e25d54af00e57bf |
Close
Hashes for solders-0.10.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d1f2713a3688fe96eaaf35f95ce2dde75cfc89795d39a6ee74d76e29ca7ed43 |
|
MD5 | 93bc805cf8c7609d09ae96114763a8da |
|
BLAKE2b-256 | 41da36295f0161028d473112ed5b2e18e7649b89203490c24a9f48616c3070df |
Close
Hashes for solders-0.10.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7b0ef566186e7c9b852c1fd50c8ca9ea6a88eededf039da4c20181a93b03afa |
|
MD5 | 4f19e83126a2349eecd6bcdd85b9f2fa |
|
BLAKE2b-256 | 2177236c653b4abf9c7785c828717eb5bb808080488e83716ffb552ffda040fe |
Close
Hashes for solders-0.10.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 804f092bb86127168db1f660f10848d585812e667d67dd8e013c929f57479e94 |
|
MD5 | a93a082508b966bf045734f7d7ab4c39 |
|
BLAKE2b-256 | 68e6200e7e0547b0da39e0ee47eff57087a81e592e0f7dc2205e8de06f1ca123 |
Close
Hashes for solders-0.10.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d73896d10bfe7dec2856ca847297ff12eb027c327af9d6cf506da6f883ccb54 |
|
MD5 | 63efb916c757daca892a9dba5245f3cf |
|
BLAKE2b-256 | 74f41985e2392b9442e22381ddf87f72253312031369859e9977088ece3a9e49 |
Close
Hashes for solders-0.10.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb838808e29a15365e200a75b4268b2ad134416a23522e04663f6690891427e9 |
|
MD5 | da40b7eda792a97801a1e09e9876e041 |
|
BLAKE2b-256 | 983064f0ce206a681f1b9af17e1afda8f119e2de47db3b463eda818765d67413 |
Close
Hashes for solders-0.10.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b6f93e3d6d8a6e2771fb7368d5d0547cbfb5ff69258950f561e21bedb22fe29 |
|
MD5 | ecd0bef6026fdd5be83ecbef8ed2e2b5 |
|
BLAKE2b-256 | 07fb9de71b39bc678f3bc494d5d7ec0bac875c3c9c2fc6028a9f83630e43cae9 |
Close
Hashes for solders-0.10.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a062e436be397ac3daddb7acecb8eac95abee558f2a847484df445e028b0e907 |
|
MD5 | f7d7fc1e7d49d530d219d7dbef657aff |
|
BLAKE2b-256 | 2502f609f9418cbb5a6f0209c22040ef2394026dfc1403e0914f577a09906bfd |
Close
Hashes for solders-0.10.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0a15c016d1ef7cb6d25c3945596ff815ef72bb0fe15249d6b49eb0c46b3535e |
|
MD5 | 9849343a9449aed5106b5b43cc98501d |
|
BLAKE2b-256 | 6c04b52cbe04df1cf06d21afd3e5dc032e6667dabd72aa79489bae2ac716bb28 |