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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7+ Windows x86-64

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

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.3.1-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.1-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.1-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.1-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.1-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.1-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.1-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

File details

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

File metadata

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

File hashes

Hashes for solders-0.3.1.tar.gz
Algorithm Hash digest
SHA256 99b8e518189ad0bae4ad3a8817c3b3dcf768a4b973c7238d4c8814c98d75daf6
MD5 bc9237ff5b748e512def1ee0637665c7
BLAKE2b-256 373acaf428e96361d151935d28b2fbe500203e9a92455f50001054cee9489b2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.3.1-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5605b7e4dd921552c5f80af3f439b4f2c609d477fc7442866d32c78fbe4398a5
MD5 d65a139b93fe277e6de0d38be597d54c
BLAKE2b-256 a910f043ad304af1a20a689108961ddcca4c170a9ce03ca268e597a18e0d7437

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.3.1-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e16cd4bd89fbbca60de40945d28f17349b27cfece54c123925bbdbade38cd97d
MD5 64c78b61abc43c035a3635f5cf3a0a35
BLAKE2b-256 c93ed727e3634df6a7cfa8810e4e5fae3840b7fa776e074924a9d2fcdbfc308d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.3.1-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 17e63993333a37f2443bde1fb07f2bf5699a43f5622c5dbb47b75e2b6d911e59
MD5 49880ff44a9e5408cd48ba6cc3bf72ce
BLAKE2b-256 11abac19b130c9f7b3d2e79fb5e47058a7c9410708dab969efb74d4f377aa45d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.3.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 92994bb92d28b199cb3dfb9d84519ae1082ea0027339764b147a3928270ad199
MD5 aeabfb105d41772901e70be8d0b6437c
BLAKE2b-256 56742b5b6abb349ee0ccce9248ccd612a1eacbaa97b79fdcb9bcd855f12d94ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.3.1-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 3ae1d15531a9fbdcf56604c72663d762644ccd4db37e637215c562bc9b1eb968
MD5 00fdac8970b752c854daa5aadf1c54d9
BLAKE2b-256 fe600f203ab148c1cedeb55bf3b90ad2bd531f9e930a93995b568762780121f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.3.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 d2baa6100d6b8dda68f9d2f79aa21010936d6adb1c2c92304798043b9011108b
MD5 06d26e6ef97f1fc1b3e6cd9339f2c370
BLAKE2b-256 fb3e8e4d8f4579710c128dca7817a6caf50e6c45b903e00740603de672f7448f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.3.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ceb70fcf12ef29201fb84f19028b397754388b58ec5cabef3397e07b4b76dbba
MD5 b5d22d5d3b31b6dafe4cf08eff1a3f76
BLAKE2b-256 eb0519e530b74140473b847e50fe45b3dfa251f285568178e891864d014f8b9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.3.1-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 013c63fe7b48d3ad18f511a1692d451c2aa55c669ae560377d32837a90ba9d0d
MD5 be312119a819ac18d9e11bb28039ec60
BLAKE2b-256 1f07f40cb4c4e61fb02227e4c9e5bb9de3f66174b625fbac43986659cae660a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.3.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 c15c1afea825e52bd5fadb034db5ce52a19a0484a791e539abe55a6defa4bdf3
MD5 7d6925a1af6ca824a4bc195725760ade
BLAKE2b-256 b8415e3b1ee2557e9f65b50696402f53b2952d174069f7ea692333e44272e42d

See more details on using hashes here.

File details

Details for the file solders-0.3.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.3.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 353178d462402b244c40bc4b9411bfb4a48feb64eb5363f68dcf38413ba3601c
MD5 df722aa779aea06c2da4647ebcb59576
BLAKE2b-256 a93af6cd27f59bc11d9f3a8811a30b817e3ac22145e4f59dcac1ef1f5e3d8899

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