Skip to main content

📟 Solana Transactions (soltxs)

Solana transaction normalizer, parser, and resolver.

Installing

pip install soltxs

Overview

This library breaks down Solana transaction introspection and analysis into three steps:

  1. Normalize: Converts a raw JSON RPC payload into a Transaction object.
  2. Parse: Routes each instruction in the Transaction to the correct program-level parser. Produces objects describing each recognized instruction.
  3. Resolve: Takes the parsed instructions and converts them into a more human-readable format.

Support

  • Normalizers
    • Standard RPC Response
    • Modified YellowStone Geyser Response
  • Parsers
    • Compute Budget
    • System Program
    • Token Program
    • PumpFun Program
    • Raydium AMM Program
  • Resolvers
    • PumpFun Swap
    • Raydium Swap

Usage

import soltxs

tx = {"jsonrpc": ..., "result": ..., "id": ...}

# All three steps below can be combined into a single call.
# Equivalent to: resolve(parse(normalize(tx)))
result = soltxs.process(tx)

norm_tx = soltxs.normalize(tx)
# Transaction(
#     slot=...,
#     blockTime=...,
#     signatures=[...],
#     message=...,
#     meta=...,
#     loadedAddresses=...,
# )

parsed_data = soltxs.parse(norm_tx)
# ParsedTransaction(
#     signatures=[...],
#     instructions=[
#         <ComputeBudget.SetComputeUnitLimit(...)>,
#         <ComputeBudget.SetComputeUnitPrice(...)>,
#         <SystemProgram.CreateAccount(...)>,
#         <TokenProgram.InitAccount(...)>,
#         <RaydiumAMM.Swap(...)>,
#         <TokenProgram.Unknown(...)>,
#         <SystemProgram.Transfer(...)>,
#         <UnknownProgram.Unknown(...)>,
#     ],
#     Addons(
#         compute_units=<ComputeUnits(...)>,
#         instruction_count=<InstructionCount(...)>,
#         loaded_addresses=<LoadedAddresses(...)>
#         platform_identifier=<PlatformIdentifier(...)>,
#         token_transfer_summary=<TokenTransfer(...)>
#     )
# )

resolved_tx = soltxs.resolve(parsed_data)
# For example, a Raydium resolved output might be:
# Raydium(
#     type=...,
#     who=...,
#     from_token=...,
#     from_amount=...,
#     to_token=...,
#     to_amount=...,
#     minimum_amount_out=...
# )

Metadata

Release files for soltxs 1.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for soltxs 1.0.8
File Size Uploaded
soltxs-1.0.8.tar.gz 22.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for soltxs 1.0.8
File Interpreter ABI Platform
soltxs-1.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 57.0 kB

Release files / soltxs-1.0.8.tar.gz

Download URL soltxs-1.0.8.tar.gz
Size 22.6 kB
Tags Source
SHA-256 checksum
How to use checksums
56f72e6ca619de75c06e34e0366505c0db6fa0d9f84673b02f6294b5fbed75b7
BLAKE2b-256 checksum
How to use checksums
7909e54521b7ea4c827bb8b2d32c233aa2f3b5934beb54135eb799e5ecf04c6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 17, 2025.

Transparency log

Release files / soltxs-1.0.8-py3-none-any.whl

Download URL soltxs-1.0.8-py3-none-any.whl
Size 34.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae40dee1a73d7be46d1c0a5c653545bb1a35aee8985aaf76b11891e312964ee3
BLAKE2b-256 checksum
How to use checksums
80c2c52fc3ff73a1cd4d9939fe7fca19bc2d48712d3755b0b2541d3e1aaa7654
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 17, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.8 This release

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page