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.1.tar.gz
(28.2 kB
view hashes)
Built Distributions
solders-0.1.1-cp37-abi3-win_amd64.whl
(501.8 kB
view hashes)
Close
Hashes for solders-0.1.1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2234d7e027e6bf2132038fa8693a7872a33b8540172cea1446a9f7f121e04d90 |
|
MD5 | 83a9d36043f4ee2f58cb91f4cfe1d98c |
|
BLAKE2b-256 | 6cae93f9c11e3f34148f8d87f85d8bc3ae3e1a62865ac00729640acbaadae208 |
Close
Hashes for solders-0.1.1-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90e35516e44d4cc09a5c378589e1551e25e8cb2af7b4b97a3c215913b53063fc |
|
MD5 | 0b0d6748fa8228185c12d52abe81753a |
|
BLAKE2b-256 | 4bda0165a6878521bf62efebfd9c4db2a769d517d095e37bbdfa38f060591ebd |
Close
Hashes for solders-0.1.1-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42c8b8fb084717ba80ae46f780ca702d96b897ee9f70db50a9c57c1b33830d36 |
|
MD5 | e17878e7f05a4a3f2d2e3b5b3829366c |
|
BLAKE2b-256 | 4472cdf8f8bd073c78ae5bfae1b3b767dbe5437a94a86e8ddefb1388adf04b77 |
Close
Hashes for solders-0.1.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a8e78c71b935511ba9d906f71a4cb659c30212c9463dc395ed80032b9854f530 |
|
MD5 | 2c13924c5a7469c8901b2994f1d609f2 |
|
BLAKE2b-256 | e54fea7b874fb1fa0dfd67cc6e6e4088a1724273d7769f33ed28f19d9d1a4abe |
Close
Hashes for solders-0.1.1-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42b41c7b4ed4d25794294380039550aa78bfb10665fab935f64e06abef67e26a |
|
MD5 | 20962ffe93d5a340f3689d48417d72fe |
|
BLAKE2b-256 | f98cc70c1e9505eb2a815023d5aa63f6f178096ee5419a8fd6996de336bccee3 |
Close
Hashes for solders-0.1.1-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5054f2e4e04bf171ccccb607197d68bdbe7f847ceff13dc8b92c76756510fd07 |
|
MD5 | d9dd8d7259c3ca64a4240099b10dd27b |
|
BLAKE2b-256 | 788cce6480e45cd241fb5477545213f772c53f519a85701599f8d147ba282c16 |
Close
Hashes for solders-0.1.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4aea02e39c9919343f8a526a3753c6ba4d1eb8047f3bc697acc44d421e5ee594 |
|
MD5 | 0f895164c114df1b7644c1e0ccfd1d35 |
|
BLAKE2b-256 | 7ced26457a81139b8410bf0b313aae87c2ff4e354635e856592557d7ff29e736 |
Close
Hashes for solders-0.1.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8425ec4bc031fb059e6099d79151f2191753a22ca5488a5b3b711f5ccaecf878 |
|
MD5 | 64b4826cd0c97dc121992447df222345 |
|
BLAKE2b-256 | 448f4602cef1e02b6789022be04ca2d2a3d9cba62d0ff384d1568bd8d4055987 |
Close
Hashes for solders-0.1.1-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe8d51cdb02551d4e936ec8381ee5920cb416a159113d58a7676a6052d64ae4b |
|
MD5 | dc5a2bc55d2ef5ed5f88acc99d1c647b |
|
BLAKE2b-256 | 06aa0467dfdf2bf8c8b17bb133589b660f19c950851bc00418cf630e3dadd83c |
Close
Hashes for solders-0.1.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbd356ec1e0fceed1f07a7db691b58369c368175dd3d98facddb2880e3c7a918 |
|
MD5 | 4a5d2936096ff88f8763c27558c45230 |
|
BLAKE2b-256 | 57e7d4bb464676589f4f7d624415bd25f659e7076206148d846d4ccc6977293c |
Close
Hashes for solders-0.1.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fca4944591e7609fc34b55c153796602533a0a98e925b00609c9a0301338eca |
|
MD5 | 65a067929ae47ebbe10e035c6ed52cd2 |
|
BLAKE2b-256 | faede554ac89289746129297ae2566edb1d0ab107f1a285a9436fa76162de73a |
Close
Hashes for solders-0.1.1-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74aa5a509ea9689186b74284ebc0c4a81bb0e6448fff4c3a19ad6a900a825376 |
|
MD5 | e2dfc2ec701d45750376f9234d6917fb |
|
BLAKE2b-256 | d760b3cfdf56297f1ad31ac5d74c4a2e1c9e77f38c77653f21be3916046df38d |