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
Built Distributions
File details
Details for the file solders-0.9.2.tar.gz
.
File metadata
- Download URL: solders-0.9.2.tar.gz
- Upload date:
- Size: 124.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 635e55f26508688dab828a599de096af5001391628ec5d00d08bacddf195579a |
|
MD5 | 53f63384b74a9a5984019f738ea59baa |
|
BLAKE2b-256 | caf9fa1942c8620dd0e805a48a37549e22b2276710f8ecc126474a76b274012f |
File details
Details for the file solders-0.9.2-cp37-abi3-win_amd64.whl
.
File metadata
- Download URL: solders-0.9.2-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 4.7 MB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa993f7d500b314e8289fd827cb6e20f98feae511915e727d55a40bcb66c3dc3 |
|
MD5 | b98e9f7ef622733cdeefaba298eabe3f |
|
BLAKE2b-256 | c3b94ab024521d3f790196a6d4ca41699b2b61e95ba95afbfebf8c2a29d9ab66 |
File details
Details for the file solders-0.9.2-cp37-abi3-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: solders-0.9.2-cp37-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 6.5 MB
- Tags: CPython 3.7+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d229f405ecd2e4daf1d367069187d9babf736504e3b1a8139c2fcc14bcec297 |
|
MD5 | f7888cd49b02c426b111e5e3b4811486 |
|
BLAKE2b-256 | 20e457e84726a0c1ac7d6892198eb24264b8991250fc4ec355ccbc80d032a2c4 |
File details
Details for the file solders-0.9.2-cp37-abi3-musllinux_1_2_i686.whl
.
File metadata
- Download URL: solders-0.9.2-cp37-abi3-musllinux_1_2_i686.whl
- Upload date:
- Size: 6.6 MB
- Tags: CPython 3.7+, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3087bf55bf374af92dafbb764843ad2ceffa32c33baacfc9b211ec6855ec43b0 |
|
MD5 | a4ba0be54deae5949bda89e7c4435b45 |
|
BLAKE2b-256 | 94a673f3f83a4b9d8ad24420f1e01308594e9fec72f36ab936ac97fe3777949e |
File details
Details for the file solders-0.9.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: solders-0.9.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 6.4 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21f10b7192d28c790514157fe0650d3030f9b7d4441750fc959e69a5ac314179 |
|
MD5 | 3d754a849c203c4ba0881ef037a795ff |
|
BLAKE2b-256 | 9066736255dacb13ba8bef9c0aa5143c198eca34a387e30244793a92ee04a525 |
File details
Details for the file solders-0.9.2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
.
File metadata
- Download URL: solders-0.9.2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
- Upload date:
- Size: 7.6 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b6c2c6b33105b0a39c24c2165d6d15342f0a9ffeff47b31f0754ec5b907ef82 |
|
MD5 | 15b9d16e8444df617a8071fce6fd6ce7 |
|
BLAKE2b-256 | 495e3120cb0094c4f12e45a5539226cd9de0631ce47b4c15d86343778c511abb |
File details
Details for the file solders-0.9.2-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
.
File metadata
- Download URL: solders-0.9.2-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
- Upload date:
- Size: 8.2 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ppc64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e1693bff4020132759de6b84157cd33ac056bfe441416a74ce9b7d7d0cac052 |
|
MD5 | 84859b4b7dfdfe6ab69584ec4c041910 |
|
BLAKE2b-256 | 98bf42ce1279dedfe250293769f83b4d23260410ede1fa234e8e641181484c6e |
File details
Details for the file solders-0.9.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: solders-0.9.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 6.3 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c636d4a579ec90e4c3bc126981bcfb8d4f28e5ea829ba33c0a60250aa1c8908 |
|
MD5 | 56709fd393cdeef90a7689e0166b6d06 |
|
BLAKE2b-256 | 8f0106b0486d6fb21ee575a9905c3684f32a1032d680577d77fa8e0e6589a122 |
File details
Details for the file solders-0.9.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: solders-0.9.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 6.2 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b46231047b0ba18dc03b6be9277958c643bacaaceb822cc327a653608722c787 |
|
MD5 | ca13bf221f7a704f56e92ed97b851e1d |
|
BLAKE2b-256 | 84a4bbc76d010dfa860b20df4665dbbdbf43a829dab443c413db6ffd18ec2880 |
File details
Details for the file solders-0.9.2-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
.
File metadata
- Download URL: solders-0.9.2-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
- Upload date:
- Size: 6.7 MB
- Tags: CPython 3.7+, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a22a60ef0acb63af04d1d2f28fed51b4479a355127dd1057953c36c039e0d696 |
|
MD5 | 0eafc89687f045eb040e9181f2777c25 |
|
BLAKE2b-256 | f638e6c3776cfaac767f5a71b849560059aa70bb7dfd64eaa88063bb59741259 |
File details
Details for the file solders-0.9.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: solders-0.9.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 9.5 MB
- Tags: CPython 3.7+, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 900dac8f4d4e6d3446cf53bda49628d4dd60832eaf4ffa67d592f5b5c56e8e65 |
|
MD5 | d15566d92730c68f7062c1c86c1ad307 |
|
BLAKE2b-256 | dc1f9238f97e7da1d022165bd750949bd8a8aee5bf1838f9af517f309c3de16c |