@dev.sail.money/sailor 0.0.2-12 → 0.0.2-13

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.
Files changed (124) hide show
  1. package/AGENTS.md +1 -1
  2. package/README.md +27 -26
  3. package/package.json +1 -1
  4. package/packages/cli/dist/index.cjs +20 -40
  5. package/packages/sdk/dist/intelligence.d.ts +1 -1
  6. package/packages/sdk/dist/intelligence.js +1 -1
  7. package/packages/ui/dist/assets/{add-DaJhwIBV.js → add-BHtIsGoW.js} +1 -1
  8. package/packages/ui/dist/assets/{all-wallets-BUxsqWXi.js → all-wallets-BH8IiQp_.js} +1 -1
  9. package/packages/ui/dist/assets/{app-store-DkltwTqE.js → app-store-C7je0Hvt.js} +1 -1
  10. package/packages/ui/dist/assets/{apple-owVOeaIT.js → apple-C24YGi7n.js} +1 -1
  11. package/packages/ui/dist/assets/{arrow-bottom-D2mmNJve.js → arrow-bottom-NmB75e6T.js} +1 -1
  12. package/packages/ui/dist/assets/{arrow-bottom-circle-CbNYijx-.js → arrow-bottom-circle-D9vkbcGm.js} +1 -1
  13. package/packages/ui/dist/assets/{arrow-left-DJB61s4C.js → arrow-left-BXX7egmu.js} +1 -1
  14. package/packages/ui/dist/assets/{arrow-right-BBrsQ9R4.js → arrow-right-CL5l1ER5.js} +1 -1
  15. package/packages/ui/dist/assets/{arrow-top-Cil6bOc8.js → arrow-top-B3NcsHvl.js} +1 -1
  16. package/packages/ui/dist/assets/{bank-CbwEmRo3.js → bank-DyxCAL_C.js} +1 -1
  17. package/packages/ui/dist/assets/{basic-CLNfjw3m.js → basic-CnjXr1WW.js} +1 -1
  18. package/packages/ui/dist/assets/{browser-B5TtF4Pb.js → browser-C1sQ7PjQ.js} +1 -1
  19. package/packages/ui/dist/assets/{card-CO7BVB-C.js → card-DUcWbZgm.js} +1 -1
  20. package/packages/ui/dist/assets/{ccip-2W7K3_J3.js → ccip-ZC8164Ut.js} +1 -1
  21. package/packages/ui/dist/assets/{checkmark-BEtSHq9m.js → checkmark-BFIb0gZI.js} +1 -1
  22. package/packages/ui/dist/assets/{checkmark-bold-D9xGHzPE.js → checkmark-bold-GxOovLvw.js} +1 -1
  23. package/packages/ui/dist/assets/{chevron-bottom-BDztht6i.js → chevron-bottom-BWFm5iOO.js} +1 -1
  24. package/packages/ui/dist/assets/{chevron-left-EV4GFNbc.js → chevron-left-Dw1vrfPS.js} +1 -1
  25. package/packages/ui/dist/assets/{chevron-right-B4_bB9oR.js → chevron-right-Lj-4a_f7.js} +1 -1
  26. package/packages/ui/dist/assets/{chevron-top-D54xPNzF.js → chevron-top-CNtyUs8e.js} +1 -1
  27. package/packages/ui/dist/assets/{chrome-store-DYUpAJJq.js → chrome-store-BFjfxT2g.js} +1 -1
  28. package/packages/ui/dist/assets/{clock-Ca1T1Soz.js → clock-upNWT1cC.js} +1 -1
  29. package/packages/ui/dist/assets/{close-BZqWjurK.js → close-BXOvqFtp.js} +1 -1
  30. package/packages/ui/dist/assets/{coinPlaceholder-e6fl2XDo.js → coinPlaceholder-IDofua41.js} +1 -1
  31. package/packages/ui/dist/assets/{compass-DCLC7zIh.js → compass-Du2xGTuZ.js} +1 -1
  32. package/packages/ui/dist/assets/{copy-Th2AaD-O.js → copy-thfTJs3L.js} +1 -1
  33. package/packages/ui/dist/assets/{core-Ckx_cyuH.js → core-C8jSlwHY.js} +3 -3
  34. package/packages/ui/dist/assets/cursor-Dc-Hxk5X.js +3 -0
  35. package/packages/ui/dist/assets/{cursor-transparent-BKHeABKB.js → cursor-transparent-DGzNzXxd.js} +1 -1
  36. package/packages/ui/dist/assets/{desktop-CBjY8t6F.js → desktop-BozY9d6T.js} +1 -1
  37. package/packages/ui/dist/assets/{disconnect-DbSs2cli.js → disconnect-B-oC8Fzu.js} +1 -1
  38. package/packages/ui/dist/assets/{discord-ZlLOAUkM.js → discord-CpgvcuGY.js} +1 -1
  39. package/packages/ui/dist/assets/{etherscan-CKUrqWYN.js → etherscan-DB-rL796.js} +1 -1
  40. package/packages/ui/dist/assets/{events-CiKP71cK.js → events-i9ztcj9W.js} +1 -1
  41. package/packages/ui/dist/assets/{exclamation-triangle-DA1QzFiO.js → exclamation-triangle-Ct0mzv3Y.js} +1 -1
  42. package/packages/ui/dist/assets/{extension-BVJkmvpJ.js → extension-CubWAVae.js} +1 -1
  43. package/packages/ui/dist/assets/{external-link-D_bsR7B2.js → external-link-CgYSHh7f.js} +1 -1
  44. package/packages/ui/dist/assets/{facebook-CmFmhojx.js → facebook-DI_kGikU.js} +1 -1
  45. package/packages/ui/dist/assets/{fallback-Ofl6uSnB.js → fallback-CtKplO-p.js} +1 -1
  46. package/packages/ui/dist/assets/{farcaster-Co-M3Ss8.js → farcaster-PEZAXYqi.js} +1 -1
  47. package/packages/ui/dist/assets/{filters-B1WwNaFU.js → filters-D6NPvINV.js} +1 -1
  48. package/packages/ui/dist/assets/{github-CP4fP6gn.js → github-BRk_ww3A.js} +1 -1
  49. package/packages/ui/dist/assets/{google-CsOIXJ6V.js → google-3tO0AiTd.js} +1 -1
  50. package/packages/ui/dist/assets/{help-circle-DiMkomdF.js → help-circle-DtbseC_9.js} +1 -1
  51. package/packages/ui/dist/assets/{id-lmscL5LX.js → id-DNQF-HQS.js} +1 -1
  52. package/packages/ui/dist/assets/{image-B-ubJrY5.js → image-D4l2W9gw.js} +1 -1
  53. package/packages/ui/dist/assets/{index-DVgfCzCo.js → index-A8Mpr5Rm.js} +1 -1
  54. package/packages/ui/dist/assets/{index-BaukYv-x.js → index-BnYYo2S0.js} +1 -1
  55. package/packages/ui/dist/assets/{index-CZR1Qjhs.js → index-D-PqJKnq.js} +1 -1
  56. package/packages/ui/dist/assets/{index-Q2Yai4Fe.js → index-L6zhWbjO.js} +70 -70
  57. package/packages/ui/dist/assets/{index-Dbh5V1Z0.js → index-cl7Zazmz.js} +1 -1
  58. package/packages/ui/dist/assets/{index-CF0KMmke.js → index-vIXQ5sb2.js} +3 -3
  59. package/packages/ui/dist/assets/{index.es-C78cE5SI.js → index.es-BxPfiRyX.js} +4 -4
  60. package/packages/ui/dist/assets/{info-Cqg57EVo.js → info-DAwJNl3r.js} +1 -1
  61. package/packages/ui/dist/assets/{info-circle-DkeSWNKV.js → info-circle-lvyXhzfD.js} +1 -1
  62. package/packages/ui/dist/assets/{lightbulb-DNlO4qKh.js → lightbulb-BkrBfCQo.js} +1 -1
  63. package/packages/ui/dist/assets/{mail-kVQ8Jb9Y.js → mail-CrRh9uAx.js} +1 -1
  64. package/packages/ui/dist/assets/{metamask-sdk-CBalSvz7.js → metamask-sdk-SH1hL_jU.js} +1 -1
  65. package/packages/ui/dist/assets/{mobile-BEteuhF7.js → mobile-Cq71LsIe.js} +1 -1
  66. package/packages/ui/dist/assets/{more-DBWmXQli.js → more-CzCaTRQT.js} +1 -1
  67. package/packages/ui/dist/assets/{network-placeholder-Dg1uUHiL.js → network-placeholder-B7ilsHLj.js} +1 -1
  68. package/packages/ui/dist/assets/{nftPlaceholder-i3AHSiD9.js → nftPlaceholder-DYo4ThqR.js} +1 -1
  69. package/packages/ui/dist/assets/{off-BtMm0fi2.js → off-CVXtiamx.js} +1 -1
  70. package/packages/ui/dist/assets/{parseSignature-Cb5FlWWg.js → parseSignature-DDqjAA1x.js} +1 -1
  71. package/packages/ui/dist/assets/{play-store-iKKkXa6a.js → play-store-Bxo5wDfY.js} +1 -1
  72. package/packages/ui/dist/assets/{plus-CA5NaRtb.js → plus-ByOmN8u0.js} +1 -1
  73. package/packages/ui/dist/assets/{qr-code-D2kiqR7h.js → qr-code-BLcaF-bG.js} +1 -1
  74. package/packages/ui/dist/assets/{recycle-horizontal-Dcme7R03.js → recycle-horizontal-R32E5-sJ.js} +1 -1
  75. package/packages/ui/dist/assets/{refresh-Dega3sDp.js → refresh-DV3LEAlt.js} +1 -1
  76. package/packages/ui/dist/assets/{reown-logo-xNkksyWJ.js → reown-logo-CzXV-ULV.js} +1 -1
  77. package/packages/ui/dist/assets/{search-HYl7NO8x.js → search-C4ArXMR1.js} +1 -1
  78. package/packages/ui/dist/assets/{secp256k1-Cxd6_SiH.js → secp256k1-CigFWhM4.js} +1 -1
  79. package/packages/ui/dist/assets/{send-CJU8CUAo.js → send-nlnStDog.js} +1 -1
  80. package/packages/ui/dist/assets/{swapHorizontal-IMUKiUre.js → swapHorizontal-I-zOG8Yz.js} +1 -1
  81. package/packages/ui/dist/assets/{swapHorizontalBold-CNYnNJ9-.js → swapHorizontalBold-5VnEg1-A.js} +1 -1
  82. package/packages/ui/dist/assets/{swapHorizontalMedium-B9VxEYsT.js → swapHorizontalMedium-DK837_PS.js} +1 -1
  83. package/packages/ui/dist/assets/{swapHorizontalRoundedBold-Dz33l_Jh.js → swapHorizontalRoundedBold-EcrRbYtU.js} +1 -1
  84. package/packages/ui/dist/assets/{swapVertical-CHUmjVJ0.js → swapVertical--ZRk6QJu.js} +1 -1
  85. package/packages/ui/dist/assets/{telegram-kl9S2mbU.js → telegram-DQOf_6vw.js} +1 -1
  86. package/packages/ui/dist/assets/{three-dots-U5lhA1Am.js → three-dots-RaCioLRu.js} +1 -1
  87. package/packages/ui/dist/assets/{twitch-KTEUWXEp.js → twitch-CXMYNleq.js} +1 -1
  88. package/packages/ui/dist/assets/{twitterIcon-BHiq8mRg.js → twitterIcon-CafuOSTc.js} +1 -1
  89. package/packages/ui/dist/assets/{verify-CfN-BXNd.js → verify-B5SZMJAG.js} +1 -1
  90. package/packages/ui/dist/assets/{verify-filled-DwZccetj.js → verify-filled-BrlLx5ry.js} +1 -1
  91. package/packages/ui/dist/assets/{w3m-modal-CS-PFqPE.js → w3m-modal-57iUR7pY.js} +1 -1
  92. package/packages/ui/dist/assets/{wallet-DVlGkhOY.js → wallet-Fu8Tn5wK.js} +1 -1
  93. package/packages/ui/dist/assets/{wallet-placeholder-CvR_iEWX.js → wallet-placeholder-BYpbF3M_.js} +1 -1
  94. package/packages/ui/dist/assets/{walletconnect-8pZBDvVI.js → walletconnect-BT9pozGB.js} +1 -1
  95. package/packages/ui/dist/assets/{warning-circle-ylLEE0Yp.js → warning-circle-BQ8awbZW.js} +1 -1
  96. package/packages/ui/dist/assets/{x-C_TBsTMj.js → x-D21DQ5BR.js} +1 -1
  97. package/packages/ui/dist/index.html +1 -1
  98. package/scripts/check-init.mjs +2 -3
  99. package/scripts/postinstall.js +14 -324
  100. package/templates/{dca-rebalancer → default}/.sail/config.json +2 -2
  101. package/templates/default/AGENTS.md +92 -0
  102. package/templates/default/README.md +16 -0
  103. package/templates/default/examples/dca/README.md +16 -0
  104. package/templates/default/examples/dca/agent.ts +174 -0
  105. package/templates/{dca-rebalancer/src → default/examples/dca}/mandate.ts +8 -30
  106. package/templates/{dca-rebalancer → default}/package.json +2 -2
  107. package/templates/default/src/agent.ts +37 -0
  108. package/templates/{dca-rebalancer → default}/src/config.ts +8 -1
  109. package/templates/default/src/mandate.ts +22 -0
  110. package/packages/ui/dist/assets/cursor-DV7rOqbJ.js +0 -3
  111. package/templates/dca-rebalancer/AGENTS.md +0 -246
  112. package/templates/dca-rebalancer/AGENT_PLAYBOOK.md +0 -110
  113. package/templates/dca-rebalancer/README.md +0 -16
  114. package/templates/dca-rebalancer/src/agent.ts +0 -253
  115. /package/templates/{dca-rebalancer → default}/.cursor/rules +0 -0
  116. /package/templates/{dca-rebalancer → default}/.env.example +0 -0
  117. /package/templates/{dca-rebalancer → default}/.github/workflows/agent-tick.yml +0 -0
  118. /package/templates/{dca-rebalancer → default}/.sail/.gitkeep +0 -0
  119. /package/templates/{dca-rebalancer → default}/.sail/README.md +0 -0
  120. /package/templates/{dca-rebalancer → default}/CLAUDE.md +0 -0
  121. /package/templates/{dca-rebalancer → default}/_gitignore +0 -0
  122. /package/templates/{dca-rebalancer → default}/docs/PERMISSION_MODEL.md +0 -0
  123. /package/templates/{dca-rebalancer → default}/tsconfig.json +0 -0
  124. /package/templates/{dca-rebalancer → default}/ui/README.md +0 -0
package/AGENTS.md CHANGED
@@ -12,7 +12,7 @@ tooling to create SMAs, register permission contracts, and run strategy agents.
12
12
  | `packages/cli` | `sailor` | CLI: init, keys, account, mandate, onboard, station, ui, run, session, scan, status, owner, doctor, capabilities |
13
13
  | `packages/chains` | `@sail/chains` | Per-chain address registry (kernel, mandateFactory, governance) |
14
14
  | `packages/ui` | `sailor-ui` | Local dashboard + browser-driven onboarding wizard at localhost:3333 |
15
- | `templates/dca-rebalancer` | — | Default project scaffold: DCA rebalancer + Foundry workspace |
15
+ | `templates/default` | — | Default agent starter: neutral blank scaffold + Foundry workspace + onboarding guide (AGENTS.md) |
16
16
  | `templates/custom-mandate` | — | Solidity reference: IPermission scaffold (not a project template) |
17
17
 
18
18
  ## Protocol roles
package/README.md CHANGED
@@ -14,23 +14,23 @@ Sailor is the operator layer for [Sail Protocol](../SailProtocol): the tooling a
14
14
  | `packages/cli` | `sailor` | CLI for account setup, mandate signing, and agent execution |
15
15
  | `packages/chains` | `@sail/chains` | Per-chain address registry (EVM-compatible) |
16
16
  | `packages/ui` | `sailor-ui` | Local dashboard running on localhost:3333 |
17
- | `templates/dca-rebalancer` | — | Starter template: DCA portfolio rebalancer (default for `sailor init`) |
18
- | `templates/custom-mandate` | — | Solidity reference: allowlist mandate contracts (not a project template) |
17
+ | `templates/default` | — | Default agent starter (neutral; what `sailor init` scaffolds) |
18
+ | `templates/custom-mandate` | — | Solidity reference: IPermission scaffold (not a project template) |
19
19
  | `templates/lifi-permissions` | — | Solidity reference: LiFi clone permission contracts (not a project template) |
20
20
 
21
21
  ---
22
22
 
23
23
  ## How it works
24
24
 
25
- The path from nothing to a running agent is seven steps:
25
+ The path from nothing to a running agent is five stages, guided by your AI coding assistant through the scaffolded `AGENTS.md`:
26
26
 
27
- 1. **Generate keys** a manager key (the agent's dispatch signer) and a permissionSigner key, both generated and encrypted on disk.
28
- 2. **Deploy SMA** — a Safe registered with SailKernel, with the manager and permissionSigner addresses set at registration.
29
- 3. **Write a strategy** — an async `tick` function that receives a context and returns a list of intended dispatches.
30
- 4. **Sign a mandate** — a set of registered permissions that bound what the agent can do, authorized via EIP-712 by the permission signer through MetaMask or a local key.
31
- 5. **Dry-run** — the kernel's `previewBatch` confirms the named permission passes before anything executes on-chain.
32
- 6. **Run the agent** — locally on a cron schedule, or via GitHub Actions on a timer.
33
- 7. **Monitor** the local dashboard on localhost:3333 reflects live mandate state, agent status, and activity.
27
+ 1. **Deploy your SMA and create your agent wallet** done in the browser. Your owner wallet never leaves it.
28
+ 2. **Define your strategy** — describe what you want your agent to do. The assistant asks the right questions to establish on-chain bounds (tokens, amounts, venues), then helps design the permission contracts.
29
+ 3. **Build, test, and sign your mandate** — the assistant authors the permission contracts, proves in plain English what each one permits and blocks, deploys them, and walks you through signing to authorize.
30
+ 4. **Run** — `sailor run` executes your agent locally on a schedule, or via the GitHub Actions workflow the scaffold provides.
31
+ 5. **Extend** *(optional)* — the assistant can wire notifications (Telegram, email) and build a custom dashboard tailored to your strategy.
32
+
33
+ Run `npx sailor init my-agent`, open the scaffolded folder in Claude Code, Cursor, Codex, or any AI coding assistant, and say **"start"**. The `AGENTS.md` in the project drives the assistant through all five stages.
34
34
 
35
35
  ---
36
36
 
@@ -74,27 +74,28 @@ Prerequisites:
74
74
  - Node.js 18+ (the CLI runs on 18; `pnpm install` needs Node 22+)
75
75
  - A wallet (MetaMask or Rabby)
76
76
  - An RPC URL (e.g. Alchemy free tier)
77
- - A supported chain: **Base, Base Sepolia, Arbitrum, or Unichain** — these use the verified deployments bundled in `@sail/sdk`, so no `@sail/chains` entry is needed. Other chains require kernel + mandateFactory addresses in `@sail/chains` (see [State of the project](#state-of-the-project)).
77
+ - A supported chain: **Base, Base Sepolia, Arbitrum, or Unichain** — verified deployments are bundled in `@sail/sdk`, no `@sail/chains` entry needed. Other chains require addresses in `@sail/chains`.
78
+
79
+ ### Recommended — assistant-driven
78
80
 
79
81
  ```bash
80
82
  npx sailor init my-agent && cd my-agent
81
- npm install # or `pnpm install` (needs Node 22+)
83
+ npm install
84
+ ```
82
85
 
83
- # 1. Ground yourselfread-only, no gas, no wallet:
84
- sailor capabilities # what you can build on this chain
85
- sailor doctor # kernel model + RPC reachability + gas balances
86
+ Open this folder in Claude Code, Cursor, Codex, or any AI coding assistant and say **"start"**. The scaffolded `AGENTS.md` guides the assistant through all five stages SMA deployment, strategy definition, mandate authoring, running, and automation. No manual steps required.
86
87
 
87
- # 2. Set up the account in the browser wizard (choose chain, connect wallet,
88
- # generate the agent key, deploy your SMA):
89
- sailor ui start # open http://localhost:3333 and follow steps 1–4
88
+ ### Direct CLI reference (advanced)
90
89
 
91
- # 3. Back in the terminal: configure .sail/.env.local, fund the agent key for gas,
92
- sailor mandate prepare # draft permissions → approve in the browser
93
- sailor run # start the agent (use --once for a single tick)
94
- ```
90
+ For users who prefer the terminal:
95
91
 
96
- The SMA is deployed through the browser wizard (it submits from your wallet), not a
97
- terminal command see the scaffolded project's `AGENTS.md` for the full 8-step flow.
92
+ ```bash
93
+ sailor capabilities # what you can build on this chain read-only, no gas
94
+ sailor doctor # kernel model + RPC reachability + gas balances
95
+ sailor ui start # open http://localhost:3333 to deploy SMA + create agent wallet
96
+ sailor run --once # single tick — confirm it works before automating
97
+ sailor run # start the agent (continuous)
98
+ ```
98
99
 
99
100
  ---
100
101
 
@@ -106,7 +107,7 @@ writes into the **current directory**; pass a name to create a subdirectory.
106
107
  ```bash
107
108
  sailor init # scaffold into cwd
108
109
  sailor init my-agent # create ./my-agent/ and scaffold there
109
- sailor init --template dca-rebalancer # explicit (same as default)
110
+ sailor init --template default # explicit (same as default)
110
111
  sailor init my-agent --template <name> # named subdirectory + specific template
111
112
  ```
112
113
 
@@ -114,7 +115,7 @@ sailor init my-agent --template <name> # named subdirectory + specific templat
114
115
 
115
116
  | Template | Description |
116
117
  |---|---|
117
- | `dca-rebalancer` | Dollar-cost-averaging portfolio rebalancer. Includes a full agent loop, Foundry workspace for permission contracts, GitHub Actions cron job, and the operator guide (`AGENTS.md`). **Default.** |
118
+ | `default` | Neutral agent starter. Includes a blank agent loop, Foundry workspace for permission contracts, GitHub Actions cron job, and the operator guide (`AGENTS.md`). For a complete worked example see `examples/dca/`. **Default.** |
118
119
 
119
120
  ### What makes a valid template
120
121
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev.sail.money/sailor",
3
- "version": "0.0.2-12",
3
+ "version": "0.0.2-13",
4
4
  "description": "Operator toolkit for Sail Protocol",
5
5
  "bin": {
6
6
  "sailor": "packages/cli/dist/index.cjs"
@@ -39173,7 +39173,6 @@ function copyDirSync(src, dest) {
39173
39173
  }
39174
39174
  }
39175
39175
  }
39176
- var DEFAULT_CHAIN_ID = 8453;
39177
39176
  var SAIL_WORKSPACE_README = `# Sailor Project Workspace
39178
39177
 
39179
39178
  This folder is the local workspace for one Sailor agent deployment.
@@ -39192,10 +39191,11 @@ function writeIfMissing2(file, content) {
39192
39191
  if (!import_node_fs6.default.existsSync(file)) import_node_fs6.default.writeFileSync(file, content, "utf-8");
39193
39192
  }
39194
39193
  function scaffoldProjectWorkspace(dest, name, options) {
39195
- const chainId = Number(options.chain ?? DEFAULT_CHAIN_ID);
39196
- if (!Number.isInteger(chainId) || chainId <= 0) {
39197
- throw new Error(`Invalid chain id: "${options.chain}"`);
39198
- }
39194
+ const chainId = options.chain ? (() => {
39195
+ const n = Number(options.chain);
39196
+ if (!Number.isInteger(n) || n <= 0) throw new Error(`Invalid chain id: "${options.chain}"`);
39197
+ return n;
39198
+ })() : null;
39199
39199
  const sailDir2 = import_node_path5.default.join(dest, ".sail");
39200
39200
  import_node_fs6.default.mkdirSync(import_node_path5.default.join(sailDir2, "keys"), { recursive: true });
39201
39201
  import_node_fs6.default.mkdirSync(import_node_path5.default.join(sailDir2, "runtime"), { recursive: true });
@@ -39207,6 +39207,7 @@ function scaffoldProjectWorkspace(dest, name, options) {
39207
39207
  version: 1,
39208
39208
  name,
39209
39209
  chainId,
39210
+ // null = chain not yet chosen; Stage 1 will set this
39210
39211
  stateDir: ".sail/state",
39211
39212
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
39212
39213
  contracts: {
@@ -39221,24 +39222,26 @@ function scaffoldProjectWorkspace(dest, name, options) {
39221
39222
  "utf-8"
39222
39223
  );
39223
39224
  writeIfMissing2(import_node_path5.default.join(sailDir2, "README.md"), SAIL_WORKSPACE_README);
39225
+ const chainIdLine = chainId != null ? `CHAIN_ID=${chainId}
39226
+ ` : `# CHAIN_ID=8453 # set after choosing your chain in Stage 1
39227
+ `;
39224
39228
  import_node_fs6.default.writeFileSync(
39225
39229
  import_node_path5.default.join(dest, ".env.example"),
39226
39230
  `# Sailor agent environment
39227
39231
  RPC_URL=https://your-rpc-endpoint
39228
- CHAIN_ID=${chainId}
39229
-
39232
+ ${chainIdLine}
39230
39233
  # Optional for non-interactive runs
39231
39234
  # SAIL_PASSPHRASE=change-me-to-a-strong-passphrase
39232
39235
  `,
39233
39236
  "utf-8"
39234
39237
  );
39238
+ const rpcLine = options.rpcUrl ? `RPC_URL=${options.rpcUrl}` : `# Paste your RPC endpoint here (Alchemy, Infura, or any HTTPS endpoint)
39239
+ # RPC_URL=https://your-rpc-endpoint`;
39240
+ const chainLine = chainId != null ? `
39241
+ CHAIN_ID=${chainId}` : ``;
39235
39242
  writeIfMissing2(
39236
39243
  import_node_path5.default.join(sailDir2, ".env.local"),
39237
- options.rpcUrl ? `RPC_URL=${options.rpcUrl}
39238
- CHAIN_ID=${chainId}
39239
- ` : `# Paste your RPC endpoint here (Alchemy, Infura, or any HTTPS endpoint)
39240
- # RPC_URL=https://your-rpc-endpoint
39241
- CHAIN_ID=${chainId}
39244
+ `${rpcLine}${chainLine}
39242
39245
 
39243
39246
  # Optional for non-interactive runs (CI, GitHub Actions, launchd, systemd)
39244
39247
  # SAIL_PASSPHRASE=change-me-to-a-strong-passphrase
@@ -39250,7 +39253,7 @@ async function initCommand(dir, options = {}) {
39250
39253
  const dest = inPlace ? process.cwd() : import_node_path5.default.resolve(process.cwd(), dir);
39251
39254
  const name = import_node_path5.default.basename(dest);
39252
39255
  const templatesDir = import_node_path5.default.join(packageRoot(), "templates");
39253
- const templateName = options.template ?? "dca-rebalancer";
39256
+ const templateName = options.template ?? "default";
39254
39257
  if (/[/\\.]/.test(templateName) || templateName.includes("..")) {
39255
39258
  throw new Error(`Invalid template name: "${templateName}"`);
39256
39259
  }
@@ -39391,32 +39394,9 @@ function printWelcome(dest, name, inPlace, hasRpc, freshInit = false) {
39391
39394
  console.log('Open this folder in your AI coding assistant and say: "continue"');
39392
39395
  return;
39393
39396
  }
39394
- console.log(
39395
- "\nI'm Sailor, the operator toolkit for Sail Protocol \u2014 onchain SMAs where your agent"
39396
- );
39397
- console.log(
39398
- "executes within a mandate it can never exceed, enforced on every transaction.\n"
39399
- );
39400
- console.log("Your capital stays in your SMA. You can revoke the agent in one block.\n");
39401
- console.log("You'll set up your SMA in 5 steps:\n");
39402
- console.log(" In your browser:");
39403
- console.log(" 1. Connect your wallet and choose a network");
39404
- console.log(" 2. Deploy your SMA (costs gas \u2014 fund the wallet on that network)");
39405
- console.log(" 3. Create your agent wallet\n");
39406
- console.log(" With your AI coding assistant:");
39407
- console.log(" 4. Describe your strategy \u2014 your assistant builds and signs the mandate");
39408
- console.log(" 5. Set up automation (local schedule or GitHub Actions)\n");
39409
- console.log("Next:");
39410
- if (!inPlace) console.log(` cd ${name}`);
39411
- if (!hasRpc) console.log(" cp .env.example .sail/.env.local");
39412
- console.log(" sailor capabilities # what you can build here \u2014 read-only, no gas, no wallet");
39413
- console.log(" sailor doctor # kernel model + RPC + gas balances \u2014 read-only, no gas");
39414
- console.log(" Open this folder in your AI coding assistant (Claude Code, Cursor, Codex, \u2026)");
39415
- console.log("\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
39416
- console.log(" Project ready. You're already in the right place.");
39417
- console.log("");
39418
- console.log(' Say: "start"');
39419
- console.log("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
39397
+ if (!inPlace) console.log(`
39398
+ Created ${name}/`);
39399
+ console.log("\nYour Sail agent project is ready. Open your AI coding assistant in this folder and say start.");
39420
39400
  }
39421
39401
 
39422
39402
  // src/commands/keys.ts
@@ -42701,7 +42681,7 @@ function actionWith(fn) {
42701
42681
  closePrompts();
42702
42682
  };
42703
42683
  }
42704
- program2.command("init [dir]").description("Scaffold a new Sail agent into the current directory (or [dir] subdirectory)").option("--template <name>", "Template to scaffold from (default: dca-rebalancer)").option("--chain <id>", "Default EVM chain id written to .sail/config.json and .env.example").option("--rpc-url <url>", "Default RPC_URL written to .sail/.env.local").action(
42684
+ program2.command("init [dir]").description("Scaffold a new Sail agent into the current directory (or [dir] subdirectory)").option("--template <name>", "Template to scaffold from (default: default)").option("--chain <id>", "Default EVM chain id written to .sail/config.json and .env.example").option("--rpc-url <url>", "Default RPC_URL written to .sail/.env.local").action(
42705
42685
  async (name, opts) => {
42706
42686
  try {
42707
42687
  await initCommand(name, opts);
@@ -5,7 +5,7 @@
5
5
  * Do not edit manually — run `pnpm build` to regenerate.
6
6
  *
7
7
  * Spec version : 1.2.0
8
- * Generated at : 2026-06-05T12:43:07.205Z
8
+ * Generated at : 2026-06-06T08:08:18.501Z
9
9
  */
10
10
  export declare const SAIL_INTELLIGENCE_BASE_URL = "https://api.sail.money";
11
11
  export declare const SAIL_INTELLIGENCE_DOCS_URL = "https://api.sail.money/docs";
@@ -5,7 +5,7 @@
5
5
  * Do not edit manually — run `pnpm build` to regenerate.
6
6
  *
7
7
  * Spec version : 1.2.0
8
- * Generated at : 2026-06-05T12:43:07.205Z
8
+ * Generated at : 2026-06-06T08:08:18.501Z
9
9
  */
10
10
  export const SAIL_INTELLIGENCE_BASE_URL = "https://api.sail.money";
11
11
  export const SAIL_INTELLIGENCE_DOCS_URL = "https://api.sail.money/docs";
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const d=o`<svg
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const d=o`<svg
2
2
  width="14"
3
3
  height="14"
4
4
  viewBox="0 0 14 14"
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const p=o`<svg fill="none" viewBox="0 0 24 24">
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const p=o`<svg fill="none" viewBox="0 0 24 24">
2
2
  <path
3
3
  style="fill: var(--wui-color-accent-100);"
4
4
  d="M10.2 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 6.6a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM10.2 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0ZM21 17.4a3.6 3.6 0 1 1-7.2 0 3.6 3.6 0 0 1 7.2 0Z"
@@ -1,4 +1,4 @@
1
- import{F as t}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const e=t`
1
+ import{F as t}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const e=t`
2
2
  <svg width="36" height="36">
3
3
  <path
4
4
  d="M28.724 0H7.271A7.269 7.269 0 0 0 0 7.272v21.46A7.268 7.268 0 0 0 7.271 36H28.73A7.272 7.272 0 0 0 36 28.728V7.272A7.275 7.275 0 0 0 28.724 0Z"
@@ -1,4 +1,4 @@
1
- import{F as i}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const h=i`<svg fill="none" viewBox="0 0 40 40">
1
+ import{F as i}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const h=i`<svg fill="none" viewBox="0 0 40 40">
2
2
  <g clip-path="url(#a)">
3
3
  <g clip-path="url(#b)">
4
4
  <circle cx="20" cy="19.89" r="20" fill="#000" />
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const p=o`<svg fill="none" viewBox="0 0 14 15">
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const p=o`<svg fill="none" viewBox="0 0 14 15">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const t=o`<svg
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const t=o`<svg
2
2
  fill="none"
3
3
  viewBox="0 0 21 20"
4
4
  >
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const a=o`<svg fill="none" viewBox="0 0 14 15">
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const a=o`<svg fill="none" viewBox="0 0 14 15">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const p=o`<svg fill="none" viewBox="0 0 14 15">
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const p=o`<svg fill="none" viewBox="0 0 14 15">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const t=o`<svg fill="none" viewBox="0 0 14 15">
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const t=o`<svg fill="none" viewBox="0 0 14 15">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const H=o`<svg
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const H=o`<svg
2
2
  xmlns="http://www.w3.org/2000/svg"
3
3
  width="12"
4
4
  height="13"
@@ -1,4 +1,4 @@
1
- import{u as P,s as M,y as A,v as I,p as c,g as L,c as T,O as Y,l as E,m as J,R as O,h as ke,e as D,f as S,o as ft,j as Hi,W as gt,C as jt,d as si,T as kt,n as Qe,M as vi,k as yi,F as Ae,A as li,q as Ki}from"./core-Ckx_cyuH.js";import{n as u,c as C,o as y,r as v,U as se,e as Gi,f as Yi,a as Ji}from"./index-CF0KMmke.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const Qi=P`
1
+ import{u as P,s as M,y as A,v as I,p as c,g as L,c as T,O as Y,l as E,m as J,R as O,h as ke,e as D,f as S,o as ft,j as Hi,W as gt,C as jt,d as si,T as kt,n as Qe,M as vi,k as yi,F as Ae,A as li,q as Ki}from"./core-C8jSlwHY.js";import{n as u,c as C,o as y,r as v,U as se,e as Gi,f as Yi,a as Ji}from"./index-vIXQ5sb2.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const Qi=P`
2
2
  :host {
3
3
  position: relative;
4
4
  background-color: var(--wui-color-gray-glass-002);
@@ -1,4 +1,4 @@
1
- import{F as l}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const i=l`<svg fill="none" viewBox="0 0 20 20">
1
+ import{F as l}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const i=l`<svg fill="none" viewBox="0 0 20 20">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{F as C}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const l=C`<svg
1
+ import{F as C}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const l=C`<svg
2
2
  xmlns="http://www.w3.org/2000/svg"
3
3
  width="12"
4
4
  height="13"
@@ -1 +1 @@
1
- import{B as u,cY as p,fP as k,c0 as x,de as M,dl as S,dk as $,bK as A,bR as T,cd as C,cJ as w,dc as E,a0 as b,dg as G}from"./index-Q2Yai4Fe.js";class D extends u{constructor({callbackSelector:a,cause:t,data:f,extraData:e,sender:d,urls:i}){var o;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(o=t.metaMessages)!=null&&o.length?"":[],"Offchain Gateway Call:",i&&[" Gateway URL(s):",...i.map(n=>` ${p(n)}`)],` Sender: ${d}`,` Data: ${f}`,` Callback selector: ${a}`,` Extra data: ${e}`].flat(),name:"OffchainLookupError"})}}class P extends u{constructor({result:a,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${p(t)}`,`Response: ${k(a)}`],name:"OffchainLookupResponseMalformedError"})}}class B extends u{constructor({sender:a,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${a}`],name:"OffchainLookupSenderMismatchError"})}}const H="0x556f1830",U={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function J(c,{blockNumber:a,blockTag:t,data:f,requestOptions:e,to:d}){var s;const{args:i}=x({data:f,abi:[U]}),[o,n,l,g,y]=i,{ccipRead:h}=c,r=h&&typeof(h==null?void 0:h.request)=="function"?h.request:j;try{if(!M(d,o))throw new B({sender:o,to:d});const m=n.includes(S)?await $({data:l,ccipRequest:R=>r({...R,requestOptions:e})}):await r({data:l,requestOptions:e,sender:o,urls:n}),{data:L}=await A(c,{blockNumber:a,blockTag:t,data:T([g,C([{type:"bytes"},{type:"bytes"}],[m,y])]),requestOptions:e,to:d});return L}catch(m){throw(s=e==null?void 0:e.signal)!=null&&s.aborted?w(e.signal):E(m)?m:new D({callbackSelector:g,cause:m,data:f,extraData:y,sender:o,urls:n})}}async function j({data:c,requestOptions:a,sender:t,urls:f}){var d,i,o;let e=new Error("An unknown error occurred.");for(let n=0;n<f.length;n++){if((d=a==null?void 0:a.signal)!=null&&d.aborted)throw w(a.signal);const l=f[n],g=l.includes("{data}")?"GET":"POST",y=g==="POST"?{data:c,sender:t}:void 0,h=g==="POST"?{"Content-Type":"application/json"}:{};try{const r=await fetch(l.replace("{sender}",t.toLowerCase()).replace("{data}",c),{body:JSON.stringify(y),headers:h,method:g,...a!=null&&a.signal?{signal:a.signal}:{}});let s;if((i=r.headers.get("Content-Type"))!=null&&i.startsWith("application/json")?s=(await r.json()).data:s=await r.text(),!r.ok){e=new b({body:y,details:s!=null&&s.error?k(s.error):r.statusText,headers:r.headers,status:r.status,url:l});continue}if(!G(s)){e=new P({result:s,url:l});continue}return s}catch(r){if((o=a==null?void 0:a.signal)!=null&&o.aborted)throw w(a.signal);if(E(r))throw r;e=new b({body:y,details:r.message,url:l})}}throw e}export{j as ccipRequest,J as offchainLookup,U as offchainLookupAbiItem,H as offchainLookupSignature};
1
+ import{B as u,cY as p,fP as k,c0 as x,de as M,dl as S,dk as $,bK as A,bR as T,cd as C,cJ as w,dc as E,a0 as b,dg as G}from"./index-L6zhWbjO.js";class D extends u{constructor({callbackSelector:a,cause:t,data:f,extraData:e,sender:d,urls:i}){var o;super(t.shortMessage||"An error occurred while fetching for an offchain result.",{cause:t,metaMessages:[...t.metaMessages||[],(o=t.metaMessages)!=null&&o.length?"":[],"Offchain Gateway Call:",i&&[" Gateway URL(s):",...i.map(n=>` ${p(n)}`)],` Sender: ${d}`,` Data: ${f}`,` Callback selector: ${a}`,` Extra data: ${e}`].flat(),name:"OffchainLookupError"})}}class P extends u{constructor({result:a,url:t}){super("Offchain gateway response is malformed. Response data must be a hex value.",{metaMessages:[`Gateway URL: ${p(t)}`,`Response: ${k(a)}`],name:"OffchainLookupResponseMalformedError"})}}class B extends u{constructor({sender:a,to:t}){super("Reverted sender address does not match target contract address (`to`).",{metaMessages:[`Contract address: ${t}`,`OffchainLookup sender address: ${a}`],name:"OffchainLookupSenderMismatchError"})}}const H="0x556f1830",U={name:"OffchainLookup",type:"error",inputs:[{name:"sender",type:"address"},{name:"urls",type:"string[]"},{name:"callData",type:"bytes"},{name:"callbackFunction",type:"bytes4"},{name:"extraData",type:"bytes"}]};async function J(c,{blockNumber:a,blockTag:t,data:f,requestOptions:e,to:d}){var s;const{args:i}=x({data:f,abi:[U]}),[o,n,l,g,y]=i,{ccipRead:h}=c,r=h&&typeof(h==null?void 0:h.request)=="function"?h.request:j;try{if(!M(d,o))throw new B({sender:o,to:d});const m=n.includes(S)?await $({data:l,ccipRequest:R=>r({...R,requestOptions:e})}):await r({data:l,requestOptions:e,sender:o,urls:n}),{data:L}=await A(c,{blockNumber:a,blockTag:t,data:T([g,C([{type:"bytes"},{type:"bytes"}],[m,y])]),requestOptions:e,to:d});return L}catch(m){throw(s=e==null?void 0:e.signal)!=null&&s.aborted?w(e.signal):E(m)?m:new D({callbackSelector:g,cause:m,data:f,extraData:y,sender:o,urls:n})}}async function j({data:c,requestOptions:a,sender:t,urls:f}){var d,i,o;let e=new Error("An unknown error occurred.");for(let n=0;n<f.length;n++){if((d=a==null?void 0:a.signal)!=null&&d.aborted)throw w(a.signal);const l=f[n],g=l.includes("{data}")?"GET":"POST",y=g==="POST"?{data:c,sender:t}:void 0,h=g==="POST"?{"Content-Type":"application/json"}:{};try{const r=await fetch(l.replace("{sender}",t.toLowerCase()).replace("{data}",c),{body:JSON.stringify(y),headers:h,method:g,...a!=null&&a.signal?{signal:a.signal}:{}});let s;if((i=r.headers.get("Content-Type"))!=null&&i.startsWith("application/json")?s=(await r.json()).data:s=await r.text(),!r.ok){e=new b({body:y,details:s!=null&&s.error?k(s.error):r.statusText,headers:r.headers,status:r.status,url:l});continue}if(!G(s)){e=new P({result:s,url:l});continue}return s}catch(r){if((o=a==null?void 0:a.signal)!=null&&o.aborted)throw w(a.signal);if(E(r))throw r;e=new b({body:y,details:r.message,url:l})}}throw e}export{j as ccipRequest,J as offchainLookup,U as offchainLookupAbiItem,H as offchainLookupSignature};
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const p=o`<svg
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const p=o`<svg
2
2
  width="28"
3
3
  height="28"
4
4
  viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const p=o`<svg fill="none" viewBox="0 0 14 14">
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const p=o`<svg fill="none" viewBox="0 0 14 14">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const p=o`<svg fill="none" viewBox="0 0 16 16">
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const p=o`<svg fill="none" viewBox="0 0 16 16">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const p=o`<svg fill="none" viewBox="0 0 16 16">
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const p=o`<svg fill="none" viewBox="0 0 16 16">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const p=o`<svg fill="none" viewBox="0 0 16 16">
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const p=o`<svg fill="none" viewBox="0 0 16 16">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const t=o`<svg fill="none" viewBox="0 0 16 16">
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const t=o`<svg fill="none" viewBox="0 0 16 16">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{F as t}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const l=t`<svg width="36" height="36" fill="none">
1
+ import{F as t}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const l=t`<svg width="36" height="36" fill="none">
2
2
  <path
3
3
  fill="#fff"
4
4
  fill-opacity=".05"
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const t=o`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const t=o`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
2
2
  <path
3
3
  fill-rule="evenodd"
4
4
  clip-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const p=o`<svg fill="none" viewBox="0 0 16 16">
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const p=o`<svg fill="none" viewBox="0 0 16 16">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const m=o`<svg fill="none" viewBox="0 0 20 20">
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const m=o`<svg fill="none" viewBox="0 0 20 20">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{F as o}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const p=o`<svg fill="none" viewBox="0 0 16 16">
1
+ import{F as o}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const p=o`<svg fill="none" viewBox="0 0 16 16">
2
2
  <path
3
3
  fill="currentColor"
4
4
  fill-rule="evenodd"
@@ -1,4 +1,4 @@
1
- import{F as C}from"./core-Ckx_cyuH.js";import"./index-Q2Yai4Fe.js";import"./events-CiKP71cK.js";import"./index.es-C78cE5SI.js";import"./fallback-Ofl6uSnB.js";const e=C`<svg
1
+ import{F as C}from"./core-C8jSlwHY.js";import"./index-L6zhWbjO.js";import"./events-i9ztcj9W.js";import"./index.es-BxPfiRyX.js";import"./fallback-CtKplO-p.js";const e=C`<svg
2
2
  xmlns="http://www.w3.org/2000/svg"
3
3
  width="16"
4
4
  height="16"