otto-intel-mcp 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -18
- package/dist/account-userop-policy-definition.d.ts +14 -0
- package/dist/account-userop-policy-definition.js +12 -0
- package/dist/account-userop-policy-relation.d.ts +371 -0
- package/dist/account-userop-policy-relation.js +87 -0
- package/dist/adapter/cdp-signer.d.ts +32 -4
- package/dist/adapter/cdp-signer.js +128 -37
- package/dist/adapter-cdp-index.d.ts +1 -1
- package/dist/execution-account-gas-quote.d.ts +141 -0
- package/dist/execution-account-gas-quote.js +443 -0
- package/dist/execution-account-gas-review.d.ts +123 -0
- package/dist/execution-account-gas-review.js +104 -0
- package/dist/execution-account-gas-runtime.d.ts +33 -0
- package/dist/execution-account-gas-runtime.js +131 -0
- package/dist/execution-account-gas-view.d.ts +936 -0
- package/dist/execution-account-gas-view.js +56 -0
- package/dist/execution-config.d.ts +3 -0
- package/dist/execution-config.js +4 -0
- package/dist/execution-delegated-definition.d.ts +6 -6
- package/dist/execution-delegated-definition.js +1 -1
- package/dist/execution-delegation-admin-definition.d.ts +12 -11
- package/dist/execution-delegation-admin-definition.js +6 -5
- package/dist/execution-delegation-admin.d.ts +5 -5
- package/dist/execution-delegation-admin.js +157 -49
- package/dist/execution-delegation-cap-store.d.ts +22 -5
- package/dist/execution-delegation-cap-store.js +74 -7
- package/dist/execution-delegation-exit-definition.d.ts +309 -0
- package/dist/execution-delegation-exit-definition.js +204 -0
- package/dist/execution-delegation-exit-store.d.ts +114 -0
- package/dist/execution-delegation-exit-store.js +671 -0
- package/dist/execution-delegation-exit.d.ts +4 -0
- package/dist/execution-delegation-exit.js +614 -0
- package/dist/execution-delegation-finality.d.ts +22 -0
- package/dist/execution-delegation-finality.js +90 -0
- package/dist/execution-delegation-operation-store.d.ts +129 -0
- package/dist/execution-delegation-operation-store.js +1107 -0
- package/dist/execution-delegation-operations-definition.d.ts +282 -0
- package/dist/execution-delegation-operations-definition.js +117 -0
- package/dist/execution-delegation-operations.d.ts +6 -0
- package/dist/execution-delegation-operations.js +282 -0
- package/dist/execution-delegation-policy.d.ts +1 -2
- package/dist/execution-delegation-policy.js +13 -24
- package/dist/execution-delegation.d.ts +16 -0
- package/dist/execution-delegation.js +221 -26
- package/dist/execution-errors.d.ts +1 -1
- package/dist/execution-errors.js +27 -3
- package/dist/execution-index.d.ts +4 -0
- package/dist/execution-index.js +4 -0
- package/dist/execution-journal-schema.d.ts +96 -0
- package/dist/execution-journal-schema.js +368 -0
- package/dist/execution-journal-tables.d.ts +14 -0
- package/dist/execution-journal-tables.js +227 -0
- package/dist/execution-policy-compatibility.d.ts +34 -0
- package/dist/execution-policy-compatibility.js +76 -0
- package/dist/execution-registration.d.ts +8 -5
- package/dist/execution-registration.js +106 -3
- package/dist/execution-sponsored-account-profile.d.ts +32 -0
- package/dist/execution-sponsored-account-profile.js +59 -0
- package/dist/execution-sponsored-account.d.ts +1519 -0
- package/dist/execution-sponsored-account.js +222 -0
- package/dist/execution-sponsored-definition.d.ts +1713 -0
- package/dist/execution-sponsored-definition.js +185 -0
- package/dist/execution-sponsored-gas-policy.d.ts +27 -0
- package/dist/execution-sponsored-gas-policy.js +110 -0
- package/dist/execution-sponsored-hosted.d.ts +3 -0
- package/dist/execution-sponsored-hosted.js +71 -0
- package/dist/execution-sponsored-index.d.ts +1322 -0
- package/dist/execution-sponsored-index.js +102 -0
- package/dist/execution-sponsored-mcp-definition.d.ts +1662 -0
- package/dist/execution-sponsored-mcp-definition.js +94 -0
- package/dist/execution-sponsored-receipt.d.ts +47 -0
- package/dist/execution-sponsored-receipt.js +74 -0
- package/dist/execution-sponsored-registration.d.ts +14 -0
- package/dist/execution-sponsored-registration.js +77 -0
- package/dist/execution-sponsored-runtime.d.ts +84 -0
- package/dist/execution-sponsored-runtime.js +149 -0
- package/dist/execution-sponsored-settlement.d.ts +15 -0
- package/dist/execution-sponsored-settlement.js +88 -0
- package/dist/execution-sponsored-store.d.ts +67 -0
- package/dist/execution-sponsored-store.js +517 -0
- package/dist/execution-sponsored-transport.d.ts +90 -0
- package/dist/execution-sponsored-transport.js +180 -0
- package/dist/execution-tool-definitions.d.ts +21 -21
- package/dist/execution-tool-definitions.js +0 -7
- package/dist/execution-tools.d.ts +9 -0
- package/dist/execution-tools.js +14 -0
- package/dist/execution-worker-guard.d.ts +28 -0
- package/dist/execution-worker-guard.js +124 -0
- package/dist/hybrid-yield-index.d.ts +10 -0
- package/dist/hybrid-yield-index.js +11 -0
- package/dist/hybrid-yield-markets.d.ts +96 -0
- package/dist/hybrid-yield-markets.js +124 -0
- package/dist/hybrid-yield.d.ts +411 -0
- package/dist/hybrid-yield.js +155 -0
- package/dist/hyperliquid-order-builder.js +4 -0
- package/dist/lp-userop-account.d.ts +461 -0
- package/dist/lp-userop-account.js +417 -0
- package/dist/lp-userop-authority.d.ts +49 -0
- package/dist/lp-userop-authority.js +211 -0
- package/dist/lp-userop-definition.d.ts +233 -0
- package/dist/lp-userop-definition.js +85 -0
- package/dist/lp-userop-hosted.d.ts +3 -0
- package/dist/lp-userop-hosted.js +73 -0
- package/dist/lp-userop-index.d.ts +1569 -0
- package/dist/lp-userop-index.js +112 -0
- package/dist/lp-userop-mcp-definition.d.ts +1220 -0
- package/dist/lp-userop-mcp-definition.js +46 -0
- package/dist/lp-userop-operation.d.ts +1230 -0
- package/dist/lp-userop-operation.js +140 -0
- package/dist/lp-userop-registration.d.ts +14 -0
- package/dist/lp-userop-registration.js +70 -0
- package/dist/lp-userop-settlement.d.ts +89 -0
- package/dist/lp-userop-settlement.js +184 -0
- package/dist/lp-userop.d.ts +643 -0
- package/dist/lp-userop.js +343 -0
- package/dist/native-yield-account-definition.d.ts +1192 -0
- package/dist/native-yield-account-definition.js +232 -0
- package/dist/native-yield-account-gas.d.ts +58 -0
- package/dist/native-yield-account-gas.js +228 -0
- package/dist/native-yield-account-index.d.ts +23 -0
- package/dist/native-yield-account-index.js +28 -0
- package/dist/native-yield-account-policy.d.ts +168 -0
- package/dist/native-yield-account-policy.js +525 -0
- package/dist/native-yield-account-rpc.d.ts +8 -0
- package/dist/native-yield-account-rpc.js +128 -0
- package/dist/native-yield-account-runtime.d.ts +71 -0
- package/dist/native-yield-account-runtime.js +125 -0
- package/dist/native-yield-account-store.d.ts +40 -0
- package/dist/native-yield-account-store.js +307 -0
- package/dist/native-yield-account.d.ts +662 -0
- package/dist/native-yield-account.js +371 -0
- package/dist/native-yield-consent-store.d.ts +20 -0
- package/dist/native-yield-consent-store.js +317 -0
- package/dist/native-yield-definition.d.ts +288 -0
- package/dist/native-yield-definition.js +105 -0
- package/dist/native-yield-reader.d.ts +4 -0
- package/dist/native-yield-reader.js +137 -0
- package/dist/native-yield-settlement.d.ts +48 -0
- package/dist/native-yield-settlement.js +167 -0
- package/dist/native-yield-simulation.d.ts +18 -0
- package/dist/native-yield-simulation.js +45 -0
- package/dist/native-yield-userop-account.d.ts +675 -0
- package/dist/native-yield-userop-account.js +357 -0
- package/dist/native-yield-userop-authority.d.ts +214 -0
- package/dist/native-yield-userop-authority.js +296 -0
- package/dist/native-yield-userop-definition.d.ts +331 -0
- package/dist/native-yield-userop-definition.js +105 -0
- package/dist/native-yield-userop-hosted.d.ts +3 -0
- package/dist/native-yield-userop-hosted.js +71 -0
- package/dist/native-yield-userop-index.d.ts +1522 -0
- package/dist/native-yield-userop-index.js +142 -0
- package/dist/native-yield-userop-mcp-definition.d.ts +1356 -0
- package/dist/native-yield-userop-mcp-definition.js +50 -0
- package/dist/native-yield-userop-operation.d.ts +845 -0
- package/dist/native-yield-userop-operation.js +127 -0
- package/dist/native-yield-userop-policy.d.ts +23 -0
- package/dist/native-yield-userop-policy.js +25 -0
- package/dist/native-yield-userop-registration.d.ts +17 -0
- package/dist/native-yield-userop-registration.js +76 -0
- package/dist/native-yield-userop-settlement.d.ts +8 -0
- package/dist/native-yield-userop-settlement.js +79 -0
- package/dist/native-yield-userop-simulation.d.ts +18 -0
- package/dist/native-yield-userop-simulation.js +34 -0
- package/dist/native-yield-userop.d.ts +35 -0
- package/dist/native-yield-userop.js +156 -0
- package/dist/native-yield-verify.d.ts +30 -0
- package/dist/native-yield-verify.js +141 -0
- package/dist/native-yield.d.ts +17 -0
- package/dist/native-yield.js +119 -0
- package/dist/stdio-main.js +0 -0
- package/dist/stock-buy-definition.d.ts +10 -10
- package/dist/tool-definitions.d.ts +3 -1
- package/dist/tool-definitions.js +54 -1
- package/dist/vendor/lp-v3/lp-v3-atomic-contract.d.ts +445 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-contract.js +90 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-evidence.d.ts +14 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-evidence.js +82 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-index.d.ts +80 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-index.js +19 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-plan.d.ts +43 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-plan.js +112 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-read-contract.d.ts +312 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-read-contract.js +41 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-read-index.d.ts +3 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-read-index.js +3 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-read-rpc.d.ts +49 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-read-rpc.js +88 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-read.d.ts +17 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-read.js +232 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-settlement.d.ts +105 -0
- package/dist/vendor/lp-v3/lp-v3-atomic-settlement.js +162 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-contract.d.ts +606 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-contract.js +59 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-index.d.ts +168 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-index.js +23 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-observation.d.ts +32 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-observation.js +228 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-plan.d.ts +11 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-plan.js +91 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-reconcile.d.ts +9 -0
- package/dist/vendor/lp-v3/lp-v3-collect-protocol-reconcile.js +124 -0
- package/dist/vendor/lp-v3/lp-v3-contract.d.ts +538 -0
- package/dist/vendor/lp-v3/lp-v3-contract.js +137 -0
- package/dist/vendor/lp-v3/lp-v3-evidence.d.ts +25 -0
- package/dist/vendor/lp-v3/lp-v3-evidence.js +168 -0
- package/dist/vendor/lp-v3/lp-v3-plan.d.ts +22 -0
- package/dist/vendor/lp-v3/lp-v3-plan.js +135 -0
- package/dist/vendor/lp-v3/types.d.ts +131 -0
- package/dist/vendor/lp-v3/types.js +6 -0
- package/dist/vendor/lp-v3/v4-math.d.ts +18 -0
- package/dist/vendor/lp-v3/v4-math.js +90 -0
- package/dist/yield-deposit-definition.d.ts +65 -14
- package/dist/yield-deposit-definition.js +6 -4
- package/dist/yield-deposit.js +8 -0
- package/dist/yield-route-semantics.d.ts +27 -0
- package/dist/yield-route-semantics.js +71 -0
- package/dist/yield-withdraw-definition.d.ts +62 -11
- package/dist/yield-withdraw-definition.js +3 -1
- package/dist/yield-withdraw.d.ts +0 -10
- package/dist/yield-withdraw.js +2 -0
- package/package.json +215 -7
package/README.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# Otto Intel MCP
|
|
2
2
|
|
|
3
|
-
Market intelligence and trade construction for AI agents, over MCP: SEC filings and insider flow for US stocks, tokenized equities on Robinhood Chain, Base and Polymarket market context, plus
|
|
3
|
+
Market intelligence and trade construction for AI agents, over MCP: SEC filings and insider flow for US stocks, tokenized equities on Robinhood Chain, Base and Polymarket market context, plus **constructors** for swaps, bridges, orders, tokenized-stock purchases and vault deposits or withdrawals. Pay per intelligence call in USDC on Base; on the hosted server the first successful eligible intelligence call from your network address is free.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
**This source is the staged `otto-intel-mcp@0.1.4` release candidate.** It includes the reviewed Optimism swap verifier and the library entries described below. Publication does not establish hosted deployment or activate native/sponsored/LP execution. The companion `otto-execute@0.1.4` candidate deliberately retains the aged MCP `0.1.3` verifier, so its Optimism EOA path remains refused until a later release repins this package after seven full days from publication.
|
|
6
|
+
|
|
7
|
+
- Hosted: `https://mcp.ottoai.services` — use `tools/list` to inspect the deployed registry. This source registers 34 tools when fully configured. Registry presence does not enable an execution rail; query its current availability.
|
|
8
|
+
- Local: `npx otto-intel-mcp` — the 13 intelligence tools, paid from a wallet you configure.
|
|
7
9
|
- Docs: https://docs.useotto.xyz/acp-swarm/otto-intel-mcp
|
|
8
10
|
|
|
9
11
|
## Quick start (hosted, under a minute)
|
|
@@ -27,20 +29,20 @@ claude mcp add otto-intel --transport http https://mcp.ottoai.services
|
|
|
27
29
|
**First call** — ask your agent, or call the tool directly:
|
|
28
30
|
|
|
29
31
|
```text
|
|
30
|
-
Use
|
|
32
|
+
Use otto_base_season and summarize the returned Base tokens and their freshness.
|
|
31
33
|
```
|
|
32
34
|
|
|
33
35
|
```json
|
|
34
|
-
{ "method": "tools/call", "params": { "name": "
|
|
36
|
+
{ "method": "tools/call", "params": { "name": "otto_base_season", "arguments": {} } }
|
|
35
37
|
```
|
|
36
38
|
|
|
37
39
|
(a standard MCP `tools/call` request — your MCP client wraps it in JSON-RPC and handles `initialize` and the Streamable HTTP session)
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
The first successful eligible cached intelligence call is free for a network address; crypto news is paid-only. Later calls return a payment request; your agent signs it with an x402 wallet and retries with the signed payload in `x_payment` — see [How paying works](#how-paying-works). The [Agent Quickstart](https://docs.useotto.xyz/getting-started/agent-quickstart) includes the complete Base example and receipt checks.
|
|
40
42
|
|
|
41
43
|
## Quick start (local)
|
|
42
44
|
|
|
43
|
-
Runs the
|
|
45
|
+
Runs the 13 intelligence tools on your machine and pays each call from a wallet you provide. It needs one variable, `X402_PRIVATE_KEY` — the key of a wallet holding some USDC on Base.
|
|
44
46
|
|
|
45
47
|
**Claude Code**
|
|
46
48
|
|
|
@@ -62,9 +64,9 @@ claude mcp add otto-intel -e X402_PRIVATE_KEY=0x… -- npx -y otto-intel-mcp
|
|
|
62
64
|
}
|
|
63
65
|
```
|
|
64
66
|
|
|
65
|
-
Requires Node 22 or newer. Optional: `X402_RPC_URL` (your own Base RPC), `X402_TIMEOUT_MS` (default 30000). The local server serves the
|
|
67
|
+
Requires Node 22 or newer. Optional: `X402_RPC_URL` (your own Base RPC), `X402_TIMEOUT_MS` (default 30000). The local server serves the 13 intelligence tools by default. To get an envelope from the hosted service, call `otto_prepare_swap` on `https://mcp.ottoai.services` (free). A paid local call carries the rail's settlement receipt in the result metadata under `com.ottoai/payment-response`, exactly like the hosted server.
|
|
66
68
|
|
|
67
|
-
|
|
69
|
+
Dependency audit results depend on the installed package versions and optional dependencies. The Hyperliquid execution client loads its venue SDK; run `npm audit` against the actual installation when assessing that path. `npm install otto-intel-mcp --omit=optional` drops the optional Coinbase subtree if you do not delegate.
|
|
68
70
|
|
|
69
71
|
## What you get
|
|
70
72
|
|
|
@@ -72,6 +74,8 @@ Requires Node 22 or newer. Optional: `X402_RPC_URL` (your own Base RPC), `X402_T
|
|
|
72
74
|
|
|
73
75
|
| Tool | Argument | Returns | Price |
|
|
74
76
|
| --- | --- | --- | ---: |
|
|
77
|
+
| `otto_crypto_news` | — | Ranked crypto headlines, source links, publication times and a market brief; paid-only | $0.001 |
|
|
78
|
+
| `otto_news_recaps` | — | Concise market recap, ranked stories, analysis window and freshness | $0.003 |
|
|
75
79
|
| `otto_tokenized_equities` | optional `thesis` | The live registry of US stocks and ETFs tokenized on Robinhood Chain — symbol, token address, reference price, tradability; with a thesis, a ranked shortlist with a match reason per row | $0.001 |
|
|
76
80
|
| `otto_rh_season` | — | Robinhood Chain movers, rug-screened, with per-token risk flags | $0.001 |
|
|
77
81
|
| `otto_equity_intel` | `ticker` | SEC fundamentals for a US ticker: revenue and net-income trend, margins, EPS, leverage, recent 10-K / 10-Q / 8-K filings, and a short summary | $0.003 |
|
|
@@ -82,19 +86,26 @@ Requires Node 22 or newer. Optional: `X402_RPC_URL` (your own Base RPC), `X402_T
|
|
|
82
86
|
| `otto_base_season` | — | Quality-screened Base tokens with current social and trusted-KOL context | $0.002 |
|
|
83
87
|
| `otto_pm_markets` | — | The highest-volume open Polymarket markets: outcome probabilities, bid/ask, liquidity, volume, end dates | $0.001 |
|
|
84
88
|
| `otto_pm_crypto` | — | The same for BTC, ETH and crypto Polymarket markets | $0.001 |
|
|
89
|
+
| `otto_stock_pools` | `stock` (`network:ticker` or `network:address`) | The DEX pools a tokenized US stock or ETF is a member of on Robinhood Chain, Base, BNB Chain or Solana: pool id, DEX and version, which side the asset is on, the counterpart token with an evidence-backed class, reported liquidity and 24h volume, and the coverage limits | $0.001 |
|
|
85
90
|
|
|
86
91
|
All of these return data and context, not recommendations.
|
|
87
92
|
|
|
93
|
+
**News access:** `otto_crypto_news` reads ranked headlines and a market brief for $0.001 USDC and is paid-only, preserving your free allowance. `otto_news_recaps` reads a concise recap and ranked stories for $0.003 USDC; a warm cached result can use the free allowance. A cold recap returns the payment challenge without unpaid generation. Both take `{}` (hosted paid retries add `x_payment`). These additions are in this source candidate; check the deployed `tools/list` before calling them.
|
|
94
|
+
|
|
88
95
|
### Execution constructors — hosted, free
|
|
89
96
|
|
|
90
|
-
A constructor builds the transaction; **your wallet signs and sends it.** Give it the address that will sign, and it returns an *envelope*: the ordered steps (for example allowance reset → approval → swap), every check it ran on its own output, a `valid_until`, and a digest so a stale or altered plan is detectable.
|
|
97
|
+
A constructor builds the transaction; **your wallet signs and sends it.** Give it the address that will sign, and it returns an *envelope*: the ordered steps (for example allowance reset → approval → swap), every check it ran on its own output, a `valid_until`, and a digest so a stale or altered plan is detectable. A constructor call itself never signs or submits. The protected app delegation and user-exit interfaces have separate authentication and submission contracts, described below.
|
|
91
98
|
|
|
92
99
|
| Tool | Builds | For |
|
|
93
100
|
| --- | --- | --- |
|
|
94
101
|
| `otto_prepare_swap` | A same-chain ERC-20 swap via LI.FI, as ready-to-sign steps | Your EOA or Safe on any supported EVM chain |
|
|
95
102
|
| `otto_prepare_bridge` | A cross-chain native-USDC bridge over Circle CCTP (Ethereum, Polygon, Base, Arbitrum, Avalanche) | Your EOA or Safe |
|
|
96
103
|
| `otto_prepare_polymarket_order` | A Polymarket CTF Exchange V2 limit order as typed data, tick and size validated against the live market | Your Polygon EOA |
|
|
97
|
-
| `
|
|
104
|
+
| `otto_prepare_stock_buy` | A registry-bound tokenized-stock purchase with Base USDC | Your Base account |
|
|
105
|
+
| `otto_prepare_yield_deposit` | A registry-bound vault deposit from Base USDC | Your Base account |
|
|
106
|
+
| `otto_prepare_yield_withdraw` | A registry-bound vault-share withdrawal into USDC in the same account | Your Base account |
|
|
107
|
+
|
|
108
|
+
**Hyperliquid retirement:** `otto_prepare_perp_order` is absent from public discovery and calls through old MCP definitions refuse with `HYPERLIQUID_RETIRED`. New orders, deposits and delegation are unavailable. Read-only market/account/history research and protected close, cancel, withdrawal, status and reconciliation remain. The retained unsigned SDK constructor accepts only explicit reduce-only recovery, and its order builder refuses any non-reduce-only leg. Existing balances and jobs are unknown until verified; no environment flag restores new Hyperliquid trading.
|
|
98
109
|
|
|
99
110
|
On a server with a chain view (the hosted rail), a quoted swap route is also **simulated from the address that will sign it** before it is prepared: the quote's shape is asserted first, then the asserted call is run against the node with the plan's own balance and allowance overridden. A route that reverts is re-quoted with that exchange denied; a route that cannot be simulated — a token whose storage layout has not been proven on-chain, a node that ignores overrides — is **refused by name rather than prepared unproven**. Today the proven tokens are USDC on Base and the two Yield Copilot vault shares (`gtUSDCp`, `steakUSDC`).
|
|
100
111
|
|
|
@@ -106,11 +117,57 @@ To verify, sign and submit an envelope from the command line or from code, use t
|
|
|
106
117
|
- `otto_x_recipes` — Otto X's X Layer recipe menu with each recipe's payment requirement.
|
|
107
118
|
- `otto_delegation_fence_status` — whether the delegated-send fence is installed on this server (read-only).
|
|
108
119
|
|
|
109
|
-
The other
|
|
120
|
+
The other delegation tools are protected server-to-server interfaces. Otto's app authenticates the end-user session before calling them. New Model B trading-permission reservations are retired; an existing permission can still be checked or revoked, and an already minted reservation can still be confirmed. The `otto-execute delegate` command does not create a new permission against the retirement server or expose general hosted delegated submission. Do not request or distribute Otto's private server header.
|
|
121
|
+
|
|
122
|
+
### App transfer recovery
|
|
123
|
+
|
|
124
|
+
This source provides three protected transfer/recovery interfaces, including the existing read surface and two new tools. Their presence in source does not establish that the hosted revision has been deployed or activated.
|
|
125
|
+
|
|
126
|
+
- `otto_delegation_operations` reads the authenticated user's saved operation history.
|
|
127
|
+
- `otto_delegation_reconcile` checks known Base transaction hashes for one saved operation. It updates matching receipts without resubmitting a CDP request or running another plan step.
|
|
128
|
+
- `otto_delegation_exit` prepares an exact Base USDC transfer for the user to sign with Coinbase. The service validates and saves those signed bytes before broadcasting. Its explicit `retry_same` action can send only the already-saved transaction; it cannot change the amount, recipient, nonce or signature.
|
|
129
|
+
|
|
130
|
+
An unresolved operation blocks conflicting activity across devices using the shared service journal. A missing transaction reference stays unresolved until its outcome can be proved. Revoking an Otto permission does not withdraw assets. Operators must complete the versioned readiness and worker-drain procedure in `SETUP.md` before activation.
|
|
131
|
+
|
|
132
|
+
### Sponsored account application entry — unreleased and inactive
|
|
133
|
+
|
|
134
|
+
The local candidate exports `otto-intel-mcp/sponsored-account`: `sponsoredAccountAvailability()` reports readiness, and `createSponsoredAccountService()` provides prepare, gas review, explicit submit, read and reconcile methods for one same-chain USDC-to-ERC20 swap. Native-currency output is refused because this version verifies ERC20 transfer settlement. The committed activation list is empty, so the factory refuses before opening a journal. With protected delegation configured, the source registers `otto_sponsored_account`; the dApp provides the current-session `POST /api/delegation/sponsored` API. Sending and recovery remain unavailable while the activation list is empty. The authenticated app review loads an existing swap or native operation ID; it does not provide a complete operation-preparation flow or a wallet upgrade action.
|
|
135
|
+
|
|
136
|
+
The planned same-address account transport covers Ethereum, Base, Arbitrum, Optimism and Polygon. It requires a separately approved Coinbase account upgrade, a reviewed sponsor policy and bounded gas budgets. It does not perform that wallet upgrade. Avalanche and BNB Chain are outside this Coinbase upgrade transport; the companion's EOA path uses user-funded gas there.
|
|
137
|
+
|
|
138
|
+
The implementation binds the current owner session and permission, verifies the exact swap, saves one idempotent provider request in the existing operation journal, and checks the individual UserOperation event plus token settlement before reporting completion. A provider acknowledgement alone is insufficient. Stop and recovery remain separate: an unresolved request keeps its claim and cannot be replaced with a fresh request.
|
|
139
|
+
|
|
140
|
+
Ordinary startup preserves coherent existing internal schema 2, 3 and 4 journals without DDL, marker changes or claim repair. A truly empty database initializes all storage as schema 4 with every rail unready; unsupported or inconsistent storage refuses without repair. An explicit existing-journal migration to schema 4 requires the separately approved old-worker drain and exact prior version/coverage. Sponsorship readiness is a separate operator action; it does not enable an activation or widen a wallet permission. Existing native-yield execution refuses upgraded, code-bearing EOAs, so account upgrade rollout requires a compatibility decision first.
|
|
141
|
+
|
|
142
|
+
### Native protocol UserOperations — source candidate, inactive
|
|
143
|
+
|
|
144
|
+
The local `otto-intel-mcp/yield-userop-account` entry and protected `otto_native_yield_userop` tool support availability, native scope review/confirmation, operation gas review, explicit submit, owned read/reconciliation and consent revocation. The application proxy is `/api/delegation/native-userop`. These actions require separately reviewed source activation, wallet authority and current consent; neither activation list contains an entry. The app can review an existing native operation ID, but sending stays unavailable without the separately reviewed activation and authority. No wallet-upgrade control is provided.
|
|
145
|
+
|
|
146
|
+
This transport verifies the native protocol calls and their settlement inside the account UserOperation. A receipt or simulation alone is insufficient. Native and swap operations share the existing journal, user claim, sponsor reservations and gas circuit breaker. An unresolved submission keeps the original operation identity and claim. Native consent does not authorize swaps, and a native-only provider policy cannot advertise swap execution.
|
|
147
|
+
|
|
148
|
+
Internal journal schema 5 is a separate, explicit offline migration after old workers are drained; ordinary startup never performs it. Schema 4 cannot admit the new record variant. Source publication, live migration, account upgrade and funded acceptance remain separate gates.
|
|
149
|
+
|
|
150
|
+
### Guarded LP collection UserOperations — source candidate, inactive
|
|
151
|
+
|
|
152
|
+
The `otto-intel-mcp/lp-userop-account` entry, protected `otto_lp_collect_userop` tool and `/api/delegation/lp-userop` application proxy provide availability, prepare, gas review, explicit submit, owned read and reconcile for one existing Uniswap V3 position on Base. The current app has no LP operation review panel. All source activation lists remain empty. A separate wallet upgrade, reviewed immutable guard and provider policy, explicit operation review and journal readiness are required.
|
|
153
|
+
|
|
154
|
+
The reviewed batch contains exactly the position approval and guarded collection. The guard restores the position's approval to zero on success; an atomic revert restores its previous state. Completion requires the exact UserOperation, finalized receipt, attributed token and guard events, and canonical protocol accounting. Collection can include previously owed principal and fees: profit remains `UNKNOWN`, and no distributable-profit amount is inferred.
|
|
155
|
+
|
|
156
|
+
LP, native and swap records share the same user claim, sponsor budget and gas circuit breaker. Ambiguous delivery retains the original request and claim. Recovery does not resubmit. Internal schema 6 requires a separate drained migration from schema 5 and an explicit LP readiness action. Source publication does not activate this rail.
|
|
157
|
+
|
|
158
|
+
### Initial gas subsidy and account-paid pilot — inactive
|
|
159
|
+
|
|
160
|
+
The three protected account tools also accept `reviewGas`, bound to the owned operation ID, current review commitment and requested payer preference. Refreshing an eligible, known-unsent review obtains current gas terms and requires fresh confirmation. Funding and **Check gas balance** never submit automatically; an unresolved provider request retains its original identity and claim.
|
|
161
|
+
|
|
162
|
+
For a separately activated pilot, Otto may cover at most **USD 0.10 of initial transaction network gas**, shared by every call in one UserOperation. Provider API usage, subscriptions, paymaster markup and other non-gas charges are outside that allowance. A fresh provider policy and conservative sponsored estimate are refusal controls; live provider enforcement still requires verification before activation.
|
|
163
|
+
|
|
164
|
+
Account-paid review is restricted to source-designated internal pilot accounts. The native-balance plus EntryPoint-deposit ceiling is an admission snapshot, not a persistent loss bound. The displayed estimate and separate 25% funding cushion are not a request-bound maximum fee; actual fees can differ. General real-user account-paid execution is outside this designated pilot and requires a separately reviewed activation scope. A payer change clears confirmation. Missing gas-price or sponsorship evidence cannot establish subsidy eligibility.
|
|
165
|
+
|
|
166
|
+
The gas-review fields introduce no new journal schema version or automatic migration; supported versions still depend on the operation variant. Older strict readers can nevertheless reject the new records. Keep compatible recovery readers and resolve the worker-drain/rollback plan before activation; preserve every unresolved claim. Source publication, account funding and ordinary deployment do not activate the pilot.
|
|
110
167
|
|
|
111
168
|
## How paying works
|
|
112
169
|
|
|
113
|
-
Calls are priced per tool ($0.001–$0.10) and paid in USDC on Base through x402. On the hosted server the first successful intelligence call from your network address (IP) is free; every call after that needs a payment:
|
|
170
|
+
Calls are priced per tool ($0.001–$0.10) and paid in USDC on Base through x402. On the hosted server the first successful eligible intelligence call from your network address (IP) is free; every call after that needs a payment:
|
|
114
171
|
|
|
115
172
|
1. Call the tool without `x_payment` → it returns `payment_required` (below) with the price and the exact requirement.
|
|
116
173
|
2. Sign it with an x402 client from a wallet holding USDC on Base. With `@x402/core` + `@x402/evm` + `viem`:
|
|
@@ -135,7 +192,7 @@ const x_payment = encodePaymentSignatureHeader(payload); // base64 — the PAYME
|
|
|
135
192
|
|
|
136
193
|
3. Retry the same tool with that string in `x_payment`. The paid result carries the settlement receipt in its metadata under `com.ottoai/payment-response` — keep it; it is the proof a later rating or refund claim is made against.
|
|
137
194
|
|
|
138
|
-
If a route has no result for your input, it answers promptly and the free call is not consumed. If a paid delivery is interrupted, retry the same input with the same `x_payment
|
|
195
|
+
If a route has no result for your input, it answers promptly and the free call is not consumed. If a paid delivery is interrupted, promptly retry the same input with the same `x_payment`; do not sign a new authorization merely to retry. The service may replay a saved result without another settlement while its delivery window permits. If it reports `settlement_unconfirmed` or `delivery_replay_expired`, retain the receipt and follow the response instructions or contact [support](https://docs.useotto.xyz/support-and-feedback/getting-help). Replay is not unlimited, and a receipt alone does not prove the expected data arrived.
|
|
139
196
|
|
|
140
197
|
`payment_required` is the standard x402 v2 body (`accepts[0]` is the requirement to sign; `payment.requirement` is the same one, flattened for reading; `payment_required_header` is it base64-encoded for clients that consume the header form). Each requirement is valid for 300 seconds. If your MCP client has no x402 wallet of its own, the local server is the simplest route: it signs every payment from `X402_PRIVATE_KEY` automatically, with no free call.
|
|
141
198
|
|
|
@@ -195,7 +252,7 @@ An unpaid call after the free one returns `isError: true` with this payload (abb
|
|
|
195
252
|
}
|
|
196
253
|
```
|
|
197
254
|
|
|
198
|
-
Constructor arguments (addresses are `0x` + 40 hex; swap and bridge amounts are strings in atomic token units; Polymarket price/size
|
|
255
|
+
Constructor arguments (addresses are `0x` + 40 hex; swap and bridge amounts are strings in atomic token units; Polymarket price/size are plain decimal strings):
|
|
199
256
|
|
|
200
257
|
```json
|
|
201
258
|
{
|
|
@@ -214,13 +271,12 @@ Constructor arguments (addresses are `0x` + 40 hex; swap and bridge amounts are
|
|
|
214
271
|
|
|
215
272
|
- `otto_prepare_bridge`: `accountProfile`, `fromChainId`, `toChainId`, `fromToken`, `toToken` (native USDC on each side), `fromAmount`, `slippage`, optional `destinationRecipient` (required for a Safe).
|
|
216
273
|
- `otto_prepare_polymarket_order`: `accountProfile` (chainId 137), `tokenId` (the outcome token, not the condition id), `side` `BUY|SELL`, `price` (e.g. `"0.045"`, on the market's tick), `size` (shares).
|
|
217
|
-
- `otto_prepare_perp_order`: `accountProfile` (chainId 1337), `asset` (e.g. `"BTC"`), `side`, `size`, `limitPrice`, optional `timeInForce` `Gtc|Ioc|Alo`, `reduceOnly`, `takeProfitPrice`, `stopLossPrice`, `tradingSigner`, `vaultAddress`.
|
|
218
274
|
|
|
219
275
|
Every tool's full description and JSON schema comes back from `tools/list`.
|
|
220
276
|
|
|
221
277
|
## Using this package as a library
|
|
222
278
|
|
|
223
|
-
|
|
279
|
+
Use the package subpaths; there is no root import. Code that consumes constructor envelopes uses:
|
|
224
280
|
|
|
225
281
|
- `otto-intel-mcp/execution` — the envelope schema and types, the digest and freshness assertions, the fee and delegation constants.
|
|
226
282
|
- `otto-intel-mcp/adapter` — verify an envelope against your own intent and sign or submit it with an EOA.
|
|
@@ -233,6 +289,6 @@ Field-by-field documentation: https://docs.useotto.xyz/acp-swarm/execution-seam.
|
|
|
233
289
|
- Docs: https://docs.useotto.xyz/acp-swarm/otto-intel-mcp · execution seam: https://docs.useotto.xyz/acp-swarm/execution-seam
|
|
234
290
|
- The full Otto x402 catalog: https://x402.ottoai.services
|
|
235
291
|
- Otto AI: https://useotto.xyz · X: [@useOttoAI](https://x.com/useOttoAI)
|
|
236
|
-
- Changelog: 0.1.3 — swap-shaped constructors on a server with a chain view now SIMULATE the quoted route from the signing account before preparing it (a reverting exchange tool is re-quoted and denied; an unprovable route is refused by name — see the execution constructors section), and the library entries ship the fence-v2 policy lineage (`MODEL_B_POLICY_*_V2`, `MODEL_B_POLICY_DIGEST_BY_NAME`) that the `otto-execute` CLI needs to recognise the current fence; 0.1.2 — the hosted front door (`GET /`, `/health`) reports the live tool registry (21 tools, never a literal), the local server carries the settlement receipt like the hosted one, constructor descriptions state the freshness window, `serverInfo.version` = the package version; 0.1.1 — README rewritten for first-time users and agents, source maps removed from the package, publish gated by a privacy audit; 0.1.0 — first release (hosted + local server, execution constructors, library entries).
|
|
292
|
+
- Changelog: 0.1.4 candidate — reviewed Optimism swap construction/verification, hybrid/native yield library entries, a fenced sponsored-account entry and shared journal schema v4. Ordinary startup preserves coherent existing journals; an explicit migration requires the separately approved old-worker drain. Package publication alone does not activate these paths. 0.1.3 — swap-shaped constructors on a server with a chain view now SIMULATE the quoted route from the signing account before preparing it (a reverting exchange tool is re-quoted and denied; an unprovable route is refused by name — see the execution constructors section), and the library entries ship the fence-v2 policy lineage (`MODEL_B_POLICY_*_V2`, `MODEL_B_POLICY_DIGEST_BY_NAME`) that the `otto-execute` CLI needs to recognise the current fence; 0.1.2 — the hosted front door (`GET /`, `/health`) reports the live tool registry (21 tools, never a literal), the local server carries the settlement receipt like the hosted one, constructor descriptions state the freshness window, `serverInfo.version` = the package version; 0.1.1 — README rewritten for first-time users and agents, source maps removed from the package, publish gated by a privacy audit; 0.1.0 — first release (hosted + local server, execution constructors, library entries).
|
|
237
293
|
|
|
238
294
|
Running the hosted server yourself, or building from the monorepo: see `SETUP.md` in the repository.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Pure schema for a separately reviewed full native-plus-LP provider policy. */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const ACCOUNT_NATIVE_LP_USEROP_COMPILER: "legacy-v2-native-lp-collect-enduser-userop-v1";
|
|
4
|
+
export declare const SPONSORED_LP_USEROP_POLICY_RELATION_SCHEMA: z.ZodObject<{
|
|
5
|
+
compiler: z.ZodLiteral<"legacy-v2-native-lp-collect-enduser-userop-v1">;
|
|
6
|
+
nativeCompiledPolicyDigest: z.ZodString;
|
|
7
|
+
nativeActivationCommitment: z.ZodString;
|
|
8
|
+
nativeRulesDigest: z.ZodString;
|
|
9
|
+
lpActivationCommitment: z.ZodString;
|
|
10
|
+
lpRulesDigest: z.ZodString;
|
|
11
|
+
compiledFullPolicyDigest: z.ZodString;
|
|
12
|
+
relationReviewEvidenceDigest: z.ZodString;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
export type LpUserOpPolicyRelation = z.infer<typeof SPONSORED_LP_USEROP_POLICY_RELATION_SCHEMA>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Pure schema for a separately reviewed full native-plus-LP provider policy. */
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
const digest = z.string().regex(/^[0-9a-f]{64}$/).refine(value => !/^0+$/.test(value));
|
|
4
|
+
const commitment = z.string().regex(/^sha256:[0-9a-f]{64}$/);
|
|
5
|
+
export const ACCOUNT_NATIVE_LP_USEROP_COMPILER = 'legacy-v2-native-lp-collect-enduser-userop-v1';
|
|
6
|
+
export const SPONSORED_LP_USEROP_POLICY_RELATION_SCHEMA = z.object({
|
|
7
|
+
compiler: z.literal(ACCOUNT_NATIVE_LP_USEROP_COMPILER),
|
|
8
|
+
nativeCompiledPolicyDigest: digest, nativeActivationCommitment: commitment, nativeRulesDigest: digest,
|
|
9
|
+
lpActivationCommitment: commitment, lpRulesDigest: digest, compiledFullPolicyDigest: digest,
|
|
10
|
+
relationReviewEvidenceDigest: digest,
|
|
11
|
+
}).strict();
|
|
12
|
+
//# sourceMappingURL=account-userop-policy-definition.js.map
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
import type { NativeYieldAccountActivation } from './native-yield-account-definition.js';
|
|
2
|
+
import type { SponsoredActivation } from './execution-sponsored-definition.js';
|
|
3
|
+
import { type LpUserOpActivation } from './lp-userop-definition.js';
|
|
4
|
+
export { ACCOUNT_NATIVE_LP_USEROP_COMPILER, SPONSORED_LP_USEROP_POLICY_RELATION_SCHEMA, type LpUserOpPolicyRelation } from './account-userop-policy-definition.js';
|
|
5
|
+
export declare class LpUserOpPolicyRefusal extends Error {
|
|
6
|
+
readonly code: string;
|
|
7
|
+
constructor(code: string);
|
|
8
|
+
}
|
|
9
|
+
export declare function lpUserOpActivationCommitment(raw: LpUserOpActivation): `sha256:${string}`;
|
|
10
|
+
/**
|
|
11
|
+
* Provider scope is per call: Base, zero native value, pinned NPM/guard, and only
|
|
12
|
+
* approve(guard, tokenId) or the guard's exact collect selector. The immutable
|
|
13
|
+
* guard enforces the caller/recipient, position, pair and atomic NFT cleanup.
|
|
14
|
+
* The host separately enforces exactly [approve, collect]. This provider rule
|
|
15
|
+
* cannot express batch cardinality/order; allowed subsets/repetitions remain a
|
|
16
|
+
* provider-authority residual, including a standalone approval to the guard.
|
|
17
|
+
* Tuple-parameter enforcement is not claimed. Provider acceptance and denial
|
|
18
|
+
* evidence remain an activation gate, independent of SDK schema parsing.
|
|
19
|
+
*/
|
|
20
|
+
export declare function compileLpCollectEndUserOperationRules(raw: LpUserOpActivation): {
|
|
21
|
+
action: "accept";
|
|
22
|
+
operation: "sendEndUserOperation";
|
|
23
|
+
criteria: ({
|
|
24
|
+
type: "evmNetwork";
|
|
25
|
+
networks: "base"[];
|
|
26
|
+
operator: "in";
|
|
27
|
+
ethValue?: undefined;
|
|
28
|
+
addresses?: undefined;
|
|
29
|
+
abi?: undefined;
|
|
30
|
+
conditions?: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
type: "ethValue";
|
|
33
|
+
ethValue: string;
|
|
34
|
+
operator: "<=";
|
|
35
|
+
networks?: undefined;
|
|
36
|
+
addresses?: undefined;
|
|
37
|
+
abi?: undefined;
|
|
38
|
+
conditions?: undefined;
|
|
39
|
+
} | {
|
|
40
|
+
type: "evmAddress";
|
|
41
|
+
addresses: `0x${string}`[];
|
|
42
|
+
operator: "in";
|
|
43
|
+
networks?: undefined;
|
|
44
|
+
ethValue?: undefined;
|
|
45
|
+
abi?: undefined;
|
|
46
|
+
conditions?: undefined;
|
|
47
|
+
} | {
|
|
48
|
+
type: "evmData";
|
|
49
|
+
abi: ({
|
|
50
|
+
readonly name: "approve";
|
|
51
|
+
readonly type: "function";
|
|
52
|
+
readonly stateMutability: "nonpayable";
|
|
53
|
+
readonly inputs: readonly [{
|
|
54
|
+
readonly type: "address";
|
|
55
|
+
readonly name: "to";
|
|
56
|
+
}, {
|
|
57
|
+
readonly type: "uint256";
|
|
58
|
+
readonly name: "tokenId";
|
|
59
|
+
}];
|
|
60
|
+
readonly outputs: readonly [];
|
|
61
|
+
} | {
|
|
62
|
+
readonly name: "collect";
|
|
63
|
+
readonly type: "function";
|
|
64
|
+
readonly stateMutability: "nonpayable";
|
|
65
|
+
readonly inputs: readonly [{
|
|
66
|
+
readonly type: "tuple";
|
|
67
|
+
readonly components: readonly [{
|
|
68
|
+
readonly type: "address";
|
|
69
|
+
readonly name: "owner";
|
|
70
|
+
}, {
|
|
71
|
+
readonly type: "address";
|
|
72
|
+
readonly name: "pool";
|
|
73
|
+
}, {
|
|
74
|
+
readonly type: "uint256";
|
|
75
|
+
readonly name: "tokenId";
|
|
76
|
+
}, {
|
|
77
|
+
readonly type: "int24";
|
|
78
|
+
readonly name: "tickLower";
|
|
79
|
+
}, {
|
|
80
|
+
readonly type: "int24";
|
|
81
|
+
readonly name: "tickUpper";
|
|
82
|
+
}, {
|
|
83
|
+
readonly type: "uint128";
|
|
84
|
+
readonly name: "amount0Max";
|
|
85
|
+
}, {
|
|
86
|
+
readonly type: "uint128";
|
|
87
|
+
readonly name: "amount1Max";
|
|
88
|
+
}, {
|
|
89
|
+
readonly type: "uint256";
|
|
90
|
+
readonly name: "amount0Min";
|
|
91
|
+
}, {
|
|
92
|
+
readonly type: "uint256";
|
|
93
|
+
readonly name: "amount1Min";
|
|
94
|
+
}, {
|
|
95
|
+
readonly type: "uint256";
|
|
96
|
+
readonly name: "deadline";
|
|
97
|
+
}];
|
|
98
|
+
readonly name: "params";
|
|
99
|
+
}];
|
|
100
|
+
readonly outputs: readonly [{
|
|
101
|
+
readonly type: "uint256";
|
|
102
|
+
readonly name: "amount0";
|
|
103
|
+
}, {
|
|
104
|
+
readonly type: "uint256";
|
|
105
|
+
readonly name: "amount1";
|
|
106
|
+
}];
|
|
107
|
+
})[];
|
|
108
|
+
conditions: ({
|
|
109
|
+
function: string;
|
|
110
|
+
params: {
|
|
111
|
+
name: string;
|
|
112
|
+
operator: "in";
|
|
113
|
+
values: `0x${string}`[];
|
|
114
|
+
}[];
|
|
115
|
+
} | {
|
|
116
|
+
function: string;
|
|
117
|
+
params?: undefined;
|
|
118
|
+
})[];
|
|
119
|
+
networks?: undefined;
|
|
120
|
+
operator?: undefined;
|
|
121
|
+
ethValue?: undefined;
|
|
122
|
+
addresses?: undefined;
|
|
123
|
+
})[];
|
|
124
|
+
}[];
|
|
125
|
+
export declare function compileNativeLpCollectEndUserOperationPolicy(nativeActivation: NativeYieldAccountActivation, rawLpActivation: LpUserOpActivation): {
|
|
126
|
+
body: {
|
|
127
|
+
scope: "project";
|
|
128
|
+
description: "OTTO model b swap fence v3";
|
|
129
|
+
rules: (import("./execution-delegation-policy.js").DelegationPolicyRule | {
|
|
130
|
+
operation: "sendEndUserOperation";
|
|
131
|
+
action: "accept";
|
|
132
|
+
criteria: readonly import("./native-yield-account-policy.js").NativeYieldAccountPolicyCriterion[];
|
|
133
|
+
} | {
|
|
134
|
+
action: "accept";
|
|
135
|
+
operation: "sendEndUserOperation";
|
|
136
|
+
criteria: ({
|
|
137
|
+
type: "evmNetwork";
|
|
138
|
+
networks: "base"[];
|
|
139
|
+
operator: "in";
|
|
140
|
+
ethValue?: undefined;
|
|
141
|
+
addresses?: undefined;
|
|
142
|
+
abi?: undefined;
|
|
143
|
+
conditions?: undefined;
|
|
144
|
+
} | {
|
|
145
|
+
type: "ethValue";
|
|
146
|
+
ethValue: string;
|
|
147
|
+
operator: "<=";
|
|
148
|
+
networks?: undefined;
|
|
149
|
+
addresses?: undefined;
|
|
150
|
+
abi?: undefined;
|
|
151
|
+
conditions?: undefined;
|
|
152
|
+
} | {
|
|
153
|
+
type: "evmAddress";
|
|
154
|
+
addresses: `0x${string}`[];
|
|
155
|
+
operator: "in";
|
|
156
|
+
networks?: undefined;
|
|
157
|
+
ethValue?: undefined;
|
|
158
|
+
abi?: undefined;
|
|
159
|
+
conditions?: undefined;
|
|
160
|
+
} | {
|
|
161
|
+
type: "evmData";
|
|
162
|
+
abi: ({
|
|
163
|
+
readonly name: "approve";
|
|
164
|
+
readonly type: "function";
|
|
165
|
+
readonly stateMutability: "nonpayable";
|
|
166
|
+
readonly inputs: readonly [{
|
|
167
|
+
readonly type: "address";
|
|
168
|
+
readonly name: "to";
|
|
169
|
+
}, {
|
|
170
|
+
readonly type: "uint256";
|
|
171
|
+
readonly name: "tokenId";
|
|
172
|
+
}];
|
|
173
|
+
readonly outputs: readonly [];
|
|
174
|
+
} | {
|
|
175
|
+
readonly name: "collect";
|
|
176
|
+
readonly type: "function";
|
|
177
|
+
readonly stateMutability: "nonpayable";
|
|
178
|
+
readonly inputs: readonly [{
|
|
179
|
+
readonly type: "tuple";
|
|
180
|
+
readonly components: readonly [{
|
|
181
|
+
readonly type: "address";
|
|
182
|
+
readonly name: "owner";
|
|
183
|
+
}, {
|
|
184
|
+
readonly type: "address";
|
|
185
|
+
readonly name: "pool";
|
|
186
|
+
}, {
|
|
187
|
+
readonly type: "uint256";
|
|
188
|
+
readonly name: "tokenId";
|
|
189
|
+
}, {
|
|
190
|
+
readonly type: "int24";
|
|
191
|
+
readonly name: "tickLower";
|
|
192
|
+
}, {
|
|
193
|
+
readonly type: "int24";
|
|
194
|
+
readonly name: "tickUpper";
|
|
195
|
+
}, {
|
|
196
|
+
readonly type: "uint128";
|
|
197
|
+
readonly name: "amount0Max";
|
|
198
|
+
}, {
|
|
199
|
+
readonly type: "uint128";
|
|
200
|
+
readonly name: "amount1Max";
|
|
201
|
+
}, {
|
|
202
|
+
readonly type: "uint256";
|
|
203
|
+
readonly name: "amount0Min";
|
|
204
|
+
}, {
|
|
205
|
+
readonly type: "uint256";
|
|
206
|
+
readonly name: "amount1Min";
|
|
207
|
+
}, {
|
|
208
|
+
readonly type: "uint256";
|
|
209
|
+
readonly name: "deadline";
|
|
210
|
+
}];
|
|
211
|
+
readonly name: "params";
|
|
212
|
+
}];
|
|
213
|
+
readonly outputs: readonly [{
|
|
214
|
+
readonly type: "uint256";
|
|
215
|
+
readonly name: "amount0";
|
|
216
|
+
}, {
|
|
217
|
+
readonly type: "uint256";
|
|
218
|
+
readonly name: "amount1";
|
|
219
|
+
}];
|
|
220
|
+
})[];
|
|
221
|
+
conditions: ({
|
|
222
|
+
function: string;
|
|
223
|
+
params: {
|
|
224
|
+
name: string;
|
|
225
|
+
operator: "in";
|
|
226
|
+
values: `0x${string}`[];
|
|
227
|
+
}[];
|
|
228
|
+
} | {
|
|
229
|
+
function: string;
|
|
230
|
+
params?: undefined;
|
|
231
|
+
})[];
|
|
232
|
+
networks?: undefined;
|
|
233
|
+
operator?: undefined;
|
|
234
|
+
ethValue?: undefined;
|
|
235
|
+
addresses?: undefined;
|
|
236
|
+
})[];
|
|
237
|
+
})[];
|
|
238
|
+
};
|
|
239
|
+
compiler: "legacy-v2-native-lp-collect-enduser-userop-v1";
|
|
240
|
+
nativeCompiledPolicyDigest: string;
|
|
241
|
+
nativeActivationCommitment: `sha256:${string}`;
|
|
242
|
+
nativeRulesDigest: string;
|
|
243
|
+
lpActivationCommitment: `sha256:${string}`;
|
|
244
|
+
lpRulesDigest: string;
|
|
245
|
+
compiledFullPolicyDigest: string;
|
|
246
|
+
};
|
|
247
|
+
/** Preserve the existing native-only compiler proof; the new relation binds the augmented actual policy. */
|
|
248
|
+
export declare function assertNativeLpCollectPolicyRelation(nativeActivation: NativeYieldAccountActivation, sponsorActivation: SponsoredActivation & {
|
|
249
|
+
readonly lpUserOpPolicyRelation?: unknown;
|
|
250
|
+
}, lpActivation: LpUserOpActivation): {
|
|
251
|
+
body: {
|
|
252
|
+
scope: "project";
|
|
253
|
+
description: "OTTO model b swap fence v3";
|
|
254
|
+
rules: (import("./execution-delegation-policy.js").DelegationPolicyRule | {
|
|
255
|
+
operation: "sendEndUserOperation";
|
|
256
|
+
action: "accept";
|
|
257
|
+
criteria: readonly import("./native-yield-account-policy.js").NativeYieldAccountPolicyCriterion[];
|
|
258
|
+
} | {
|
|
259
|
+
action: "accept";
|
|
260
|
+
operation: "sendEndUserOperation";
|
|
261
|
+
criteria: ({
|
|
262
|
+
type: "evmNetwork";
|
|
263
|
+
networks: "base"[];
|
|
264
|
+
operator: "in";
|
|
265
|
+
ethValue?: undefined;
|
|
266
|
+
addresses?: undefined;
|
|
267
|
+
abi?: undefined;
|
|
268
|
+
conditions?: undefined;
|
|
269
|
+
} | {
|
|
270
|
+
type: "ethValue";
|
|
271
|
+
ethValue: string;
|
|
272
|
+
operator: "<=";
|
|
273
|
+
networks?: undefined;
|
|
274
|
+
addresses?: undefined;
|
|
275
|
+
abi?: undefined;
|
|
276
|
+
conditions?: undefined;
|
|
277
|
+
} | {
|
|
278
|
+
type: "evmAddress";
|
|
279
|
+
addresses: `0x${string}`[];
|
|
280
|
+
operator: "in";
|
|
281
|
+
networks?: undefined;
|
|
282
|
+
ethValue?: undefined;
|
|
283
|
+
abi?: undefined;
|
|
284
|
+
conditions?: undefined;
|
|
285
|
+
} | {
|
|
286
|
+
type: "evmData";
|
|
287
|
+
abi: ({
|
|
288
|
+
readonly name: "approve";
|
|
289
|
+
readonly type: "function";
|
|
290
|
+
readonly stateMutability: "nonpayable";
|
|
291
|
+
readonly inputs: readonly [{
|
|
292
|
+
readonly type: "address";
|
|
293
|
+
readonly name: "to";
|
|
294
|
+
}, {
|
|
295
|
+
readonly type: "uint256";
|
|
296
|
+
readonly name: "tokenId";
|
|
297
|
+
}];
|
|
298
|
+
readonly outputs: readonly [];
|
|
299
|
+
} | {
|
|
300
|
+
readonly name: "collect";
|
|
301
|
+
readonly type: "function";
|
|
302
|
+
readonly stateMutability: "nonpayable";
|
|
303
|
+
readonly inputs: readonly [{
|
|
304
|
+
readonly type: "tuple";
|
|
305
|
+
readonly components: readonly [{
|
|
306
|
+
readonly type: "address";
|
|
307
|
+
readonly name: "owner";
|
|
308
|
+
}, {
|
|
309
|
+
readonly type: "address";
|
|
310
|
+
readonly name: "pool";
|
|
311
|
+
}, {
|
|
312
|
+
readonly type: "uint256";
|
|
313
|
+
readonly name: "tokenId";
|
|
314
|
+
}, {
|
|
315
|
+
readonly type: "int24";
|
|
316
|
+
readonly name: "tickLower";
|
|
317
|
+
}, {
|
|
318
|
+
readonly type: "int24";
|
|
319
|
+
readonly name: "tickUpper";
|
|
320
|
+
}, {
|
|
321
|
+
readonly type: "uint128";
|
|
322
|
+
readonly name: "amount0Max";
|
|
323
|
+
}, {
|
|
324
|
+
readonly type: "uint128";
|
|
325
|
+
readonly name: "amount1Max";
|
|
326
|
+
}, {
|
|
327
|
+
readonly type: "uint256";
|
|
328
|
+
readonly name: "amount0Min";
|
|
329
|
+
}, {
|
|
330
|
+
readonly type: "uint256";
|
|
331
|
+
readonly name: "amount1Min";
|
|
332
|
+
}, {
|
|
333
|
+
readonly type: "uint256";
|
|
334
|
+
readonly name: "deadline";
|
|
335
|
+
}];
|
|
336
|
+
readonly name: "params";
|
|
337
|
+
}];
|
|
338
|
+
readonly outputs: readonly [{
|
|
339
|
+
readonly type: "uint256";
|
|
340
|
+
readonly name: "amount0";
|
|
341
|
+
}, {
|
|
342
|
+
readonly type: "uint256";
|
|
343
|
+
readonly name: "amount1";
|
|
344
|
+
}];
|
|
345
|
+
})[];
|
|
346
|
+
conditions: ({
|
|
347
|
+
function: string;
|
|
348
|
+
params: {
|
|
349
|
+
name: string;
|
|
350
|
+
operator: "in";
|
|
351
|
+
values: `0x${string}`[];
|
|
352
|
+
}[];
|
|
353
|
+
} | {
|
|
354
|
+
function: string;
|
|
355
|
+
params?: undefined;
|
|
356
|
+
})[];
|
|
357
|
+
networks?: undefined;
|
|
358
|
+
operator?: undefined;
|
|
359
|
+
ethValue?: undefined;
|
|
360
|
+
addresses?: undefined;
|
|
361
|
+
})[];
|
|
362
|
+
})[];
|
|
363
|
+
};
|
|
364
|
+
compiler: "legacy-v2-native-lp-collect-enduser-userop-v1";
|
|
365
|
+
nativeCompiledPolicyDigest: string;
|
|
366
|
+
nativeActivationCommitment: `sha256:${string}`;
|
|
367
|
+
nativeRulesDigest: string;
|
|
368
|
+
lpActivationCommitment: `sha256:${string}`;
|
|
369
|
+
lpRulesDigest: string;
|
|
370
|
+
compiledFullPolicyDigest: string;
|
|
371
|
+
};
|