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

Model card: Circle Gateway (0.13) and sendCalls batches

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -138,7 +138,7 @@ If this is useful for your agent, a ❤️ like on this page helps others find i
138
  | On your machine | `ollama run sriram1983007/sra-riskgate` |
139
  | In an AI agent (MCP) | `uvx sra-riskgate-mcp` ([details](#🔌-use-it-from-an-ai-agent-mcp)) |
140
  | In a CrewAI crew | `pip install crewai-sra-riskgate` ([GitHub](https://github.com/sriram1983007-dev/crewai-sra-riskgate)): a check tool, or `risk_gated()` to wrap the tool that sends money |
141
- | In an ElizaOS agent (TypeScript) | `npm install elizaos-plugin-sra-riskgate viem` ([GitHub](https://github.com/sriram1983007-dev/elizaos-plugin-sra-riskgate)): guards the agent's viem wallet, so only approved USDC payments are broadcast; [demo agent](https://github.com/sriram1983007-dev/elizaos-plugin-sra-riskgate/tree/main/examples/eliza-demo) |
142
  | In LangChain / Coinbase AgentKit (Python) | `pip install langchain-sra-riskgate` ([GitHub](https://github.com/sriram1983007-dev/langchain-sra-riskgate)) |
143
  | Rule checks in Python, no GPU | `pip install sra-riskgate` ([details](#📦-python-sdk-one-call-before-every-payment-pypi)) · [try them in Colab](https://colab.research.google.com/github/sriram1983007-dev/sra-riskgate/blob/main/notebooks/try-sra-riskgate.ipynb) |
144
  | Test your agent's payments in CI | [GitHub Action](https://github.com/sriram1983007-dev/sra-riskgate-action): `uses: sriram1983007-dev/sra-riskgate-action@v1` |
@@ -164,7 +164,7 @@ If this is useful for your agent, a ❤️ like on this page helps others find i
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
 
170
  ```json
@@ -179,10 +179,10 @@ 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. 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
 
138
  | On your machine | `ollama run sriram1983007/sra-riskgate` |
139
  | In an AI agent (MCP) | `uvx sra-riskgate-mcp` ([details](#🔌-use-it-from-an-ai-agent-mcp)) |
140
  | In a CrewAI crew | `pip install crewai-sra-riskgate` ([GitHub](https://github.com/sriram1983007-dev/crewai-sra-riskgate)): a check tool, or `risk_gated()` to wrap the tool that sends money |
141
+ | In an ElizaOS agent (TypeScript) | `npm install elizaos-plugin-sra-riskgate viem` ([GitHub](https://github.com/sriram1983007-dev/elizaos-plugin-sra-riskgate)): guards the agent's viem wallet, so only approved USDC payments (including sendCalls batches) are broadcast; [demo agent](https://github.com/sriram1983007-dev/elizaos-plugin-sra-riskgate/tree/main/examples/eliza-demo) |
142
  | In LangChain / Coinbase AgentKit (Python) | `pip install langchain-sra-riskgate` ([GitHub](https://github.com/sriram1983007-dev/langchain-sra-riskgate)) |
143
  | Rule checks in Python, no GPU | `pip install sra-riskgate` ([details](#📦-python-sdk-one-call-before-every-payment-pypi)) · [try them in Colab](https://colab.research.google.com/github/sriram1983007-dev/sra-riskgate/blob/main/notebooks/try-sra-riskgate.ipynb) |
144
  | Test your agent's payments in CI | [GitHub Action](https://github.com/sriram1983007-dev/sra-riskgate-action): `uses: sriram1983007-dev/sra-riskgate-action@v1` |
 
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; Circle Gateway batched payments are supported | 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
 
170
  ```json
 
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. 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.
183
 
184
  ```bash
185
+ pip install --upgrade "sra-riskgate>=0.13.1"
186
  ```
187
 
188
  ```python