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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7+ Windows x86-64

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

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.14.0-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.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (7.8 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

solders-0.14.0-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.0-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.0-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.0-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.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (9.0 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.0.tar.gz.

File metadata

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

File hashes

Hashes for solders-0.14.0.tar.gz
Algorithm Hash digest
SHA256 4aaf483816f1cf59e226bdbf48fca6a9355a45efebbcb62cdf0737aa9728c779
MD5 6bf516f8276aaf2b3f0d10f067d6c05d
BLAKE2b-256 da050cd7ac1dd30b2b777b68b23643133d47e2c6fcb27bd4a365126d98a8cd8d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0dfa41d65ca419c8c203a51b673ac134bf861e94e426177fb8ceae2158e95edb
MD5 11d61ab19bcdf810536b24c39a734f86
BLAKE2b-256 27db15af00c708887625c59635fadded17494110a27ead4d63769c8e7b4960a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 7fbb95272fbb0f9590405a8c087bbf34960e2f3d3e221e6d54fd84f989af0214
MD5 787ff2794c78f924058df418b29fd413
BLAKE2b-256 ffdc3267dbe6be14e8d14996ca4016c4b68e843f37c28f42a9fd5ceabceba1da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 0f9440e375582ca6bbc2611a20aff79c1d1552b8f58f0f6a6ba9d84fbc6d31ca
MD5 796ac7253e03e12a98682a6f84287447
BLAKE2b-256 7b23f237a9b84d79a9f27923539f3ef8ca6d4003462229c81a187e02ed16f43b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 502d1a2ce162f78a017ccbdc623e77d4746cfa7e6613f3a041aa0922a73dd6a4
MD5 90fe51be31f9745847cdc192e2abb9e8
BLAKE2b-256 8c2bf00490a7b14358be667ed9dca5e86294a2fb46e81c28f16aaa2c7582939d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 8e3b6ccc527b795fc37dc0dcfe724ee7cbfc8660a02d04159b797be05d4be54d
MD5 8dee16ae6af9fa9df7c3a32ca4c5d045
BLAKE2b-256 4c0e2a302a8ccfb01de6880257891dfe6ca225d8cce9127bb4ee1a8aca7803d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 387b1dd70c6d61036254e14fa5513c66f847173de983e1a275bd435c51d271c7
MD5 2971ad49374b614279e117aa18077c91
BLAKE2b-256 9d7c07be75ee682889a8e242bfe192510a31572206029b0c901b36809d1784ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 2cbf6c569eac915b6610cc0cabe141857e316e2920ba68fa9b4b3ca403c82de0
MD5 fad9e8d6d67aae1e3ea08e8fb9ddb21f
BLAKE2b-256 6469ec8ad3a1623743686f1c0ae11119d665abcbff272e78a3eae329614572a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 fd61be4ab076488c8f4a0b563fdc519204a3a978d2b585f97dbfd2897cf0a5ff
MD5 c4f0ba7fb9d355a9edca80dd1b036a5e
BLAKE2b-256 9ad610087503e112cf4cf61d8edd28cca2a2e839e85786d998eab0e4aafd35c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 cc20b0957d9441d4c70efad86f2a917548a52579ebac99b9bd06fcbf13e3b476
MD5 b8728ac0b2872a1cad6090197ec7da83
BLAKE2b-256 959f1f28ff3df51aaff35f6f35ecf5828e473e5cd5a0db784b5f57374abe8e0e

See more details on using hashes here.

File details

Details for the file solders-0.14.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.14.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 6fa15a8e0d70afefcee3a1a6ec102f0bba6ef057dd146e08741847a5392bea7a
MD5 6ff896cd8b1336427aff6af506cb508e
BLAKE2b-256 2fd2cdcd156a5d75bf6e752f912b266d4ab77925146ad7783628d17bd6cfc850

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