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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7+ Windows x86-64

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

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.14.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.1 MB view details)

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

solders-0.14.1-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.14.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.14.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.14.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.14.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.14.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (8.9 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.14.1.tar.gz.

File metadata

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

File hashes

Hashes for solders-0.14.1.tar.gz
Algorithm Hash digest
SHA256 c17d6c7bf914716a125413c79b272807a7696015f95286ed11a53c8d9148ca67
MD5 06332112a90cc6fb9644f3e3ef51381a
BLAKE2b-256 6197974ab5fa8f4d91f6172994aec3f2361bf2850bf67f6f6f99aed6373f4013

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.1-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 bab96129f72c9880989c4c57d5940d77a34dfe809340c5ffe2e1c8210c239363
MD5 e9fe4f46391bcc3536377c88e522452e
BLAKE2b-256 de35da2c43bfdb92b0d629103a9739151e903c9401665bf65de89428ed1f9805

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.1-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 50e7599b527a465784c7ae89e6a5dbbefdf26e131969d88835f00dabb0c9eaca
MD5 b69138a466a6d917440529c1f56ee00d
BLAKE2b-256 6c0717fd9729ee41b2e6d37befb972646ca290ffffa9f6d207f348354ee94e26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.1-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 84d8f7b070784e688d9ecb62fe702059f9cb4e779a05ba80415d19ded5c4f52b
MD5 caff584742a8b41b2e50cf710d2a1d9f
BLAKE2b-256 e2901eec5dac521f06b0d7b73cba1a2f2d6cb1016eb3a86364b5d2d70244cc20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5c8341d6faef630d3361569201289ccf481e7c4ae50eb02eb4ff5d1bf3ec5675
MD5 3ce58a1d4f0d79a4a08579104e0fff21
BLAKE2b-256 86d3352a30f97b4ebfcc5d11346f1e8925bbae9a54dda48aa90375e4c16e71b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 bb9c14f411311014e469fb506ceb162c039cd11bebbb520395aa6123b211569d
MD5 3af02f263d4d868db80e7f008add834b
BLAKE2b-256 7f3cd29351ab8cd865f9174ee3d838fe76f33289111bccbd3e52e402bc49feff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.1-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 84216d2ecfc1c2bf489f97f88686797826159388e30eef983b925784209100a3
MD5 e265464dde65b6b6bb341983c1bea6d1
BLAKE2b-256 d194f4e0aa84d0e04f27732ccc3c8442f4d06bc548dc0637b6db75a0d817b41a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 4a7207eb2337d775d45aeba73f9b8401cba4c102f108ef5911b365dbff5f8fdc
MD5 dba002efb2d9ab793e18a73ad6fb24c3
BLAKE2b-256 c319b50118ab4b9c5d7b68996f8d2995c6b6aeff126dcc0c31fe8b899db49ac0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cac64fcf5c630ab38075f638d8792074ab98a863d10048fd97d15fe9e3fc5a7e
MD5 b826cc76c7da7dbb5d83eaf81aab9c5a
BLAKE2b-256 be9b649d68a858fdce65d795aa7384aed3ae6cd9bd11a63db48418fc06ee7bea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 dd108a1751dd8fbbcf784876ef5cdfd8ba320377a9c2cc3cf00bcdb761aacabd
MD5 7e286413fa183d48c8bccfc3dcba437d
BLAKE2b-256 2885dd82d8df358edcf1ca2dd1ee2261e88eb333975fd1ff846d227424ea371f

See more details on using hashes here.

File details

Details for the file solders-0.14.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.14.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 457b71eabe0cbda94c0855c5fef2a134a35a6f32312cef6a2f6adc5cf78147b8
MD5 19ad8efbe4943e34feb70ab0c2336632
BLAKE2b-256 fa4feb686071c9cabf24e9e1509c23795c08ec8dd68d595de02648ba2acdecd6

See more details on using hashes here.

Supported by

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