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

Uploaded Source

Built Distributions

solders-0.9.2-cp37-abi3-win_amd64.whl (4.7 MB view details)

Uploaded CPython 3.7+ Windows x86-64

solders-0.9.2-cp37-abi3-musllinux_1_2_x86_64.whl (6.5 MB view details)

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

solders-0.9.2-cp37-abi3-musllinux_1_2_i686.whl (6.6 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.9.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB view details)

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

solders-0.9.2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (7.6 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

solders-0.9.2-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (8.2 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64

solders-0.9.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (6.3 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

solders-0.9.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (6.2 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

solders-0.9.2-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (6.7 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

solders-0.9.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (9.5 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.9.2.tar.gz.

File metadata

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

File hashes

Hashes for solders-0.9.2.tar.gz
Algorithm Hash digest
SHA256 635e55f26508688dab828a599de096af5001391628ec5d00d08bacddf195579a
MD5 53f63384b74a9a5984019f738ea59baa
BLAKE2b-256 caf9fa1942c8620dd0e805a48a37549e22b2276710f8ecc126474a76b274012f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.2-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 aa993f7d500b314e8289fd827cb6e20f98feae511915e727d55a40bcb66c3dc3
MD5 b98e9f7ef622733cdeefaba298eabe3f
BLAKE2b-256 c3b94ab024521d3f790196a6d4ca41699b2b61e95ba95afbfebf8c2a29d9ab66

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.2-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9d229f405ecd2e4daf1d367069187d9babf736504e3b1a8139c2fcc14bcec297
MD5 f7888cd49b02c426b111e5e3b4811486
BLAKE2b-256 20e457e84726a0c1ac7d6892198eb24264b8991250fc4ec355ccbc80d032a2c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.2-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 3087bf55bf374af92dafbb764843ad2ceffa32c33baacfc9b211ec6855ec43b0
MD5 a4ba0be54deae5949bda89e7c4435b45
BLAKE2b-256 94a673f3f83a4b9d8ad24420f1e01308594e9fec72f36ab936ac97fe3777949e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 21f10b7192d28c790514157fe0650d3030f9b7d4441750fc959e69a5ac314179
MD5 3d754a849c203c4ba0881ef037a795ff
BLAKE2b-256 9066736255dacb13ba8bef9c0aa5143c198eca34a387e30244793a92ee04a525

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 0b6c2c6b33105b0a39c24c2165d6d15342f0a9ffeff47b31f0754ec5b907ef82
MD5 15b9d16e8444df617a8071fce6fd6ce7
BLAKE2b-256 495e3120cb0094c4f12e45a5539226cd9de0631ce47b4c15d86343778c511abb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.2-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 6e1693bff4020132759de6b84157cd33ac056bfe441416a74ce9b7d7d0cac052
MD5 84859b4b7dfdfe6ab69584ec4c041910
BLAKE2b-256 98bf42ce1279dedfe250293769f83b4d23260410ede1fa234e8e641181484c6e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 0c636d4a579ec90e4c3bc126981bcfb8d4f28e5ea829ba33c0a60250aa1c8908
MD5 56709fd393cdeef90a7689e0166b6d06
BLAKE2b-256 8f0106b0486d6fb21ee575a9905c3684f32a1032d680577d77fa8e0e6589a122

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b46231047b0ba18dc03b6be9277958c643bacaaceb822cc327a653608722c787
MD5 ca13bf221f7a704f56e92ed97b851e1d
BLAKE2b-256 84a4bbc76d010dfa860b20df4665dbbdbf43a829dab443c413db6ffd18ec2880

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.2-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 a22a60ef0acb63af04d1d2f28fed51b4479a355127dd1057953c36c039e0d696
MD5 0eafc89687f045eb040e9181f2777c25
BLAKE2b-256 f638e6c3776cfaac767f5a71b849560059aa70bb7dfd64eaa88063bb59741259

See more details on using hashes here.

File details

Details for the file solders-0.9.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.9.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 900dac8f4d4e6d3446cf53bda49628d4dd60832eaf4ffa67d592f5b5c56e8e65
MD5 d15566d92730c68f7062c1c86c1ad307
BLAKE2b-256 dc1f9238f97e7da1d022165bd750949bd8a8aee5bf1838f9af517f309c3de16c

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