@dev.sail.money/sailor 0.0.2-22 → 0.0.2-23

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 (100) hide show
  1. package/package.json +1 -1
  2. package/packages/cli/dist/index.cjs +96 -9
  3. package/packages/cli/dist/server.cjs +56 -16
  4. package/packages/sdk/dist/intelligence.d.ts +1 -1
  5. package/packages/sdk/dist/intelligence.js +1 -1
  6. package/packages/ui/dist/assets/{add-C--RBwJe.js → add-BcGCle88.js} +1 -1
  7. package/packages/ui/dist/assets/{all-wallets-_xwd_eso.js → all-wallets-8Jcfw5Qj.js} +1 -1
  8. package/packages/ui/dist/assets/{app-store-CIQsK1zU.js → app-store-R1-af7b6.js} +1 -1
  9. package/packages/ui/dist/assets/{apple-BdlAnnmO.js → apple-Cxitz1aK.js} +1 -1
  10. package/packages/ui/dist/assets/{arrow-bottom-circle-D7c6JPTF.js → arrow-bottom-circle-BGQ9w6zi.js} +1 -1
  11. package/packages/ui/dist/assets/{arrow-bottom-B5p_6Dat.js → arrow-bottom-n-1aGCMa.js} +1 -1
  12. package/packages/ui/dist/assets/{arrow-left-SA4NpEnP.js → arrow-left-BngH26cQ.js} +1 -1
  13. package/packages/ui/dist/assets/{arrow-right-mOJNWujS.js → arrow-right-Bd1vyPNZ.js} +1 -1
  14. package/packages/ui/dist/assets/{arrow-top-CvPVVpHl.js → arrow-top-nst6Ttr2.js} +1 -1
  15. package/packages/ui/dist/assets/{bank-B2j2rPm9.js → bank-3aeQOng_.js} +1 -1
  16. package/packages/ui/dist/assets/{basic-Bw6cXOlk.js → basic-Ds-ESc-H.js} +1 -1
  17. package/packages/ui/dist/assets/{browser-CUSNF__N.js → browser-COcw6X9p.js} +1 -1
  18. package/packages/ui/dist/assets/{card-CpKLox49.js → card-B8clsijS.js} +1 -1
  19. package/packages/ui/dist/assets/{ccip-XB9iQjXB.js → ccip-SgLYYQWq.js} +1 -1
  20. package/packages/ui/dist/assets/{checkmark-BRpXeSCK.js → checkmark-CxpPWG40.js} +1 -1
  21. package/packages/ui/dist/assets/{checkmark-bold-BkPvoqxo.js → checkmark-bold-3THr8VIu.js} +1 -1
  22. package/packages/ui/dist/assets/{chevron-bottom-CtK0W2av.js → chevron-bottom-HfWcF1bE.js} +1 -1
  23. package/packages/ui/dist/assets/{chevron-left-NayfPMDy.js → chevron-left-CkXbcOst.js} +1 -1
  24. package/packages/ui/dist/assets/{chevron-right-BPU2hCfA.js → chevron-right-Bt7ATlLQ.js} +1 -1
  25. package/packages/ui/dist/assets/{chevron-top-CTXwC4nM.js → chevron-top-BZc4xycM.js} +1 -1
  26. package/packages/ui/dist/assets/{chrome-store-eWIk0-YZ.js → chrome-store-IT1ftwJy.js} +1 -1
  27. package/packages/ui/dist/assets/{clock-VmYiq5jB.js → clock-DpBvmJiH.js} +1 -1
  28. package/packages/ui/dist/assets/{close-NfBukMzW.js → close-BoRwHijk.js} +1 -1
  29. package/packages/ui/dist/assets/{coinPlaceholder-BWOeJc6j.js → coinPlaceholder-Dba1nosr.js} +1 -1
  30. package/packages/ui/dist/assets/{compass-oRk8W3iM.js → compass-D4QnmoWi.js} +1 -1
  31. package/packages/ui/dist/assets/{copy-GcYQZOsF.js → copy-iBRvR2f1.js} +1 -1
  32. package/packages/ui/dist/assets/{core-B_rvnvkC.js → core-B0JxSbAV.js} +3 -3
  33. package/packages/ui/dist/assets/cursor-D3cYdnOt.js +3 -0
  34. package/packages/ui/dist/assets/{cursor-transparent-CGox3wZ-.js → cursor-transparent-Djp2Lulv.js} +1 -1
  35. package/packages/ui/dist/assets/{desktop-DU4yyiV4.js → desktop-DF6t43QS.js} +1 -1
  36. package/packages/ui/dist/assets/{disconnect-CJm9NnxK.js → disconnect-BUeUrh3r.js} +1 -1
  37. package/packages/ui/dist/assets/{discord-MxDL8Eq6.js → discord-DWtvIwBI.js} +1 -1
  38. package/packages/ui/dist/assets/{etherscan-CkCvlZiA.js → etherscan-CrPMVPiO.js} +1 -1
  39. package/packages/ui/dist/assets/{events-CkyJn32_.js → events-DC84dMPF.js} +1 -1
  40. package/packages/ui/dist/assets/{exclamation-triangle-hH1JdYAZ.js → exclamation-triangle-9IcrwUru.js} +1 -1
  41. package/packages/ui/dist/assets/{extension-DTMrXG5m.js → extension-_qe-89Jo.js} +1 -1
  42. package/packages/ui/dist/assets/{external-link-GSwn5MzD.js → external-link-Bsar6cmv.js} +1 -1
  43. package/packages/ui/dist/assets/{facebook-Vw_uyzaE.js → facebook-CZnM2tIe.js} +1 -1
  44. package/packages/ui/dist/assets/{fallback-BL3U4ZRT.js → fallback-BOfZ_bwu.js} +1 -1
  45. package/packages/ui/dist/assets/{farcaster-F-_di36M.js → farcaster-DyBlkt7c.js} +1 -1
  46. package/packages/ui/dist/assets/{filters-DQzcstDl.js → filters-DwCepBxH.js} +1 -1
  47. package/packages/ui/dist/assets/{github-BSq3_rEd.js → github-DgFcdJPt.js} +1 -1
  48. package/packages/ui/dist/assets/{google-BU4QXiDS.js → google-Csj-pWAm.js} +1 -1
  49. package/packages/ui/dist/assets/{help-circle-CuF4iPyF.js → help-circle-CF8XrZBx.js} +1 -1
  50. package/packages/ui/dist/assets/{id-BQWlv0a_.js → id-YqFg_Hnr.js} +1 -1
  51. package/packages/ui/dist/assets/{image-BPNySDPo.js → image-DvX7Dg9U.js} +1 -1
  52. package/packages/ui/dist/assets/{index-CMyY4FOR.js → index-3OLndEW6.js} +3 -3
  53. package/packages/ui/dist/assets/{index-D0SPxlSM.js → index-BR_6qS4k.js} +1 -1
  54. package/packages/ui/dist/assets/{index-D2wgBslE.js → index-BiN726SD.js} +1 -1
  55. package/packages/ui/dist/assets/index-DCnJ64lX.css +1 -0
  56. package/packages/ui/dist/assets/{index-CsbiKM3b.js → index-Da0fOMbp.js} +1 -1
  57. package/packages/ui/dist/assets/{index-BMPQOOgv.js → index-DsS2DJdh.js} +1 -1
  58. package/packages/ui/dist/assets/index-yQSvDbVa.js +1775 -0
  59. package/packages/ui/dist/assets/{index.es-CvyDIsY4.js → index.es-BiIWW5o1.js} +4 -4
  60. package/packages/ui/dist/assets/{info-circle-BEjvYTHa.js → info-circle-poBAGMBs.js} +1 -1
  61. package/packages/ui/dist/assets/{info-D20yslek.js → info-zvmQXfcd.js} +1 -1
  62. package/packages/ui/dist/assets/{lightbulb-DfvLi5mQ.js → lightbulb-Dce_oD8K.js} +1 -1
  63. package/packages/ui/dist/assets/{mail-CkgaIJAd.js → mail-dmvvhqN6.js} +1 -1
  64. package/packages/ui/dist/assets/{metamask-sdk-O-IBvvGq.js → metamask-sdk-BnCx3I3r.js} +1 -1
  65. package/packages/ui/dist/assets/{mobile-CGc88WfG.js → mobile-B8JxvnR1.js} +1 -1
  66. package/packages/ui/dist/assets/{more-DnX8wlTn.js → more-BwL7SLTo.js} +1 -1
  67. package/packages/ui/dist/assets/{network-placeholder-DDrgA4a3.js → network-placeholder-BGXRLaM_.js} +1 -1
  68. package/packages/ui/dist/assets/{nftPlaceholder-DhHWPuD3.js → nftPlaceholder-YKLlOwZU.js} +1 -1
  69. package/packages/ui/dist/assets/{off-D1CsYvPQ.js → off-BdCZJUYq.js} +1 -1
  70. package/packages/ui/dist/assets/{parseSignature-BlZUbtEc.js → parseSignature-D9i4CKzP.js} +1 -1
  71. package/packages/ui/dist/assets/{play-store-Dbkk8PTZ.js → play-store-3UXzYs09.js} +1 -1
  72. package/packages/ui/dist/assets/{plus-B8jXpls3.js → plus-42VUC7wg.js} +1 -1
  73. package/packages/ui/dist/assets/{qr-code-CDuJ3ftj.js → qr-code-W99JyxAx.js} +1 -1
  74. package/packages/ui/dist/assets/{recycle-horizontal-ZFGjaHsZ.js → recycle-horizontal-B2t10e4m.js} +1 -1
  75. package/packages/ui/dist/assets/{refresh-D0rMEDtF.js → refresh-DEFqVlG3.js} +1 -1
  76. package/packages/ui/dist/assets/{reown-logo-NlCNVmgd.js → reown-logo-BpYt7vTo.js} +1 -1
  77. package/packages/ui/dist/assets/{search-CrJAA2qW.js → search-C38Hy_cf.js} +1 -1
  78. package/packages/ui/dist/assets/{secp256k1-mJj6W2AI.js → secp256k1-IKD5pd64.js} +1 -1
  79. package/packages/ui/dist/assets/{send-C7CoRziM.js → send-gSwkftFg.js} +1 -1
  80. package/packages/ui/dist/assets/{swapHorizontal-fD3wbCGJ.js → swapHorizontal-C1XbgPr5.js} +1 -1
  81. package/packages/ui/dist/assets/{swapHorizontalBold-Cc-jQ6as.js → swapHorizontalBold-CtEf5r93.js} +1 -1
  82. package/packages/ui/dist/assets/{swapHorizontalMedium-DlJW6uX1.js → swapHorizontalMedium-CHP_nvzn.js} +1 -1
  83. package/packages/ui/dist/assets/{swapHorizontalRoundedBold-1VHOerLO.js → swapHorizontalRoundedBold-Crnco-Af.js} +1 -1
  84. package/packages/ui/dist/assets/{swapVertical-CKaRlkZK.js → swapVertical-Ozkl0BQE.js} +1 -1
  85. package/packages/ui/dist/assets/{telegram-DnCYed4D.js → telegram-BdfzLFDW.js} +1 -1
  86. package/packages/ui/dist/assets/{three-dots-BFluoxma.js → three-dots-H2XRHPIG.js} +1 -1
  87. package/packages/ui/dist/assets/{twitch-BXGv98S9.js → twitch-DvbgB-BL.js} +1 -1
  88. package/packages/ui/dist/assets/{twitterIcon-C6IdXEe5.js → twitterIcon-BBsTYQzn.js} +1 -1
  89. package/packages/ui/dist/assets/{verify-D_QGyiLQ.js → verify-3A_7IJxL.js} +1 -1
  90. package/packages/ui/dist/assets/{verify-filled-DIW8QKL9.js → verify-filled-B4sP0yi_.js} +1 -1
  91. package/packages/ui/dist/assets/{w3m-modal-Do9U160p.js → w3m-modal-Bfua7kiP.js} +1 -1
  92. package/packages/ui/dist/assets/{wallet-CcARZnOx.js → wallet-BbJ989Xh.js} +1 -1
  93. package/packages/ui/dist/assets/{wallet-placeholder-X1coFzQa.js → wallet-placeholder-CQ2v8t-c.js} +1 -1
  94. package/packages/ui/dist/assets/{walletconnect-Glte9ia7.js → walletconnect-BuShZt17.js} +1 -1
  95. package/packages/ui/dist/assets/{warning-circle-j-3V4KTo.js → warning-circle-DMs8QNCr.js} +1 -1
  96. package/packages/ui/dist/assets/{x-Bcc52c_T.js → x-DzP75KD1.js} +1 -1
  97. package/packages/ui/dist/index.html +2 -2
  98. package/packages/ui/dist/assets/cursor-BAViuJWh.js +0 -3
  99. package/packages/ui/dist/assets/index-DDKDa0s2.css +0 -1
  100. package/packages/ui/dist/assets/index-Dc9_WV0G.js +0 -1775
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev.sail.money/sailor",
3
- "version": "0.0.2-22",
3
+ "version": "0.0.2-23",
4
4
  "description": "Operator toolkit for Sail Protocol",
5
5
  "bin": {
6
6
  "sailor": "packages/cli/dist/index.cjs"
@@ -38416,6 +38416,7 @@ function getRpcUrl(chainId) {
38416
38416
  }
38417
38417
 
38418
38418
  // src/lib/keys.ts
38419
+ init_esm2();
38419
38420
  var ROLES = ["manager", "permissionSigner"];
38420
38421
  function normalizeRole(input) {
38421
38422
  const n = input.trim().toLowerCase().replace(/[-_\s]/g, "");
@@ -38482,6 +38483,13 @@ async function loadManagerSigner(safe) {
38482
38483
  }
38483
38484
  return loadKeyring("manager", safe);
38484
38485
  }
38486
+ function managerKeystorePath(managerAddr) {
38487
+ if (!isAddress(managerAddr, { strict: false })) {
38488
+ throw new Error(`managerKeystorePath: invalid address "${managerAddr}"`);
38489
+ }
38490
+ const hex = managerAddr.toLowerCase().replace(/^0x/, "");
38491
+ return sailPath("keys", "managers", `${hex}.json`);
38492
+ }
38485
38493
  async function loadAnySigner() {
38486
38494
  if (keyExists("permissionSigner")) return loadKeyring("permissionSigner");
38487
38495
  if (keyExists("manager")) return loadKeyring("manager");
@@ -41290,6 +41298,7 @@ async function persistAccount(publicClient, account2) {
41290
41298
  owner: checksum4(account2.owner),
41291
41299
  permissionSigner: checksum4(account2.permissionSigner),
41292
41300
  manager: checksum4(account2.manager),
41301
+ managers: [checksum4(account2.manager)],
41293
41302
  chainId: account2.chainId,
41294
41303
  createdAtBlock,
41295
41304
  ...account2.saltNonce != null ? { saltNonce: account2.saltNonce.toString() } : {}
@@ -42661,6 +42670,24 @@ async function runRotateSigner(project, channel, options) {
42661
42670
  const account2 = resolveAccount(options);
42662
42671
  const smaAddress = account2.safe;
42663
42672
  const owner2 = account2.owner;
42673
+ if (options.list) {
42674
+ const stored = readJsonFile(sailPath("account.json"));
42675
+ const known = stored?.managers ?? (stored?.manager ? [stored.manager] : []);
42676
+ const active = stored?.manager ?? "";
42677
+ return {
42678
+ sma: smaAddress,
42679
+ oldManager: null,
42680
+ newManager: active,
42681
+ rotated: false,
42682
+ reattached: [],
42683
+ reattachDeferred: false,
42684
+ managers: known.map((m) => ({
42685
+ address: m,
42686
+ active: m.toLowerCase() === active.toLowerCase(),
42687
+ keystoreStored: readJsonFile(managerKeystorePath(m)) !== null
42688
+ }))
42689
+ };
42690
+ }
42664
42691
  const publicClient = createPublicClient({
42665
42692
  chain: getChainById(project.chainId),
42666
42693
  transport: http(getRpcUrl(project.chainId))
@@ -42793,6 +42820,7 @@ SMA: ${smaAddress}`);
42793
42820
  chainId: project.chainId
42794
42821
  });
42795
42822
  persistManager(smaAddress, newManager);
42823
+ if (options.to) promoteManagerKeystore(newManager, say);
42796
42824
  if (options.skipReattach || currentPermissions.length === 0) {
42797
42825
  return {
42798
42826
  sma: smaAddress,
@@ -42956,13 +42984,23 @@ async function resolveNewManager(options, oldManager, json, say) {
42956
42984
  throw new Error(`Invalid --to address: ${options.to}`);
42957
42985
  }
42958
42986
  const to = getAddress(options.to);
42959
- say(
42960
- () => console.log(
42961
- `
42962
- Rotating to existing address ${to}. The local agent keystore is left unchanged \u2014
42987
+ if (readJsonFile(managerKeystorePath(to)) !== null) {
42988
+ say(
42989
+ () => console.log(
42990
+ `
42991
+ Rotating to ${to}. Its stored keystore will become the active one
42992
+ (.sail/keys/manager.json) once the rotation confirms.`
42993
+ )
42994
+ );
42995
+ } else {
42996
+ say(
42997
+ () => console.log(
42998
+ `
42999
+ Rotating to existing address ${to}. No local keystore found for this address \u2014
42963
43000
  ensure the agent that signs dispatches holds this key.`
42964
- )
42965
- );
43001
+ )
43002
+ );
43003
+ }
42966
43004
  return to;
42967
43005
  }
42968
43006
  if (json) {
@@ -42982,6 +43020,9 @@ ensure the agent that signs dispatches holds this key.`
42982
43020
  const keyring = LocalKeyring.generate();
42983
43021
  const keystore = await keyring.exportKeystore(password);
42984
43022
  writeJsonFile(target, keystore);
43023
+ const perManagerPath = managerKeystorePath(keyring.address);
43024
+ (0, import_node_fs13.mkdirSync)(sailPath("keys", "managers"), { recursive: true });
43025
+ writeJsonFile(perManagerPath, keystore);
42985
43026
  say(
42986
43027
  () => console.log(
42987
43028
  ` New agent wallet: ${checksum4(keyring.address)} (keystore at .sail/keys/manager.json)`
@@ -42989,10 +43030,28 @@ ensure the agent that signs dispatches holds this key.`
42989
43030
  );
42990
43031
  return keyring.address;
42991
43032
  }
43033
+ function promoteManagerKeystore(newManager, say) {
43034
+ const stored = readJsonFile(managerKeystorePath(newManager));
43035
+ if (!stored) return;
43036
+ (0, import_node_fs13.mkdirSync)(sailPath("keys", "managers"), { recursive: true });
43037
+ const activeTarget = keyPath("manager");
43038
+ const displaced = readJsonFile(activeTarget);
43039
+ if (displaced?.address) {
43040
+ const snapshotPath = managerKeystorePath(displaced.address);
43041
+ if (readJsonFile(snapshotPath) === null) writeJsonFile(snapshotPath, displaced);
43042
+ } else if (displaced) {
43043
+ writeJsonFile(`${activeTarget}.${Date.now()}.bak`, displaced);
43044
+ }
43045
+ writeJsonFile(activeTarget, stored);
43046
+ say(
43047
+ () => console.log(` Agent wallet keystore for ${newManager} is now active (.sail/keys/manager.json).`)
43048
+ );
43049
+ }
42992
43050
  function persistManager(safe, manager) {
42993
43051
  const account2 = readJsonFile(sailPath("account.json"));
42994
43052
  if (account2 && account2.safe.toLowerCase() === safe.toLowerCase()) {
42995
- writeJsonFile(sailPath("account.json"), { ...account2, manager: checksum4(manager) });
43053
+ const managers = addToManagerList(account2.managers, account2.manager, manager);
43054
+ writeJsonFile(sailPath("account.json"), { ...account2, manager: checksum4(manager), managers });
42996
43055
  }
42997
43056
  const listPath = sailPath("state", "accounts.json");
42998
43057
  const list = readJsonFile(
@@ -43001,11 +43060,26 @@ function persistManager(safe, manager) {
43001
43060
  if (Array.isArray(list)) {
43002
43061
  const idx = list.findIndex((a) => a.safe.toLowerCase() === safe.toLowerCase());
43003
43062
  if (idx !== -1) {
43004
- list[idx] = { ...list[idx], manager: checksum4(manager) };
43063
+ const entry = list[idx];
43064
+ const managers = addToManagerList(entry.managers, entry.manager, manager);
43065
+ list[idx] = { ...entry, manager: checksum4(manager), managers };
43005
43066
  writeJsonFile(listPath, list);
43006
43067
  }
43007
43068
  }
43008
43069
  }
43070
+ function addToManagerList(existing, current, next) {
43071
+ const all = [...existing ?? [current], checksum4(next)];
43072
+ const seen = /* @__PURE__ */ new Set();
43073
+ const deduped = [];
43074
+ for (const a of all) {
43075
+ const lower = a.toLowerCase();
43076
+ if (!seen.has(lower)) {
43077
+ seen.add(lower);
43078
+ deduped.push(checksum4(a));
43079
+ }
43080
+ }
43081
+ return deduped;
43082
+ }
43009
43083
  function writePending(pending) {
43010
43084
  writeJsonFile(sailPath(...PENDING_REATTACH_FILE), pending);
43011
43085
  }
@@ -43016,6 +43090,19 @@ function clearPending() {
43016
43090
  }
43017
43091
  }
43018
43092
  function printSummary2(r) {
43093
+ if (r.managers) {
43094
+ console.log("\nKnown agent wallets for this SMA:");
43095
+ if (r.managers.length === 0) {
43096
+ console.log(" (none recorded)");
43097
+ } else {
43098
+ for (const m of r.managers) {
43099
+ const marker = m.active ? "* " : " ";
43100
+ console.log(`${marker}${m.address}${m.keystoreStored ? " (keystore stored)" : ""}`);
43101
+ }
43102
+ console.log("\n* = active");
43103
+ }
43104
+ return;
43105
+ }
43019
43106
  console.log(`
43020
43107
  ${"\u2500".repeat(56)}`);
43021
43108
  if (r.rotated) {
@@ -43949,7 +44036,7 @@ account.command("predict").description(
43949
44036
  "Agent (manager) wallet \u2014 mixed into the kernel salt (defaults to .sail/account.json)"
43950
44037
  ).option("--salt <n>", "CREATE2 salt nonce (default: 0)").option("--chain <id>", "Show prediction for one chain only").option("--json", "Emit machine-readable JSON").action(actionWith(accountPredict));
43951
44038
  account.command("deploy-chain").description("Deploy the same SMA address on an additional chain using the same owner, manager, and salt").requiredOption("--chain <id>", "Target EVM chain ID (e.g. 8453, 42161, 130, 1)").option("--salt <n>", "CREATE2 salt (defaults to saltNonce stored in .sail/account.json)").option("--json", "Emit machine-readable JSON").action(actionWith(accountDeployChain));
43952
- account.command("rotate-signer").description("Rotate the SMA's delegated signer (agent wallet) and re-approve its mandates").option("--sma <address>", "SMA to rotate (defaults to the active account)").option("--to <address>", "Rotate to an existing agent-wallet address instead of generating one").option("--generate", "Generate a fresh local agent wallet (default when --to is omitted)").option("--skip-reattach", "Do not re-approve the previously-attached mandates").option("--reattach-only", "Skip rotation; only re-approve mandates (resume after funding)").option("--json", "Machine-readable output").action(actionWith(rotateSigner));
44039
+ account.command("rotate-signer").description("Rotate the SMA's delegated signer (agent wallet) and re-approve its mandates").option("--sma <address>", "SMA to rotate (defaults to the active account)").option("--to <address>", "Rotate to an existing agent-wallet address instead of generating one").option("--generate", "Generate a fresh local agent wallet (default when --to is omitted)").option("--skip-reattach", "Do not re-approve the previously-attached mandates").option("--reattach-only", "Skip rotation; only re-approve mandates (resume after funding)").option("--list", "List known agent wallets for this SMA without rotating").option("--json", "Machine-readable output").action(actionWith(rotateSigner));
43953
44040
  var mandate = program2.command("mandate").description("Manage mandates");
43954
44041
  mandate.command("prepare").description("Prepare a mandate draft for review and signing in the UI (MetaMask)").action(action(mandatePrepare));
43955
44042
  mandate.command("sign").description("Review and confirm the permissions authorized for your SMA").option("--yes", "Skip the confirmation prompt (for non-interactive / CI use)").action(actionWith(mandateSign));
@@ -49593,6 +49593,17 @@ function signerEntry(role, address, balanceByAddr) {
49593
49593
  status: balanceStatus(wei)
49594
49594
  };
49595
49595
  }
49596
+ function addManagerToList(existing, current, next) {
49597
+ const base = existing ?? (current ? [getAddress(current)] : []);
49598
+ const all = [...base, getAddress(next)];
49599
+ const seen = /* @__PURE__ */ new Set();
49600
+ return all.filter((a) => {
49601
+ const l = a.toLowerCase();
49602
+ if (seen.has(l)) return false;
49603
+ seen.add(l);
49604
+ return true;
49605
+ });
49606
+ }
49596
49607
  var OVERVIEW_TTL_MS = 1e4;
49597
49608
  function startServer(sailDir, { port = PORT } = {}) {
49598
49609
  const app = (0, import_express.default)();
@@ -49883,7 +49894,8 @@ function startServer(sailDir, { port = PORT } = {}) {
49883
49894
  try {
49884
49895
  const account = JSON.parse(import_node_fs2.default.readFileSync(at("account.json"), "utf-8"));
49885
49896
  if (account?.safe?.toLowerCase() === safe.toLowerCase()) {
49886
- import_node_fs2.default.writeFileSync(at("account.json"), `${JSON.stringify({ ...account, manager }, null, 2)}
49897
+ const managers = addManagerToList(account.managers, account.manager, manager);
49898
+ import_node_fs2.default.writeFileSync(at("account.json"), `${JSON.stringify({ ...account, manager, managers }, null, 2)}
49887
49899
  `);
49888
49900
  }
49889
49901
  } catch {
@@ -49893,7 +49905,9 @@ function startServer(sailDir, { port = PORT } = {}) {
49893
49905
  const list = JSON.parse(import_node_fs2.default.readFileSync(listPath, "utf-8"));
49894
49906
  const idx = list.findIndex((a) => a.safe?.toLowerCase() === safe.toLowerCase());
49895
49907
  if (idx !== -1) {
49896
- list[idx] = { ...list[idx], manager };
49908
+ const entry = list[idx];
49909
+ const managers = addManagerToList(entry.managers, entry.manager, manager);
49910
+ list[idx] = { ...entry, manager, managers };
49897
49911
  import_node_fs2.default.writeFileSync(listPath, `${JSON.stringify(list, null, 2)}
49898
49912
  `);
49899
49913
  }
@@ -49915,7 +49929,20 @@ function startServer(sailDir, { port = PORT } = {}) {
49915
49929
  res.status(500).json({ error: String(err) });
49916
49930
  }
49917
49931
  });
49918
- const isManagerKeyFile = (file) => file === "manager.json" || file.startsWith("manager-") && file.endsWith(".json");
49932
+ const isManagerKeyFile = (file) => file === "manager.json" || file.startsWith("manager-") && file.endsWith(".json") || file.startsWith("managers/") && file.endsWith(".json");
49933
+ const listManagerKeyFiles = () => {
49934
+ let files = [];
49935
+ try {
49936
+ files = import_node_fs2.default.readdirSync(at("keys"));
49937
+ } catch {
49938
+ files = [];
49939
+ }
49940
+ try {
49941
+ files.push(...import_node_fs2.default.readdirSync(at("keys/managers")).map((f) => `managers/${f}`));
49942
+ } catch {
49943
+ }
49944
+ return files;
49945
+ };
49919
49946
  const keystoreAddress = (file) => {
49920
49947
  try {
49921
49948
  const ks = JSON.parse(import_node_fs2.default.readFileSync(at(`keys/${file}`), "utf-8"));
@@ -49927,12 +49954,7 @@ function startServer(sailDir, { port = PORT } = {}) {
49927
49954
  };
49928
49955
  app.get("/api/signers", (_req, res) => {
49929
49956
  try {
49930
- let files = [];
49931
- try {
49932
- files = import_node_fs2.default.readdirSync(at("keys"));
49933
- } catch {
49934
- files = [];
49935
- }
49957
+ const files = listManagerKeyFiles();
49936
49958
  const activeSafe = readActiveSafe();
49937
49959
  let activeManager = null;
49938
49960
  try {
@@ -49972,12 +49994,7 @@ function startServer(sailDir, { port = PORT } = {}) {
49972
49994
  return;
49973
49995
  }
49974
49996
  try {
49975
- let files = [];
49976
- try {
49977
- files = import_node_fs2.default.readdirSync(at("keys"));
49978
- } catch {
49979
- files = [];
49980
- }
49997
+ const files = listManagerKeyFiles();
49981
49998
  const want = getAddress(address).toLowerCase();
49982
49999
  const match = files.find((file) => isManagerKeyFile(file) && keystoreAddress(file)?.toLowerCase() === want);
49983
50000
  if (!match) {
@@ -50610,8 +50627,9 @@ function startServer(sailDir, { port = PORT } = {}) {
50610
50627
  const [permissionSigner, manager, , sessionActive] = configs;
50611
50628
  const managerSet = Boolean(manager) && getAddress(manager) !== zeroAddress2;
50612
50629
  const managerAddr = managerSet ? getAddress(manager) : localSigner;
50630
+ const knownManagerAddrs = (account.managers ?? []).map((a) => getAddress(a));
50613
50631
  const signerAddrs = [
50614
- ...new Set([managerAddr, account.owner ? getAddress(account.owner) : null, ...localManagerAddrs].filter(Boolean))
50632
+ ...new Set([managerAddr, account.owner ? getAddress(account.owner) : null, ...localManagerAddrs, ...knownManagerAddrs].filter(Boolean))
50615
50633
  ];
50616
50634
  const balances = await Promise.all(signerAddrs.map((a) => client.getBalance({ address: a })));
50617
50635
  const balanceByAddr = new Map(signerAddrs.map((a, i) => [a.toLowerCase(), balances[i]]));
@@ -50637,6 +50655,17 @@ function startServer(sailDir, { port = PORT } = {}) {
50637
50655
  } else {
50638
50656
  managerEntry = { role: "manager", address: null, balanceWei: null, balanceEth: null, status: "unconfigured" };
50639
50657
  }
50658
+ if (knownManagerAddrs.length > 0) {
50659
+ const activeLower = (managerSet ? getAddress(manager) : account.manager ?? null)?.toLowerCase() ?? null;
50660
+ managerEntry.managers = knownManagerAddrs.map((a) => {
50661
+ const bal = balanceByAddr.get(a.toLowerCase());
50662
+ return {
50663
+ address: a,
50664
+ balanceEth: bal != null ? formatEther(bal) : null,
50665
+ isActive: a.toLowerCase() === activeLower
50666
+ };
50667
+ });
50668
+ }
50640
50669
  const signers = [managerEntry];
50641
50670
  for (const la of localManagerAddrs) {
50642
50671
  if (getAddress(la) !== (managerAddr ? getAddress(managerAddr) : null)) {
@@ -50665,6 +50694,17 @@ function startServer(sailDir, { port = PORT } = {}) {
50665
50694
  status: "local"
50666
50695
  }));
50667
50696
  }
50697
+ if (account.managers?.length > 0) {
50698
+ const onchainMgr = result.sma.manager;
50699
+ const activeLower = (onchainMgr && onchainMgr !== zeroAddress2 ? onchainMgr : account.manager ?? null)?.toLowerCase() ?? null;
50700
+ const managersPayload = account.managers.map((a) => ({
50701
+ address: getAddress(a),
50702
+ balanceEth: null,
50703
+ isActive: a.toLowerCase() === activeLower
50704
+ }));
50705
+ const mgrSigner = result.signers.find((s) => s.role === "manager");
50706
+ if (mgrSigner && !mgrSigner.managers) mgrSigner.managers = managersPayload;
50707
+ }
50668
50708
  return result;
50669
50709
  }
50670
50710
  const distDir = process.env.SAILOR_UI_DIST ?? import_node_path.default.join(import_node_path.default.dirname(_thisFile), "dist");
@@ -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-09T18:08:54.042Z
8
+ * Generated at : 2026-06-10T08:02:39.276Z
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-09T18:08:54.042Z
8
+ * Generated at : 2026-06-10T08:02:39.276Z
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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const d=o`<svg
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const p=o`<svg fill="none" viewBox="0 0 24 24">
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const e=t`
1
+ import{F as t}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const h=i`<svg fill="none" viewBox="0 0 40 40">
1
+ import{F as i}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const t=o`<svg
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const p=o`<svg fill="none" viewBox="0 0 14 15">
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const a=o`<svg fill="none" viewBox="0 0 14 15">
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const p=o`<svg fill="none" viewBox="0 0 14 15">
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const t=o`<svg fill="none" viewBox="0 0 14 15">
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const H=o`<svg
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.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-CMyY4FOR.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.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-B0JxSbAV.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-3OLndEW6.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const i=l`<svg fill="none" viewBox="0 0 20 20">
1
+ import{F as l}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const l=C`<svg
1
+ import{F as C}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-Dc9_WV0G.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-yQSvDbVa.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const p=o`<svg
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const p=o`<svg fill="none" viewBox="0 0 14 14">
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const p=o`<svg fill="none" viewBox="0 0 16 16">
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const p=o`<svg fill="none" viewBox="0 0 16 16">
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const p=o`<svg fill="none" viewBox="0 0 16 16">
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const t=o`<svg fill="none" viewBox="0 0 16 16">
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const l=t`<svg width="36" height="36" fill="none">
1
+ import{F as t}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const t=o`<svg width="14" height="14" viewBox="0 0 14 14" fill="none">
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const p=o`<svg fill="none" viewBox="0 0 16 16">
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const m=o`<svg fill="none" viewBox="0 0 20 20">
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const p=o`<svg fill="none" viewBox="0 0 16 16">
1
+ import{F as o}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.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-B_rvnvkC.js";import"./index-Dc9_WV0G.js";import"./events-CkyJn32_.js";import"./index.es-CvyDIsY4.js";import"./fallback-BL3U4ZRT.js";const e=C`<svg
1
+ import{F as C}from"./core-B0JxSbAV.js";import"./index-yQSvDbVa.js";import"./events-DC84dMPF.js";import"./index.es-BiIWW5o1.js";import"./fallback-BOfZ_bwu.js";const e=C`<svg
2
2
  xmlns="http://www.w3.org/2000/svg"
3
3
  width="16"
4
4
  height="16"