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.9.2.tar.gz
(124.3 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.9.2-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa993f7d500b314e8289fd827cb6e20f98feae511915e727d55a40bcb66c3dc3 |
|
MD5 | b98e9f7ef622733cdeefaba298eabe3f |
|
BLAKE2b-256 | c3b94ab024521d3f790196a6d4ca41699b2b61e95ba95afbfebf8c2a29d9ab66 |
Close
Hashes for solders-0.9.2-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d229f405ecd2e4daf1d367069187d9babf736504e3b1a8139c2fcc14bcec297 |
|
MD5 | f7888cd49b02c426b111e5e3b4811486 |
|
BLAKE2b-256 | 20e457e84726a0c1ac7d6892198eb24264b8991250fc4ec355ccbc80d032a2c4 |
Close
Hashes for solders-0.9.2-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3087bf55bf374af92dafbb764843ad2ceffa32c33baacfc9b211ec6855ec43b0 |
|
MD5 | a4ba0be54deae5949bda89e7c4435b45 |
|
BLAKE2b-256 | 94a673f3f83a4b9d8ad24420f1e01308594e9fec72f36ab936ac97fe3777949e |
Close
Hashes for solders-0.9.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21f10b7192d28c790514157fe0650d3030f9b7d4441750fc959e69a5ac314179 |
|
MD5 | 3d754a849c203c4ba0881ef037a795ff |
|
BLAKE2b-256 | 9066736255dacb13ba8bef9c0aa5143c198eca34a387e30244793a92ee04a525 |
Close
Hashes for solders-0.9.2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b6c2c6b33105b0a39c24c2165d6d15342f0a9ffeff47b31f0754ec5b907ef82 |
|
MD5 | 15b9d16e8444df617a8071fce6fd6ce7 |
|
BLAKE2b-256 | 495e3120cb0094c4f12e45a5539226cd9de0631ce47b4c15d86343778c511abb |
Close
Hashes for solders-0.9.2-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e1693bff4020132759de6b84157cd33ac056bfe441416a74ce9b7d7d0cac052 |
|
MD5 | 84859b4b7dfdfe6ab69584ec4c041910 |
|
BLAKE2b-256 | 98bf42ce1279dedfe250293769f83b4d23260410ede1fa234e8e641181484c6e |
Close
Hashes for solders-0.9.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c636d4a579ec90e4c3bc126981bcfb8d4f28e5ea829ba33c0a60250aa1c8908 |
|
MD5 | 56709fd393cdeef90a7689e0166b6d06 |
|
BLAKE2b-256 | 8f0106b0486d6fb21ee575a9905c3684f32a1032d680577d77fa8e0e6589a122 |
Close
Hashes for solders-0.9.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b46231047b0ba18dc03b6be9277958c643bacaaceb822cc327a653608722c787 |
|
MD5 | ca13bf221f7a704f56e92ed97b851e1d |
|
BLAKE2b-256 | 84a4bbc76d010dfa860b20df4665dbbdbf43a829dab443c413db6ffd18ec2880 |
Close
Hashes for solders-0.9.2-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a22a60ef0acb63af04d1d2f28fed51b4479a355127dd1057953c36c039e0d696 |
|
MD5 | 0eafc89687f045eb040e9181f2777c25 |
|
BLAKE2b-256 | f638e6c3776cfaac767f5a71b849560059aa70bb7dfd64eaa88063bb59741259 |
Close
Hashes for solders-0.9.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 900dac8f4d4e6d3446cf53bda49628d4dd60832eaf4ffa67d592f5b5c56e8e65 |
|
MD5 | d15566d92730c68f7062c1c86c1ad307 |
|
BLAKE2b-256 | dc1f9238f97e7da1d022165bd750949bd8a8aee5bf1838f9af517f309c3de16c |