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

Uploaded Source

Built Distributions

solders-0.14.3-cp37-abi3-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.7+ Windows x86-64

solders-0.14.3-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.14.3-cp37-abi3-musllinux_1_2_i686.whl (6.4 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.14.3-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.14.3-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (7.8 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

solders-0.14.3-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.14.3-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.14.3-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.14.3-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.14.3-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (8.9 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.14.3.tar.gz.

File metadata

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

File hashes

Hashes for solders-0.14.3.tar.gz
Algorithm Hash digest
SHA256 d0c417e9ae95e83caeaee2526fd036870cce52eea2ea00e3a687183815db8ade
MD5 d0fe10ab4d9f57ce1c4490c656d9be1d
BLAKE2b-256 7f9514ae9cae4fadc48939a30b3134373bda93ce81eafdd630e9ed542a8336f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.3-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d17af9077e8ad759cd54ccea21a9722c70e34b9e600c6b8591e763f23476084d
MD5 5e4df4fc778711becc120330f879f85b
BLAKE2b-256 8056f74a23961b1cb9700aecd737b563ecc106b55ea1bea26f3a73ad2bcdabde

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.3-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0c7b898e2ec6d452bc26c05c5d6e1afe6df759cd072a430b8cf2d71944680ba9
MD5 94793bfb9cc822c48e84570e345726d0
BLAKE2b-256 f71d18ab17879e97dad71c16db56862d8ffc4161b01d0ab10f254c6ba38553bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.3-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 2bc7755d44ccb6f2ec8dac8cba2ef76fedc47f17314fec7fc7690ac0ee83fed3
MD5 35869e8ea70c204f598f92b61d21ae80
BLAKE2b-256 0c93cd7ab35fee950b8a9b682862fb5e2a20de298f412aa02c491ca9d1d99492

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6bb50e5910c92018012591a91ebc3241abc356fddde079ee5c4d2428aef4812b
MD5 318aaabc93efa88934c1c48b73771616
BLAKE2b-256 309ccdf9c9ec040c7eb4df53bbf35f6d33bbdbe6607bc63f51b8df79532c6535

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.3-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 140b5714344bc11b25aa6d9b116b6600a9139b02bcdcfa44704f9a8196b965a9
MD5 2291f827959e616c88a0e71355441db5
BLAKE2b-256 a4d92c8f1d43f850f8bd39027004f5b681da62718947e6ea1bbed70d57e40ca2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.3-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 9dc01a1f3af0744d3f7bb93b94cdcf8a07d72062ddce074663f8c2c0b3fa0529
MD5 b554ea2b7375ffc10c0c670e40d3a339
BLAKE2b-256 1bfb9b0161affd8f8c376c37be2619606920f330ef2abbe6713f2bf72506bdee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.3-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 92258dd5113dfac2a566ce642fcfb7d954eec1b1629a9ad1b81dbd68986486a0
MD5 5f6d6c0abc85049d8e984bda616e07bf
BLAKE2b-256 172f77bb08f92488081c4f9f7742eff02512788db57a073e1f7d9491c9baecaa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f4e7429d21b2fac079204b7d3b22a58edfc5d6c6a3dae3bd0f512cab008fe446
MD5 d34d3eb6cc97af9985b321bf2b0aeafb
BLAKE2b-256 d71810ff8dbf2f9a5eeb53e57560b4c47201965d095765a2774799cf48fad336

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.3-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 24c082efc5e5f1d3722242c90c96654149ef98ab02561cd7b83656b8807a4ea1
MD5 61614efef8452d5cf22599e53fb4c78a
BLAKE2b-256 2c53e4cf359d06a40541ea460874ca6ff7a882ebb2fa3bd1bea5bda2ac74783e

See more details on using hashes here.

File details

Details for the file solders-0.14.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.14.3-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 672c0d71d6e9f85d4744bee18083e8aaeb85a4d710a3a60b9ec273a080e77472
MD5 3786bbc8220d95f36d83ca25bf36d19f
BLAKE2b-256 b30bebe15dade1cd92b624703dc478b9924f3f2a7b52d3360d63e4534ad07866

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