sriram1983007 commited on
Commit
6be439e
·
verified ·
1 Parent(s): ba2f70f

sra-riskgate 0.15.0 is live on PyPI

Browse files
Files changed (1) hide show
  1. README.md +2 -2
README.md CHANGED
@@ -184,10 +184,10 @@ Pass the payment's own text as `untrusted_text` so self-asserted claims are held
184
 
185
  ## 📦 Python SDK: One Call Before Every Payment (PyPI)
186
 
187
- The `sra-riskgate` SDK runs fast deterministic checks before the model is involved: an offline match against the OFAC SDN list's crypto addresses (a dated snapshot, not a screening service), supported asset and chain, address and amount validation, a per-payment ceiling, USDC depeg in both directions, and a scan for payment text that claims its own verification. From 0.8.0 it can also hold the first payment to a new payee (`known_recipients`) and always reject addresses you block (`blocked_addresses`). It never raises on bad payment data: invalid payments are rejected and anything unexpected becomes `hold`. From 0.9.0, `check_transaction(tx, ...)` checks the exact transaction an agent is about to sign: a USDC `transfer` gets the same checks, and token approvals (including unlimited `approve()`), other functions, other contracts and native ETH are held. From 0.11.0, check_authorization(typed_data, ...) does the same for x402 payments, which the agent pays by signing an EIP-3009 authorization instead of sending a transaction: the signature must be for USDC on that chain, from the agent’s wallet, and valid for at most an hour by default, and the decoded payment then gets every check above. From 0.12.0, Circle Arc is supported (5042 mainnet, 5042002 testnet): on Arc, USDC is the native asset, so a plain native send is checked as a USDC payment, read at 18 decimals and rounded up to a whole micro-USDC before the payment check. From 0.12.1, EIP-7702 code delegation is always held (`CODE_DELEGATION`): a type-4 transaction or any `authorizationList` hands the whole account to contract code, on every chain if signed with chain id 0, and `check_delegation()` holds a signed authorization before the agent signs it. From 0.13.0, Circle Gateway batched x402 payments (nanopayments) are checked: an authorization signed for Gateway's `GatewayWalletBatched` domain with Circle's GatewayWallet contract gets its own validity limit (default 8 days, since Gateway requires at least 3 and Circle's SDK signs for 7) and every payment check above, while a look-alike Gateway contract is held. Shown live on Arc Testnet: a Gateway payment approved and accepted by Circle, three unsafe ones stopped before signing. From 0.14.0, Circle Wallets (developer-controlled) requests are checked before they are sent to Circle, which signs as soon as it accepts them: transfers, contract executions (an `approve()` is held), typed-data and transaction signing, with `sign/message` and wallet upgrades always held. `guard_circle_wallets()` wraps Circle's Python SDK so blocked requests never reach Circle (`pip install "sra-riskgate[circle]"`). Shown live on Arc Testnet: a USDC payment from a Circle wallet approved and completed, an unlimited approval, an unknown payee and an unlimited permit stopped before reaching Circle.
188
 
189
  ```bash
190
- pip install --upgrade "sra-riskgate>=0.14.0"
191
  ```
192
 
193
  ```python
 
184
 
185
  ## 📦 Python SDK: One Call Before Every Payment (PyPI)
186
 
187
+ The `sra-riskgate` SDK runs fast deterministic checks before the model is involved: an offline match against the OFAC SDN list's crypto addresses (a dated snapshot, not a screening service), supported asset and chain, address and amount validation, a per-payment ceiling, USDC depeg in both directions, and a scan for payment text that claims its own verification. From 0.8.0 it can also hold the first payment to a new payee (`known_recipients`) and always reject addresses you block (`blocked_addresses`). It never raises on bad payment data: invalid payments are rejected and anything unexpected becomes `hold`. From 0.9.0, `check_transaction(tx, ...)` checks the exact transaction an agent is about to sign: a USDC `transfer` gets the same checks, and token approvals (including unlimited `approve()`), other functions, other contracts and native ETH are held. From 0.11.0, check_authorization(typed_data, ...) does the same for x402 payments, which the agent pays by signing an EIP-3009 authorization instead of sending a transaction: the signature must be for USDC on that chain, from the agent’s wallet, and valid for at most an hour by default, and the decoded payment then gets every check above. From 0.12.0, Circle Arc is supported (5042 mainnet, 5042002 testnet): on Arc, USDC is the native asset, so a plain native send is checked as a USDC payment, read at 18 decimals and rounded up to a whole micro-USDC before the payment check. From 0.12.1, EIP-7702 code delegation is always held (`CODE_DELEGATION`): a type-4 transaction or any `authorizationList` hands the whole account to contract code, on every chain if signed with chain id 0, and `check_delegation()` holds a signed authorization before the agent signs it. From 0.13.0, Circle Gateway batched x402 payments (nanopayments) are checked: an authorization signed for Gateway's `GatewayWalletBatched` domain with Circle's GatewayWallet contract gets its own validity limit (default 8 days, since Gateway requires at least 3 and Circle's SDK signs for 7) and every payment check above, while a look-alike Gateway contract is held. Shown live on Arc Testnet: a Gateway payment approved and accepted by Circle, three unsafe ones stopped before signing. From 0.14.0, Circle Wallets (developer-controlled) requests are checked before they are sent to Circle, which signs as soon as it accepts them: transfers, contract executions (an `approve()` is held), typed-data and transaction signing, with `sign/message` and wallet upgrades always held. `guard_circle_wallets()` wraps Circle's Python SDK so blocked requests never reach Circle (`pip install "sra-riskgate[circle]"`). Shown live on Arc Testnet: a USDC payment from a Circle wallet approved and completed, an unlimited approval, an unknown payee and an unlimited permit stopped before reaching Circle. From 0.15.0, a payee that imitates one of your known payees (address poisoning: the same first and last characters, such as `0x2ffb…b7ee` for `0x2ffb88…472deb7ee`) is rejected as `LOOKALIKE_RECIPIENT`, naming the payee it imitates.
188
 
189
  ```bash
190
+ pip install --upgrade "sra-riskgate>=0.15.0"
191
  ```
192
 
193
  ```python