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
Built Distributions
File details
Details for the file solders-0.10.0.tar.gz
.
File metadata
- Download URL: solders-0.10.0.tar.gz
- Upload date:
- Size: 124.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd5409c4441b88c07f277fc4b2b5ed935e439c570375f681f672d24e5c8a438c |
|
MD5 | 2ec5e1c8b7d8bc8a9f96c463f328b94f |
|
BLAKE2b-256 | 6e85409a547457f6ba13cc6f27ebe2b053d49a6107ad534ab9f087012f81b697 |
File details
Details for the file solders-0.10.0-cp37-abi3-win_amd64.whl
.
File metadata
- Download URL: solders-0.10.0-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a56905e96dded9605d48ad1a04874fcb5c48862ade20303ef1b380ef02bda7dd |
|
MD5 | fa11f65c8a9de0add36f527614f4e122 |
|
BLAKE2b-256 | 70365d0a0c8e9dbcf9071f8b91f356ce5422caf920b7fc7073879ed14d994f3c |
File details
Details for the file solders-0.10.0-cp37-abi3-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: solders-0.10.0-cp37-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 6.5 MB
- Tags: CPython 3.7+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a135df7e151c7fa36b717030444b83cc5e6bf8e6d376a53a8161d84e2444e133 |
|
MD5 | 926da164ce846d96a0fbc4a90078fa37 |
|
BLAKE2b-256 | b6f88e55cc6c1d27968b586bbf2cb85c5b1694db40e5bfbd4e25d54af00e57bf |
File details
Details for the file solders-0.10.0-cp37-abi3-musllinux_1_2_i686.whl
.
File metadata
- Download URL: solders-0.10.0-cp37-abi3-musllinux_1_2_i686.whl
- Upload date:
- Size: 6.6 MB
- Tags: CPython 3.7+, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d1f2713a3688fe96eaaf35f95ce2dde75cfc89795d39a6ee74d76e29ca7ed43 |
|
MD5 | 93bc805cf8c7609d09ae96114763a8da |
|
BLAKE2b-256 | 41da36295f0161028d473112ed5b2e18e7649b89203490c24a9f48616c3070df |
File details
Details for the file solders-0.10.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: solders-0.10.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 6.4 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7b0ef566186e7c9b852c1fd50c8ca9ea6a88eededf039da4c20181a93b03afa |
|
MD5 | 4f19e83126a2349eecd6bcdd85b9f2fa |
|
BLAKE2b-256 | 2177236c653b4abf9c7785c828717eb5bb808080488e83716ffb552ffda040fe |
File details
Details for the file solders-0.10.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
.
File metadata
- Download URL: solders-0.10.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
- Upload date:
- Size: 7.6 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 804f092bb86127168db1f660f10848d585812e667d67dd8e013c929f57479e94 |
|
MD5 | a93a082508b966bf045734f7d7ab4c39 |
|
BLAKE2b-256 | 68e6200e7e0547b0da39e0ee47eff57087a81e592e0f7dc2205e8de06f1ca123 |
File details
Details for the file solders-0.10.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
.
File metadata
- Download URL: solders-0.10.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
- Upload date:
- Size: 8.2 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ppc64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d73896d10bfe7dec2856ca847297ff12eb027c327af9d6cf506da6f883ccb54 |
|
MD5 | 63efb916c757daca892a9dba5245f3cf |
|
BLAKE2b-256 | 74f41985e2392b9442e22381ddf87f72253312031369859e9977088ece3a9e49 |
File details
Details for the file solders-0.10.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: solders-0.10.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb838808e29a15365e200a75b4268b2ad134416a23522e04663f6690891427e9 |
|
MD5 | da40b7eda792a97801a1e09e9876e041 |
|
BLAKE2b-256 | 983064f0ce206a681f1b9af17e1afda8f119e2de47db3b463eda818765d67413 |
File details
Details for the file solders-0.10.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: solders-0.10.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b6f93e3d6d8a6e2771fb7368d5d0547cbfb5ff69258950f561e21bedb22fe29 |
|
MD5 | ecd0bef6026fdd5be83ecbef8ed2e2b5 |
|
BLAKE2b-256 | 07fb9de71b39bc678f3bc494d5d7ec0bac875c3c9c2fc6028a9f83630e43cae9 |
File details
Details for the file solders-0.10.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
.
File metadata
- Download URL: solders-0.10.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
- Upload date:
- Size: 6.6 MB
- Tags: CPython 3.7+, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a062e436be397ac3daddb7acecb8eac95abee558f2a847484df445e028b0e907 |
|
MD5 | f7d7fc1e7d49d530d219d7dbef657aff |
|
BLAKE2b-256 | 2502f609f9418cbb5a6f0209c22040ef2394026dfc1403e0914f577a09906bfd |
File details
Details for the file solders-0.10.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: solders-0.10.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 9.4 MB
- Tags: CPython 3.7+, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0a15c016d1ef7cb6d25c3945596ff815ef72bb0fe15249d6b49eb0c46b3535e |
|
MD5 | 9849343a9449aed5106b5b43cc98501d |
|
BLAKE2b-256 | 6c04b52cbe04df1cf06d21afd3e5dc032e6667dabd72aa79489bae2ac716bb28 |