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

Uploaded Source

Built Distributions

solders-0.7.0-cp37-abi3-win_amd64.whl (4.6 MB view details)

Uploaded CPython 3.7+ Windows x86-64

solders-0.7.0-cp37-abi3-musllinux_1_2_x86_64.whl (6.4 MB view details)

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

solders-0.7.0-cp37-abi3-musllinux_1_2_i686.whl (6.4 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.7.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.2 MB view details)

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

solders-0.7.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (7.4 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

solders-0.7.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (8.0 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64

solders-0.7.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (6.1 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

solders-0.7.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (6.0 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

solders-0.7.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (6.5 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

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

File metadata

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

File hashes

Hashes for solders-0.7.0.tar.gz
Algorithm Hash digest
SHA256 bac9048ffddbfccc25ba1928219dad37098dee36648132def5308c74c8f829b5
MD5 e13ad617c737d1d4a83579d0cbfa44b3
BLAKE2b-256 9d498ba9b74c1ab99c24c4953ed6127803fff5060b4f81cd010bfc61b0d88af3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.7.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 944a9b59110fcb8177b20b51760d8f2ae69667ae788a1e5507402727275416f7
MD5 59bacf73e361ae6be06893d1257cad30
BLAKE2b-256 1c5798617ff4cca28906e70d5c68c1ad39a31ee04fd63f1134b8af4526ac6ba3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.7.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 76fbb4d939ac7b0368c7f082b360add70b672581b9b8a0ad627003c9b866cbc5
MD5 8421667741ff8a135727b6c254e5dba6
BLAKE2b-256 04ecd832567dbab5803a078a4b360249fbf21b212138723d50af456bd7c6eeb5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.7.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 595bceba2b030c2a811c8d000dd4b27f15154b754522fd73635c85ce5d7f794a
MD5 b383f7177bf93565f08b4d4b81429c5b
BLAKE2b-256 3c99782dd152c0a65b9b50a1632e283b8c80690a5aaaafaefb57472b5bdeca80

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.7.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 973188465c2851b845b3c7911f724a3882db9d37057f664f6d01a73cdca3ecfb
MD5 2bf76ad5a45a71a5fbd94057653b71a3
BLAKE2b-256 fa0e0932fed023001b04430a5e1eabde03c2e57517e0a6951b23e6162d038120

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.7.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 5edc208fb0212e97343b5ed299a559d4cb2d06f2234046f3345eccf5a8315ce3
MD5 e1b7812c06d36f001d642edd1d428335
BLAKE2b-256 97eea65bc37bbe42ef3b7f89845830ace2ff2a1ffb6b3fe0e54e0a377e52089a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.7.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 572ad2f1ce36c0fa21cb06fc0d43a7725e2ad4a0b58a2377a797c5b03f21db57
MD5 4badbd086287df2721a85a84f09b1f7f
BLAKE2b-256 9083a8407ddd4204542883e1b3410dae1aa7d339728d3bc48ba8713272cd28b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.7.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 e8ed979b6822c6b3c514f09435e0756644628b75ab4631eca07d0a38c7f7b87a
MD5 f0a6bf34d2e1ba4abbde907a3f3c0dfc
BLAKE2b-256 2e1c4dfbb4fec284717960ba64ddc75a96a2bf1e74caa027d8087f8ed39acc01

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.7.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4c0d14fb8a700014c2ff2ed2563adc8bfd47d11cd629e9d49c3ecc8aabfd2b37
MD5 94fd9c77c505038cd964abf3bd5d3533
BLAKE2b-256 a4773f9a5fb94e27f8143a2b8ffcc534bd4d49294386b779e1b396ae9947e3b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.7.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 f917197db21ae79802e93caf7eb500bfc3aa3158e87bf3182e58b20e1f968e25
MD5 687f91029ef5ec713eef46a740c1bb97
BLAKE2b-256 9dda07c5de1ada354c8822e556ec66911d379eacec0d1ffcd41dbb792d702fdd

See more details on using hashes here.

File details

Details for the file solders-0.7.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.7.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b6d8e5eefce7c15abf390e1d5fcc9314f4a7a2df66bd6f131f01eb57991398b2
MD5 d5efde5b83a12d09338a918fbcafacdf
BLAKE2b-256 1d44d5c8ef9a1525b5968e4f5dbb7ad421cd60e05bf670d77952effd88469360

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