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.0.tar.gz
(33.1 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.3.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dff605472bd747310b4651f8ca72fdc42aba2b633833911a566f89bed608999 |
|
MD5 | 989f54600982565c8ec550cbee7a16ba |
|
BLAKE2b-256 | e3e8686992e20356c29e799bf5fd6f78d7e4853e73a345a6317c5045a4881899 |
Close
Hashes for solders-0.3.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e10c59623af2b3c1a493aefa7114595f05881639db5556112c4d2426ac3ba33 |
|
MD5 | 4d4b3ccbf79624a349056d7489c957b3 |
|
BLAKE2b-256 | bd25fc5af65d1ceba7909fce0699ae4ef04049b319c59edb7a232f66e5afacfd |
Close
Hashes for solders-0.3.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dd19f9d065bad129ac7abc008eb106599b281f8450dead323e34da404b0f0e8 |
|
MD5 | a55374d8e12b076474f3b18ecf7ba5cd |
|
BLAKE2b-256 | e6b03ffe30893fdc1a79d42edea335aef82bcf93f4da0a61361fe813fece27bc |
Close
Hashes for solders-0.3.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d199fc8773649dab7d54d6fbebc46944b2950658103a8a463fd2c30abae45bdd |
|
MD5 | 1bfe3ae01d816efe440ddba1f92d7459 |
|
BLAKE2b-256 | 4679c7dbdeca5c84ae3cc81cedb6260a147c699ea861455f55a8c3abf4b0a756 |
Close
Hashes for solders-0.3.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42c63fbf391701fa71b069015751a10fc72b2e45e27e00aeff05f9f138512cf3 |
|
MD5 | 39f773a9f640d75a4b2975a40aac41e0 |
|
BLAKE2b-256 | 3c0db61607fb37f06c1fa457635e06035ef59d8981a4e3e6ac3660efdf159c28 |
Close
Hashes for solders-0.3.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f91def5d281039b2f97564c90803724d2bb639e87fe76e5ad4f0992cbc104a8 |
|
MD5 | 0e3f5f2840d783c419a3cd7aa157ecc4 |
|
BLAKE2b-256 | 0a73704087fd9f22894308dc50793e51647c82f12622ea91001edc4125e15f6a |
Close
Hashes for solders-0.3.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea96c477f8bd3d007ab5cde3792d677fc51d0d12ec3e4b85cacbf9cc5d587e02 |
|
MD5 | 4554c1f170e1f9200dfcca3aac11ffa5 |
|
BLAKE2b-256 | 077530405eedfae6350ce149112bed746f8b36075d731267e0cab5027bc77221 |
Close
Hashes for solders-0.3.0-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2bb051b8de266293b911223c3c0eee9fd0db6b6c2eaabdb6eb7e069128f0667 |
|
MD5 | 4f5dd0ca024c51cd1d0c493bd6542254 |
|
BLAKE2b-256 | efa1782607d11db8fda69c6c75b9dca253019641764dcae291623695a8260869 |
Close
Hashes for solders-0.3.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fd6e36d3d4cc494cda170f254ea57b7ee6712af9c63f630264ee608e735e31c |
|
MD5 | 7cf4bef41ea5d62f878b8ded38996974 |
|
BLAKE2b-256 | 28ccc8dcdc5686f990b54bc9b78c8bd70d0b43a3d05ee7d4aaf8292be99230cf |
Close
Hashes for solders-0.3.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f95763c2f7fd2d198de13e605aca24b15d639b9539714a4f900dc7e2da42a90 |
|
MD5 | 98d46149472b2e72828c84aa036ac830 |
|
BLAKE2b-256 | dc3bff279f16a5b35aca97decd1315cd5a751b54dd05643cff0ad32430026e38 |
Close
Hashes for solders-0.3.0-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa57db196b1f8352529c88b7339abae591f6385fdb4a0188856b3e1ef3298f14 |
|
MD5 | b9b7467f925889296af5fa4b838a31d7 |
|
BLAKE2b-256 | fd46cb3bd015b95c21b8a805e36e0aea5b7bf3ae000205aaa08747f981241a6d |