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

Uploaded Source

Built Distributions

solders-0.11.0-cp37-abi3-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.7+ Windows x86-64

solders-0.11.0-cp37-abi3-musllinux_1_2_x86_64.whl (6.2 MB view details)

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

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

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.11.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.0 MB view details)

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

solders-0.11.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (7.7 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

solders-0.11.0-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.11.0-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.11.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (5.9 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

solders-0.11.0-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.11.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (8.8 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.11.0.tar.gz.

File metadata

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

File hashes

Hashes for solders-0.11.0.tar.gz
Algorithm Hash digest
SHA256 414cdf5f14c17141da6038c0f0ce1afee9d460af9b5e94b6c4cb3dbb5094e87d
MD5 5aca2c8b0ba2eb4ab12cac7df765e163
BLAKE2b-256 2cfec0117e7ed2a2d7dd527a9630642fb02d824217517315f9e504f1725bbc48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.11.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0b82fc7a97f27d2875795cd038c0571e8f55477b3e0eebd5193d3044ee8826a6
MD5 bc47058b30dd6aad5b9e0b37a4d60133
BLAKE2b-256 54d59e7879aab8146b131e2784532e1f492e0b9b25ce043e596864c69ba1217e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.11.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f2797c0729a7ec31651a7b48a2dfb0b1fd96138daec193ac44acb93536e8a3be
MD5 574bf227f7acf1dcded0c856690e05d3
BLAKE2b-256 8bd94a69cb0b3e3777e5d0620eda01c757517926fba4a82e1b5b6d29b95a1519

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.11.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 da9430c8c5075e0a63ec6f69e6996e612784f9745e545fcaa785af3c0af7d759
MD5 24e41f83528b76b943f1287d29cc70c0
BLAKE2b-256 abb28121d68adb62b75a256dfd0ebb9c49c9572f7cc673dfb943e3d06338b965

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.11.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dad85d67e38979757e331ebb3497031952a1c2326c2566f9c3ad6daa8a14d8a2
MD5 567386af2b5446a20a89cc9929ce62cf
BLAKE2b-256 48dea202429f9840bb0cb2c98f4cd9b428726c859200dc21dccee8634885d975

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.11.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 2c9a129bfc325d3357214a446f2c6d019398b5ffc634f93707fb559d9f5cd3ed
MD5 a24735be4115facf2541653addf2aab6
BLAKE2b-256 0a794f83b67cd1feedee699d86ad01dcd144b936eda9b87987ce61e081954d3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.11.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 55b7b6c37ea9d59a04b3f72256115d1558dd842a66466542556080fac989d5e3
MD5 41b31de52ad4ba456a62f564d4a57f7d
BLAKE2b-256 95c02ceeca5396632aadb6ab36a2dce8dfc6941e971934e3b522687cd2a2c623

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.11.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 db2fce349a4a6c3b71b8e02b278866d3779c44d6ff5ca7dcda38cf077d207736
MD5 b29dbc05c3922707db9517cce6631bd7
BLAKE2b-256 54ba55e50c45c974e8fd01a34c69239a0b6caeef1f48aff0c5e8dee208348839

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.11.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 949ae711bc027614629587565da8a80f2bb595d84ee2ae340b8f0460a9144d8f
MD5 e86ffd5b7111af9f2526bc56d003f014
BLAKE2b-256 e44dd7fc3017259d53acae9080b75f81483caab937e6aef42cf45e338cd23e5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.11.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 12a62b6c57ebbceb9df8f6e74748ed7edc787c77aa4698862b6d6cfb2d435b56
MD5 5c87d5fd67d1f9ac30cd41f458de08c3
BLAKE2b-256 3643a4d5288aa8a80043543f71916897c33c7fbcb5ac3dee56ba67b519e5584c

See more details on using hashes here.

File details

Details for the file solders-0.11.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.11.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 aa74ba12a7c8a10993003428b767b3965d35c940f4ec52273238125c132e0ac4
MD5 d9189c487e983d4e1b578a6b1f8aeac6
BLAKE2b-256 d753aff97c37b4f4047a1bc791c2f5a5af8a3b571462ff0aefd3457d040d3fb6

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