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

Uploaded Source

Built Distributions

solders-0.1.2-cp37-abi3-win_amd64.whl (504.7 kB view details)

Uploaded CPython 3.7+ Windows x86-64

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

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.1.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-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.2-cp37-abi3-macosx_10_7_x86_64.whl (650.1 kB view details)

Uploaded CPython 3.7+ macOS 10.7+ x86-64

File details

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

File metadata

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

File hashes

Hashes for solders-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d6c603d4653234b7ebb5e3a21e427a98dfd2c559f6c3117696ea2223cc83a116
MD5 64af56b83075cff8d6b41fc446d6d177
BLAKE2b-256 f6dcba1a21c38838dbc7e6bc84742fe04f84f1bf0e7c8b91b8f9d362fbc5c43e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: solders-0.1.2-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 504.7 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.2-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 8251dee3f055cc52add933f9e50aa85709c49dce0167dff248307527781a2dc2
MD5 6d25e22ab4a573cd7c21c890228e4933
BLAKE2b-256 3a72e1fb888ec1f01d24b607a7226d07cce68731a54c7fe831ba47477128af75

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.2-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 35f07838667639d5566082a83b957ed93f7b3aca4565987861c6bc84aa19a196
MD5 34b8a9b04ab4e2f52c9f9360ad3b57dc
BLAKE2b-256 167a95678ff9574d9bbf2600523e59cf283c5eae6fd1cf37ea1fa458cb0f1f85

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.2-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 86a628d660a6a77dbd8cd2a7ffffcaaf713f70a3485f1fba5ae55c8b548630b0
MD5 7b720533a4aa5d645139efa4bdb6c8bd
BLAKE2b-256 ee29812d415f74fa78480870cc31eca96d71568ac59b166a36eba08909d8cc25

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 d809c2ffc4cc54d2583a3bd827fa296822248a69976e8b7ff1f9c3bace1054ab
MD5 24e475271c58df84e7439b9e6867fce7
BLAKE2b-256 af9ab6a649a431d44efced383894a250bc9d50099cf896aa0683c0da5885da01

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.2-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 dc88e8631f4584462d08e46f7a390b1e9c9cea6fa87b068f8eb16455ec483c46
MD5 9f43ba420b081d251eedd5c841444d99
BLAKE2b-256 c40e89da53f4afebb25a5a921053039c6cd2b3ca305c96718e5a4b2a98de5c3b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.2-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 fa9df7c2af4d16c312d7f20dc49930a7f1cdf1637d1e7a2fe80efaed1a97f080
MD5 545acb9922705b644768586e4ff09442
BLAKE2b-256 6baf4f1f5764703cabc0f725b62e6fea8840e82f4ac50eb0bb14293ae5ede63c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 272ed46d8d5c513adb4df56dcfdaab20a3a7d104e56cee13dc1fd0f65cbc00b4
MD5 a5c91c0c408945ffdc3e3270ec43b034
BLAKE2b-256 5e93dd3bb9d821b845ce63a6b4b2f2e44d66117cf65f74d7f17d26f4b0c70758

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8659ab66abfa9087dce18ab7297e77283368a0f541fea527683e5f627101009c
MD5 1eab814851ecc1fb7e7046450270bba1
BLAKE2b-256 a9ae783bda72ab8fb42bb3d1b17b64a7aa43eab81c93088cb760a7f7f6ec8f65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.2-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9e16055572ceb18f6842ccb3964cefd49509fc792f6992ed2e4a5775e0a84593
MD5 ebe05fab7f4d6252d26c47fc9a40e180
BLAKE2b-256 bf4bc88def7eac9b1ce4de7492847ef8de9af25796d6a98d72af212c18e3804a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.2-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 30b4882ab20f9592362d496a0029942728ae0d86c486570bc8726c336d172a48
MD5 5581de43c262506048cd0d13b1a3c24b
BLAKE2b-256 c8b9ce54055042cf8372ea0946cc72f03972d0e6bfc1a744be87a9cf981d6076

See more details on using hashes here.

File details

Details for the file solders-0.1.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.1.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 fedfee0ac278b8cbfce7343b30b65af6f9c20b1096d91a6a52b211079a216f52
MD5 cf6b36018f0bfac0d4634d71d5615182
BLAKE2b-256 5cb1456b02bfd6784fd9df3488284d107a4f638804aecc952d1a30102cb020f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.2-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 b53303f0b3bb25a63efcfe0c29594801cf940395e7598ae827493c1eac71960b
MD5 f314c14bb1ca0e0f5ef7fc3d58922576
BLAKE2b-256 7ea0a6a74867e9cfabf1223d5c68c8b30f7e94e009b2774f16e37ffb21a0ce1c

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