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

Uploaded Source

Built Distributions

solders-0.5.1-cp37-abi3-win_amd64.whl (4.5 MB view details)

Uploaded CPython 3.7+ Windows x86-64

solders-0.5.1-cp37-abi3-musllinux_1_2_x86_64.whl (6.3 MB view details)

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

solders-0.5.1-cp37-abi3-musllinux_1_2_i686.whl (6.3 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.5.1-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.5.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (7.3 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

solders-0.5.1-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (7.9 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64

solders-0.5.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (6.0 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

solders-0.5.1-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.5.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (6.4 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

solders-0.5.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (9.1 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.5.1.tar.gz.

File metadata

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

File hashes

Hashes for solders-0.5.1.tar.gz
Algorithm Hash digest
SHA256 8154a44b9323eb7360238eee7c511e809c3225bf53c4ae26d374b266b7857050
MD5 1eedf400f5aa41b3ed06eae98d451bb5
BLAKE2b-256 0589f064195b666a3f5ce1b604da0af87c297ce59813dcbf1cd993f902004b0b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.1-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e0aaaa1e92355521b3ea460434c1746e37ec88e9b9cd71508d8d5caffbd7e9cd
MD5 1aaa41db22598112a960509cf988938b
BLAKE2b-256 29db479fea3c605c2628e95c7b1cc7d553c1029c110da2fa8e84f6ccd94a62e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.1-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ca9d6aab0d7806a14e219d29cb268625159f46567062f3f8858a10db7532bc4d
MD5 2a454b2f0e3390a5fde2508272666e31
BLAKE2b-256 9a0f3fa28ab138cb55b58418743636ea8cedfcb438f86299378bb0ad71e5a058

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.1-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 275ccf2de5ce1ac33643634ff073ceb7d1cd3d9d01416e5c309c55f7e47f462a
MD5 2d4ad4152ee1bb21bf846c2ad1984041
BLAKE2b-256 c150189e5f4242c6ffbc52ed3622786909f1a4526d990d3409fc6581896418b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c6ffc8f31c33510617a9c9dc6831733c525f9bc7b481ba29c797ca77c89e8f17
MD5 7b0880527208daf56cc7ede7d6872d71
BLAKE2b-256 e2aadaf93a76a524c1a5b870cf1aeaa499368869a44e4688fbac0a8cc490bd88

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 c0a0c070e18ef30790a5b8caf36795097ad2fdd2c683089e260f29b4475060e2
MD5 b77c2be84ad69af1ff1771999b761ad3
BLAKE2b-256 d563f8aeee7a3c5108decaccb46e66a4790334aca00f18d60d410c4ce1bc13b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.1-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 1a6fc35c502f4f80cecb487cb800f9e081446a443c336c623a7736e36034acdd
MD5 59485d57df7e845b3776475118d1cef0
BLAKE2b-256 9172763dfc5a19bb1413a2302f698d0c75475d56ba538d482113efc67edbbc01

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 8653ac9192dc4ed891450d629e187864331f5ecb795f54005befa79b5fc395cf
MD5 e144f45a89c58119a2ab69ba666fa688
BLAKE2b-256 df8fc02b24456d0f6b9cd14d08a3d6190a86206cb6d9dfa1be7c0c4c9ef36b6c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 68f2f8b117e88af9f2faf041f3618be2c59361f0118a74bb142c5e006010e8a3
MD5 285f4cd481cde8173b797e4d13182cf7
BLAKE2b-256 234b804d4a765d9c10c5c54faab50a8c845144068e40e870a963fcf3d63ad9bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 822368203c1b0bb6345afe134f9079dab5f19dc10862a9c9c7fb9cf018b57f94
MD5 d975130fef3c0c5b5ddc9ee6796b7c8b
BLAKE2b-256 43291704e71856314971512dffedb379dc059e9fd5d46b4834cdfeb49dcca116

See more details on using hashes here.

File details

Details for the file solders-0.5.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.5.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 738d0b7acb598006427bc9a8a181a8fa8e82b3ea9da10fd1ce3913b64ada199c
MD5 e7c8e0eb29626d2677af9d2c8518eda1
BLAKE2b-256 a5726379b692c2e71354b6c2ae6a1e5e265fd390749703faeffd498891376e3f

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