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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7+ Windows x86-64

solders-0.8.1-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.1-cp37-abi3-musllinux_1_2_i686.whl (6.4 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.8.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.3 MB view details)

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

solders-0.8.1-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.1-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.1-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.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (6.1 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

solders-0.8.1-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.1-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.1.tar.gz.

File metadata

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

File hashes

Hashes for solders-0.8.1.tar.gz
Algorithm Hash digest
SHA256 5680eefc93252298e657911c8431db39e13505fa0f5f50aa20baf30e319c6ab6
MD5 d2591f60ac3d592ee930a2dfd8ef94d6
BLAKE2b-256 0e2bedf0c945664f16a3216ffcccffe9745eda0ade10a14af7267bc24c097ce0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.8.1-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 49f336c2e1e7e07b0e52887fa8c256c4f526ea71ea6db2ac4667f06512f58e3c
MD5 ab2d1de4f34b7046b878f273efcded56
BLAKE2b-256 976bd1689fc4bbef07073b6cba22464c835263a98434951dea895f6bef4d27cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.8.1-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7ad0da0e8be401eb5ae7c1e0748c584aff9091107b13424b1bb8b6516b95f825
MD5 c2b44101888a973a72973ec8a10f4606
BLAKE2b-256 4d29a19823c059cffe096351c350bb95992a93cb4f2ef1c3f4ca40f191baebb0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.8.1-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 b67923baca68d5c0ab0674d0121270e3e0368ae5155ece2b32472ea0a2214526
MD5 b0be27a835848cc15b8e67eefa5c8af8
BLAKE2b-256 a06b82cdc51116e72514f9b58f1a882f464ceabe3f1dc5fefceabc4f83aace1c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.8.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 20e9b2231766021d41986c35f078a683efe4ef0f72fadca3a55ca3f916fcfc77
MD5 5d821febe00bc854234daaad744742b3
BLAKE2b-256 c2ed1e21472247578600e306e7d77b772b1fff1da4d91a2afc6037bd2c510799

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.8.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 fbd0a2a0cf5dfec2d361643c5d6703badbb7924dc5ae976176102a9d3ca1b64a
MD5 e30e7b39fc1c126f0bedcc177d6d8bab
BLAKE2b-256 c415d1e0557bca4197037053adacec1eac8575e8222f4f090afe8239730ea277

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.8.1-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 1d9d847d32c49ef9a0d6d8a00869a372ad7c1d61a53ea265bacc2c3185643967
MD5 b1407d927a529d1810b49a465138bffc
BLAKE2b-256 ffaa39a83a8940da43d2c2a9cbabd973549883ebf61eee97da00ea3a84dbe3a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.8.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 cb828e184b0427374acfa03b7335f8b8a6203d2e8b2e8635541e9265934c1274
MD5 c8bf6dd00c2b232328687c14ded9b1af
BLAKE2b-256 50d2680b78c28e107d4fe5b4da1c9251d9b7260d2741a2f67ca7c45f64fbb89a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.8.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 95b7526d026d7fa4cfc383283a8d866a6303360ac1df7b8fd9d3ab4d49293d37
MD5 d1f64676d2def361e34e772d256a7786
BLAKE2b-256 edd144dd25e24c56bf8690b300bf06f597ad361787853fc4685b871c58a8c694

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.8.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 d693a54dd8495f972f0868395c5949d7a1befe1879b231fe88b9bd255a2c7bb5
MD5 81938dfaeb824b244bfb0dbeba060887
BLAKE2b-256 2f841a2e6e448a34f6791f5f8a2948aa161c2e48361d9b8677567e0f4ad7d3f7

See more details on using hashes here.

File details

Details for the file solders-0.8.1-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.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b3232e294445c821e65a9cda0f6fb789d7d6a687e8cbc31c345f1129defe1f86
MD5 cff929ff6b00ec0ce8c5fb88c5634c3a
BLAKE2b-256 0ea0ea285e330e6567443415fe4711f94487f7af5955171bf42c3047ebdd6d1f

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