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: Reason: Replaced by 0.3.5 with tested AgentKit 0.7.4 ActionProvider registration
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.4
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.4.tar.gz | 8.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sra_riskgate-0.3.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.5 kB
Release files / sra_riskgate-0.3.4.tar.gz
| Download URL | sra_riskgate-0.3.4.tar.gz |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1082fccfda7a97a7eafa34b9d366f85ecc56b38057d10f5fa0eb43844b464697
|
|
BLAKE2b-256 checksum How to use checksums |
148a41c1f69060efe41009a2e7ad385f83edc7fcd5d3cb0ffff5a523be010a84
|
| 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.4-py3-none-any.whl
| Download URL | sra_riskgate-0.3.4-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f9d103a60a5a064aaf4ec8c385842ad380e5d93212608828655c28d90870524
|
|
BLAKE2b-256 checksum How to use checksums |
c9945f55f0be9f951e7d754321368ec15e7fef2bc6c5a9e268f9ad6ec2f1b35d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|