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.9.1.tar.gz
(124.2 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.9.1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a488af1c70e87b9faf3ee3292339c3cc5d0c686abf71711dbb381248189989c7 |
|
MD5 | 1c7542a48895bf0407ecceb1ab7de329 |
|
BLAKE2b-256 | aa2921d6adaf83707948579ebda0bb9449a2c148d3e12f4a4c82e05b97802715 |
Close
Hashes for solders-0.9.1-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38961e211bce49480941409d4ef497177285758bc2d253f06a81d9147eb86f13 |
|
MD5 | fd4fb4c8caabec1361d2ca4d70692cd6 |
|
BLAKE2b-256 | 5cd7b146f217ec6ef4d68379a287bfbc3981bb1f079f71f49f449678d0ac8cdb |
Close
Hashes for solders-0.9.1-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d84d8baef8e01504a706ac309b2db7888748d9ecf206683657f49a230515f99b |
|
MD5 | f6a66cac444bb8c686d20b1ca23a4ff2 |
|
BLAKE2b-256 | e96001d1a6ebacc4cc24db5ab5aa2de34cb09542471c19704f2e44962d640917 |
Close
Hashes for solders-0.9.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b6c1c35bc8d099a98700869404177680ab9ba424e24a9dbe6d0bc7427cc2f87 |
|
MD5 | 5d1554bd199dacb3b8916784a8d82911 |
|
BLAKE2b-256 | bc63d6241bee07c63ff59c7b46e11c4f4611a0a468d4d78e57491c20915fc89f |
Close
Hashes for solders-0.9.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dbe8906cd14a101c5172a71ee03b1907605f221d3b7c65cb75db3ee72eee85a |
|
MD5 | 6aa55adab1f745209dabfd0671e881a6 |
|
BLAKE2b-256 | 9c0fd9cbd13d87f497a21b993449da1fc1611be6c6fe8a587f82031333f9cee7 |
Close
Hashes for solders-0.9.1-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa40601d606c15c12416659f5a86d6425ea09c7f8d7362322d911163da976adf |
|
MD5 | 22fd0318447e8db6e4efac926175582a |
|
BLAKE2b-256 | 732f6ebc39e55b9344a97c786ad8c1be25a389443ed7aadf1f2ddc35cdd95cfe |
Close
Hashes for solders-0.9.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b720e294ce4b30b0f3af31961e25b4b474fdba0fefd914a7b6245a0737328bd |
|
MD5 | cccb8439c7f557cb7d56340e905a5adb |
|
BLAKE2b-256 | a50b6ac6ebcd09abe6dbee7cef560a376742cce07b074e89b0920c45ff4e3529 |
Close
Hashes for solders-0.9.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc0dda5abd3a991e84c896fb298b35bd99437e40ab3f6a2f42fd86d7fb1553c5 |
|
MD5 | 61f13a1e3e146098ac6c30476ac1a541 |
|
BLAKE2b-256 | 98d0e0fce143815c038b08b93180be287509fc71027dd4f929fdac3cfe51ee20 |
Close
Hashes for solders-0.9.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8be42975aaed6dc7151416058b2b51ab40a9b720570e5c43b1b841d9bea5e01 |
|
MD5 | e8bb9256cb283db0b6d7a19d7a1773db |
|
BLAKE2b-256 | e5d1c4de0c7310bfe0117e41b7fc872eefdfa3a668f70cd40bf3a3cdd7902a41 |
Close
Hashes for solders-0.9.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeabf697a247db751167905627e34eae1d654d03257d43093531a599c93ca6e5 |
|
MD5 | e8d3f135b652e172328916d1a1bf201b |
|
BLAKE2b-256 | 629056244f451f233e6782174f9714a2296cd39e6eeebb4b5598b16ea56e3668 |