DeFi client for Sarcire — synchronous revert diagnosis without blocking the on-chain loop
Project description
sarcire-defi
DeFi client for Sarcire — synchronous revert diagnosis without blocking the on-chain loop.
Install
pip install sarcire-defi
Usage
from sarcire_defi import diagnose_revert, request_generation_async
result = diagnose_revert(
error_trace,
min_confidence=0.80,
chain_id=8453,
protocol="aave_v3_pool",
)
if result["action"] == "apply":
# Safe to use — cached fix with sufficient confidence
for step in result["fix_steps"]:
print(step)
else:
# No safe immediate fix — stop the on-chain loop
# Trigger background generation for next time:
request_generation_async(error_trace, chain_id=8453, protocol="aave_v3_pool")
raise RuntimeError("No safe remediation available")
Critical: diagnose_revert always returns immediately. It never blocks waiting for LLM generation.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sarcire_defi-0.1.1.tar.gz
(5.1 kB
view details)
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 sarcire_defi-0.1.1.tar.gz.
File metadata
- Download URL: sarcire_defi-0.1.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2637324f289753c4754ca3ca68b0764927f69f5925d6377bb0d6ac86d8a4da93
|
|
| MD5 |
0bad81af99ed1070b090005916c6879b
|
|
| BLAKE2b-256 |
49fbfbc943f31ab142a1e39e9a19fa3bec9b6accc7ed1f9e026afb614f1a686a
|
File details
Details for the file sarcire_defi-0.1.1-py3-none-any.whl.
File metadata
- Download URL: sarcire_defi-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a32375130458ba68d74a027b3baea08e972c74817c573a7b034148c05f96b06
|
|
| MD5 |
3f996c0bbe4ae86189e82b91f6068a3d
|
|
| BLAKE2b-256 |
d0b9bcdfb76d3da14bc4e5cca2ab62c67664763741d4968464655f85c55cda1d
|