{"library":"solders","title":"Solders","type":"library","description":"Solders is a high-performance Python toolkit for Solana, providing robust solutions for core SDK functionalities like keypairs, pubkeys, transaction signing and serialization, and RPC request/response parsing. It serves as a Python binding to the Solana Rust SDK, aiming to avoid reimplementing Solana logic in pure Python. While `solana-py` handles network interaction and SPL token clients, `solders` focuses on low-level primitives and offers a `litesvm` module for faster integration testing. The library is actively maintained with frequent updates, with the current version being 0.27.1.","language":"python","status":"active","last_verified":"Fri May 15","install":{"commands":["pip install solders"],"cli":null},"imports":["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","from solana.rpc.api import Client"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":"https://github.com/kevinheavey/solders","docs":"https://kevinheavey.github.io/solders/","changelog":"https://github.com/kevinheavey/solders/blob/main/CHANGELOG.md","pypi":"https://pypi.org/project/solders/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"from solders.message import Message\nfrom solders.keypair import Keypair\nfrom solders.instruction import Instruction\nfrom solders.hash import Hash\nfrom solders.transaction import Transaction\nfrom solders.pubkey import Pubkey\n\n# Generate a new keypair for the payer (replace with a real keypair in production)\npayer = Keypair()\n\n# Define a program ID and some arbitrary instruction data\nprogram_id = Pubkey.new_unique() # Using new_unique for a placeholder program ID\narbitrary_instruction_data = bytes([1, 2, 3])\naccounts = [] # For a simple instruction, no accounts might be needed\n\n# Create an instruction\ninstruction = Instruction(program_id, arbitrary_instruction_data, accounts)\n\n# Create a message from the instruction and payer's public key\nmessage = Message([instruction], payer.pubkey())\n\n# Replace with a real blockhash from an RPC call in a real application\n# For demonstration, we use a default hash.\nblockhash = Hash.default() \n\n# Create a transaction\ntx = Transaction([payer], message, blockhash)\n\n# In a real application, you would sign and send the transaction:\n# from solana.rpc.api import Client\n# rpc_client = Client(\"https://api.devnet.solana.com\") # Example RPC URL\n# # For this example, we won't actually send the transaction.\n# # signature = rpc_client.send_transaction(tx).value\n# # print(f\"Transaction sent: {signature}\")\n\nprint(\"Transaction created successfully (not sent in this example).\")\nprint(f\"Payer Public Key: {payer.pubkey()}\")\nprint(f\"Transaction Message: {message}\")\nprint(f\"Transaction: {tx}\")","lang":"python","description":"This quickstart demonstrates how to create a basic Solana transaction using `solders` primitives. It generates a keypair, defines an instruction, constructs a message, and finally builds a transaction. Note that `solders` focuses on data structures and cryptography; network interaction (like sending the transaction) is typically handled by `solana-py`.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-15","installed_version":"0.27.1","pypi_latest":"0.27.1","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":2,"avg_import_s":0.07,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"solders","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.06,"mem_mb":3.7,"disk_size":"41.0M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"solders","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.9,"import_time_s":0.04,"mem_mb":3.7,"disk_size":"58M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"solders","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.1,"mem_mb":3.9,"disk_size":"42.9M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"solders","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2,"import_time_s":0.09,"mem_mb":3.9,"disk_size":"60M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"solders","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.1,"mem_mb":3.9,"disk_size":"34.8M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"solders","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.8,"import_time_s":0.09,"mem_mb":3.9,"disk_size":"51M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"solders","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.08,"mem_mb":3.7,"disk_size":"34.5M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"solders","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.8,"import_time_s":0.09,"mem_mb":3.6,"disk_size":"51M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"solders","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.05,"mem_mb":3.7,"disk_size":"40.5M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"solders","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.3,"import_time_s":0.05,"mem_mb":3.7,"disk_size":"57M"}]}}