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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7+ Windows x86-64

solders-0.12.0-cp37-abi3-musllinux_1_2_x86_64.whl (6.2 MB view details)

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

solders-0.12.0-cp37-abi3-musllinux_1_2_i686.whl (6.3 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.12.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.12.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (7.7 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

solders-0.12.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.12.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.12.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.12.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.12.0-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.12.0.tar.gz.

File metadata

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

File hashes

Hashes for solders-0.12.0.tar.gz
Algorithm Hash digest
SHA256 4f1f8a87d284e67e2ca1c65552adc3d788a1dcb1324e7b2b007d303c84e20509
MD5 22bdcbb96603dc81e2251ae3046d11b7
BLAKE2b-256 eb7a093612b80c121326831cd46b361d984568b049fa1a08cb1459bbefe600a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.12.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 7cd1fff58bb835c575610f671953cbd766e88218e67ffb27c772f5f54bf1bcae
MD5 2e743dfa52ea891920923dd91e5b66a2
BLAKE2b-256 5b12fb4418a7be87318a27abda6019ec526d8028f5f42e64a6cff8b05eb9cdb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.12.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 cec4f1798fd2dedd16e9221fc8c84dd61094c662b015b574ae2db2627292a5cf
MD5 ed20784af3c3162222f1a33d27bb5c61
BLAKE2b-256 2b99cd7d71131c9af86864a0347b5319dc4301571ac72a6b45c59420b0532328

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.12.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 cc18d1d6bf7b65c286bbe1e34b2d23439a2f2e223215281f25d77e3531cf449f
MD5 e2a45972c75372a8f26e425ae075d04e
BLAKE2b-256 e73781999bb7416b26f726786af11a17643100d6283ce51622afa0e815c80a29

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.12.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 45e549685c71901ccf72c24d6f08a61d46203e50e90934b23e239978595fffa2
MD5 f9179150e78b80b6d23f4df55eaae67a
BLAKE2b-256 a76a21ead24c26d1be7b04952704897b8c477d725fbab42f40f504551cfb4fb6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.12.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 137b75844550ddabb8e709e1d74e2804d3c94cd6a075deda4876eb50d1b00cc5
MD5 d019d4c20fb02227878ffbf56da94c97
BLAKE2b-256 4f9465e94583e7f7d399ac89b5f462b2c4f04fa0e10db0fc695feb9ea9692fd4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.12.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 a2b7bf4607dee7233cea0a9e3dbd8c2995a1dfd01072ecd6fe35c3b0973d0c18
MD5 6acd27eda590cece74b4f6db1036bc08
BLAKE2b-256 f3bf91cf2369c23c753a348fdac23f9f79d38cb1bc5dbd5d25f2314759cadd3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.12.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 741db220e32480de00f4bd1e7f6eaf459d2ae4610b71009a674d370b3b2d9375
MD5 58f90e711779cfc439a802cfc89ba75a
BLAKE2b-256 101bd9bc71830d676398a56353c767e2f95cf8ba635eb171c22ce9d38bdd7630

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.12.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 61a5023ae576d0cae09e53b7bfbdab08216c80cf541e3912752238bdd65e7c2c
MD5 f53cbec97f23cf0ee2b30960f682046b
BLAKE2b-256 00241e331cbc4102359caf916de54bcd7ea80487bcb0daee5e609f60b137da4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.12.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 6be13c19a739b17d026befc35e7fa96b2dab9c00c34795e6c107e842fbde06ca
MD5 6995640ab51e6ff9d08a76ff392d847b
BLAKE2b-256 36641963034a38576f44b6340382d2a4ba9fd5407d50825e9e8cda018af676f1

See more details on using hashes here.

File details

Details for the file solders-0.12.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.12.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 90ec909b616078f9e085d93040806245fe5468a94d758bd5f41d4597166715f7
MD5 47d51c6260e5a0717d8998b75cb0aa00
BLAKE2b-256 c411fe2adce17fdc6a8020ba51e04ccc08d42ccf98082725d2e8c7c4cf3e8747

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