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

Uploaded Source

Built Distributions

solders-0.9.1-cp37-abi3-win_amd64.whl (4.7 MB view details)

Uploaded CPython 3.7+ Windows x86-64

solders-0.9.1-cp37-abi3-musllinux_1_2_x86_64.whl (6.6 MB view details)

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

solders-0.9.1-cp37-abi3-musllinux_1_2_i686.whl (6.6 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.9.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

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

solders-0.9.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (7.6 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

solders-0.9.1-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (8.2 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64

solders-0.9.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (6.3 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

solders-0.9.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (6.2 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

solders-0.9.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (6.7 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

solders-0.9.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (9.5 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.9.1.tar.gz.

File metadata

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

File hashes

Hashes for solders-0.9.1.tar.gz
Algorithm Hash digest
SHA256 9f14b1af7db68066520cdedefef553163b10a7faee90242f7f98b986ef1de5a2
MD5 5218f11d2114d27e277d099e9bab3c95
BLAKE2b-256 b82b8dec4e7cbc202e725bd9c6deecc8b8f7626b79d5c06171607b1b04374ebd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.1-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a488af1c70e87b9faf3ee3292339c3cc5d0c686abf71711dbb381248189989c7
MD5 1c7542a48895bf0407ecceb1ab7de329
BLAKE2b-256 aa2921d6adaf83707948579ebda0bb9449a2c148d3e12f4a4c82e05b97802715

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.1-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 38961e211bce49480941409d4ef497177285758bc2d253f06a81d9147eb86f13
MD5 fd4fb4c8caabec1361d2ca4d70692cd6
BLAKE2b-256 5cd7b146f217ec6ef4d68379a287bfbc3981bb1f079f71f49f449678d0ac8cdb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.1-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 d84d8baef8e01504a706ac309b2db7888748d9ecf206683657f49a230515f99b
MD5 f6a66cac444bb8c686d20b1ca23a4ff2
BLAKE2b-256 e96001d1a6ebacc4cc24db5ab5aa2de34cb09542471c19704f2e44962d640917

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0b6c1c35bc8d099a98700869404177680ab9ba424e24a9dbe6d0bc7427cc2f87
MD5 5d1554bd199dacb3b8916784a8d82911
BLAKE2b-256 bc63d6241bee07c63ff59c7b46e11c4f4611a0a468d4d78e57491c20915fc89f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 7dbe8906cd14a101c5172a71ee03b1907605f221d3b7c65cb75db3ee72eee85a
MD5 6aa55adab1f745209dabfd0671e881a6
BLAKE2b-256 9c0fd9cbd13d87f497a21b993449da1fc1611be6c6fe8a587f82031333f9cee7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.1-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 aa40601d606c15c12416659f5a86d6425ea09c7f8d7362322d911163da976adf
MD5 22fd0318447e8db6e4efac926175582a
BLAKE2b-256 732f6ebc39e55b9344a97c786ad8c1be25a389443ed7aadf1f2ddc35cdd95cfe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 7b720e294ce4b30b0f3af31961e25b4b474fdba0fefd914a7b6245a0737328bd
MD5 cccb8439c7f557cb7d56340e905a5adb
BLAKE2b-256 a50b6ac6ebcd09abe6dbee7cef560a376742cce07b074e89b0920c45ff4e3529

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cc0dda5abd3a991e84c896fb298b35bd99437e40ab3f6a2f42fd86d7fb1553c5
MD5 61f13a1e3e146098ac6c30476ac1a541
BLAKE2b-256 98d0e0fce143815c038b08b93180be287509fc71027dd4f929fdac3cfe51ee20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 b8be42975aaed6dc7151416058b2b51ab40a9b720570e5c43b1b841d9bea5e01
MD5 e8bb9256cb283db0b6d7a19d7a1773db
BLAKE2b-256 e5d1c4de0c7310bfe0117e41b7fc872eefdfa3a668f70cd40bf3a3cdd7902a41

See more details on using hashes here.

File details

Details for the file solders-0.9.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.9.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 aeabf697a247db751167905627e34eae1d654d03257d43093531a599c93ca6e5
MD5 e8d3f135b652e172328916d1a1bf201b
BLAKE2b-256 629056244f451f233e6782174f9714a2296cd39e6eeebb4b5598b16ea56e3668

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