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.13.0.tar.gz
(126.6 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.13.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bed53516222fcd5cbe45eb114da6a7364cbda427f8e0c4c58a8aa20bce872529 |
|
MD5 | 943005044ffda35e632f2f148c8fb490 |
|
BLAKE2b-256 | b9352f923d23d9c8ba7d4a2b9a086e035d7137f1d05cd8c04b18b69bbe4a1636 |
Close
Hashes for solders-0.13.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 119dd5e45aab52a81234bcfe0b06d412a988bc0d0135baef9de7590e748c333d |
|
MD5 | 446298854aa0a8060db95cc717777b33 |
|
BLAKE2b-256 | 6fb3493c509ec217f0f9b9f1785810e5eb55bcc503ebe4d3471b847bda4980c6 |
Close
Hashes for solders-0.13.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c813d36e245acfe6997d7fdbccea0a78f5fe1db3b6531deaa5e83becddef681 |
|
MD5 | 03400932958360a4d00450ddbc8682a8 |
|
BLAKE2b-256 | 02632bc1192d911525db3b5d182cc4689b6c0ad59fc1ff971672bc6399e3aebf |
Close
Hashes for solders-0.13.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e718e90a7a612e4773304fb48e55c02fe45acdb609d2d66438e125e2889db89 |
|
MD5 | 55013cf5354eb6d7fd4481beb21d141d |
|
BLAKE2b-256 | fd1e8ea9e227e605906aa79095e32be0762d4b6cf7078aefb8c51245d2425ffa |
Close
Hashes for solders-0.13.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f87fe7c9517e567d03f9e475cfdd361bd4f0c029e281c8721c40d191366f6064 |
|
MD5 | 159392de9f73eaba33856dc9d4656e77 |
|
BLAKE2b-256 | 2f39588d174e6f631b36fde29b70c0e08b0bc147e105cbfad2f74901294805c8 |
Close
Hashes for solders-0.13.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31ccf97da667a4f59bb0e9b62dd3b3665909c4f1b824bccc75c03ac847cb7814 |
|
MD5 | 15b49c517139622b991500d6078dd08f |
|
BLAKE2b-256 | cbcb0de4155621a5aa8f4a37ad33dbc5df0f956f4ec0635de0da56b3270766eb |
Close
Hashes for solders-0.13.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42924074c9f661a91cc0459220d793332db792b9b0f3d4ea25a7f19420780351 |
|
MD5 | 96b143a476d7570456c0681a4369d51b |
|
BLAKE2b-256 | 90b7e2f27c71e0b0d4a37bd1a4dd71101e0d2068d66f16ba532d4e0c216d6b55 |
Close
Hashes for solders-0.13.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 467524979c4b9244be8b45180985ad4ffa55c6426b80b8b8ebe245169dddbe20 |
|
MD5 | 53112e2bd684901009f5ceda7765b11a |
|
BLAKE2b-256 | 32d18541ad975d8925081f446a5f7308a9d10448e3c9473f204e0da77e378716 |
Close
Hashes for solders-0.13.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b47a4f6d3e0842920a260641888c5e45cb7e788c515bdca565d0249e82d08c47 |
|
MD5 | 79e614b72beed26d9db42be0bd746c5f |
|
BLAKE2b-256 | 1d9abb220d36a901742ca219b61a5171ae04d97a5c1ff4da417b39eb34bc9228 |
Close
Hashes for solders-0.13.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 286b2a5f8ac40ae1a5bfdf53e544f5c272fe5a6d79d1d1a5681546ad0f73ac82 |
|
MD5 | 83ff7e992687e77fba20c4a2e0ab1df4 |
|
BLAKE2b-256 | e0c0b35c47d7286b859afc0d995865f73e8d5253af684c4c7036060297bc72ed |