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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7+ Windows x86-64

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

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.14.2-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.2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (7.7 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

solders-0.14.2-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.2-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.2-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.2-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.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (8.9 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.2.tar.gz.

File metadata

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

File hashes

Hashes for solders-0.14.2.tar.gz
Algorithm Hash digest
SHA256 713d67b679d233bd0700327818e3f1f33e6340421aecf5648be65556e45cdea1
MD5 89be12b0c9cd304d74ec4caabd861ec3
BLAKE2b-256 41d49b5235239e0bc33448c42bfd3e04a41bb0fb42a73a15804c35646ad41063

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.2-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3405baa01d3a27fa5be2523c512a486b056068913267f72296cf20eaa6f4d52a
MD5 bc338cc0149e5f7a29e198095bc4dc02
BLAKE2b-256 7d0e40f1f3b5e0d93ae77d6f04fda0b8c78980669ceb289ba60ab2297b9197f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.2-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2973bb8aaeaf332a1110264fb31ba5669ccc59aa8cc60e8a0fea8a234458e3fd
MD5 523e0974a057e892899128d874d2e114
BLAKE2b-256 c2127a76b53efd5f6a1aa0b1bf26eb87a7abf76f2177c6cff5f90d0d6970f3ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.2-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 7e4fe209752e3d177018d98c178137d70db9fc5ca8041cf5ee5fbdf762b30963
MD5 a8443b1bdf866a2bf3c8204ddaa227f6
BLAKE2b-256 a7430430ba6debe77389e1164ee7ff61177be2090804af2ce6a8fe556ec8b2f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 33468e93000df418cb7bfcfaca46163cf3fce584c7969ec80604bbb619660173
MD5 beec3be72e9da48b92c5d3751584b405
BLAKE2b-256 b2f0f16dc1ad22baa03f4dec25bd71b3c0ec2ff24aa65fa57e89169cca79aaef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 2e2cf6c1a40eda73f9e25795b5c836934d4dfc9b9135eb6a091f8273bc12e2f3
MD5 2ff71c7e9ea40d9db9915cf5a8f3594b
BLAKE2b-256 4c577f0cd7ae26e9c644c1272d2f64cadb3f82ef859f7e5843a4446f22be9db4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.2-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 a83cd4a08bb66ecd46f34f21b5aca2f4b757ae082fee626b3e8281f00e2221ed
MD5 7c1166c4363b91d689bd02ae80b0c8a1
BLAKE2b-256 1ed4a17e5646b64769501d3fe7dc962e600a6f80155b8d068b48945437efc499

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 30a50fcbb98619673953107e75ef98e7fe702df7194a338fe6a6748248780585
MD5 e55b04d36b1f8da3f724d6062a6dfc0b
BLAKE2b-256 590f576f01bddab340010a9e4e035c1f0d6da7bfc2d9ce1037a094d12adac77b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 aa47a64915c5c167de68a9e7ac06336dbb3107d952d8cfadaa9cdb19a8e8d24d
MD5 7ba5bddee970e9a3f4de3cc469f45277
BLAKE2b-256 ad9b9558fc4e0ebfd5f77da46e186946fa0ff84b15e644dec2322490c6df8b08

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.2-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 83fa2e7c3cbae8b2d64ba091cc947d2f07108b891796dbc29f4119f4b047fdd8
MD5 b73ff986bfc4056f0d982aedae0756fd
BLAKE2b-256 36d7011b727fd087da72b7d757706c5cc24758a11b1f72c1977f7cd0fca2a955

See more details on using hashes here.

File details

Details for the file solders-0.14.2-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.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1fd382f4055d895bb0f7c6e362c70b409e551f8a465494f6b3354d0b05c70c7e
MD5 d6dd8c6607ce2735d3bb08e7a6a73b92
BLAKE2b-256 64c64f06addb4f8209ba74d7f26984332bd957f64580deb2cc80ee54e563f823

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page