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.4.tar.gz
(128.1 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.14.4-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c96a6cb9c57289f655b83bd6f5406595845efac033016fdf4d64a4fb940276c |
|
MD5 | 149b350c3e305f6a1eac640726037dbb |
|
BLAKE2b-256 | 93151f7aecd6b8ce4cd5e91bbd7db2c62d18488d037dad85b7a4d0b05a58585b |
Close
Hashes for solders-0.14.4-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd2ae632b65d8e34ae2ebb7b02476a92a6b9c4c26750869084dd17930f9840b5 |
|
MD5 | 2f50ee63e472aad8fd16267e76f6b571 |
|
BLAKE2b-256 | 339c8d70fec5a71084313cf3f7b5211fd5228cc6f818236475ca67b0f97b126c |
Close
Hashes for solders-0.14.4-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5d695f1de1142a38df5372598dfdcb5e40d513b7e370c4985f7de30cfdb9a5f |
|
MD5 | e4946b2a8213b667042995c0b62e8ee1 |
|
BLAKE2b-256 | e22934a4ccf6c2847a694b084778aa072a858584b31f51419431d6631247eb0f |
Close
Hashes for solders-0.14.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fee58ed337546139779e9ff55d8c8aecde9be9d8017c8720a032a376b8c1f8a |
|
MD5 | dfaa44ed0d584bf99e02edd470952a04 |
|
BLAKE2b-256 | 1bef2df4e82bc3058cef2139cef7ddc15776459557b6c410d72fcfc79987f4d1 |
Close
Hashes for solders-0.14.4-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa73891956e27aeae946a1117061a5dc73dea7629222f0391170e4fdc2c420cb |
|
MD5 | 41aa705255fc183b0db089639475587d |
|
BLAKE2b-256 | b12e6b04feb1b83201b10c5749cda018b04a90b8a8049dd6c3af3f467439c28b |
Close
Hashes for solders-0.14.4-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39895eea96086154afd345cc95ae30d80ce7cac3efe4e79d14267277b6201b25 |
|
MD5 | c5d7e0acb298634ab96a1c21d120369f |
|
BLAKE2b-256 | d9a913da006a01a65cc8450df2efacd517b2607f660f27f5f95a8912fbf4e4be |
Close
Hashes for solders-0.14.4-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70dc45a92d167ad87417273132c7b207687b7b17007dcbfba716682941b1573c |
|
MD5 | 40cfeec0b7db32fea095310558279b4d |
|
BLAKE2b-256 | e7fcd6a7ba5be566bc630c71e796738c8e00ad0a4bacff9d394438226e7c159b |
Close
Hashes for solders-0.14.4-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d0b40248ea97960e9de7046994dd51aefb9f9c28b53ed82b07f64bc61177140 |
|
MD5 | f73361cf628d1314895697568778ec7c |
|
BLAKE2b-256 | 1a6664b95c0febe0c298c41b8ca64ad3c9a15b7a04f1386e85e380cd9e3686ed |
Close
Hashes for solders-0.14.4-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26e44723352914723fd6ee45037339347282659e2d7db36c8a32d22d001af6a8 |
|
MD5 | 520b14ac8f5cfe9fd0d3d5411e59ad5f |
|
BLAKE2b-256 | b4c9c99035956a6730641a3437a5fa5e24e9104431ca09ece721b63be299224e |
Close
Hashes for solders-0.14.4-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b46980420df7cf33d009666c675885071d53b9f05789cf8bf23b1cb6efc8a64c |
|
MD5 | 1c408480290a50a61f16824f9cbb255a |
|
BLAKE2b-256 | 749427092f631934d8007bfdb8f82113306a698e369c10c3c900e5ae47b66353 |