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.7.0.tar.gz
(120.2 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.7.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 944a9b59110fcb8177b20b51760d8f2ae69667ae788a1e5507402727275416f7 |
|
MD5 | 59bacf73e361ae6be06893d1257cad30 |
|
BLAKE2b-256 | 1c5798617ff4cca28906e70d5c68c1ad39a31ee04fd63f1134b8af4526ac6ba3 |
Close
Hashes for solders-0.7.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76fbb4d939ac7b0368c7f082b360add70b672581b9b8a0ad627003c9b866cbc5 |
|
MD5 | 8421667741ff8a135727b6c254e5dba6 |
|
BLAKE2b-256 | 04ecd832567dbab5803a078a4b360249fbf21b212138723d50af456bd7c6eeb5 |
Close
Hashes for solders-0.7.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 595bceba2b030c2a811c8d000dd4b27f15154b754522fd73635c85ce5d7f794a |
|
MD5 | b383f7177bf93565f08b4d4b81429c5b |
|
BLAKE2b-256 | 3c99782dd152c0a65b9b50a1632e283b8c80690a5aaaafaefb57472b5bdeca80 |
Close
Hashes for solders-0.7.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 973188465c2851b845b3c7911f724a3882db9d37057f664f6d01a73cdca3ecfb |
|
MD5 | 2bf76ad5a45a71a5fbd94057653b71a3 |
|
BLAKE2b-256 | fa0e0932fed023001b04430a5e1eabde03c2e57517e0a6951b23e6162d038120 |
Close
Hashes for solders-0.7.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5edc208fb0212e97343b5ed299a559d4cb2d06f2234046f3345eccf5a8315ce3 |
|
MD5 | e1b7812c06d36f001d642edd1d428335 |
|
BLAKE2b-256 | 97eea65bc37bbe42ef3b7f89845830ace2ff2a1ffb6b3fe0e54e0a377e52089a |
Close
Hashes for solders-0.7.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 572ad2f1ce36c0fa21cb06fc0d43a7725e2ad4a0b58a2377a797c5b03f21db57 |
|
MD5 | 4badbd086287df2721a85a84f09b1f7f |
|
BLAKE2b-256 | 9083a8407ddd4204542883e1b3410dae1aa7d339728d3bc48ba8713272cd28b9 |
Close
Hashes for solders-0.7.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8ed979b6822c6b3c514f09435e0756644628b75ab4631eca07d0a38c7f7b87a |
|
MD5 | f0a6bf34d2e1ba4abbde907a3f3c0dfc |
|
BLAKE2b-256 | 2e1c4dfbb4fec284717960ba64ddc75a96a2bf1e74caa027d8087f8ed39acc01 |
Close
Hashes for solders-0.7.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c0d14fb8a700014c2ff2ed2563adc8bfd47d11cd629e9d49c3ecc8aabfd2b37 |
|
MD5 | 94fd9c77c505038cd964abf3bd5d3533 |
|
BLAKE2b-256 | a4773f9a5fb94e27f8143a2b8ffcc534bd4d49294386b779e1b396ae9947e3b0 |
Close
Hashes for solders-0.7.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f917197db21ae79802e93caf7eb500bfc3aa3158e87bf3182e58b20e1f968e25 |
|
MD5 | 687f91029ef5ec713eef46a740c1bb97 |
|
BLAKE2b-256 | 9dda07c5de1ada354c8822e556ec66911d379eacec0d1ffcd41dbb792d702fdd |
Close
Hashes for solders-0.7.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6d8e5eefce7c15abf390e1d5fcc9314f4a7a2df66bd6f131f01eb57991398b2 |
|
MD5 | d5efde5b83a12d09338a918fbcafacdf |
|
BLAKE2b-256 | 1d44d5c8ef9a1525b5968e4f5dbb7ad421cd60e05bf670d77952effd88469360 |