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

Uploaded Source

Built Distributions

solders-0.1.1-cp37-abi3-win_amd64.whl (501.8 kB view details)

Uploaded CPython 3.7+ Windows x86-64

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

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.1.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-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.1-cp37-abi3-macosx_10_7_x86_64.whl (650.0 kB view details)

Uploaded CPython 3.7+ macOS 10.7+ x86-64

File details

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

File metadata

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

File hashes

Hashes for solders-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bbc3e7710dc24d6a1329c9fbb96328a7b7ebb4a2e061e1be5710b543be014664
MD5 32e513dcee435e815c8677fc246fcefc
BLAKE2b-256 7e86e2c166f80c6887e3d3bd94ee9fee27555d4d67961533cec2ece29ddec9b9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for solders-0.1.1-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2234d7e027e6bf2132038fa8693a7872a33b8540172cea1446a9f7f121e04d90
MD5 83a9d36043f4ee2f58cb91f4cfe1d98c
BLAKE2b-256 6cae93f9c11e3f34148f8d87f85d8bc3ae3e1a62865ac00729640acbaadae208

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.1-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 90e35516e44d4cc09a5c378589e1551e25e8cb2af7b4b97a3c215913b53063fc
MD5 0b0d6748fa8228185c12d52abe81753a
BLAKE2b-256 4bda0165a6878521bf62efebfd9c4db2a769d517d095e37bbdfa38f060591ebd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.1-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 42c8b8fb084717ba80ae46f780ca702d96b897ee9f70db50a9c57c1b33830d36
MD5 e17878e7f05a4a3f2d2e3b5b3829366c
BLAKE2b-256 4472cdf8f8bd073c78ae5bfae1b3b767dbe5437a94a86e8ddefb1388adf04b77

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 a8e78c71b935511ba9d906f71a4cb659c30212c9463dc395ed80032b9854f530
MD5 2c13924c5a7469c8901b2994f1d609f2
BLAKE2b-256 e54fea7b874fb1fa0dfd67cc6e6e4088a1724273d7769f33ed28f19d9d1a4abe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.1-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 42b41c7b4ed4d25794294380039550aa78bfb10665fab935f64e06abef67e26a
MD5 20962ffe93d5a340f3689d48417d72fe
BLAKE2b-256 f98cc70c1e9505eb2a815023d5aa63f6f178096ee5419a8fd6996de336bccee3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.1-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 5054f2e4e04bf171ccccb607197d68bdbe7f847ceff13dc8b92c76756510fd07
MD5 d9dd8d7259c3ca64a4240099b10dd27b
BLAKE2b-256 788cce6480e45cd241fb5477545213f772c53f519a85701599f8d147ba282c16

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 4aea02e39c9919343f8a526a3753c6ba4d1eb8047f3bc697acc44d421e5ee594
MD5 0f895164c114df1b7644c1e0ccfd1d35
BLAKE2b-256 7ced26457a81139b8410bf0b313aae87c2ff4e354635e856592557d7ff29e736

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8425ec4bc031fb059e6099d79151f2191753a22ca5488a5b3b711f5ccaecf878
MD5 64b4826cd0c97dc121992447df222345
BLAKE2b-256 448f4602cef1e02b6789022be04ca2d2a3d9cba62d0ff384d1568bd8d4055987

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.1-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 fe8d51cdb02551d4e936ec8381ee5920cb416a159113d58a7676a6052d64ae4b
MD5 dc5a2bc55d2ef5ed5f88acc99d1c647b
BLAKE2b-256 06aa0467dfdf2bf8c8b17bb133589b660f19c950851bc00418cf630e3dadd83c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.1-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 dbd356ec1e0fceed1f07a7db691b58369c368175dd3d98facddb2880e3c7a918
MD5 4a5d2936096ff88f8763c27558c45230
BLAKE2b-256 57e7d4bb464676589f4f7d624415bd25f659e7076206148d846d4ccc6977293c

See more details on using hashes here.

File details

Details for the file solders-0.1.1-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.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9fca4944591e7609fc34b55c153796602533a0a98e925b00609c9a0301338eca
MD5 65a067929ae47ebbe10e035c6ed52cd2
BLAKE2b-256 faede554ac89289746129297ae2566edb1d0ab107f1a285a9436fa76162de73a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.1-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 74aa5a509ea9689186b74284ebc0c4a81bb0e6448fff4c3a19ad6a900a825376
MD5 e2dfc2ec701d45750376f9234d6917fb
BLAKE2b-256 d760b3cfdf56297f1ad31ac5d74c4a2e1c9e77f38c77653f21be3916046df38d

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