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.0.tar.gz
(126.9 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.14.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0dfa41d65ca419c8c203a51b673ac134bf861e94e426177fb8ceae2158e95edb |
|
MD5 | 11d61ab19bcdf810536b24c39a734f86 |
|
BLAKE2b-256 | 27db15af00c708887625c59635fadded17494110a27ead4d63769c8e7b4960a9 |
Close
Hashes for solders-0.14.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fbb95272fbb0f9590405a8c087bbf34960e2f3d3e221e6d54fd84f989af0214 |
|
MD5 | 787ff2794c78f924058df418b29fd413 |
|
BLAKE2b-256 | ffdc3267dbe6be14e8d14996ca4016c4b68e843f37c28f42a9fd5ceabceba1da |
Close
Hashes for solders-0.14.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f9440e375582ca6bbc2611a20aff79c1d1552b8f58f0f6a6ba9d84fbc6d31ca |
|
MD5 | 796ac7253e03e12a98682a6f84287447 |
|
BLAKE2b-256 | 7b23f237a9b84d79a9f27923539f3ef8ca6d4003462229c81a187e02ed16f43b |
Close
Hashes for solders-0.14.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 502d1a2ce162f78a017ccbdc623e77d4746cfa7e6613f3a041aa0922a73dd6a4 |
|
MD5 | 90fe51be31f9745847cdc192e2abb9e8 |
|
BLAKE2b-256 | 8c2bf00490a7b14358be667ed9dca5e86294a2fb46e81c28f16aaa2c7582939d |
Close
Hashes for solders-0.14.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e3b6ccc527b795fc37dc0dcfe724ee7cbfc8660a02d04159b797be05d4be54d |
|
MD5 | 8dee16ae6af9fa9df7c3a32ca4c5d045 |
|
BLAKE2b-256 | 4c0e2a302a8ccfb01de6880257891dfe6ca225d8cce9127bb4ee1a8aca7803d4 |
Close
Hashes for solders-0.14.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 387b1dd70c6d61036254e14fa5513c66f847173de983e1a275bd435c51d271c7 |
|
MD5 | 2971ad49374b614279e117aa18077c91 |
|
BLAKE2b-256 | 9d7c07be75ee682889a8e242bfe192510a31572206029b0c901b36809d1784ba |
Close
Hashes for solders-0.14.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cbf6c569eac915b6610cc0cabe141857e316e2920ba68fa9b4b3ca403c82de0 |
|
MD5 | fad9e8d6d67aae1e3ea08e8fb9ddb21f |
|
BLAKE2b-256 | 6469ec8ad3a1623743686f1c0ae11119d665abcbff272e78a3eae329614572a7 |
Close
Hashes for solders-0.14.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd61be4ab076488c8f4a0b563fdc519204a3a978d2b585f97dbfd2897cf0a5ff |
|
MD5 | c4f0ba7fb9d355a9edca80dd1b036a5e |
|
BLAKE2b-256 | 9ad610087503e112cf4cf61d8edd28cca2a2e839e85786d998eab0e4aafd35c8 |
Close
Hashes for solders-0.14.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc20b0957d9441d4c70efad86f2a917548a52579ebac99b9bd06fcbf13e3b476 |
|
MD5 | b8728ac0b2872a1cad6090197ec7da83 |
|
BLAKE2b-256 | 959f1f28ff3df51aaff35f6f35ecf5828e473e5cd5a0db784b5f57374abe8e0e |
Close
Hashes for solders-0.14.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fa15a8e0d70afefcee3a1a6ec102f0bba6ef057dd146e08741847a5392bea7a |
|
MD5 | 6ff896cd8b1336427aff6af506cb508e |
|
BLAKE2b-256 | 2fd2cdcd156a5d75bf6e752f912b266d4ab77925146ad7783628d17bd6cfc850 |