Solana transaction normalizer, parser, and resolver.
Project description
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:
- Normalize: Converts a raw JSON RPC payload into a
Transactionobject. - Parse: Routes each instruction in the
Transactionto the correct program-level parser. Produces objects describing each recognized instruction. - 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)
# {
# "signatures": [...],
# "instructions": [
# <ComputeBudget.SetComputeUnitLimit(...)>,
# <ComputeBudget.SetComputeUnitPrice(...)>,
# <SystemProgram.CreateAccount(...)>,
# <TokenProgram.InitAccount(...)>,
# <RaydiumAMM.Swap(...)>,
# <TokenProgram.Unknown(...)>,
# <SystemProgram.Transfer(...)>,
# <UnknownProgram.Unknown(...)>,
# ],
# "addons": {
# {"compute_units": <ComputeUnitsAddon(...)>},
# {"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=...
# )
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file soltxs-1.0.6.tar.gz.
File metadata
- Download URL: soltxs-1.0.6.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4c821c5d3a022a658503d181f726f9c5deed2462dbd660fd364143141106f14
|
|
| MD5 |
32e0b3ccfd2c21f4e5b752fedec1d012
|
|
| BLAKE2b-256 |
16bfd7433dcfc4d93ce9ac64de41b887cbfe5b818d422dfe10ac75bbfa6e5324
|
Provenance
The following attestation bundles were made for soltxs-1.0.6.tar.gz:
Publisher:
release.yaml on qvecs/soltxs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
soltxs-1.0.6.tar.gz -
Subject digest:
b4c821c5d3a022a658503d181f726f9c5deed2462dbd660fd364143141106f14 - Sigstore transparency entry: 169815936
- Sigstore integration time:
-
Permalink:
qvecs/soltxs@929d1f48d5e6e0df539159b7685d32ba7a5e4a0d -
Branch / Tag:
refs/tags/v1.0.6 - Owner: https://github.com/qvecs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@929d1f48d5e6e0df539159b7685d32ba7a5e4a0d -
Trigger Event:
push
-
Statement type:
File details
Details for the file soltxs-1.0.6-py3-none-any.whl.
File metadata
- Download URL: soltxs-1.0.6-py3-none-any.whl
- Upload date:
- Size: 33.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3de62167513923a4f1c5f8d94604d3bcf2542b5475362fa44e295f6580a5fd3
|
|
| MD5 |
697610e1d9f577adf5f8024cc55a294f
|
|
| BLAKE2b-256 |
2dec688210bc95a751c8c7c1ca4657dc70b5306e7d72b38e563e5e2b4c0af7a5
|
Provenance
The following attestation bundles were made for soltxs-1.0.6-py3-none-any.whl:
Publisher:
release.yaml on qvecs/soltxs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
soltxs-1.0.6-py3-none-any.whl -
Subject digest:
c3de62167513923a4f1c5f8d94604d3bcf2542b5475362fa44e295f6580a5fd3 - Sigstore transparency entry: 169815937
- Sigstore integration time:
-
Permalink:
qvecs/soltxs@929d1f48d5e6e0df539159b7685d32ba7a5e4a0d -
Branch / Tag:
refs/tags/v1.0.6 - Owner: https://github.com/qvecs
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@929d1f48d5e6e0df539159b7685d32ba7a5e4a0d -
Trigger Event:
push
-
Statement type: