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

Uploaded Source

Built Distributions

solders-0.14.4-cp37-abi3-win_amd64.whl (4.2 MB view details)

Uploaded CPython 3.7+ Windows x86-64

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

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.14.4-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.4-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.14.4-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (6.7 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64

solders-0.14.4-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.4-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.14.4-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.4-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.4.tar.gz.

File metadata

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

File hashes

Hashes for solders-0.14.4.tar.gz
Algorithm Hash digest
SHA256 a1e02900d3e254eadf924f97fb3bfc20b29dbd23f1cedf67cc0aafc37d02d292
MD5 55eb8e783ce45c2c7f351c348805ed9b
BLAKE2b-256 838bebac4c478a40aee2560cd9194f530c4c19c3492f4c4f84fed8f4a42eeb2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.4-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6c96a6cb9c57289f655b83bd6f5406595845efac033016fdf4d64a4fb940276c
MD5 149b350c3e305f6a1eac640726037dbb
BLAKE2b-256 93151f7aecd6b8ce4cd5e91bbd7db2c62d18488d037dad85b7a4d0b05a58585b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.4-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 dd2ae632b65d8e34ae2ebb7b02476a92a6b9c4c26750869084dd17930f9840b5
MD5 2f50ee63e472aad8fd16267e76f6b571
BLAKE2b-256 339c8d70fec5a71084313cf3f7b5211fd5228cc6f818236475ca67b0f97b126c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.4-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 c5d695f1de1142a38df5372598dfdcb5e40d513b7e370c4985f7de30cfdb9a5f
MD5 e4946b2a8213b667042995c0b62e8ee1
BLAKE2b-256 e22934a4ccf6c2847a694b084778aa072a858584b31f51419431d6631247eb0f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7fee58ed337546139779e9ff55d8c8aecde9be9d8017c8720a032a376b8c1f8a
MD5 dfaa44ed0d584bf99e02edd470952a04
BLAKE2b-256 1bef2df4e82bc3058cef2139cef7ddc15776459557b6c410d72fcfc79987f4d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.4-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 aa73891956e27aeae946a1117061a5dc73dea7629222f0391170e4fdc2c420cb
MD5 41aa705255fc183b0db089639475587d
BLAKE2b-256 b12e6b04feb1b83201b10c5749cda018b04a90b8a8049dd6c3af3f467439c28b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.4-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 39895eea96086154afd345cc95ae30d80ce7cac3efe4e79d14267277b6201b25
MD5 c5d7e0acb298634ab96a1c21d120369f
BLAKE2b-256 d9a913da006a01a65cc8450df2efacd517b2607f660f27f5f95a8912fbf4e4be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.4-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 70dc45a92d167ad87417273132c7b207687b7b17007dcbfba716682941b1573c
MD5 40cfeec0b7db32fea095310558279b4d
BLAKE2b-256 e7fcd6a7ba5be566bc630c71e796738c8e00ad0a4bacff9d394438226e7c159b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.4-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5d0b40248ea97960e9de7046994dd51aefb9f9c28b53ed82b07f64bc61177140
MD5 f73361cf628d1314895697568778ec7c
BLAKE2b-256 1a6664b95c0febe0c298c41b8ca64ad3c9a15b7a04f1386e85e380cd9e3686ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.14.4-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 26e44723352914723fd6ee45037339347282659e2d7db36c8a32d22d001af6a8
MD5 520b14ac8f5cfe9fd0d3d5411e59ad5f
BLAKE2b-256 b4c9c99035956a6730641a3437a5fa5e24e9104431ca09ece721b63be299224e

See more details on using hashes here.

File details

Details for the file solders-0.14.4-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.4-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b46980420df7cf33d009666c675885071d53b9f05789cf8bf23b1cb6efc8a64c
MD5 1c408480290a50a61f16824f9cbb255a
BLAKE2b-256 749427092f631934d8007bfdb8f82113306a698e369c10c3c900e5ae47b66353

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