Skip to main content

Python binding to the Solana Rust SDK

Project description

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

Uploaded Source

Built Distributions

solders-0.1.0-cp37-abi3-win_amd64.whl (501.1 kB view details)

Uploaded CPython 3.7+ Windows x86-64

solders-0.1.0-cp37-abi3-musllinux_1_2_x86_64.whl (1.7 MB view details)

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

solders-0.1.0-cp37-abi3-musllinux_1_2_i686.whl (1.7 MB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

solders-0.1.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.7 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

solders-0.1.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.7 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64le

solders-0.1.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (1.7 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64

solders-0.1.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.5 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

solders-0.1.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.5 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

solders-0.1.0-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.5 MB view details)

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

solders-0.1.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (1.6 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

solders-0.1.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (1.2 MB view details)

Uploaded CPython 3.7+ macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

solders-0.1.0-cp37-abi3-macosx_10_7_x86_64.whl (649.5 kB view details)

Uploaded CPython 3.7+ macOS 10.7+ x86-64

File details

Details for the file solders-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for solders-0.1.0.tar.gz
Algorithm Hash digest
SHA256 368eeb3cff112efdb567ac4756db035a7232ca3375d2659fe9d2ccdfcb9dc1c9
MD5 8aca0cb6b709ee42c75490d19ed0baf5
BLAKE2b-256 7bb5e8f475083d9676037fc28dc1abf6017b37f7cd0eb8a664740d8b65b9bef9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: solders-0.1.0-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 501.1 kB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.12.17

File hashes

Hashes for solders-0.1.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d1253d5c8ea13bc9fe40ef605b294f795fccd5ca6181f6ff05f45a7b6fa8639b
MD5 d907fa3c664568070ea29f591f85df83
BLAKE2b-256 e208ac465c995ef238532c417685008a7f37fd14b9a48736d828414b6a3824ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 daf2aae242637dd06d4410ebc1fd7d246bad8a4fd7fdb8a047062f4f84640b8e
MD5 e23a405269109779be2483f0ad12e520
BLAKE2b-256 6b2689a9206967047081ae594a57adaa3d508ac081e3766e3490a5a9ccb0e8da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 02bfeb0a8db684f3020e2daea335fc7a831d33efff9caafe3218c0c4469fdb26
MD5 154e7c28cb3217804248ccb898116cde
BLAKE2b-256 5632088fb92b0fdb73fcae70fb850cefb43734aa5e4e86e03976980934d1f53d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 4daf400bfebf5ffcaa65a77dad89c55dbfd83086371daebae3608a286a1f3e10
MD5 e180c9c742ef1920f403a245953434a0
BLAKE2b-256 9c16b0c0f617707e9e71ee085edc43a82986b7b8d0430135afe9655b58e72b9f

See more details on using hashes here.

File details

Details for the file solders-0.1.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for solders-0.1.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 42e621a43bd224245a1d6d9a4d152e3b98b65245aff97265ba54185b2b9bcbb4
MD5 462fdb0c11abf67494010db69b3bb9fd
BLAKE2b-256 355defc19df77bec3c2a67e77ed988fab560c5cf88bd3cb7d7bcbc68023b4c4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 5097f93f2731155b575702f10481169728ab162e2fb0c659e994d24ebf7f4f03
MD5 5a981b75ab72df8c82c980d248e2c1b2
BLAKE2b-256 d049a2f8dbd9904eb9e5ca351537dc0b67af3c51ac646cd58bebd3135ed493ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 2199506090e81e73c12bf26a791051bf43efb5c43f6413ed13d063e2c383d5d8
MD5 1f65c062b52196937e6e863a196d26c4
BLAKE2b-256 870da5c33682cebccf4c625be0959ee5fb5dcbc3e83937a0a72edb7e5812cd3e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8c103574493b1842d29a35958308e1755efc766ef760e43bfe07ec18836bfe0e
MD5 7c22a9eb002c2459c8e8fc874b3f13b9
BLAKE2b-256 622ae56d800f4168e26e9c597cbd68815022bb779b1a910ee914514390c1f51a

See more details on using hashes here.

File details

Details for the file solders-0.1.0-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for solders-0.1.0-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 d41c9fc873ec943fb96277ef63916b0a12fd0458f6c5bdd0d02ecb2023679ca5
MD5 526b7b3b30a0589cb64ffe0733a0f1a5
BLAKE2b-256 1ec1f78cf08c6a8efac5f56693c4f17968dce49f96c92954556af551f3b35673

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solders-0.1.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 544868ba414a144395aedfafc3bedcaf1e4f821b564d99fceb9fb7fe049bf3ba
MD5 2b6ee00a8eceab7974bb6fe15d5ceaa1
BLAKE2b-256 4ab9dfdba97ba561cf950cd21fb3f3920bb6689e39b900f355c755dcb797218b

See more details on using hashes here.

File details

Details for the file solders-0.1.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.1.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 a5e4624688d80f840190a20ea3759edc02230c22c515bcd3b8c594182c3547d8
MD5 49e75a2f156e03b83c62df2b5fc94ce4
BLAKE2b-256 74c5b248d1ed34dc961456333001d8c87863cbc0c58eb5b7c9632fcd6b0e2426

See more details on using hashes here.

File details

Details for the file solders-0.1.0-cp37-abi3-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for solders-0.1.0-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 f2382072a63a6c495c7f9857fed821fedae207b204744384b3f1c2dafb335750
MD5 2fd3c45f913c4cf46818ab3e805fe8fd
BLAKE2b-256 2f8ff23d9d3869914923064b7041659470bb880f4f90a5f51e6001c425526a80

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