sriram1983007 commited on
Commit
ea3f273
·
verified ·
1 Parent(s): e775491

Model card: Arc support (0.12.0) and EIP-7702 hold (0.12.1)

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -163,7 +163,7 @@ If this is useful for your agent, a ❤️ like on this page helps others find i
163
  | `check_address_sanctions` | Exact, offline match of up to 100 addresses against the bundled OFAC SDN snapshot | Nothing |
164
  | `check_payment_rules` | The deterministic checks above for a USDC payment | Nothing |
165
  | `check_x402_payment` | The same checks for an x402 payment requirement, before the agent signs | Nothing |
166
- | `check_transaction` | The same checks for the exact transaction about to be signed (`to`, calldata, `value`); token approvals, other functions and native ETH are held | Nothing |
167
  | `check_x402_authorization` | The same checks for the x402 signature itself (the EIP-3009 `TransferWithAuthorization` typed data) before signing; expired, post-dated or long-lived authorizations and permits are held | Nothing |
168
  | `check_payment_with_model` | Full review by SRA-RiskGate-4B over your policy, the payment and your verification results | This model served locally (for example with Ollama) |
169
 
@@ -179,17 +179,17 @@ Pass the payment's own text as `untrusted_text` so self-asserted claims are held
179
 
180
  ## 📦 Python SDK: One Call Before Every Payment (PyPI)
181
 
182
- 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.
183
 
184
  ```bash
185
- pip install --upgrade "sra-riskgate>=0.11.0"
186
  ```
187
 
188
  ```python
189
  from sra_riskgate import ActionDecision, check_payment
190
 
191
  result = check_payment(
192
- chain_id=1, # Ethereum; Base (8453) and Base Sepolia (84532) also supported
193
  sender="0x" + "a" * 40,
194
  recipient="0x" + "b" * 40,
195
  amount=5000.0, # USDC
 
163
  | `check_address_sanctions` | Exact, offline match of up to 100 addresses against the bundled OFAC SDN snapshot | Nothing |
164
  | `check_payment_rules` | The deterministic checks above for a USDC payment | Nothing |
165
  | `check_x402_payment` | The same checks for an x402 payment requirement, before the agent signs | Nothing |
166
+ | `check_transaction` | The same checks for the exact transaction about to be signed (`to`, calldata, `value`); token approvals, other functions, native ETH and EIP-7702 delegations are held; on Arc, native USDC sends are checked as payments | Nothing |
167
  | `check_x402_authorization` | The same checks for the x402 signature itself (the EIP-3009 `TransferWithAuthorization` typed data) before signing; expired, post-dated or long-lived authorizations and permits are held | Nothing |
168
  | `check_payment_with_model` | Full review by SRA-RiskGate-4B over your policy, the payment and your verification results | This model served locally (for example with Ollama) |
169
 
 
179
 
180
  ## 📦 Python SDK: One Call Before Every Payment (PyPI)
181
 
182
+ 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.
183
 
184
  ```bash
185
+ pip install --upgrade "sra-riskgate>=0.12.1"
186
  ```
187
 
188
  ```python
189
  from sra_riskgate import ActionDecision, check_payment
190
 
191
  result = check_payment(
192
+ chain_id=1, # Ethereum; Base (8453), Base Sepolia (84532), Arc (5042) and Arc Testnet (5042002) also supported
193
  sender="0x" + "a" * 40,
194
  recipient="0x" + "b" * 40,
195
  amount=5000.0, # USDC