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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7+ Windows x86-64

solders-0.9.0-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.0-cp37-abi3-musllinux_1_2_i686.whl (6.6 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.9.0-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.0-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.0-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.0-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.0-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.0-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.0-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.0.tar.gz.

File metadata

  • Download URL: solders-0.9.0.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.0.tar.gz
Algorithm Hash digest
SHA256 c55f4ad17698887f08a470ff7bea1a84026175bc27c21d8270c33da0bdfb2455
MD5 db4dbb292de2365cfabde4105e4074d1
BLAKE2b-256 2a4d1252251fabb9c36b90be28111e73152e2a004ae2572af9f172debb51155d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 da1cf2ddb74b04b14d26645c3f8233d419e0356ec6b6dd24f5aa8d4a15275deb
MD5 1cd8a5d82bd5259aac1c16af22b5f681
BLAKE2b-256 de05180bf23e930b0dd7e085590a6691d68a08c536e1f085d212ba3fe3fe389d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 b3479e34d94eb86ae071c3fa2f534bdc99b8db77926b37c373bfc50285255a5f
MD5 220c90618e7b4f0faf2254a2a92f056f
BLAKE2b-256 bf5de2c8eb0bcd84ec831e8713436ee75257b1f84f9b750f224676d6d94a6ac6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 c2cf369c9b929cabc06b7a9d7c5610f4e6b7e7f6e6ec327d3e53662a04ac4545
MD5 562f4f702294f68c9017f49e323f2f7e
BLAKE2b-256 8c81ced9d3332ba92dde7e0a6761b3c889170d00c63971ce5c1e086ff36a96ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2e9e571d8a35b07fbb31fa8d123f38d819a6d11ad269c46528af3a3d3f1a7d54
MD5 b5edaf26bffea71563aac36199708cc2
BLAKE2b-256 321ec16697aefb51c0c4a3be8bb86601b9da14b67af9bde273b4283cc640c671

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 6ce16544e45449243f43758884971e28a31adbebca2ccbcae261a199f4d1115c
MD5 2bd3dea4b62a213cf0dac44ad01acdaa
BLAKE2b-256 3f1328fc51d78f790b0d873eb9c324b50293c7d5a4d99ac813743176abc0d763

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 ab345f3443f657f71277f6beaf70a435a36aaf71eafd4da987379affb4abfff8
MD5 16566195d8cedf363a25f69b062587bd
BLAKE2b-256 c27d4c78b596c39569d8d18a2dc7c9bcd42bf62898f77ea46d01619eade91a1b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 9cb3aa2b91ee8186f8f8df9264cdf7b8f64e71db9ff71c170059743ada01bd43
MD5 c88a0c7190a4d1c233034857cf29971f
BLAKE2b-256 fd70292be3531c8a4d97f614a5edb0da249817ec3bd81ada2007bb9d6066e6be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 99bf839119b16b2bb07944824fc5d08692a72d17534383410c6da903ac3d2f15
MD5 a999c901ff5b0b93a0c11dd61947b03b
BLAKE2b-256 ec836027a1bd681fe01e1b783605331c88fc3eccfcf9e01bf2faa13ad3ea613c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 16db66f9935231f50fd67e44cde1dabf06832487a3c6df7251eb28f13f22754e
MD5 d25a5898ac4089fa810262b25f160d36
BLAKE2b-256 51d58f8940723eefb1a7644b051fbf42aad8242cf75878743669234c6d6b91bf

See more details on using hashes here.

File details

Details for the file solders-0.9.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.9.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 885b41168d1ae98d57d089280be2366cfaf8fe8de675cfe04f99fc7df4871315
MD5 2305c168f4882c0f926d03792dd6063d
BLAKE2b-256 8d5c2e4afb03ccab6ffe2f7fe0b351de27bc376006ab5e275d362f1e7d810219

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