Library Reference¶
The siriscore Python library scores a transaction and returns a structured report you can render, log, or gate on. Install it with pip install siriscore.
See Install the library for requirements and CLI setup.
Quick example¶
import siriscore
# Accepts a PSBT (base64), raw tx hex, or txid — type is auto-detected
report = siriscore.score("cHNidP8BA...")
print(report.score) # 82
for finding in report.findings:
print(f"{finding.heuristic_id}: {finding.title}")
print(f" → {finding.suggestion}")
Choosing a function¶
| You want to | Use |
|---|---|
| Score a transaction; let the input type be auto-detected | score() |
Skip auto-detection, or pass psbt_meta for Payjoin detection (H11) |
score_as() |
| Import wallet labels so label-based scoring (H8/H9) has data to match | import_labels() |
Understanding results¶
Every call returns a Report, ie the score, the Finding entries for heuristics that fired, and a checks list recording what every heuristic did, including the ones that passed or were skipped.
- Report and Finding models - every field, with the score formula
- Check statuses -
pass/fail/skipped/unavailableand when each occurs
Privacy¶
Scoring runs entirely offline unless you opt in to network lookups with lookup=True, and you can route those through your own node.