Skip to main content

Program-agnostic Solana IDL transaction decoder and SDK

Project description

checkpoint-sdk

Solana SDK for:

  • Real-time transaction decoding via Anchor IDL
  • Program-agnostic decoding
  • Batch RPC fetching
  • Wallet utilities
  • etc.

Wallet Manager is beta!!!

Install

pip install checkpoint-sdk

Example usage

from checkpoint_sdk import Decoder
# from checkpoint_sdk.decoder import Decoder  # also works

PROGRAM_ID = "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"

decoder = Decoder([PROGRAM_ID])

result = decoder.decode("vdt/007m", PROGRAM_ID)  # Example b64 data

print(result)

If the built-in IDL auto-fetch 403s (it hits an undocumented Solscan endpoint, which blocks non-browser requests fairly often), pass your own:

import json

idl = json.load(open("pump.json"))  # from the program's own public source repo
decoder = Decoder([PROGRAM_ID], idls={PROGRAM_ID: idl})

0.2.0 changes

Fixed, without changing the public shape of anything except WalletManager:

  • import checkpoint_sdk no longer crashes on a fresh install. checkpoint_sdk/__init__.py unconditionally imported WalletManager, which imported solana.rpc.api.Client - a module solana-py removed in favor of the async-only client. WalletManager is now imported lazily, so a problem in the wallet module can't break Decoder/TransactionManager.
  • from checkpoint_sdk.decoder import Decoder (this README's own example) now actually works. decoder/__init__.py (and transaction/__init__.py, wallet/__init__.py) were empty.
  • Decoder.IDLs is an instance attribute now, not a class attribute. Previously every Decoder you created in the same process shared (and kept appending to) the same list.
  • Decoder(programs, idls={...}) - pass pre-loaded IDLs directly instead of subclassing to override _fetch_idl(). See the Solscan 403 note above.
  • extract_program_data() / extract_all_program_data() now track the actual invoke/success call stack instead of assuming a Program data: line always precedes the next invoke of the same program - which breaks on transactions with nested self-CPI event logging. Also fixed an off-by-one that silently dropped a data line if it was the very last log line.

Breaking change: WalletManager's methods are async def now (get_balance, transfer, instant_transfer, airdrop, get_recent_blockhash, estimate_transfer_fee, get_network_info all need await; there's also a new await wallet.close()). This wasn't optional - the synchronous solana.rpc.api.Client it depended on no longer exists in current solana-py, so there was no working synchronous behavior left to preserve. Verified end-to-end against Solana devnet (client construction, wallet creation, network info, balance checks, and the insufficient-balance error path); the airdrop-then-send round trip specifically couldn't be re-confirmed live in one sitting because the public devnet faucet was rate-limited at the time - transaction construction/signing itself uses the same MessageV0 + VersionedTransaction pattern already verified in the decoder/transaction paths.

Documentation

https://github.com/apchhui/checkpoint-python/tree/main/docs

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

checkpoint_sdk-0.2.0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

checkpoint_sdk-0.2.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file checkpoint_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: checkpoint_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for checkpoint_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 958c802a79c7db0d3f4b3a9a2cf44ec34668add684693104d73153de29e57221
MD5 dba3e7c68b23fbe601534a66974cce45
BLAKE2b-256 8431448ff35dee6a68fd1bcebba6854d0ad197acc1dd9c77e98b72b78ce0cfe5

See more details on using hashes here.

Provenance

The following attestation bundles were made for checkpoint_sdk-0.2.0.tar.gz:

Publisher: publish.yml on apchhui/checkpoint-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file checkpoint_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: checkpoint_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for checkpoint_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92f2367b7755b7305da28a36c1b8a4e027172b7d88d30d725e63536de9ce2c44
MD5 26327f8ee9ea97cb46d27c042a0b77f9
BLAKE2b-256 6a62034aa188c8cd75704cfaf7e205b7f36beb23d22f07c86dfa87d5fc9b1332

See more details on using hashes here.

Provenance

The following attestation bundles were made for checkpoint_sdk-0.2.0-py3-none-any.whl:

Publisher: publish.yml on apchhui/checkpoint-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page