This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.6.1 instead.
Reason given by maintainers: Yank release (Reason: "Replaced by 0.3.4 with verified ERC-20 calldata handling").
sra-riskgate
Deterministic pre-filter for stablecoin transactions. It runs fast rule checks (peg-deviation bounds in both directions, a single-transfer ceiling, and payload validation) before you send a transaction to the SRA-RiskGate-4B model.
This package does not run the model and does not perform sanctions screening.
pip install sra-riskgate
from sra_riskgate import RulePreFilter, TransactionPayload
gate = RulePreFilter(max_amount=50_000, depeg_hold_pct=1.0, depeg_reject_pct=5.0)
verdict = gate.inspect(TransactionPayload(
chain_id=1, token="USDC",
sender="0x" + "a" * 40, recipient="0x" + "b" * 40,
amount=5000.0, peg_deviation_pct=-1.5,
))
print(verdict.decision.value, verdict.flags, verdict.required_actions)
# hold ['MODERATE_DEPEG'] ['manual_review']
| Rule | Decision |
|---|---|
| Peg deviation NaN / infinite | reject |
abs(peg deviation) >= depeg_reject_pct |
reject |
abs(peg deviation) >= depeg_hold_pct |
hold |
amount > max_amount |
hold |
| otherwise | approve |
Changelog
0.3.1: Unknown constructor arguments now raise TypeError instead of being
silently ignored. Legacy max_allowed_deviation_pct maps to the hold threshold
again (as in 0.1.x). Non-finite thresholds are rejected. License and author metadata restored.
0.3.0: Depeg checks use abs() (catches upward depegs). Thresholds validated.
License: Apache-2.0
Metadata
Release files for sra-riskgate 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sra_riskgate-0.3.3.tar.gz | 7.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sra_riskgate-0.3.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.2 kB
Release files / sra_riskgate-0.3.3.tar.gz
| Download URL | sra_riskgate-0.3.3.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6153e18fe3cef3fb59e293e4abb9d95e205742fa516ea883317c10bb058e8de9
|
|
BLAKE2b-256 checksum How to use checksums |
57cea298fb552a0d773ba4d5ad787e2eca7d1acc385020640abe0ddbeb29155b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / sra_riskgate-0.3.3-py3-none-any.whl
| Download URL | sra_riskgate-0.3.3-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ebf7723093d9ba0e103166a703572bd99ef43d3cec10bb5537d442203630c2e7
|
|
BLAKE2b-256 checksum How to use checksums |
f009296fcc091bb8831b2e85578f5214ba03e2d3c28a927449e8ec2790f589af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|