Crates.io | solders |
lib.rs | solders |
version | 0.14.3 |
source | src |
created_at | 2022-02-02 10:59:52.022838 |
updated_at | 2023-01-28 19:27:05.903193 |
description | Python binding to the Solana Rust SDK |
homepage | |
repository | https://github.com/kevinheavey/solders |
max_upload_size | |
id | 525654 |
size | 458,847 |
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.
pip install solders
Note: Requires Python >= 3.7.
>>> 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)
poetry install
poetry shell
maturin develop
to compile the Rust code.make fmt
, make lint
, and make test
.