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.14.1.tar.gz
(127.7 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.14.1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bab96129f72c9880989c4c57d5940d77a34dfe809340c5ffe2e1c8210c239363 |
|
MD5 | e9fe4f46391bcc3536377c88e522452e |
|
BLAKE2b-256 | de35da2c43bfdb92b0d629103a9739151e903c9401665bf65de89428ed1f9805 |
Close
Hashes for solders-0.14.1-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50e7599b527a465784c7ae89e6a5dbbefdf26e131969d88835f00dabb0c9eaca |
|
MD5 | b69138a466a6d917440529c1f56ee00d |
|
BLAKE2b-256 | 6c0717fd9729ee41b2e6d37befb972646ca290ffffa9f6d207f348354ee94e26 |
Close
Hashes for solders-0.14.1-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84d8f7b070784e688d9ecb62fe702059f9cb4e779a05ba80415d19ded5c4f52b |
|
MD5 | caff584742a8b41b2e50cf710d2a1d9f |
|
BLAKE2b-256 | e2901eec5dac521f06b0d7b73cba1a2f2d6cb1016eb3a86364b5d2d70244cc20 |
Close
Hashes for solders-0.14.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c8341d6faef630d3361569201289ccf481e7c4ae50eb02eb4ff5d1bf3ec5675 |
|
MD5 | 3ce58a1d4f0d79a4a08579104e0fff21 |
|
BLAKE2b-256 | 86d3352a30f97b4ebfcc5d11346f1e8925bbae9a54dda48aa90375e4c16e71b7 |
Close
Hashes for solders-0.14.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb9c14f411311014e469fb506ceb162c039cd11bebbb520395aa6123b211569d |
|
MD5 | 3af02f263d4d868db80e7f008add834b |
|
BLAKE2b-256 | 7f3cd29351ab8cd865f9174ee3d838fe76f33289111bccbd3e52e402bc49feff |
Close
Hashes for solders-0.14.1-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84216d2ecfc1c2bf489f97f88686797826159388e30eef983b925784209100a3 |
|
MD5 | e265464dde65b6b6bb341983c1bea6d1 |
|
BLAKE2b-256 | d194f4e0aa84d0e04f27732ccc3c8442f4d06bc548dc0637b6db75a0d817b41a |
Close
Hashes for solders-0.14.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a7207eb2337d775d45aeba73f9b8401cba4c102f108ef5911b365dbff5f8fdc |
|
MD5 | dba002efb2d9ab793e18a73ad6fb24c3 |
|
BLAKE2b-256 | c319b50118ab4b9c5d7b68996f8d2995c6b6aeff126dcc0c31fe8b899db49ac0 |
Close
Hashes for solders-0.14.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cac64fcf5c630ab38075f638d8792074ab98a863d10048fd97d15fe9e3fc5a7e |
|
MD5 | b826cc76c7da7dbb5d83eaf81aab9c5a |
|
BLAKE2b-256 | be9b649d68a858fdce65d795aa7384aed3ae6cd9bd11a63db48418fc06ee7bea |
Close
Hashes for solders-0.14.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd108a1751dd8fbbcf784876ef5cdfd8ba320377a9c2cc3cf00bcdb761aacabd |
|
MD5 | 7e286413fa183d48c8bccfc3dcba437d |
|
BLAKE2b-256 | 2885dd82d8df358edcf1ca2dd1ee2261e88eb333975fd1ff846d227424ea371f |
Close
Hashes for solders-0.14.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 457b71eabe0cbda94c0855c5fef2a134a35a6f32312cef6a2f6adc5cf78147b8 |
|
MD5 | 19ad8efbe4943e34feb70ab0c2336632 |
|
BLAKE2b-256 | fa4feb686071c9cabf24e9e1509c23795c08ec8dd68d595de02648ba2acdecd6 |