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.1.2.tar.gz
(28.3 kB
view hashes)
Built Distributions
solders-0.1.2-cp37-abi3-win_amd64.whl
(504.7 kB
view hashes)
Close
Hashes for solders-0.1.2-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8251dee3f055cc52add933f9e50aa85709c49dce0167dff248307527781a2dc2 |
|
MD5 | 6d25e22ab4a573cd7c21c890228e4933 |
|
BLAKE2b-256 | 3a72e1fb888ec1f01d24b607a7226d07cce68731a54c7fe831ba47477128af75 |
Close
Hashes for solders-0.1.2-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35f07838667639d5566082a83b957ed93f7b3aca4565987861c6bc84aa19a196 |
|
MD5 | 34b8a9b04ab4e2f52c9f9360ad3b57dc |
|
BLAKE2b-256 | 167a95678ff9574d9bbf2600523e59cf283c5eae6fd1cf37ea1fa458cb0f1f85 |
Close
Hashes for solders-0.1.2-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86a628d660a6a77dbd8cd2a7ffffcaaf713f70a3485f1fba5ae55c8b548630b0 |
|
MD5 | 7b720533a4aa5d645139efa4bdb6c8bd |
|
BLAKE2b-256 | ee29812d415f74fa78480870cc31eca96d71568ac59b166a36eba08909d8cc25 |
Close
Hashes for solders-0.1.2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d809c2ffc4cc54d2583a3bd827fa296822248a69976e8b7ff1f9c3bace1054ab |
|
MD5 | 24e475271c58df84e7439b9e6867fce7 |
|
BLAKE2b-256 | af9ab6a649a431d44efced383894a250bc9d50099cf896aa0683c0da5885da01 |
Close
Hashes for solders-0.1.2-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc88e8631f4584462d08e46f7a390b1e9c9cea6fa87b068f8eb16455ec483c46 |
|
MD5 | 9f43ba420b081d251eedd5c841444d99 |
|
BLAKE2b-256 | c40e89da53f4afebb25a5a921053039c6cd2b3ca305c96718e5a4b2a98de5c3b |
Close
Hashes for solders-0.1.2-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fa9df7c2af4d16c312d7f20dc49930a7f1cdf1637d1e7a2fe80efaed1a97f080 |
|
MD5 | 545acb9922705b644768586e4ff09442 |
|
BLAKE2b-256 | 6baf4f1f5764703cabc0f725b62e6fea8840e82f4ac50eb0bb14293ae5ede63c |
Close
Hashes for solders-0.1.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 272ed46d8d5c513adb4df56dcfdaab20a3a7d104e56cee13dc1fd0f65cbc00b4 |
|
MD5 | a5c91c0c408945ffdc3e3270ec43b034 |
|
BLAKE2b-256 | 5e93dd3bb9d821b845ce63a6b4b2f2e44d66117cf65f74d7f17d26f4b0c70758 |
Close
Hashes for solders-0.1.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8659ab66abfa9087dce18ab7297e77283368a0f541fea527683e5f627101009c |
|
MD5 | 1eab814851ecc1fb7e7046450270bba1 |
|
BLAKE2b-256 | a9ae783bda72ab8fb42bb3d1b17b64a7aa43eab81c93088cb760a7f7f6ec8f65 |
Close
Hashes for solders-0.1.2-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e16055572ceb18f6842ccb3964cefd49509fc792f6992ed2e4a5775e0a84593 |
|
MD5 | ebe05fab7f4d6252d26c47fc9a40e180 |
|
BLAKE2b-256 | bf4bc88def7eac9b1ce4de7492847ef8de9af25796d6a98d72af212c18e3804a |
Close
Hashes for solders-0.1.2-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30b4882ab20f9592362d496a0029942728ae0d86c486570bc8726c336d172a48 |
|
MD5 | 5581de43c262506048cd0d13b1a3c24b |
|
BLAKE2b-256 | c8b9ce54055042cf8372ea0946cc72f03972d0e6bfc1a744be87a9cf981d6076 |
Close
Hashes for solders-0.1.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fedfee0ac278b8cbfce7343b30b65af6f9c20b1096d91a6a52b211079a216f52 |
|
MD5 | cf6b36018f0bfac0d4634d71d5615182 |
|
BLAKE2b-256 | 5cb1456b02bfd6784fd9df3488284d107a4f638804aecc952d1a30102cb020f6 |
Close
Hashes for solders-0.1.2-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b53303f0b3bb25a63efcfe0c29594801cf940395e7598ae827493c1eac71960b |
|
MD5 | f314c14bb1ca0e0f5ef7fc3d58922576 |
|
BLAKE2b-256 | 7ea0a6a74867e9cfabf1223d5c68c8b30f7e94e009b2774f16e37ffb21a0ce1c |