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.3.tar.gz
(127.7 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.14.3-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d17af9077e8ad759cd54ccea21a9722c70e34b9e600c6b8591e763f23476084d |
|
MD5 | 5e4df4fc778711becc120330f879f85b |
|
BLAKE2b-256 | 8056f74a23961b1cb9700aecd737b563ecc106b55ea1bea26f3a73ad2bcdabde |
Close
Hashes for solders-0.14.3-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c7b898e2ec6d452bc26c05c5d6e1afe6df759cd072a430b8cf2d71944680ba9 |
|
MD5 | 94793bfb9cc822c48e84570e345726d0 |
|
BLAKE2b-256 | f71d18ab17879e97dad71c16db56862d8ffc4161b01d0ab10f254c6ba38553bd |
Close
Hashes for solders-0.14.3-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bc7755d44ccb6f2ec8dac8cba2ef76fedc47f17314fec7fc7690ac0ee83fed3 |
|
MD5 | 35869e8ea70c204f598f92b61d21ae80 |
|
BLAKE2b-256 | 0c93cd7ab35fee950b8a9b682862fb5e2a20de298f412aa02c491ca9d1d99492 |
Close
Hashes for solders-0.14.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bb50e5910c92018012591a91ebc3241abc356fddde079ee5c4d2428aef4812b |
|
MD5 | 318aaabc93efa88934c1c48b73771616 |
|
BLAKE2b-256 | 309ccdf9c9ec040c7eb4df53bbf35f6d33bbdbe6607bc63f51b8df79532c6535 |
Close
Hashes for solders-0.14.3-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 140b5714344bc11b25aa6d9b116b6600a9139b02bcdcfa44704f9a8196b965a9 |
|
MD5 | 2291f827959e616c88a0e71355441db5 |
|
BLAKE2b-256 | a4d92c8f1d43f850f8bd39027004f5b681da62718947e6ea1bbed70d57e40ca2 |
Close
Hashes for solders-0.14.3-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dc01a1f3af0744d3f7bb93b94cdcf8a07d72062ddce074663f8c2c0b3fa0529 |
|
MD5 | b554ea2b7375ffc10c0c670e40d3a339 |
|
BLAKE2b-256 | 1bfb9b0161affd8f8c376c37be2619606920f330ef2abbe6713f2bf72506bdee |
Close
Hashes for solders-0.14.3-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92258dd5113dfac2a566ce642fcfb7d954eec1b1629a9ad1b81dbd68986486a0 |
|
MD5 | 5f6d6c0abc85049d8e984bda616e07bf |
|
BLAKE2b-256 | 172f77bb08f92488081c4f9f7742eff02512788db57a073e1f7d9491c9baecaa |
Close
Hashes for solders-0.14.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4e7429d21b2fac079204b7d3b22a58edfc5d6c6a3dae3bd0f512cab008fe446 |
|
MD5 | d34d3eb6cc97af9985b321bf2b0aeafb |
|
BLAKE2b-256 | d71810ff8dbf2f9a5eeb53e57560b4c47201965d095765a2774799cf48fad336 |
Close
Hashes for solders-0.14.3-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24c082efc5e5f1d3722242c90c96654149ef98ab02561cd7b83656b8807a4ea1 |
|
MD5 | 61614efef8452d5cf22599e53fb4c78a |
|
BLAKE2b-256 | 2c53e4cf359d06a40541ea460874ca6ff7a882ebb2fa3bd1bea5bda2ac74783e |
Close
Hashes for solders-0.14.3-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 672c0d71d6e9f85d4744bee18083e8aaeb85a4d710a3a60b9ec273a080e77472 |
|
MD5 | 3786bbc8220d95f36d83ca25bf36d19f |
|
BLAKE2b-256 | b30bebe15dade1cd92b624703dc478b9924f3f2a7b52d3360d63e4534ad07866 |