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.0.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.0.tar.gz.
File metadata
- Download URL: sarcire_defi-0.1.0.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 |
27a04c96aa7c2c19816dac2ca5786f9f1afe9e39d6d1c7a162080642eb64b6ef
|
|
| MD5 |
5f65a270123460f46dfc6d963ef871f0
|
|
| BLAKE2b-256 |
7a06750c20fd24292a476f417439cb2b5ce4b56b0c56e78ac735ad5ec6ba9cff
|
File details
Details for the file sarcire_defi-0.1.0-py3-none-any.whl.
File metadata
- Download URL: sarcire_defi-0.1.0-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 |
128c4e116c3d3a060c679d226e45203cc0f01597b00ca02295502c3b2e52f721
|
|
| MD5 |
7313e0831069c65fced6af7d8dc74cad
|
|
| BLAKE2b-256 |
722cd931e61ada26e082704e216815eebcc540715c5d3d486b49ae11bbe1682b
|