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.4.0.tar.gz
(55.1 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.4.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a50c702cc36dcee3ef34b1fa14b20ac1bbfef48002511e5350095e3ba3f5518 |
|
MD5 | cabbeed3d190c9f534889bd09d36a2f8 |
|
BLAKE2b-256 | 82f57f0cddfdf62237f308fa70ac65fc3a09f9fb00dabefccc785018f2b1c0c1 |
Close
Hashes for solders-0.4.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 094cb3aa2b054048f52041aad692fe2e480fcdf54ec21c3fea3a208a530ad437 |
|
MD5 | 59a057a7a0a3cf17cbbf8b367b8451d0 |
|
BLAKE2b-256 | 5fb71c4fa1186c21c19621c9b25e9b8ccbfa5e2dfe4d0363888970a06c5d08e9 |
Close
Hashes for solders-0.4.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4569869331cb464dab4c983614a714f40c6f7799398f348d081ec31ab7d05ac5 |
|
MD5 | f78b33e28bacacd4217a706d9ca96c2a |
|
BLAKE2b-256 | 5acf8b3e6126734eaf76a78191f4d5f05bfca97b6b0c3d3d05feb0bd719ad6a0 |
Close
Hashes for solders-0.4.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1733d0a5ffef2b13a68aecc91bcff8c4a84dedd3b1f50688aedc42c66d2cf0f |
|
MD5 | 041d0ec4ed957329b8367b4e079a696c |
|
BLAKE2b-256 | 765628aba57f9684658b2631776f125d8a062816fc9a59293133cf77f397c1f6 |
Close
Hashes for solders-0.4.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 245fc1e92012fe9ecbf51ad1aa5c349a47b2e2471b881128d6a3fa425b315a42 |
|
MD5 | eb476df6a4289faf46766ce44f66913b |
|
BLAKE2b-256 | f3474b8e114ec49a205f7d5cf1942cdff9fbd82759b117be314c3f7a4d1aedcc |
Close
Hashes for solders-0.4.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c65898dc0708731c00628e4e1d3ad2bd3a15c45c813637fec1bed29c9cf9ae11 |
|
MD5 | cdd2eaf2517e988dbc9f242c2993ca9f |
|
BLAKE2b-256 | 9e83f06f6eb68311c072b3fd4cfae0d52480401ee810895f86680aeade00a240 |
Close
Hashes for solders-0.4.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8c7518beb4b71e629c20fb35e6950eb918ebbb2492240da6ec2ab074e6c90b9 |
|
MD5 | 7b33e48fe305b458f04c68442d226f36 |
|
BLAKE2b-256 | 614e029848cd989745834dc1815055f8e7d808c115f85c4ca5575386c0e4440e |
Close
Hashes for solders-0.4.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cda82ad70277a385555a90fb8c69cbcb227602fa40614e20e4408d565d2e741 |
|
MD5 | febdca88dd0ca8ebe2367077655230b2 |
|
BLAKE2b-256 | e0760c9498618dfa4f5fbb81aaccad43e299c7ec0df388d95e30fdd819128aec |
Close
Hashes for solders-0.4.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 061777deec30403452cc93a753616f34458b18c2725e2e54ae8aa1f67b7beaf9 |
|
MD5 | 45ab8a0cb1d4a32ed45b8f8e1877463b |
|
BLAKE2b-256 | ea1916e91b9a9ce8536081936bd7dcb9f60d6fa36063a68f6b448374872d7256 |
Close
Hashes for solders-0.4.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83423b67268d30880cb908dad34be75cdcaee0cc5b5b07e60295b464ea05488d |
|
MD5 | 7014f85c0cf9d4f0ff6dd1f6edcd8b78 |
|
BLAKE2b-256 | 6996e4704193f7bb2ea5ce899ab10dd108b6baa9dddc6a2777ca29023461f03b |