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

Uploaded Source

Built Distributions

solders-0.3.0-cp37-abi3-win_amd64.whl (2.1 MB view details)

Uploaded CPython 3.7+ Windows x86-64

solders-0.3.0-cp37-abi3-musllinux_1_2_x86_64.whl (3.7 MB view details)

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

solders-0.3.0-cp37-abi3-musllinux_1_2_i686.whl (3.7 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.3.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (3.8 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

solders-0.3.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (3.9 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64

solders-0.3.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (3.5 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

solders-0.3.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.4 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

solders-0.3.0-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl (3.5 MB view details)

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

solders-0.3.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (3.6 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

solders-0.3.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (4.4 MB view details)

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

solders-0.3.0-cp37-abi3-macosx_10_7_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.7+ macOS 10.7+ x86-64

File details

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

File metadata

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

File hashes

Hashes for solders-0.3.0.tar.gz
Algorithm Hash digest
SHA256 0f4fb3b11bea840e3f1f7b9f957706e198c4d367a0027612f54c59da7a3c03d7
MD5 5add0d6b26391d074184ad2bb6ee9aaf
BLAKE2b-256 07ba768a299c4a0d3421728826cd32c7d64648d70683a5943cdd6b7f374bd6ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.3.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5dff605472bd747310b4651f8ca72fdc42aba2b633833911a566f89bed608999
MD5 989f54600982565c8ec550cbee7a16ba
BLAKE2b-256 e3e8686992e20356c29e799bf5fd6f78d7e4853e73a345a6317c5045a4881899

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.3.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9e10c59623af2b3c1a493aefa7114595f05881639db5556112c4d2426ac3ba33
MD5 4d4b3ccbf79624a349056d7489c957b3
BLAKE2b-256 bd25fc5af65d1ceba7909fce0699ae4ef04049b319c59edb7a232f66e5afacfd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.3.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 7dd19f9d065bad129ac7abc008eb106599b281f8450dead323e34da404b0f0e8
MD5 a55374d8e12b076474f3b18ecf7ba5cd
BLAKE2b-256 e6b03ffe30893fdc1a79d42edea335aef82bcf93f4da0a61361fe813fece27bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.3.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 d199fc8773649dab7d54d6fbebc46944b2950658103a8a463fd2c30abae45bdd
MD5 1bfe3ae01d816efe440ddba1f92d7459
BLAKE2b-256 4679c7dbdeca5c84ae3cc81cedb6260a147c699ea861455f55a8c3abf4b0a756

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.3.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 42c63fbf391701fa71b069015751a10fc72b2e45e27e00aeff05f9f138512cf3
MD5 39f773a9f640d75a4b2975a40aac41e0
BLAKE2b-256 3c0db61607fb37f06c1fa457635e06035ef59d8981a4e3e6ac3660efdf159c28

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.3.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 8f91def5d281039b2f97564c90803724d2bb639e87fe76e5ad4f0992cbc104a8
MD5 0e3f5f2840d783c419a3cd7aa157ecc4
BLAKE2b-256 0a73704087fd9f22894308dc50793e51647c82f12622ea91001edc4125e15f6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.3.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ea96c477f8bd3d007ab5cde3792d677fc51d0d12ec3e4b85cacbf9cc5d587e02
MD5 4554c1f170e1f9200dfcca3aac11ffa5
BLAKE2b-256 077530405eedfae6350ce149112bed746f8b36075d731267e0cab5027bc77221

See more details on using hashes here.

File details

Details for the file solders-0.3.0-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for solders-0.3.0-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f2bb051b8de266293b911223c3c0eee9fd0db6b6c2eaabdb6eb7e069128f0667
MD5 4f5dd0ca024c51cd1d0c493bd6542254
BLAKE2b-256 efa1782607d11db8fda69c6c75b9dca253019641764dcae291623695a8260869

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.3.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 0fd6e36d3d4cc494cda170f254ea57b7ee6712af9c63f630264ee608e735e31c
MD5 7cf4bef41ea5d62f878b8ded38996974
BLAKE2b-256 28ccc8dcdc5686f990b54bc9b78c8bd70d0b43a3d05ee7d4aaf8292be99230cf

See more details on using hashes here.

File details

Details for the file solders-0.3.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.3.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8f95763c2f7fd2d198de13e605aca24b15d639b9539714a4f900dc7e2da42a90
MD5 98d46149472b2e72828c84aa036ac830
BLAKE2b-256 dc3bff279f16a5b35aca97decd1315cd5a751b54dd05643cff0ad32430026e38

See more details on using hashes here.

File details

Details for the file solders-0.3.0-cp37-abi3-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for solders-0.3.0-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 aa57db196b1f8352529c88b7339abae591f6385fdb4a0188856b3e1ef3298f14
MD5 b9b7467f925889296af5fa4b838a31d7
BLAKE2b-256 fd46cb3bd015b95c21b8a805e36e0aea5b7bf3ae000205aaa08747f981241a6d

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