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

Uploaded Source

Built Distributions

solders-0.5.0-cp37-abi3-win_amd64.whl (4.5 MB view details)

Uploaded CPython 3.7+ Windows x86-64

solders-0.5.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.5.0-cp37-abi3-musllinux_1_2_i686.whl (6.3 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.5.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.5.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (7.3 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

solders-0.5.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (7.9 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64

solders-0.5.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.5.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (5.9 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

solders-0.5.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (6.4 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

solders-0.5.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (9.1 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.5.0.tar.gz.

File metadata

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

File hashes

Hashes for solders-0.5.0.tar.gz
Algorithm Hash digest
SHA256 de5f1662ea29d6b1afcb146f669e08db608bfff64292165a6e5cca76c03c4abf
MD5 7a59eece4a01597eaed10b420f9230df
BLAKE2b-256 39d5825787fee07f2f71101212da2d5098c6c55231c5e1de395e15c96d735b20

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 ee1225d335d334db24694eee0ed54ebf7e4535112e9c4341753a8e84f7da3b64
MD5 818f55c80957d36b2e2439a7172a0108
BLAKE2b-256 293c0e6371749336d12e60c1fd3e80cd4904f39e49d968763663b7e12aa70d58

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 fe3ec4c2cd1f1d7a918551775e631f15056065a6c289d80fbef5f196bf1694f1
MD5 351832097726e47c7fb369d751fd26df
BLAKE2b-256 1e46e3c11b6f6a813afd4a1f505452a67518eec753c68f285bcd72d246c11b6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 f77e93ed528fed23318cb06af01ff3fee34642aa5b953f512383ec64a775812b
MD5 88427771508fe621c078c85015e47ff4
BLAKE2b-256 31637b4a3b4541c1d8334e977c3cff23c4b0345c6e507a79fd3e60fb13a9c2ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 49c807c1b28d8ed3d6665f87eb492e5c5a86f1664e4fb02fe243d7603d6035bc
MD5 c5ae2ec8ef00af78eaac13b1c41667cc
BLAKE2b-256 8541c859c72001947a374e72276fb8847163b7c040a8dc3b68fd31feac298985

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 62f7db71ee09f47858782d9316530401aa2868f1ddf4510ad41db30c15640508
MD5 994f4ac5551954daaeba3b0438492097
BLAKE2b-256 25d6908b0860c496a5591dd6a12d0121d6a82ba67779981cbdafe19f9a9f1238

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 c8e5ec59e01716d04b88a9a70240d3dab5de06d92ff4b2d996b0bc8b09629f03
MD5 2f0273423540dea8e802a9e2d815ae0b
BLAKE2b-256 de934a04b25205dc531d2a1045d8a8c2b50820e7dfbe07df554ece346ff28b69

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 f7b6f53b1cb6630ea76509de90358914d149777912e5af3217cefac470d3f5c0
MD5 8808164e0abbb3f58d265175b89203eb
BLAKE2b-256 4313e003d04a0d283e65d0001e8d6a0bbf9e40895d212a8dacd756af5c02100a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 53cd6bac4d5aa747ea754fa093d5bf06b5516cb5c4453a6139440e6e7fa928eb
MD5 a9a999fc5901f2a09aae3df58e8bbd74
BLAKE2b-256 7034840d0f7dda6ca8603a9b52a3f7dd2f13310e39eac54daef4e23afda8c64d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.5.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 2b9f10764bf19285de2f9481f6316f409fd53d0d029359c976241edf4815f15b
MD5 8a749eb184cc54ec00ea74ee10b9f4ae
BLAKE2b-256 58f6be532615edf567074c849badd38a56a4aecd855fa6e9fb3fe34be58dee4c

See more details on using hashes here.

File details

Details for the file solders-0.5.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.5.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ba2640783396ed1ce93f3a991ee2d5be90f3c32315f5196c31089362d9dae730
MD5 3b9e94e079b9759347467059818015e7
BLAKE2b-256 a9035dee288bd86516feecf819bab365485d5f74b508d63fbe71298ee778ed3f

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