@seedprotocol/publish 0.7.10 → 0.7.11-next.1396.g883ef47

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 (72) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/README.md +1 -1
  3. package/dist/{chainConfig-B8U89YJb.js → chainConfig-nYXoVL1s.js} +1283 -1284
  4. package/dist/chainConfig-nYXoVL1s.js.map +1 -0
  5. package/dist/{collectBatchUids-CnIe9jUB.js → collectBatchUids-qRc2q61Q.js} +1 -2
  6. package/dist/collectBatchUids-qRc2q61Q.js.map +1 -0
  7. package/dist/config.d.ts +0 -2
  8. package/dist/config.d.ts.map +1 -1
  9. package/dist/{ensureAutomationSessionKey-B19eVd1T.js → ensureAutomationSessionKey-BaaHU2Wb.js} +27 -27
  10. package/dist/{ensureAutomationSessionKey-B19eVd1T.js.map → ensureAutomationSessionKey-BaaHU2Wb.js.map} +1 -1
  11. package/dist/{ensureModularPublishBootstrap-COEV4BGz.js → ensureModularPublishBootstrap-NzYQ1MfY.js} +9 -9
  12. package/dist/{ensureModularPublishBootstrap-COEV4BGz.js.map → ensureModularPublishBootstrap-NzYQ1MfY.js.map} +1 -1
  13. package/dist/{ensureSmartWalletThenPublish-DhWyUjt0.js → ensureSmartWalletThenPublish-CpuDoo5O.js} +16 -16
  14. package/dist/{ensureSmartWalletThenPublish-DhWyUjt0.js.map → ensureSmartWalletThenPublish-CpuDoo5O.js.map} +1 -1
  15. package/dist/helpers/adapters/eip1193.d.ts +1 -3
  16. package/dist/helpers/adapters/eip1193.d.ts.map +1 -1
  17. package/dist/helpers/assertStorageBoundToIdentity.d.ts.map +1 -1
  18. package/dist/helpers/constants.d.ts +0 -13
  19. package/dist/helpers/constants.d.ts.map +1 -1
  20. package/dist/helpers/enrollPublishAutomation.d.ts +5 -1
  21. package/dist/helpers/enrollPublishAutomation.d.ts.map +1 -1
  22. package/dist/helpers/publishWalletRegistry.d.ts +1 -5
  23. package/dist/helpers/publishWalletRegistry.d.ts.map +1 -1
  24. package/dist/hooks/index.d.ts +1 -1
  25. package/dist/hooks/index.d.ts.map +1 -1
  26. package/dist/index.d.ts +2 -2
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +239 -239
  29. package/dist/index.js.map +1 -1
  30. package/dist/managedAccountAdmin-BeSXTCeH.js +26 -0
  31. package/dist/{managedAccountAdmin-xZbC3bQ5.js.map → managedAccountAdmin-BeSXTCeH.js.map} +1 -1
  32. package/dist/{publishAuthorization-CpmPRbpm.js → publishAuthorization-CVl5ZK5B.js} +37 -34
  33. package/dist/publishAuthorization-CVl5ZK5B.js.map +1 -0
  34. package/dist/publishWalletRegistry-BaQe9rIR.js.map +1 -1
  35. package/dist/react/PublishProvider.thirdweb.d.ts +0 -1
  36. package/dist/react/PublishProvider.thirdweb.d.ts.map +1 -1
  37. package/dist/{resolveRevokeAccount-D08n9UTy.js → resolveRevokeAccount-DRrUY9FR.js} +12 -12
  38. package/dist/{resolveRevokeAccount-D08n9UTy.js.map → resolveRevokeAccount-DRrUY9FR.js.map} +1 -1
  39. package/dist/services/domainOwnership/index.d.ts.map +1 -1
  40. package/dist/services/domainOwnership/public.d.ts +1 -1
  41. package/dist/services/domainOwnership/public.d.ts.map +1 -1
  42. package/dist/services/publish/actors/index.d.ts +1 -1
  43. package/dist/services/publish/actors/index.d.ts.map +1 -1
  44. package/dist/services/publish/actors/seedUidHelpers.d.ts +0 -39
  45. package/dist/services/publish/actors/seedUidHelpers.d.ts.map +1 -1
  46. package/dist/services/publish/actors/utils.d.ts +0 -1
  47. package/dist/services/publish/actors/utils.d.ts.map +1 -1
  48. package/dist/services/publish/index.d.ts +4 -6
  49. package/dist/services/publish/index.d.ts.map +1 -1
  50. package/dist/services/publishAuthorization/index.d.ts +1 -1
  51. package/dist/services/publishAuthorization/index.d.ts.map +1 -1
  52. package/dist/services/publishCost/index.d.ts +2 -2
  53. package/dist/services/publishCost/index.d.ts.map +1 -1
  54. package/dist/services/publishedBy/collectBatchUids.d.ts +0 -2
  55. package/dist/services/publishedBy/collectBatchUids.d.ts.map +1 -1
  56. package/dist/services/publishedBy/index.d.ts +1 -3
  57. package/dist/services/publishedBy/index.d.ts.map +1 -1
  58. package/dist/services/publishedBy/public.d.ts +1 -1
  59. package/dist/services/publishedBy/public.d.ts.map +1 -1
  60. package/dist/thirdweb.js +129 -128
  61. package/dist/thirdweb.js.map +1 -1
  62. package/dist/{worker-4DXDWw6E.js → worker-D1czx7Yg.js} +2 -2
  63. package/dist/{worker-4DXDWw6E.js.map → worker-D1czx7Yg.js.map} +1 -1
  64. package/package.json +7 -9
  65. package/dist/chainConfig-B8U89YJb.js.map +0 -1
  66. package/dist/collectBatchUids-CnIe9jUB.js.map +0 -1
  67. package/dist/managedAccountAdmin-xZbC3bQ5.js +0 -26
  68. package/dist/publishAuthorization-CpmPRbpm.js.map +0 -1
  69. package/dist/services/publish/seeds.d.ts +0 -2
  70. package/dist/services/publish/seeds.d.ts.map +0 -1
  71. package/dist/services/shared.d.ts +0 -7
  72. package/dist/services/shared.d.ts.map +0 -1
package/dist/thirdweb.js CHANGED
@@ -1,147 +1,147 @@
1
- import { $ as e, B as t, F as n, G as r, H as i, Ht as a, J as o, K as s, Kt as c, L as l, M as u, N as d, P as f, Q as p, R as m, Rt as ee, U as h, V as g, Vt as te, W as _, Wt as ne, X as re, Y as ie, Z as ae, _t as v, a as y, et as oe, gt as b, ht as se, i as ce, it as x, j as le, m as S, mt as ue, nt as de, o as fe, q as C, qt as w, rt as pe, t as T, tt as me, z as he } from "./chainConfig-B8U89YJb.js";
2
- import { i as E, t as D } from "./publishWalletRegistry-BaQe9rIR.js";
3
- import { a as O, d as k, f as A, g as j, h as M, l as N, m as P, p as F, u as I } from "./publishAuthorization-CpmPRbpm.js";
4
- import { t as L } from "./ensureSmartWalletThenPublish-DhWyUjt0.js";
5
- import { t as R } from "./ensureModularPublishBootstrap-COEV4BGz.js";
6
- import { i as z, r as B, t as V } from "./ensureAutomationSessionKey-B19eVd1T.js";
1
+ import { $ as e, A as t, B as n, Bt as r, G as i, Gt as a, H as o, I as s, J as c, K as l, Kt as u, L as ee, Lt as te, M as ne, N as d, P as re, Q as f, R as ie, U as p, Ut as ae, V as m, Vt as h, W as g, X as oe, Y as se, Z as _, a as v, et as ce, gt as y, ht as b, i as x, j as le, mt as ue, nt as de, p as S, pt as fe, q as C, r as pe, rt as w, t as T, tt as me, z as E } from "./chainConfig-nYXoVL1s.js";
2
+ import { i as he, t as D } from "./publishWalletRegistry-BaQe9rIR.js";
3
+ import { a as O, d as k, f as A, g as j, h as M, l as N, m as P, p as F, u as I } from "./publishAuthorization-CVl5ZK5B.js";
4
+ import { t as L } from "./ensureSmartWalletThenPublish-CpuDoo5O.js";
5
+ import { t as R } from "./ensureModularPublishBootstrap-NzYQ1MfY.js";
6
+ import { i as z, r as B, t as V } from "./ensureAutomationSessionKey-BaaHU2Wb.js";
7
7
  import { client as H } from "@seedprotocol/sdk";
8
8
  import { deploySmartAccount as ge, getContract as U, sendTransaction as _e } from "thirdweb";
9
9
  import { ConnectButton as ve, ThirdwebProvider as ye, darkTheme as be, useActiveAccount as xe, useActiveWallet as Se, useActiveWalletConnectionStatus as Ce, useIsAutoConnecting as we } from "thirdweb/react";
10
10
  import { useCallback as Te, useEffect as W, useRef as G } from "react";
11
- import { assessPublishAuthorization as Ee, decodePublishAuthorizationData as De, getPublishAuthorizationFromEas as Oe } from "@seedprotocol/eas";
11
+ import { PUBLISH_AUTHORIZATION_DEFAULT_EXPIRATION_SECS as Ee, assessPublishAuthorization as De, decodePublishAuthorizationData as Oe, getPublishAuthorizationFromEas as ke } from "@seedprotocol/eas";
12
12
  import { jsx as K } from "react/jsx-runtime";
13
- import { SeedProvider as ke } from "@seedprotocol/react";
14
- import { addSessionKey as Ae, shouldUpdateSessionKey as je } from "thirdweb/extensions/erc4337";
13
+ import { SeedProvider as Ae } from "@seedprotocol/react";
14
+ import { addSessionKey as je, shouldUpdateSessionKey as Me } from "thirdweb/extensions/erc4337";
15
15
  //#region src/react/ConnectButton.tsx
16
16
  var q = "seedProtocol:publish:userChoseWalletDisconnect";
17
- function Me(e) {
18
- console.warn("[ConnectButton] Wallet setup / module install skipped:", e), y().onWalletSetupWarning?.(e);
17
+ function Ne(e) {
18
+ console.warn("[ConnectButton] Wallet setup / module install skipped:", e), x().onWalletSetupWarning?.(e);
19
19
  }
20
- function Ne() {
20
+ function Pe() {
21
21
  return H.isInitialized() ? Promise.resolve() : new Promise((e) => {
22
22
  H.onReady(() => e());
23
23
  });
24
24
  }
25
- async function Pe(e, t, n) {
25
+ async function Fe(e, t, n) {
26
26
  if (n.modularAccountModuleContract) {
27
27
  if (n.useModularExecutor) {
28
28
  if (!t) return;
29
29
  try {
30
- p();
31
- let e = _();
30
+ _();
31
+ let e = p();
32
32
  await e.autoConnect({
33
- client: x(),
34
- chain: v(n)
33
+ client: w(),
34
+ chain: y(n)
35
35
  });
36
36
  let r = e.getAccount();
37
37
  if (!r) return;
38
- await f(t, r, n);
38
+ await d(t, r, n);
39
39
  } catch {}
40
40
  } else try {
41
- await f(e.address, e, n);
41
+ await d(e.address, e, n);
42
42
  } catch (e) {
43
- Me(e);
43
+ Ne(e);
44
44
  }
45
45
  }
46
46
  }
47
- var Fe = () => {
48
- let e = j(), n = v(e), a = Se(), s = xe(), c = Ce(), l = we(), u = G(null), d = G(!1), f = G(!1);
47
+ var Ie = () => {
48
+ let e = j(), t = y(e), n = Se(), r = xe(), i = Ce(), a = we(), o = G(null), s = G(!1), c = G(!1);
49
49
  W(() => {
50
50
  if (typeof window > "u") return;
51
- let t = d.current;
52
- d.current = l;
53
- let i;
51
+ let n = s.current;
52
+ s.current = a;
53
+ let r;
54
54
  try {
55
- i = performance.getEntriesByType("navigation")[0]?.type;
55
+ r = performance.getEntriesByType("navigation")[0]?.type;
56
56
  } catch {
57
- i = void 0;
57
+ r = void 0;
58
58
  }
59
- if (i !== "reload") return;
60
- let a = !1;
59
+ if (r !== "reload") return;
60
+ let o = !1;
61
61
  try {
62
- a = sessionStorage.getItem(q) === "1";
62
+ o = sessionStorage.getItem(q) === "1";
63
63
  } catch {
64
- a = !1;
64
+ o = !1;
65
65
  }
66
- a || t && !l && c === "disconnected" && (f.current || (f.current = !0, (e.useModularExecutor ? r() : _()).autoConnect({
67
- client: x(),
68
- chain: n
66
+ o || n && !a && i === "disconnected" && (c.current || (c.current = !0, (e.useModularExecutor ? g() : p()).autoConnect({
67
+ client: w(),
68
+ chain: t
69
69
  }).catch(() => {})));
70
70
  }, [
71
- c,
72
- l,
71
+ i,
72
+ a,
73
73
  e.useModularExecutor,
74
- n
74
+ t
75
75
  ]);
76
- let m = Te(async (r) => {
77
- let a = r.getAccount();
78
- if (!a) return;
79
- await Ne();
80
- let o = /* @__PURE__ */ new Set([a.address.toLowerCase()]), s;
76
+ let u = Te(async (n) => {
77
+ let r = n.getAccount();
78
+ if (!r) return;
79
+ await Pe();
80
+ let i = /* @__PURE__ */ new Set([r.address.toLowerCase()]), a;
81
81
  if (e.useModularExecutor) {
82
- p();
83
- let e = r.getAdminAccount?.()?.address ?? a.address, t = async () => {
82
+ _();
83
+ let e = n.getAdminAccount?.()?.address ?? r.address, o = async () => {
84
84
  try {
85
- return await i(n);
85
+ return await m(t);
86
86
  } catch {
87
87
  try {
88
- return await C(e);
88
+ return await l(e);
89
89
  } catch {
90
90
  return;
91
91
  }
92
92
  }
93
93
  };
94
- s = await t(), s ||= (await new Promise((e) => queueMicrotask(() => e())), await t()), s && o.add(s.toLowerCase());
94
+ a = await o(), a ||= (await new Promise((e) => queueMicrotask(() => e())), await o()), a && i.add(a.toLowerCase());
95
95
  }
96
- let c = [...o].sort().join(",");
97
- if (u.current !== c) {
98
- u.current !== null && S.stopAll(), u.current = c;
96
+ let s = [...i].sort().join(",");
97
+ if (o.current !== s) {
98
+ o.current !== null && S.stopAll(), o.current = s;
99
99
  try {
100
- let e = r.getAdminAccount?.()?.address, n = !!s || !!e && e.toLowerCase() !== a.address.toLowerCase(), i = b(a, { kind: n ? "smart" : "eoa" }), c = r.getAdminAccount?.(), l = s ? i.signer : n && c && c.address.toLowerCase() !== a.address.toLowerCase() ? b(c, { kind: "eoa" }).signer : void 0;
101
- await E({
102
- ...i,
103
- ownedAddresses: [...o],
104
- publisherAddress: s ?? a.address,
105
- ...l ? { dataItemSigner: l } : {},
106
- ...n && !s ? { deploy: async () => {
107
- await t(a);
100
+ let e = n.getAdminAccount?.()?.address, t = !!a || !!e && e.toLowerCase() !== r.address.toLowerCase(), o = b(r, { kind: t ? "smart" : "eoa" }), s = n.getAdminAccount?.(), c = a ? o.signer : t && s && s.address.toLowerCase() !== r.address.toLowerCase() ? b(s, { kind: "eoa" }).signer : void 0;
101
+ await he({
102
+ ...o,
103
+ ownedAddresses: [...i],
104
+ publisherAddress: a ?? r.address,
105
+ ...c ? { dataItemSigner: c } : {},
106
+ ...t && !a ? { deploy: async () => {
107
+ await E(r);
108
108
  } } : {},
109
- ...e && e.toLowerCase() !== a.address.toLowerCase() ? { adminAddress: e } : {}
109
+ ...e && e.toLowerCase() !== r.address.toLowerCase() ? { adminAddress: e } : {}
110
110
  });
111
111
  } catch (e) {
112
- throw u.current = null, console.warn("[ConnectButton] Failed to set seed client addresses:", e), e;
112
+ throw o.current = null, console.warn("[ConnectButton] Failed to set seed client addresses:", e), e;
113
113
  }
114
- await Pe(a, s, e);
114
+ await Fe(r, a, e);
115
115
  }
116
116
  }, [e]);
117
117
  return W(() => {
118
- if (l) return;
119
- if (c !== "connected") {
120
- u.current = null;
118
+ if (a) return;
119
+ if (i !== "connected") {
120
+ o.current = null;
121
121
  return;
122
122
  }
123
- if (!a) return;
123
+ if (!n) return;
124
124
  let e = !1;
125
125
  return (async () => {
126
126
  try {
127
127
  if (e) return;
128
- await m(a);
128
+ await u(n);
129
129
  } catch {}
130
130
  })(), () => {
131
131
  e = !0;
132
132
  };
133
133
  }, [
134
+ n,
135
+ r?.address,
136
+ i,
134
137
  a,
135
- s?.address,
136
- c,
137
- l,
138
- m
138
+ u
139
139
  ]), /* @__PURE__ */ K(ve, {
140
- client: x(),
141
- wallets: o(e),
140
+ client: w(),
141
+ wallets: C(e),
142
142
  autoConnect: !0,
143
- chain: n,
144
- chains: [n],
143
+ chain: t,
144
+ chains: [t],
145
145
  onConnect: async (e, t) => {
146
146
  let n = e.getAccount();
147
147
  if (n) {
@@ -150,7 +150,7 @@ var Fe = () => {
150
150
  } catch {}
151
151
  console.log("[ConnectButton] Connected", n.address);
152
152
  try {
153
- await m(e);
153
+ await u(e);
154
154
  } catch {}
155
155
  }
156
156
  },
@@ -169,44 +169,44 @@ var Fe = () => {
169
169
  borderColor: "#344054"
170
170
  } })
171
171
  });
172
- }, Ie = ({ children: e, config: t, queryClient: n, queryClientRef: r }) => {
172
+ }, Le = ({ children: e, config: t, queryClient: n, queryClientRef: r }) => {
173
173
  let i = G(void 0);
174
- return t && i.current !== t && (fe(t), i.current = t), /* @__PURE__ */ K(M.Provider, {
175
- value: t ?? ce(),
176
- children: /* @__PURE__ */ K(ye, { children: /* @__PURE__ */ K(ke, {
174
+ return t && i.current !== t && (v(t), i.current = t), /* @__PURE__ */ K(M.Provider, {
175
+ value: t ?? pe(),
176
+ children: /* @__PURE__ */ K(ye, { children: /* @__PURE__ */ K(Ae, {
177
177
  queryClient: n,
178
178
  queryClientRef: r,
179
179
  children: e
180
180
  }) })
181
181
  });
182
- }, Le = "Modular (EIP-7702) wallet is not connected. Sign in with the same method and try again.", Re = () => `Your modular account is not upgraded to an EIP-7702 smart account on ${T()} yet. Enable autoDeployEip7702ModularAccount in publish config or complete wallet setup, then retry.`, ze = () => `Automatic EIP-7702 smart account setup failed on ${T()}. Retry or reconnect your wallet.`, J = "EIP-7702 upgrade was sent but on-chain bytecode was not detected yet. Wait a moment and retry.", Y = 5;
183
- async function Be() {
184
- let { autoDeployEip7702ModularAccount: e } = y(), t = r();
182
+ }, Re = "Modular (EIP-7702) wallet is not connected. Sign in with the same method and try again.", ze = () => `Your modular account is not upgraded to an EIP-7702 smart account on ${T()} yet. Enable autoDeployEip7702ModularAccount in publish config or complete wallet setup, then retry.`, J = () => `Automatic EIP-7702 smart account setup failed on ${T()}. Retry or reconnect your wallet.`, Be = "EIP-7702 upgrade was sent but on-chain bytecode was not detected yet. Wait a moment and retry.", Y = 5;
183
+ async function Ve() {
184
+ let { autoDeployEip7702ModularAccount: e } = x(), t = g();
185
185
  await t.autoConnect({
186
- client: x(),
187
- chain: v()
186
+ client: w(),
187
+ chain: y()
188
188
  });
189
189
  let n = t.getAccount();
190
- if (!n) throw new c(Le, "EIP7702_MODULAR_ACCOUNT_UNAVAILABLE");
191
- let i = x(), o = U({
190
+ if (!n) throw new a(Re, "EIP7702_MODULAR_ACCOUNT_UNAVAILABLE");
191
+ let i = w(), o = U({
192
192
  client: i,
193
- chain: v(),
193
+ chain: y(),
194
194
  address: n.address
195
195
  });
196
- if (!await te(n.address)) {
197
- if (!e) throw new c(Re(), "EIP7702_MODULAR_NOT_UPGRADED", n.address);
196
+ if (!await r(n.address)) {
197
+ if (!e) throw new a(ze(), "EIP7702_MODULAR_NOT_UPGRADED", n.address);
198
198
  try {
199
199
  await ge({
200
200
  smartAccount: n,
201
- chain: v(),
201
+ chain: y(),
202
202
  client: i,
203
203
  accountContract: o
204
204
  });
205
205
  } catch (e) {
206
- if (await a(n.address, Y)) return;
207
- throw new c(ze(), "EIP7702_MODULAR_DEPLOY_FAILED", n.address, e);
206
+ if (await h(n.address, Y)) return;
207
+ throw new a(J(), "EIP7702_MODULAR_DEPLOY_FAILED", n.address, e);
208
208
  }
209
- if (!await a(n.address, Y)) throw new c(J, "EIP7702_MODULAR_NOT_CONFIRMED", n.address);
209
+ if (!await h(n.address, Y)) throw new a(Be, "EIP7702_MODULAR_NOT_CONFIRMED", n.address);
210
210
  }
211
211
  }
212
212
  //#endregion
@@ -216,34 +216,34 @@ function X(e) {
216
216
  }
217
217
  //#endregion
218
218
  //#region src/helpers/ensureManagedSignerSessionKey.ts
219
- var Ve = () => `Could not connect the managed publishing account to authorize the modular signer on ${T()}. Reconnect and try again.`, Z = () => `Could not authorize the modular wallet as a session signer on your publishing account on ${T()}.`;
220
- async function He(e) {
221
- let { managedAddress: t, signerAddress: n } = e, r = _();
219
+ var He = () => `Could not connect the managed publishing account to authorize the modular signer on ${T()}. Reconnect and try again.`, Z = () => `Could not authorize the modular wallet as a session signer on your publishing account on ${T()}.`;
220
+ async function Ue(e) {
221
+ let { managedAddress: t, signerAddress: n } = e, r = p();
222
222
  await r.autoConnect({
223
- client: x(),
224
- chain: v()
223
+ client: w(),
224
+ chain: y()
225
225
  });
226
226
  let i = r.getAccount();
227
- if (!i) throw new w(Ve(), "MODULAR_SIGNER_ACTIVATION_FAILED", t);
227
+ if (!i) throw new u(He(), "MODULAR_SIGNER_ACTIVATION_FAILED", t);
228
228
  let a = U({
229
- client: x(),
230
- chain: v(),
229
+ client: w(),
230
+ chain: y(),
231
231
  address: t
232
232
  }), o = {
233
233
  approvedTargets: X(t),
234
234
  nativeTokenLimitPerTransaction: 0
235
235
  }, s = !1;
236
236
  try {
237
- s = await je({
237
+ s = await Me({
238
238
  accountContract: a,
239
239
  sessionKeyAddress: n,
240
240
  newPermissions: o
241
241
  });
242
242
  } catch (e) {
243
- throw new w(Z(), "MODULAR_SIGNER_ACTIVATION_FAILED", t, e);
243
+ throw new u(Z(), "MODULAR_SIGNER_ACTIVATION_FAILED", t, e);
244
244
  }
245
245
  if (s) try {
246
- let e = Ae({
246
+ let e = je({
247
247
  contract: a,
248
248
  account: i,
249
249
  sessionKeyAddress: n,
@@ -252,47 +252,47 @@ async function He(e) {
252
252
  account: i,
253
253
  transaction: e
254
254
  });
255
- await ne(t.transactionHash);
255
+ await ae(t.transactionHash);
256
256
  } catch (e) {
257
- throw new w(Z(), "MODULAR_SIGNER_ACTIVATION_FAILED", t, e);
257
+ throw new u(Z(), "MODULAR_SIGNER_ACTIVATION_FAILED", t, e);
258
258
  }
259
259
  let c = !1;
260
260
  try {
261
- c = await ee(t, n);
261
+ c = await te(t, n);
262
262
  } catch (e) {
263
- throw new w(Z(), "MODULAR_SIGNER_ACTIVATION_FAILED", t, e);
263
+ throw new u(Z(), "MODULAR_SIGNER_ACTIVATION_FAILED", t, e);
264
264
  }
265
- if (!c) throw new w(Z(), "MODULAR_SIGNER_ACTIVATION_FAILED", t);
265
+ if (!c) throw new u(Z(), "MODULAR_SIGNER_ACTIVATION_FAILED", t);
266
266
  }
267
267
  //#endregion
268
268
  //#region src/helpers/enrollPublishAutomation.ts
269
269
  async function Q(e) {
270
- let t = _();
270
+ let t = p();
271
271
  await t.autoConnect({
272
- client: x(),
273
- chain: v()
272
+ client: w(),
273
+ chain: y()
274
274
  });
275
275
  let n = t.getAccount();
276
- if (!n) throw new w("Could not connect the managed publishing account to enroll or revoke publish automation.", "MANAGED_ACCOUNT_UNAVAILABLE", e);
276
+ if (!n) throw new u("Could not connect the managed publishing account to enroll or revoke publish automation.", "MANAGED_ACCOUNT_UNAVAILABLE", e);
277
277
  return n;
278
278
  }
279
279
  async function $(e, t) {
280
280
  return t || b(await Q(e), { kind: "smart" });
281
281
  }
282
- async function Ue(e) {
283
- let t = y();
282
+ async function We(e) {
283
+ let t = x();
284
284
  if (!t.modularAccountModuleContract?.trim()) throw Error("@seedprotocol/publish: enrollPublishAutomation requires PublishConfig.modularAccountModuleContract");
285
- let r = await Q(e), i;
285
+ let n = await Q(e), r;
286
286
  try {
287
- i = await f(e, r, t);
287
+ r = await d(e, n, t);
288
288
  } catch (t) {
289
- throw t instanceof w ? t : new w("Executor module setup failed for publish automation.", "EXECUTOR_MODULE_NOT_INSTALLED", e, t);
289
+ throw t instanceof u ? t : new u("Executor module setup failed for publish automation.", "EXECUTOR_MODULE_NOT_INSTALLED", e, t);
290
290
  }
291
- await n(e, i.status === "installed" ? { installedEas: i.eas } : { readAttempts: i.status === "already-installed" ? 5 : 1 });
291
+ await re(e, r.status === "installed" ? { installedEas: r.eas } : { readAttempts: r.status === "already-installed" ? 5 : 1 });
292
292
  }
293
- async function We(e) {
294
- let { managedAddress: t, sessionKeyAddress: n, appAddress: r, expiresAt: i } = e;
295
- await Ue(t), await V({
293
+ async function Ge(e) {
294
+ let { managedAddress: t, sessionKeyAddress: n, appAddress: r } = e, i = typeof e.expiresAt == "number" && e.expiresAt > 0 ? Math.trunc(e.expiresAt) : Math.floor(Date.now() / 1e3) + Ee;
295
+ await We(t), await V({
296
296
  managedAddress: t,
297
297
  sessionKeyAddress: n,
298
298
  expiresAt: i
@@ -310,7 +310,7 @@ async function We(e) {
310
310
  })
311
311
  };
312
312
  }
313
- async function Ge(e) {
313
+ async function Ke(e) {
314
314
  let { managedAddress: t, sessionKeyAddress: n, authorizationUid: r } = e, i = await $(t, e.userWallet);
315
315
  await z({
316
316
  managedAddress: t,
@@ -322,7 +322,7 @@ async function Ge(e) {
322
322
  }
323
323
  //#endregion
324
324
  //#region src/helpers/assertStorageBoundToIdentity.ts
325
- async function Ke(e) {
325
+ async function qe(e) {
326
326
  let { managedAddress: t, dataItemOwner: n, atTime: r, allowActiveSessionKey: i = !0, allowSidecar: a = !0 } = e, o = [], s = n.trim().toLowerCase(), c = t.trim().toLowerCase();
327
327
  if (!/^0x[0-9a-fA-F]{40}$/.test(s) || !/^0x[0-9a-fA-F]{40}$/.test(c)) return {
328
328
  bound: !1,
@@ -339,17 +339,18 @@ async function Ke(e) {
339
339
  o.push(e instanceof Error ? e.message : "isActiveSigner check failed");
340
340
  }
341
341
  if (a) try {
342
- let e = await Oe({
342
+ let e = await ke({
343
343
  identities: [t],
344
344
  sessionKeys: [n],
345
345
  excludeRevoked: !0
346
346
  }), i = r == null ? Date.now() : r * 1e3;
347
347
  for (let t of e) try {
348
- let e = De(t.decodedDataJson ?? "[]");
348
+ let e = Oe(t.decodedDataJson ?? "[]");
349
349
  if (e.identity.toLowerCase() !== c || e.sessionKey.toLowerCase() !== s) continue;
350
- let n = typeof t.expirationTime == "number" ? t.expirationTime : null, r = Ee({
350
+ let n = typeof t.expirationTime == "number" ? t.expirationTime : null, r = De({
351
351
  decoded: e,
352
352
  expirationTime: n,
353
+ revoked: t.revoked,
353
354
  now: i
354
355
  });
355
356
  if (r.status === "valid") return {
@@ -369,6 +370,6 @@ async function Ke(e) {
369
370
  };
370
371
  }
371
372
  //#endregion
372
- export { de as CALL_GAS_HEADROOM_BPS, Fe as ConnectButton, l as ExternalWalletsForDeploy, I as PUBLISH_AUTOMATION_SCOPES, Ie as PublishProvider, m as appMetadata, P as approvedTargetsForAutomationPublish, ue as asSeedSignerFromThirdweb, se as asThirdwebPublishWallet, Ke as assertStorageBoundToIdentity, k as buildAutomationSessionKeyPermissions, X as defaultApprovedTargetsForModularPublish, he as deployManagedAccountViaFactory, t as deploySmartWalletContract, We as enrollPublishAutomation, V as ensureAutomationSessionKey, Be as ensureEip7702ModularAccountReady, f as ensureExecutorModuleInstalled, le as ensureManagedAccountReady, He as ensureManagedSignerSessionKey, R as ensureModularPublishBootstrap, L as ensureSmartWalletThenPublish, b as fromThirdwebAccount, x as getClient, g as getConnectedAccount, i as getConnectedManagedAccountAddress, h as getConnectedModularAccount, _ as getManagedAccountWallet, r as getModularAccountWallet, v as getPublishThirdwebChain, s as getSharedPublishInAppWalletStorage, C as getSmartWalletAddressForAdmin, o as getWalletsForConnectButton, A as hashAutomationSessionKeyPermissions, B as isAutomationSessionActive, ie as isSmartWalletDeployed, re as pollSmartWalletDeployed, z as removeAutomationSessionKey, ae as resolveSmartWalletForPublish, Ge as revokePublishAutomation, u as runModularExecutorPublishPrep, pe as seedPaymaster, F as toThirdwebSessionKeyPermissions, d as tryDeployManagedAccount, e as useActiveSmartWalletContract, oe as useLocalWalletAccount, j as usePublishConfig, me as wallets };
373
+ export { me as CALL_GAS_HEADROOM_BPS, Ie as ConnectButton, s as ExternalWalletsForDeploy, I as PUBLISH_AUTOMATION_SCOPES, Le as PublishProvider, ee as appMetadata, P as approvedTargetsForAutomationPublish, fe as asSeedSignerFromThirdweb, ue as asThirdwebPublishWallet, qe as assertStorageBoundToIdentity, k as buildAutomationSessionKeyPermissions, X as defaultApprovedTargetsForModularPublish, ie as deployManagedAccountViaFactory, E as deploySmartWalletContract, Ge as enrollPublishAutomation, V as ensureAutomationSessionKey, Ve as ensureEip7702ModularAccountReady, d as ensureExecutorModuleInstalled, t as ensureManagedAccountReady, Ue as ensureManagedSignerSessionKey, R as ensureModularPublishBootstrap, L as ensureSmartWalletThenPublish, b as fromThirdwebAccount, w as getClient, n as getConnectedAccount, m as getConnectedManagedAccountAddress, o as getConnectedModularAccount, p as getManagedAccountWallet, g as getModularAccountWallet, y as getPublishThirdwebChain, i as getSharedPublishInAppWalletStorage, l as getSmartWalletAddressForAdmin, C as getWalletsForConnectButton, A as hashAutomationSessionKeyPermissions, B as isAutomationSessionActive, c as isSmartWalletDeployed, se as pollSmartWalletDeployed, z as removeAutomationSessionKey, oe as resolveSmartWalletForPublish, Ke as revokePublishAutomation, le as runModularExecutorPublishPrep, de as seedPaymaster, F as toThirdwebSessionKeyPermissions, ne as tryDeployManagedAccount, f as useActiveSmartWalletContract, e as useLocalWalletAccount, j as usePublishConfig, ce as wallets };
373
374
 
374
375
  //# sourceMappingURL=thirdweb.js.map