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.0.tar.gz
(110.1 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.5.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee1225d335d334db24694eee0ed54ebf7e4535112e9c4341753a8e84f7da3b64 |
|
MD5 | 818f55c80957d36b2e2439a7172a0108 |
|
BLAKE2b-256 | 293c0e6371749336d12e60c1fd3e80cd4904f39e49d968763663b7e12aa70d58 |
Close
Hashes for solders-0.5.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe3ec4c2cd1f1d7a918551775e631f15056065a6c289d80fbef5f196bf1694f1 |
|
MD5 | 351832097726e47c7fb369d751fd26df |
|
BLAKE2b-256 | 1e46e3c11b6f6a813afd4a1f505452a67518eec753c68f285bcd72d246c11b6b |
Close
Hashes for solders-0.5.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f77e93ed528fed23318cb06af01ff3fee34642aa5b953f512383ec64a775812b |
|
MD5 | 88427771508fe621c078c85015e47ff4 |
|
BLAKE2b-256 | 31637b4a3b4541c1d8334e977c3cff23c4b0345c6e507a79fd3e60fb13a9c2ca |
Close
Hashes for solders-0.5.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49c807c1b28d8ed3d6665f87eb492e5c5a86f1664e4fb02fe243d7603d6035bc |
|
MD5 | c5ae2ec8ef00af78eaac13b1c41667cc |
|
BLAKE2b-256 | 8541c859c72001947a374e72276fb8847163b7c040a8dc3b68fd31feac298985 |
Close
Hashes for solders-0.5.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62f7db71ee09f47858782d9316530401aa2868f1ddf4510ad41db30c15640508 |
|
MD5 | 994f4ac5551954daaeba3b0438492097 |
|
BLAKE2b-256 | 25d6908b0860c496a5591dd6a12d0121d6a82ba67779981cbdafe19f9a9f1238 |
Close
Hashes for solders-0.5.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8e5ec59e01716d04b88a9a70240d3dab5de06d92ff4b2d996b0bc8b09629f03 |
|
MD5 | 2f0273423540dea8e802a9e2d815ae0b |
|
BLAKE2b-256 | de934a04b25205dc531d2a1045d8a8c2b50820e7dfbe07df554ece346ff28b69 |
Close
Hashes for solders-0.5.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7b6f53b1cb6630ea76509de90358914d149777912e5af3217cefac470d3f5c0 |
|
MD5 | 8808164e0abbb3f58d265175b89203eb |
|
BLAKE2b-256 | 4313e003d04a0d283e65d0001e8d6a0bbf9e40895d212a8dacd756af5c02100a |
Close
Hashes for solders-0.5.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53cd6bac4d5aa747ea754fa093d5bf06b5516cb5c4453a6139440e6e7fa928eb |
|
MD5 | a9a999fc5901f2a09aae3df58e8bbd74 |
|
BLAKE2b-256 | 7034840d0f7dda6ca8603a9b52a3f7dd2f13310e39eac54daef4e23afda8c64d |
Close
Hashes for solders-0.5.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b9f10764bf19285de2f9481f6316f409fd53d0d029359c976241edf4815f15b |
|
MD5 | 8a749eb184cc54ec00ea74ee10b9f4ae |
|
BLAKE2b-256 | 58f6be532615edf567074c849badd38a56a4aecd855fa6e9fb3fe34be58dee4c |
Close
Hashes for solders-0.5.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba2640783396ed1ce93f3a991ee2d5be90f3c32315f5196c31089362d9dae730 |
|
MD5 | 3b9e94e079b9759347467059818015e7 |
|
BLAKE2b-256 | a9035dee288bd86516feecf819bab365485d5f74b508d63fbe71298ee778ed3f |