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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7+ Windows x86-64

solders-0.9.3-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.3-cp37-abi3-musllinux_1_2_i686.whl (6.5 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.9.3-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.3-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.3-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.3-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (6.2 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

solders-0.9.3-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.3-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (6.6 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

solders-0.9.3-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (9.4 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.3.tar.gz.

File metadata

  • Download URL: solders-0.9.3.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.3.tar.gz
Algorithm Hash digest
SHA256 57256b65c280a2958163f07ba2720bcbd902a9981f2047130013a7616c14aa06
MD5 97b7b95c8c113998845fbad997c0b18b
BLAKE2b-256 b70364846714c27720feaed177a01b5b96c6744de000aba7d8917c829cf7ce90

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.3-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e27b89a826baeb4f41e0b102cf82e990bdb3c26574b6e67a03904db94c7454f9
MD5 b3df3c2d91af8201d38349bef6720f75
BLAKE2b-256 0ae515ff578f01c43d6180d8d99d76b0a4a5ab983fa003fe469c3632f98ddff0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.3-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0b3086be4573b3feda57d9e4136d9bdc946f397b5daa47eae0f3dffafc884dd9
MD5 74300bd6997af8a5041d26ccac58751a
BLAKE2b-256 91dbe9ce3ae013d087038b37e04e96851268b365df0e644a1cfc43e8dd12c8ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.3-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 2690270a814819a640f6d19bd991e5d635165f3b93b3a20c3e1740e1cb2aac64
MD5 f424121cc5bf11ab60d30c86e00ed874
BLAKE2b-256 60940808be37a043772f9bb72f2ab4f371c3b2d58d81481754a32b666184ef38

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ea552336c4301279176bf5b8c6179b12e2a1c0a70f33e158a39d9786a01649f5
MD5 b694bac3f882b89d34abdf33dd82c522
BLAKE2b-256 f0e626871559d0fd38d834d423e106b8fb5a9098f4ea63d82705ec94beaeaeb9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.3-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 15fe2726323e9ada4a5a11319e03c8f3ee422ba3425f42914038e9012e66af21
MD5 6d9513368b5495a109506c206b3b1779
BLAKE2b-256 cd828fcb16e6b936301eb41f29c272e614ed223ee4e5e9a967377f8c9e316c92

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.3-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 c52a7e2a6eb8b8425cea3f13b4bae6635375cf33f4cce021777d654b4a463610
MD5 3eb60eece29b1bbef147088006a0dcf5
BLAKE2b-256 f9bbd09c6adc904d07f6e364dc5b3e4b97a2748ad74c42337752472db17faf91

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.3-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 3cdd8891d39cf8b0435fc6ccde5cf48ad2c5b64f21fe8796ed1746253983617a
MD5 26b56ddb646009cad55bb711890512e3
BLAKE2b-256 255de68c267471a2983d3224ae9b9577260d6cb6391f0b7c351cf1bda39e3ff8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 adaa41a57ec542010440dd10c0169e028683345eef4636ca93ed3427d4c43749
MD5 d1cd2c4c4d68b6e07a2766f59f0f76dc
BLAKE2b-256 19c88c5fbb9a7633461a75a354f6ec696fbd0ae05166e0f569ca7a8435bd7487

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.9.3-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 abcb74d8e7c62d578421c7f2ed4a41a0c1cd74280ccb84af0e2ceac1a8f49120
MD5 82107403dd58563c2572ee60519c8da7
BLAKE2b-256 cfe61cfbb9c12329a9be28ee528112704156fdbb920aaf7fb308cfea24ca6127

See more details on using hashes here.

File details

Details for the file solders-0.9.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.9.3-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3c7549ffce686116da030beb3150bd3516f9ed87339fde412af8dc308cbdc939
MD5 4ac7527bcd7b54c4f6aaefa1aae79ce1
BLAKE2b-256 4683678e063f7352f9d9f1f8e2b878efd9ab2da91af6ba58e65916d3b606c27c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page