sriram1983007 commited on
Commit
1af9568
·
verified ·
1 Parent(s): fd97ae7

Card: Elliptic screening provider (sra-riskgate 1.7.0)

Browse files
Files changed (1) hide show
  1. README.md +5 -5
README.md CHANGED
@@ -250,10 +250,10 @@ Pass the payment's own text as `untrusted_text` so self-asserted claims are held
250
  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. From 0.16.0, pass the sender's account code (the result of `eth_getCode`) as `account_code`: an account already delegated through EIP-7702 to a contract you did not expect is held as `ACCOUNT_DELEGATED` and the agent is told to stop signing, because that contract can move the wallet's funds without another signature (list the delegates you trust in `expected_delegates`). Shown live on Base Sepolia (2026-10-30): an agent's USDC transfer ([tx](https://sepolia.basescan.org/tx/0x575f36cbd56e323e4191de267fe8c229900a85fab925d3c16d6c4ee3da6a67f2)) and an x402 EIP-3009 payment ([tx](https://sepolia.basescan.org/tx/0x22c23ed654570f6c96a2beea478232aa8b72a3215ecacbad095c9e149f87be1f)) were approved and settled on chain, while an unlimited approval, a look-alike payee, a 30-day x402 authorization and a self-vouching request were stopped before signing. From 0.17.0, smart accounts are covered: `check_user_operation(user_op, chain_id=...)` decodes the calls an ERC-4337 UserOperation makes (Coinbase Smart Wallet, CDP smart accounts, Safe, Kernel, Nexus, SimpleAccount) and checks each one, so an unlimited `approve()` hidden in a batch next to a payment is held and payments to the same payee are summed against your limit; self-calls, delegatecalls and unexpected paymasters are held too. Tested against callData produced by viem and permissionless for seven account types. From 0.18.0, the SDK also checks what actually settled: `verify_settlement(receipt, ...)` confirms a mined receipt holds exactly the approved USDC payment (right payer, payee and amount, and for x402 the approved authorization), and `verify_gateway_balances(...)` confirms a Circle Gateway payment from balances read before and after. An x402 server asking for a signature valid longer than an hour (`maxTimeoutSeconds`) is held before the agent signs. From 0.19.0, `verify_settlement` checks any ERC-20 on any EVM chain, and from 0.20.0 named stablecoins fill in the contract and decimals (`token="USDT"` on Ethereum, `"USDB"` from Bridge on Ethereum and Base, `"USDG"` on Ethereum and Robinhood Chain, and USDC), each read on chain before release. 0.20.0 also adds `check_allowances(owner, {spender: allowance})` for pull payments such as loan repayments and subscriptions, which need no new signature: an unlimited, oversized or unexpected standing allowance is held, and one held by a sanctioned or blocked spender is rejected. From 1.0.0, the checks before signing cover them too: `check_payment`, `check_transaction`, `check_user_operation` and Circle Wallets transfers check USDT, USDB and USDG as well as USDC once you enable them with `allowed_tokens=["USDC", "USDT", "USDB", "USDG"]` (USDC only by default, so upgrading never starts approving a token you did not choose). The token is read from the contract called, approvals and permits are held for every token, and a smart-account batch is summed across tokens. Read on chain, USDC and USDG implement EIP-3009 (USDG's support was confirmed on 2026-11-14 and its x402 signatures are checked from 1.6.0; earlier releases held them), so an x402 signature for USDT or USDB is held: it could never settle. From 1.0.0 the public API follows semantic versioning ([details](https://github.com/sriram1983007-dev/sra-riskgate#usdt-usdb-and-usdg-100)). From 1.1.0, `register_stablecoin(symbol, chain_id, contract, decimals)` adds any US-dollar stablecoin on any EVM chain (a testnet dollar, PYUSD, an L2's own stablecoin), and every check then treats it like a built-in token; it is still held until enabled with `allowed_tokens`, and a registration can never change USDC, USDT, USDB or USDG ([details](https://github.com/sriram1983007-dev/sra-riskgate#your-own-stablecoin-or-chain-110)). From 1.2.0 and 1.3.0, `with_dispute_window()`, `payment_messages()` and `dispute_messages()` build this model's exact training prompts, and `parse_payment_verdict()` / `parse_dispute_verdict()` read its answer, failing closed. From 1.4.0, `check_payment(screening_providers=[...])` adds outside address screening: Chainalysis's and TRM Labs' free sanctions APIs, Range and Webacy are built in (TRM from 1.5.0), and any other provider plugs in with `CallableProvider`. A provider's sanctions match or severe risk rejects, high risk holds, and a provider with no usable answer holds; only the sender's and recipient's addresses are sent. The adapters follow each provider's published API documentation and are tested against responses shaped like it ([details](https://github.com/sriram1983007-dev/sra-riskgate#screening-providers-chainalysis-range-webacy-and-your-own-140)).
251
 
252
  ```bash
253
- pip install --upgrade "sra-riskgate>=1.6.2"
254
  ```
255
 
256
- ### 🔎 Screening providers: Chainalysis, TRM Labs, Range, Webacy or your own (1.4.0+)
257
 
258
  Add outside address screening to the same one-call check. Both the sender and the recipient are screened, only
259
  after every local check passes:
@@ -273,8 +273,8 @@ result = check_payment(chain_id=8453, sender=agent_wallet, recipient=payee, amou
273
  | No usable answer: error, timeout, unexpected response | HOLD (`SCREENING_UNAVAILABLE`), never a pass |
274
 
275
  Built in: `ChainalysisSanctions` (Chainalysis's free sanctions API), `TRMSanctions` (TRM Labs' free sanctions API,
276
- 1.5.0+), `RangeRisk` (Range Risk API v2) and `WebacyRisk`. Anything else, such as an internal list, plugs in with
277
- `CallableProvider`. Bring your own API keys. From 1.6.1, every sanctions-list signal Range documents (`ofac-sanctioned`, `uk-sanctioned`, `eu-sanctioned`, `eu-sanction-ru` and others) rejects, and TRM works without a key; from 1.6.2, sanctions exposure in Range's results holds, and a Webacy `overallRisk` of 100 counts as high risk. The
278
  adapters follow each provider's published API documentation ([details](https://github.com/sriram1983007-dev/sra-riskgate#screening-providers-chainalysis-range-webacy-and-your-own-140)).
279
 
280
  ```python
@@ -374,7 +374,7 @@ Depeg checks run only when a `peg_feed` is supplied.
374
 
375
  ## 🚀 Transformers Quickstart
376
 
377
- **Shortcut:** `pip install "sra-riskgate>=1.6.2"` gives `payment_messages()` and `dispute_messages()`, which build the exact prompts below for you, and `parse_payment_verdict()` / `parse_dispute_verdict()`, which read the answer and fail closed.
378
 
379
  The model was trained on a specific prompt format, and it only performs as benchmarked when you use that format exactly:
380
 
 
250
  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. From 0.16.0, pass the sender's account code (the result of `eth_getCode`) as `account_code`: an account already delegated through EIP-7702 to a contract you did not expect is held as `ACCOUNT_DELEGATED` and the agent is told to stop signing, because that contract can move the wallet's funds without another signature (list the delegates you trust in `expected_delegates`). Shown live on Base Sepolia (2026-10-30): an agent's USDC transfer ([tx](https://sepolia.basescan.org/tx/0x575f36cbd56e323e4191de267fe8c229900a85fab925d3c16d6c4ee3da6a67f2)) and an x402 EIP-3009 payment ([tx](https://sepolia.basescan.org/tx/0x22c23ed654570f6c96a2beea478232aa8b72a3215ecacbad095c9e149f87be1f)) were approved and settled on chain, while an unlimited approval, a look-alike payee, a 30-day x402 authorization and a self-vouching request were stopped before signing. From 0.17.0, smart accounts are covered: `check_user_operation(user_op, chain_id=...)` decodes the calls an ERC-4337 UserOperation makes (Coinbase Smart Wallet, CDP smart accounts, Safe, Kernel, Nexus, SimpleAccount) and checks each one, so an unlimited `approve()` hidden in a batch next to a payment is held and payments to the same payee are summed against your limit; self-calls, delegatecalls and unexpected paymasters are held too. Tested against callData produced by viem and permissionless for seven account types. From 0.18.0, the SDK also checks what actually settled: `verify_settlement(receipt, ...)` confirms a mined receipt holds exactly the approved USDC payment (right payer, payee and amount, and for x402 the approved authorization), and `verify_gateway_balances(...)` confirms a Circle Gateway payment from balances read before and after. An x402 server asking for a signature valid longer than an hour (`maxTimeoutSeconds`) is held before the agent signs. From 0.19.0, `verify_settlement` checks any ERC-20 on any EVM chain, and from 0.20.0 named stablecoins fill in the contract and decimals (`token="USDT"` on Ethereum, `"USDB"` from Bridge on Ethereum and Base, `"USDG"` on Ethereum and Robinhood Chain, and USDC), each read on chain before release. 0.20.0 also adds `check_allowances(owner, {spender: allowance})` for pull payments such as loan repayments and subscriptions, which need no new signature: an unlimited, oversized or unexpected standing allowance is held, and one held by a sanctioned or blocked spender is rejected. From 1.0.0, the checks before signing cover them too: `check_payment`, `check_transaction`, `check_user_operation` and Circle Wallets transfers check USDT, USDB and USDG as well as USDC once you enable them with `allowed_tokens=["USDC", "USDT", "USDB", "USDG"]` (USDC only by default, so upgrading never starts approving a token you did not choose). The token is read from the contract called, approvals and permits are held for every token, and a smart-account batch is summed across tokens. Read on chain, USDC and USDG implement EIP-3009 (USDG's support was confirmed on 2026-11-14 and its x402 signatures are checked from 1.6.0; earlier releases held them), so an x402 signature for USDT or USDB is held: it could never settle. From 1.0.0 the public API follows semantic versioning ([details](https://github.com/sriram1983007-dev/sra-riskgate#usdt-usdb-and-usdg-100)). From 1.1.0, `register_stablecoin(symbol, chain_id, contract, decimals)` adds any US-dollar stablecoin on any EVM chain (a testnet dollar, PYUSD, an L2's own stablecoin), and every check then treats it like a built-in token; it is still held until enabled with `allowed_tokens`, and a registration can never change USDC, USDT, USDB or USDG ([details](https://github.com/sriram1983007-dev/sra-riskgate#your-own-stablecoin-or-chain-110)). From 1.2.0 and 1.3.0, `with_dispute_window()`, `payment_messages()` and `dispute_messages()` build this model's exact training prompts, and `parse_payment_verdict()` / `parse_dispute_verdict()` read its answer, failing closed. From 1.4.0, `check_payment(screening_providers=[...])` adds outside address screening: Chainalysis's and TRM Labs' free sanctions APIs, Range and Webacy are built in (TRM from 1.5.0), and any other provider plugs in with `CallableProvider`. A provider's sanctions match or severe risk rejects, high risk holds, and a provider with no usable answer holds; only the sender's and recipient's addresses are sent. The adapters follow each provider's published API documentation and are tested against responses shaped like it ([details](https://github.com/sriram1983007-dev/sra-riskgate#screening-providers-chainalysis-range-webacy-and-your-own-140)).
251
 
252
  ```bash
253
+ pip install --upgrade "sra-riskgate>=1.7.0"
254
  ```
255
 
256
+ ### 🔎 Screening providers: Chainalysis, TRM Labs, Range, Webacy, Elliptic or your own (1.4.0+)
257
 
258
  Add outside address screening to the same one-call check. Both the sender and the recipient are screened, only
259
  after every local check passes:
 
273
  | No usable answer: error, timeout, unexpected response | HOLD (`SCREENING_UNAVAILABLE`), never a pass |
274
 
275
  Built in: `ChainalysisSanctions` (Chainalysis's free sanctions API), `TRMSanctions` (TRM Labs' free sanctions API,
276
+ 1.5.0+), `RangeRisk` (Range Risk API v2), `WebacyRisk` and `EllipticRisk` (Elliptic Lens wallet screening, 1.7.0+). Anything else, such as an internal list, plugs in with
277
+ `CallableProvider`. Bring your own API keys. From 1.6.1, every sanctions-list signal Range documents (`ofac-sanctioned`, `uk-sanctioned`, `eu-sanctioned`, `eu-sanction-ru` and others) rejects, and TRM works without a key; from 1.6.2, sanctions exposure in Range's results holds, and a Webacy `overallRisk` of 100 counts as high risk. From 1.7.0, Elliptic is built in too (`EllipticRisk`): a sanctions label on the wallet rejects, Elliptic's `risk_score` sets the risk level (thresholds adjustable), and sanctions exposure holds. The
278
  adapters follow each provider's published API documentation ([details](https://github.com/sriram1983007-dev/sra-riskgate#screening-providers-chainalysis-range-webacy-and-your-own-140)).
279
 
280
  ```python
 
374
 
375
  ## 🚀 Transformers Quickstart
376
 
377
+ **Shortcut:** `pip install "sra-riskgate>=1.7.0"` gives `payment_messages()` and `dispute_messages()`, which build the exact prompts below for you, and `parse_payment_verdict()` / `parse_dispute_verdict()`, which read the answer and fail closed.
378
 
379
  The model was trained on a specific prompt format, and it only performs as benchmarked when you use that format exactly:
380