Skip to main content

Python binding to the Solana Rust SDK

Project description


Actions Status PyPI version License: MIT Code style: black

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

  1. Install poetry
  2. Install dev dependencies:
poetry install
  1. Activate the poetry shell:
poetry shell

Testing

  1. Run maturin develop to compile the Rust code.
  2. Run make fmt, make lint, and make test.

Project details


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.8.0.tar.gz (120.3 kB view details)

Uploaded Source

Built Distributions

solders-0.8.0-cp37-abi3-win_amd64.whl (4.6 MB view details)

Uploaded CPython 3.7+ Windows x86-64

solders-0.8.0-cp37-abi3-musllinux_1_2_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ x86-64

solders-0.8.0-cp37-abi3-musllinux_1_2_i686.whl (6.4 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.8.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.2 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

solders-0.8.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (7.4 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

solders-0.8.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (8.0 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64

solders-0.8.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (6.1 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

solders-0.8.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (6.0 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

solders-0.8.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (6.5 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

solders-0.8.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (9.2 MB view details)

Uploaded CPython 3.7+ macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

File details

Details for the file solders-0.8.0.tar.gz.

File metadata

  • Download URL: solders-0.8.0.tar.gz
  • Upload date:
  • Size: 120.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.13.6

File hashes

Hashes for solders-0.8.0.tar.gz
Algorithm Hash digest
SHA256 cdf00bb2e70167bdf02c984e52d006d6499cd8d2068dd377fbb7d6695c339213
MD5 73f84f7e998d91efb1e36abcf42ab4af
BLAKE2b-256 6bfba1f2ed74f48822faa12c1a6886d48d6f99b2e26b72ec00b53efd501c84d0

See more details on using hashes here.

File details

Details for the file solders-0.8.0-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for solders-0.8.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 da755dcafee41c998fbc43674fc56e12c9780f1ec398922850714d347043e5cd
MD5 bcdfec954eaf6fa9338d0023f55d54a3
BLAKE2b-256 ee34d3286b7750af4711995da50d7d9a0b9e29bc4dea06dd7ba88e3a82c9208c

See more details on using hashes here.

File details

Details for the file solders-0.8.0-cp37-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for solders-0.8.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f81e2633d345358581d21913d24dd9cb9fe9b23e5cdf8f7230557abf9cba0c41
MD5 6365e58484957b5d2e4b4d7f33373dea
BLAKE2b-256 8151c3abc49cb048584df5aa017782d692a711ea3351c2a78fde4a5fe2e514b0

See more details on using hashes here.

File details

Details for the file solders-0.8.0-cp37-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for solders-0.8.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 463f291588e59c6a97505d4e444468f0f72c5630984bb22bf6bab6a9d6193d91
MD5 3c2ca12a598c968a564a55210856a5c1
BLAKE2b-256 fe1d266e03d2b69b2a24d4021e3f6271e54e285d8a67ed88732292d5d18497f2

See more details on using hashes here.

File details

Details for the file solders-0.8.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for solders-0.8.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 96bdc2d1ebc44c5582a6a431477a5816bc03f92b2b22a61ccc5c8643194cae83
MD5 80fdd9d60f48b3d0600af587582e6053
BLAKE2b-256 d5e45ce9c8b2d564ad6c7d557eb83d15da3fef6cee32851f8647b689d379fa6e

See more details on using hashes here.

File details

Details for the file solders-0.8.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for solders-0.8.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 0b85a76b4f2bf04588833e541675b2e0b7248f8fa8294158c4df21859d6dcaae
MD5 42cd76cdadbbb57802eac3b309a01a51
BLAKE2b-256 d1899a5071a6042959fee60d43e81f2c7aa17497a71f1ead717d33bf2a53ca67

See more details on using hashes here.

File details

Details for the file solders-0.8.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl.

File metadata

File hashes

Hashes for solders-0.8.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 a1de007c8872e245dce5305cb7db4d316686fc7327c325cf5addb3e1a44dcf65
MD5 124fe6ec319f6cfd64202a67c6824f1b
BLAKE2b-256 09adf1fc9af294fbeb101cc9b8a03e47c03e1004b0045675728b7114b5c9d401

See more details on using hashes here.

File details

Details for the file solders-0.8.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for solders-0.8.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 c1e436c4ab46dc619fdc37afd0b4cf1a3678f7b37f6275effddcf32dae293bb8
MD5 2a1fbb9a70ec6fdfb166c1249ca02087
BLAKE2b-256 6936c864eef773ecda8bf5adb6ecf6cdd25cb9fbd4c20c257a1b91e3677c2174

See more details on using hashes here.

File details

Details for the file solders-0.8.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for solders-0.8.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 fdf6f82422ecd2b2f5bfc05f5dcb3058551eb5016d68fd8a01968ad7f0cfcaa7
MD5 a5de3ef108adf4823d0b92dd232e62fb
BLAKE2b-256 6ac628571c4aa075e8f867f49c10c40382dd8297c3ca9f09e3971e483bf34ee5

See more details on using hashes here.

File details

Details for the file solders-0.8.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for solders-0.8.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 dba8d28ca99144b9f48e0179d9ee07e4c6b9cd7fd34dc0be241a7f56d9c84e5b
MD5 acd3fb36daae4322244582445776107e
BLAKE2b-256 3b66966cb7d7c2b739cc58eae410317b6f0048acef6e9f78ad5c362013f52a42

See more details on using hashes here.

File details

Details for the file solders-0.8.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for solders-0.8.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9d0cff0cd848ad7fadbd014bb266c69618993272366f5b91c9a30a6eb5c4b159
MD5 a831ccadbe221193748147a0c178acb4
BLAKE2b-256 d9d7e42ac0ae480cdf9a30d7d48f7fab535d9e6ee1fa1a781e789949e99cb848

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page