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

Uploaded Source

Built Distributions

solders-0.1.3-cp37-abi3-win_amd64.whl (504.6 kB view details)

Uploaded CPython 3.7+ Windows x86-64

solders-0.1.3-cp37-abi3-musllinux_1_2_x86_64.whl (1.7 MB view details)

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

solders-0.1.3-cp37-abi3-musllinux_1_2_i686.whl (1.7 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.1.3-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.7 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

solders-0.1.3-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.7 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64le

solders-0.1.3-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (1.7 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64

solders-0.1.3-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.5 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

solders-0.1.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

solders-0.1.3-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.5 MB view details)

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

solders-0.1.3-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (1.6 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

solders-0.1.3-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (1.2 MB view details)

Uploaded CPython 3.7+ macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

solders-0.1.3-cp37-abi3-macosx_10_7_x86_64.whl (650.4 kB view details)

Uploaded CPython 3.7+ macOS 10.7+ x86-64

File details

Details for the file solders-0.1.3.tar.gz.

File metadata

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

File hashes

Hashes for solders-0.1.3.tar.gz
Algorithm Hash digest
SHA256 83a0673265a421377f0cc8044d6cd0c671144fa88bc60efdc3eea39f97285cdb
MD5 e2cadbd0425002c8fe0e2a4dfa7e5024
BLAKE2b-256 298ca1bc802296c6a76b7cc9f36d47b1d67fce47b1045ed4ee5b840c58e07319

See more details on using hashes here.

File details

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

File metadata

  • Download URL: solders-0.1.3-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 504.6 kB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.12.18

File hashes

Hashes for solders-0.1.3-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0c15b8abaa03e6c78ae366c184bd07979cfb7aa6c1c378f4e2ec6b2574f98994
MD5 fa8b315e0d3951d540fb999bc2a71c28
BLAKE2b-256 38703062e3076291095655ef9c1da0e4a0271abcac022dfa8b1c8c6107c0b44d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.3-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cbbcf14beee68ffa84a240bcaa028528edb9eb59b0f82c96c66b201709faeb5e
MD5 a7af5e4f64b5fa7edec672ee16cfcc62
BLAKE2b-256 b47cf3bc6c65b1922fc72f64ab0ef999c4cca83ad0959e51557bc74d9c278b4b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.3-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 64ed81e2939103cf3c3cf74e1b285e9905e1133379aff502b6f1922df4e24230
MD5 c51eb19135292bf7f0920a72be863020
BLAKE2b-256 412e7b241acf63e86dc5bf8385ca8a43f19585adc043521f20b0727f6d42a4a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.3-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 bd57dade538f581d3d7ecb2e3025291bc68d7427c1512e0ea5533676d1f2ea96
MD5 b05fc411f2534e3ef1113983f6f215c4
BLAKE2b-256 a57a0625c2f2caf2362bb4b0554aa8abe1e07cdda5c615838a582f3166506919

See more details on using hashes here.

File details

Details for the file solders-0.1.3-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for solders-0.1.3-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 a31ec35f10319ba37e3cd7acad5334bdc742ab94846a42280631403879be478c
MD5 307327eef0a224a0f99a980e45dbbccf
BLAKE2b-256 807e1157149901e9489cc43f3c3ad964f640702fe587d22e8c0cc7a9adb2b857

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.3-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 0e525b8e6caf1a70cee06b9d2e311c826d2ef4ef112ddb763e8fac1ec4cb6110
MD5 1856e96d993e6789330a76407e759a8a
BLAKE2b-256 c16562c6260b9bf48f605560c640b08fb9c564e12e8f94ea7b4271ed5763f5ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.3-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 f7ac5f289e305e9144d5efe9fdce9cba6bff24c59a765539fe239ed2cf246337
MD5 ce52407d0a37e8b3c7614eb727d3f24a
BLAKE2b-256 b5dcee28cfd6f90f66160c138e9f0308f866758d689b97f2779be718f377e1ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8c78e802caaf531bd5ee7c07f817fcc18263e11867693b24d09ca127dccf90c1
MD5 87c989d17cf99ad2ddf531f081a5213c
BLAKE2b-256 e83ae3a0a4b0c045260ac4ad4acd6377579824e1a1b36df7e2341f283f8c09df

See more details on using hashes here.

File details

Details for the file solders-0.1.3-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for solders-0.1.3-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 e4a7b68312dec3464daddc851920a8e4a849276a1fa5bfb38e9d3339f7682ff0
MD5 d6e7affda82d26609f266cd7d53bde3d
BLAKE2b-256 6313411aa02da576abe8a99401c2f7ec47c630a7d01273969c6092bfd4ff964b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.3-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 6dfd6f8c8e1fb4c9900b69b42fec2c90dfefb22e84b1cf249708752e6345034a
MD5 d1665ef93d1858f2630df8390e571964
BLAKE2b-256 380092f84245295425de20a9d7ac6bbe24d77f7aa6651affd173bd6fcc170357

See more details on using hashes here.

File details

Details for the file solders-0.1.3-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for solders-0.1.3-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 cb9b0fec0c564a7734198e810f2d0688e175be71c246bff5562b13a7bf0b5a5c
MD5 cfd54e42c221a807c36a46feae64b7cb
BLAKE2b-256 aae6eb7b193ece85879605844e798812dc48fe2997877a9b9030109f189e1a32

See more details on using hashes here.

File details

Details for the file solders-0.1.3-cp37-abi3-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for solders-0.1.3-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 97fcc0e9db4044a2a61fc9afaed828d60ec64cb55a839104cc09745c9bcfa5fc
MD5 b6c310557664c2f7f522a201757cd1a1
BLAKE2b-256 bcd9f8471e6fa4ad0026d39c7cfe93706bfc32a35e3184462284dbf8a04ba6fc

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