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.11.0.tar.gz
(125.8 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.11.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b82fc7a97f27d2875795cd038c0571e8f55477b3e0eebd5193d3044ee8826a6 |
|
MD5 | bc47058b30dd6aad5b9e0b37a4d60133 |
|
BLAKE2b-256 | 54d59e7879aab8146b131e2784532e1f492e0b9b25ce043e596864c69ba1217e |
Close
Hashes for solders-0.11.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2797c0729a7ec31651a7b48a2dfb0b1fd96138daec193ac44acb93536e8a3be |
|
MD5 | 574bf227f7acf1dcded0c856690e05d3 |
|
BLAKE2b-256 | 8bd94a69cb0b3e3777e5d0620eda01c757517926fba4a82e1b5b6d29b95a1519 |
Close
Hashes for solders-0.11.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | da9430c8c5075e0a63ec6f69e6996e612784f9745e545fcaa785af3c0af7d759 |
|
MD5 | 24e41f83528b76b943f1287d29cc70c0 |
|
BLAKE2b-256 | abb28121d68adb62b75a256dfd0ebb9c49c9572f7cc673dfb943e3d06338b965 |
Close
Hashes for solders-0.11.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dad85d67e38979757e331ebb3497031952a1c2326c2566f9c3ad6daa8a14d8a2 |
|
MD5 | 567386af2b5446a20a89cc9929ce62cf |
|
BLAKE2b-256 | 48dea202429f9840bb0cb2c98f4cd9b428726c859200dc21dccee8634885d975 |
Close
Hashes for solders-0.11.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c9a129bfc325d3357214a446f2c6d019398b5ffc634f93707fb559d9f5cd3ed |
|
MD5 | a24735be4115facf2541653addf2aab6 |
|
BLAKE2b-256 | 0a794f83b67cd1feedee699d86ad01dcd144b936eda9b87987ce61e081954d3a |
Close
Hashes for solders-0.11.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55b7b6c37ea9d59a04b3f72256115d1558dd842a66466542556080fac989d5e3 |
|
MD5 | 41b31de52ad4ba456a62f564d4a57f7d |
|
BLAKE2b-256 | 95c02ceeca5396632aadb6ab36a2dce8dfc6941e971934e3b522687cd2a2c623 |
Close
Hashes for solders-0.11.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db2fce349a4a6c3b71b8e02b278866d3779c44d6ff5ca7dcda38cf077d207736 |
|
MD5 | b29dbc05c3922707db9517cce6631bd7 |
|
BLAKE2b-256 | 54ba55e50c45c974e8fd01a34c69239a0b6caeef1f48aff0c5e8dee208348839 |
Close
Hashes for solders-0.11.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 949ae711bc027614629587565da8a80f2bb595d84ee2ae340b8f0460a9144d8f |
|
MD5 | e86ffd5b7111af9f2526bc56d003f014 |
|
BLAKE2b-256 | e44dd7fc3017259d53acae9080b75f81483caab937e6aef42cf45e338cd23e5e |
Close
Hashes for solders-0.11.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12a62b6c57ebbceb9df8f6e74748ed7edc787c77aa4698862b6d6cfb2d435b56 |
|
MD5 | 5c87d5fd67d1f9ac30cd41f458de08c3 |
|
BLAKE2b-256 | 3643a4d5288aa8a80043543f71916897c33c7fbcb5ac3dee56ba67b519e5584c |
Close
Hashes for solders-0.11.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa74ba12a7c8a10993003428b767b3965d35c940f4ec52273238125c132e0ac4 |
|
MD5 | d9189c487e983d4e1b578a6b1f8aeac6 |
|
BLAKE2b-256 | d753aff97c37b4f4047a1bc791c2f5a5af8a3b571462ff0aefd3457d040d3fb6 |