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.0.tar.gz
(23.8 kB
view hashes)
Built Distributions
solders-0.1.0-cp37-abi3-win_amd64.whl
(501.1 kB
view hashes)
Close
Hashes for solders-0.1.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1253d5c8ea13bc9fe40ef605b294f795fccd5ca6181f6ff05f45a7b6fa8639b |
|
MD5 | d907fa3c664568070ea29f591f85df83 |
|
BLAKE2b-256 | e208ac465c995ef238532c417685008a7f37fd14b9a48736d828414b6a3824ec |
Close
Hashes for solders-0.1.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | daf2aae242637dd06d4410ebc1fd7d246bad8a4fd7fdb8a047062f4f84640b8e |
|
MD5 | e23a405269109779be2483f0ad12e520 |
|
BLAKE2b-256 | 6b2689a9206967047081ae594a57adaa3d508ac081e3766e3490a5a9ccb0e8da |
Close
Hashes for solders-0.1.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02bfeb0a8db684f3020e2daea335fc7a831d33efff9caafe3218c0c4469fdb26 |
|
MD5 | 154e7c28cb3217804248ccb898116cde |
|
BLAKE2b-256 | 5632088fb92b0fdb73fcae70fb850cefb43734aa5e4e86e03976980934d1f53d |
Close
Hashes for solders-0.1.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4daf400bfebf5ffcaa65a77dad89c55dbfd83086371daebae3608a286a1f3e10 |
|
MD5 | e180c9c742ef1920f403a245953434a0 |
|
BLAKE2b-256 | 9c16b0c0f617707e9e71ee085edc43a82986b7b8d0430135afe9655b58e72b9f |
Close
Hashes for solders-0.1.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42e621a43bd224245a1d6d9a4d152e3b98b65245aff97265ba54185b2b9bcbb4 |
|
MD5 | 462fdb0c11abf67494010db69b3bb9fd |
|
BLAKE2b-256 | 355defc19df77bec3c2a67e77ed988fab560c5cf88bd3cb7d7bcbc68023b4c4d |
Close
Hashes for solders-0.1.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5097f93f2731155b575702f10481169728ab162e2fb0c659e994d24ebf7f4f03 |
|
MD5 | 5a981b75ab72df8c82c980d248e2c1b2 |
|
BLAKE2b-256 | d049a2f8dbd9904eb9e5ca351537dc0b67af3c51ac646cd58bebd3135ed493ec |
Close
Hashes for solders-0.1.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2199506090e81e73c12bf26a791051bf43efb5c43f6413ed13d063e2c383d5d8 |
|
MD5 | 1f65c062b52196937e6e863a196d26c4 |
|
BLAKE2b-256 | 870da5c33682cebccf4c625be0959ee5fb5dcbc3e83937a0a72edb7e5812cd3e |
Close
Hashes for solders-0.1.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c103574493b1842d29a35958308e1755efc766ef760e43bfe07ec18836bfe0e |
|
MD5 | 7c22a9eb002c2459c8e8fc874b3f13b9 |
|
BLAKE2b-256 | 622ae56d800f4168e26e9c597cbd68815022bb779b1a910ee914514390c1f51a |
Close
Hashes for solders-0.1.0-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d41c9fc873ec943fb96277ef63916b0a12fd0458f6c5bdd0d02ecb2023679ca5 |
|
MD5 | 526b7b3b30a0589cb64ffe0733a0f1a5 |
|
BLAKE2b-256 | 1ec1f78cf08c6a8efac5f56693c4f17968dce49f96c92954556af551f3b35673 |
Close
Hashes for solders-0.1.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 544868ba414a144395aedfafc3bedcaf1e4f821b564d99fceb9fb7fe049bf3ba |
|
MD5 | 2b6ee00a8eceab7974bb6fe15d5ceaa1 |
|
BLAKE2b-256 | 4ab9dfdba97ba561cf950cd21fb3f3920bb6689e39b900f355c755dcb797218b |
Close
Hashes for solders-0.1.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5e4624688d80f840190a20ea3759edc02230c22c515bcd3b8c594182c3547d8 |
|
MD5 | 49e75a2f156e03b83c62df2b5fc94ce4 |
|
BLAKE2b-256 | 74c5b248d1ed34dc961456333001d8c87863cbc0c58eb5b7c9632fcd6b0e2426 |
Close
Hashes for solders-0.1.0-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2382072a63a6c495c7f9857fed821fedae207b204744384b3f1c2dafb335750 |
|
MD5 | 2fd3c45f913c4cf46818ab3e805fe8fd |
|
BLAKE2b-256 | 2f8ff23d9d3869914923064b7041659470bb880f4f90a5f51e6001c425526a80 |