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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7+ Windows x86-64

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

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.4.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view details)

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

solders-0.4.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (3.9 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

solders-0.4.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (4.0 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64

solders-0.4.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.4.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.5 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

solders-0.4.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (3.7 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

solders-0.4.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (4.6 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.4.0.tar.gz.

File metadata

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

File hashes

Hashes for solders-0.4.0.tar.gz
Algorithm Hash digest
SHA256 c7cf9dc77a373429ba919f5f83553b2c12ab95dea2670e4218c2b8ae59b09e90
MD5 04ae107b1de5050d8515bf1719a79786
BLAKE2b-256 add750fbfdaed25d4d3dc830e9ef2c5b52827db350d846e2e5afdffc5f4feeaf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.4.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 1a50c702cc36dcee3ef34b1fa14b20ac1bbfef48002511e5350095e3ba3f5518
MD5 cabbeed3d190c9f534889bd09d36a2f8
BLAKE2b-256 82f57f0cddfdf62237f308fa70ac65fc3a09f9fb00dabefccc785018f2b1c0c1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.4.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 094cb3aa2b054048f52041aad692fe2e480fcdf54ec21c3fea3a208a530ad437
MD5 59a057a7a0a3cf17cbbf8b367b8451d0
BLAKE2b-256 5fb71c4fa1186c21c19621c9b25e9b8ccbfa5e2dfe4d0363888970a06c5d08e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.4.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 4569869331cb464dab4c983614a714f40c6f7799398f348d081ec31ab7d05ac5
MD5 f78b33e28bacacd4217a706d9ca96c2a
BLAKE2b-256 5acf8b3e6126734eaf76a78191f4d5f05bfca97b6b0c3d3d05feb0bd719ad6a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.4.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a1733d0a5ffef2b13a68aecc91bcff8c4a84dedd3b1f50688aedc42c66d2cf0f
MD5 041d0ec4ed957329b8367b4e079a696c
BLAKE2b-256 765628aba57f9684658b2631776f125d8a062816fc9a59293133cf77f397c1f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.4.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 245fc1e92012fe9ecbf51ad1aa5c349a47b2e2471b881128d6a3fa425b315a42
MD5 eb476df6a4289faf46766ce44f66913b
BLAKE2b-256 f3474b8e114ec49a205f7d5cf1942cdff9fbd82759b117be314c3f7a4d1aedcc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.4.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 c65898dc0708731c00628e4e1d3ad2bd3a15c45c813637fec1bed29c9cf9ae11
MD5 cdd2eaf2517e988dbc9f242c2993ca9f
BLAKE2b-256 9e83f06f6eb68311c072b3fd4cfae0d52480401ee810895f86680aeade00a240

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.4.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 b8c7518beb4b71e629c20fb35e6950eb918ebbb2492240da6ec2ab074e6c90b9
MD5 7b33e48fe305b458f04c68442d226f36
BLAKE2b-256 614e029848cd989745834dc1815055f8e7d808c115f85c4ca5575386c0e4440e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.4.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3cda82ad70277a385555a90fb8c69cbcb227602fa40614e20e4408d565d2e741
MD5 febdca88dd0ca8ebe2367077655230b2
BLAKE2b-256 e0760c9498618dfa4f5fbb81aaccad43e299c7ec0df388d95e30fdd819128aec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.4.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 061777deec30403452cc93a753616f34458b18c2725e2e54ae8aa1f67b7beaf9
MD5 45ab8a0cb1d4a32ed45b8f8e1877463b
BLAKE2b-256 ea1916e91b9a9ce8536081936bd7dcb9f60d6fa36063a68f6b448374872d7256

See more details on using hashes here.

File details

Details for the file solders-0.4.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.4.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 83423b67268d30880cb908dad34be75cdcaee0cc5b5b07e60295b464ea05488d
MD5 7014f85c0cf9d4f0ff6dd1f6edcd8b78
BLAKE2b-256 6996e4704193f7bb2ea5ce899ab10dd108b6baa9dddc6a2777ca29023461f03b

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