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.3.1.tar.gz
(54.5 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.3.1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5605b7e4dd921552c5f80af3f439b4f2c609d477fc7442866d32c78fbe4398a5 |
|
MD5 | d65a139b93fe277e6de0d38be597d54c |
|
BLAKE2b-256 | a910f043ad304af1a20a689108961ddcca4c170a9ce03ca268e597a18e0d7437 |
Close
Hashes for solders-0.3.1-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e16cd4bd89fbbca60de40945d28f17349b27cfece54c123925bbdbade38cd97d |
|
MD5 | 64c78b61abc43c035a3635f5cf3a0a35 |
|
BLAKE2b-256 | c93ed727e3634df6a7cfa8810e4e5fae3840b7fa776e074924a9d2fcdbfc308d |
Close
Hashes for solders-0.3.1-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17e63993333a37f2443bde1fb07f2bf5699a43f5622c5dbb47b75e2b6d911e59 |
|
MD5 | 49880ff44a9e5408cd48ba6cc3bf72ce |
|
BLAKE2b-256 | 11abac19b130c9f7b3d2e79fb5e47058a7c9410708dab969efb74d4f377aa45d |
Close
Hashes for solders-0.3.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 92994bb92d28b199cb3dfb9d84519ae1082ea0027339764b147a3928270ad199 |
|
MD5 | aeabfb105d41772901e70be8d0b6437c |
|
BLAKE2b-256 | 56742b5b6abb349ee0ccce9248ccd612a1eacbaa97b79fdcb9bcd855f12d94ca |
Close
Hashes for solders-0.3.1-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ae1d15531a9fbdcf56604c72663d762644ccd4db37e637215c562bc9b1eb968 |
|
MD5 | 00fdac8970b752c854daa5aadf1c54d9 |
|
BLAKE2b-256 | fe600f203ab148c1cedeb55bf3b90ad2bd531f9e930a93995b568762780121f1 |
Close
Hashes for solders-0.3.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2baa6100d6b8dda68f9d2f79aa21010936d6adb1c2c92304798043b9011108b |
|
MD5 | 06d26e6ef97f1fc1b3e6cd9339f2c370 |
|
BLAKE2b-256 | fb3e8e4d8f4579710c128dca7817a6caf50e6c45b903e00740603de672f7448f |
Close
Hashes for solders-0.3.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ceb70fcf12ef29201fb84f19028b397754388b58ec5cabef3397e07b4b76dbba |
|
MD5 | b5d22d5d3b31b6dafe4cf08eff1a3f76 |
|
BLAKE2b-256 | eb0519e530b74140473b847e50fe45b3dfa251f285568178e891864d014f8b9b |
Close
Hashes for solders-0.3.1-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 013c63fe7b48d3ad18f511a1692d451c2aa55c669ae560377d32837a90ba9d0d |
|
MD5 | be312119a819ac18d9e11bb28039ec60 |
|
BLAKE2b-256 | 1f07f40cb4c4e61fb02227e4c9e5bb9de3f66174b625fbac43986659cae660a1 |
Close
Hashes for solders-0.3.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c15c1afea825e52bd5fadb034db5ce52a19a0484a791e539abe55a6defa4bdf3 |
|
MD5 | 7d6925a1af6ca824a4bc195725760ade |
|
BLAKE2b-256 | b8415e3b1ee2557e9f65b50696402f53b2952d174069f7ea692333e44272e42d |
Close
Hashes for solders-0.3.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 353178d462402b244c40bc4b9411bfb4a48feb64eb5363f68dcf38413ba3601c |
|
MD5 | df722aa779aea06c2da4647ebcb59576 |
|
BLAKE2b-256 | a93af6cd27f59bc11d9f3a8811a30b817e3ac22145e4f59dcac1ef1f5e3d8899 |