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.12.0.tar.gz
(126.4 kB
view hashes)
Built Distributions
Close
Hashes for solders-0.12.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cd1fff58bb835c575610f671953cbd766e88218e67ffb27c772f5f54bf1bcae |
|
MD5 | 2e743dfa52ea891920923dd91e5b66a2 |
|
BLAKE2b-256 | 5b12fb4418a7be87318a27abda6019ec526d8028f5f42e64a6cff8b05eb9cdb4 |
Close
Hashes for solders-0.12.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cec4f1798fd2dedd16e9221fc8c84dd61094c662b015b574ae2db2627292a5cf |
|
MD5 | ed20784af3c3162222f1a33d27bb5c61 |
|
BLAKE2b-256 | 2b99cd7d71131c9af86864a0347b5319dc4301571ac72a6b45c59420b0532328 |
Close
Hashes for solders-0.12.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc18d1d6bf7b65c286bbe1e34b2d23439a2f2e223215281f25d77e3531cf449f |
|
MD5 | e2a45972c75372a8f26e425ae075d04e |
|
BLAKE2b-256 | e73781999bb7416b26f726786af11a17643100d6283ce51622afa0e815c80a29 |
Close
Hashes for solders-0.12.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 45e549685c71901ccf72c24d6f08a61d46203e50e90934b23e239978595fffa2 |
|
MD5 | f9179150e78b80b6d23f4df55eaae67a |
|
BLAKE2b-256 | a76a21ead24c26d1be7b04952704897b8c477d725fbab42f40f504551cfb4fb6 |
Close
Hashes for solders-0.12.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 137b75844550ddabb8e709e1d74e2804d3c94cd6a075deda4876eb50d1b00cc5 |
|
MD5 | d019d4c20fb02227878ffbf56da94c97 |
|
BLAKE2b-256 | 4f9465e94583e7f7d399ac89b5f462b2c4f04fa0e10db0fc695feb9ea9692fd4 |
Close
Hashes for solders-0.12.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2b7bf4607dee7233cea0a9e3dbd8c2995a1dfd01072ecd6fe35c3b0973d0c18 |
|
MD5 | 6acd27eda590cece74b4f6db1036bc08 |
|
BLAKE2b-256 | f3bf91cf2369c23c753a348fdac23f9f79d38cb1bc5dbd5d25f2314759cadd3a |
Close
Hashes for solders-0.12.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 741db220e32480de00f4bd1e7f6eaf459d2ae4610b71009a674d370b3b2d9375 |
|
MD5 | 58f90e711779cfc439a802cfc89ba75a |
|
BLAKE2b-256 | 101bd9bc71830d676398a56353c767e2f95cf8ba635eb171c22ce9d38bdd7630 |
Close
Hashes for solders-0.12.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61a5023ae576d0cae09e53b7bfbdab08216c80cf541e3912752238bdd65e7c2c |
|
MD5 | f53cbec97f23cf0ee2b30960f682046b |
|
BLAKE2b-256 | 00241e331cbc4102359caf916de54bcd7ea80487bcb0daee5e609f60b137da4d |
Close
Hashes for solders-0.12.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6be13c19a739b17d026befc35e7fa96b2dab9c00c34795e6c107e842fbde06ca |
|
MD5 | 6995640ab51e6ff9d08a76ff392d847b |
|
BLAKE2b-256 | 36641963034a38576f44b6340382d2a4ba9fd5407d50825e9e8cda018af676f1 |
Close
Hashes for solders-0.12.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90ec909b616078f9e085d93040806245fe5468a94d758bd5f41d4597166715f7 |
|
MD5 | 47d51c6260e5a0717d8998b75cb0aa00 |
|
BLAKE2b-256 | c411fe2adce17fdc6a8020ba51e04ccc08d42ccf98082725d2e8c7c4cf3e8747 |