@seedprotocol/publish 0.7.10 → 0.7.11-next.1384.g8b47246

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 (65) hide show
  1. package/CHANGELOG.md +5 -1
  2. package/README.md +1 -1
  3. package/dist/{chainConfig-B8U89YJb.js → chainConfig-DK_5pgXF.js} +1283 -1284
  4. package/dist/chainConfig-DK_5pgXF.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-BwCXLjcX.js} +27 -27
  10. package/dist/{ensureAutomationSessionKey-B19eVd1T.js.map → ensureAutomationSessionKey-BwCXLjcX.js.map} +1 -1
  11. package/dist/{ensureModularPublishBootstrap-COEV4BGz.js → ensureModularPublishBootstrap-DZcceVDq.js} +9 -9
  12. package/dist/{ensureModularPublishBootstrap-COEV4BGz.js.map → ensureModularPublishBootstrap-DZcceVDq.js.map} +1 -1
  13. package/dist/{ensureSmartWalletThenPublish-DhWyUjt0.js → ensureSmartWalletThenPublish-BW1_dW3n.js} +16 -16
  14. package/dist/{ensureSmartWalletThenPublish-DhWyUjt0.js.map → ensureSmartWalletThenPublish-BW1_dW3n.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/constants.d.ts +0 -13
  18. package/dist/helpers/constants.d.ts.map +1 -1
  19. package/dist/helpers/publishWalletRegistry.d.ts +1 -5
  20. package/dist/helpers/publishWalletRegistry.d.ts.map +1 -1
  21. package/dist/hooks/index.d.ts +1 -1
  22. package/dist/hooks/index.d.ts.map +1 -1
  23. package/dist/index.d.ts +2 -2
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +233 -233
  26. package/dist/index.js.map +1 -1
  27. package/dist/managedAccountAdmin-Cb1ut9V4.js +26 -0
  28. package/dist/{managedAccountAdmin-xZbC3bQ5.js.map → managedAccountAdmin-Cb1ut9V4.js.map} +1 -1
  29. package/dist/{publishAuthorization-CpmPRbpm.js → publishAuthorization-C_VidnTq.js} +25 -25
  30. package/dist/{publishAuthorization-CpmPRbpm.js.map → publishAuthorization-C_VidnTq.js.map} +1 -1
  31. package/dist/publishWalletRegistry-BaQe9rIR.js.map +1 -1
  32. package/dist/react/PublishProvider.thirdweb.d.ts +0 -1
  33. package/dist/react/PublishProvider.thirdweb.d.ts.map +1 -1
  34. package/dist/{resolveRevokeAccount-D08n9UTy.js → resolveRevokeAccount-CCJ_7quC.js} +12 -12
  35. package/dist/{resolveRevokeAccount-D08n9UTy.js.map → resolveRevokeAccount-CCJ_7quC.js.map} +1 -1
  36. package/dist/services/domainOwnership/public.d.ts +1 -1
  37. package/dist/services/domainOwnership/public.d.ts.map +1 -1
  38. package/dist/services/publish/actors/index.d.ts +1 -1
  39. package/dist/services/publish/actors/index.d.ts.map +1 -1
  40. package/dist/services/publish/actors/seedUidHelpers.d.ts +0 -39
  41. package/dist/services/publish/actors/seedUidHelpers.d.ts.map +1 -1
  42. package/dist/services/publish/actors/utils.d.ts +0 -1
  43. package/dist/services/publish/actors/utils.d.ts.map +1 -1
  44. package/dist/services/publish/index.d.ts +4 -6
  45. package/dist/services/publish/index.d.ts.map +1 -1
  46. package/dist/services/publishCost/index.d.ts +2 -2
  47. package/dist/services/publishCost/index.d.ts.map +1 -1
  48. package/dist/services/publishedBy/collectBatchUids.d.ts +0 -2
  49. package/dist/services/publishedBy/collectBatchUids.d.ts.map +1 -1
  50. package/dist/services/publishedBy/index.d.ts +1 -3
  51. package/dist/services/publishedBy/index.d.ts.map +1 -1
  52. package/dist/services/publishedBy/public.d.ts +1 -1
  53. package/dist/services/publishedBy/public.d.ts.map +1 -1
  54. package/dist/thirdweb.js +102 -102
  55. package/dist/thirdweb.js.map +1 -1
  56. package/dist/{worker-4DXDWw6E.js → worker-C7XeFMWh.js} +2 -2
  57. package/dist/{worker-4DXDWw6E.js.map → worker-C7XeFMWh.js.map} +1 -1
  58. package/package.json +6 -8
  59. package/dist/chainConfig-B8U89YJb.js.map +0 -1
  60. package/dist/collectBatchUids-CnIe9jUB.js.map +0 -1
  61. package/dist/managedAccountAdmin-xZbC3bQ5.js +0 -26
  62. package/dist/services/publish/seeds.d.ts +0 -2
  63. package/dist/services/publish/seeds.d.ts.map +0 -1
  64. package/dist/services/shared.d.ts +0 -7
  65. package/dist/services/shared.d.ts.map +0 -1
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
- import { $t as e, A as t, At as n, Bt as r, C as i, Ct as a, D as o, Dt as s, E as c, Et as l, F as u, Ft as d, Gt as f, I as p, It as m, Jt as h, Kt as g, Lt as _, Mt as v, Nt as y, O as b, Ot as x, Pt as S, Qt as C, Rt as w, S as ee, St as te, T as ne, Tt as re, Vt as ie, Wt as T, Xt as ae, Yt as oe, Zt as se, _ as ce, a as E, an as le, at as ue, b as de, bt as fe, c as pe, cn as me, ct as he, d as ge, dt as _e, en as ve, ft as ye, g as be, h as xe, i as Se, in as Ce, jt as we, k as Te, kt as Ee, l as De, lt as Oe, m as ke, n as Ae, nn as je, o as Me, on as Ne, ot as Pe, p as Fe, pt as Ie, qt as Le, r as Re, rn as ze, s as Be, sn as D, st as Ve, t as He, tn as Ue, u as We, ut as Ge, v as Ke, vt as qe, w as Je, wt as O, x as Ye, xt as Xe, y as Ze, yt as Qe } from "./chainConfig-B8U89YJb.js";
2
- import { i as $e, r as k, t as et } from "./publishWalletRegistry-BaQe9rIR.js";
3
- import { a as tt, c as nt, g as rt, h as it, i as at, l as ot, n as st, o as ct, r as lt, s as ut, t as dt } from "./publishAuthorization-CpmPRbpm.js";
4
- import { n as ft, r as pt } from "./collectBatchUids-CnIe9jUB.js";
5
- import { BaseDb as A, arweaveL1FinalizeJobs as j, isItemOwned as mt, publishProcesses as M, uploadProcesses as ht } from "@seedprotocol/sdk";
6
- import { createWalletClient as gt, custom as _t, defineChain as vt } from "viem";
7
- import { NO_EXPIRATION as yt, SchemaEncoder as bt, SchemaRegistry as xt, ZERO_BYTES32 as N } from "@ethereum-attestation-service/eas-sdk";
8
- import { useCallback as St, useEffect as P, useMemo as F, useRef as I, useState as L } from "react";
9
- import { and as Ct, desc as R, eq as z, inArray as wt, notInArray as Tt } from "drizzle-orm";
10
- import { DOMAIN_OWNERSHIP_CHALLENGE_TTL_MS as Et, DOMAIN_OWNERSHIP_DEFAULT_EXPIRATION_SECS as Dt, DOMAIN_OWNERSHIP_METHOD as Ot, DOMAIN_OWNERSHIP_METHOD as kt, DOMAIN_OWNERSHIP_SCHEMA_DEF as At, DOMAIN_OWNERSHIP_SCHEMA_DEF as B, DOMAIN_OWNERSHIP_SCHEMA_NAME as jt, DOMAIN_OWNERSHIP_SCHEMA_NAME as Mt, DOMAIN_OWNERSHIP_SCOPE_HOSTNAME as Nt, DOMAIN_OWNERSHIP_SCOPE_REGISTRABLE as V, EAS_CHAIN_DEPLOYMENTS as Pt, PUBLISHED_BY_SCHEMA_DEF as Ft, PUBLISHED_BY_SCHEMA_DEF as H, PUBLISHED_BY_SCHEMA_NAME as It, PUBLISHED_BY_SCHEMA_NAME as Lt, assessDomainOwnership as Rt, buildDomainOwnershipTxtValue as zt, decodeDomainOwnershipData as Bt, domainOwnershipTxtName as Vt, getDomainOwnershipFromEas as Ht, getEasChainDeployment as Ut, hashDomainOwnershipChallenge as Wt, hashDomainRegistryFingerprint as Gt, hashPublishedByBatch as Kt, hashPublishedByBatch as qt, isValidEasAttestationUid as U, normalizeBytes32Hex as W, parseDomainOwnershipTxtValue as Jt } from "@seedprotocol/eas";
11
- import { jsx as G, jsxs as Yt } from "react/jsx-runtime";
12
- import { SeedProvider as Xt, SeedProvider as Zt, useLiveQuery as K, useSeedAddressRevision as Qt } from "@seedprotocol/react";
1
+ import { $t as e, At as t, Bt as n, C as r, Ct as i, D as a, Dt as o, E as s, Et as c, F as l, Ft as u, Gt as d, It as f, Jt as p, Kt as m, Lt as h, Mt as g, Nt as _, O as v, Ot as y, P as b, Pt as x, Qt as ee, S, St as C, T as te, Tt as w, Ut as T, Wt as ne, Xt as re, Yt as ie, Zt as ae, _ as oe, _t as se, a as ce, an as le, at as ue, b as de, bt as fe, c as pe, ct as me, dt as he, en as ge, f as _e, ft as ve, g as ye, h as be, i as E, in as xe, it as Se, jt as Ce, k as we, kt as Te, l as Ee, lt as De, m as Oe, n as ke, nn as Ae, o as je, on as D, ot as Me, p as Ne, qt as Pe, r as Fe, rn as Ie, s as Le, st as Re, t as ze, tn as Be, u as Ve, ut as He, v as Ue, vt as We, w as Ge, wt as Ke, x as qe, xt as Je, y as Ye, yt as Xe, zt as Ze } from "./chainConfig-DK_5pgXF.js";
2
+ import { i as Qe, r as O, t as $e } from "./publishWalletRegistry-BaQe9rIR.js";
3
+ import { a as et, c as tt, g as nt, h as rt, i as it, l as at, n as ot, o as st, r as ct, s as lt, t as ut } from "./publishAuthorization-C_VidnTq.js";
4
+ import { n as dt, r as ft } from "./collectBatchUids-qRc2q61Q.js";
5
+ import { BaseDb as k, arweaveL1FinalizeJobs as A, isItemOwned as pt, publishProcesses as j, uploadProcesses as mt } from "@seedprotocol/sdk";
6
+ import { createWalletClient as ht, custom as gt, defineChain as _t } from "viem";
7
+ import { NO_EXPIRATION as vt, SchemaEncoder as yt, SchemaRegistry as bt, ZERO_BYTES32 as M } from "@ethereum-attestation-service/eas-sdk";
8
+ import { useCallback as xt, useEffect as N, useMemo as P, useRef as F, useState as I } from "react";
9
+ import { and as St, desc as L, eq as R, inArray as Ct, notInArray as wt } from "drizzle-orm";
10
+ import { DOMAIN_OWNERSHIP_CHALLENGE_TTL_MS as Tt, DOMAIN_OWNERSHIP_DEFAULT_EXPIRATION_SECS as Et, DOMAIN_OWNERSHIP_METHOD as Dt, DOMAIN_OWNERSHIP_METHOD as Ot, DOMAIN_OWNERSHIP_SCHEMA_DEF as kt, DOMAIN_OWNERSHIP_SCHEMA_DEF as z, DOMAIN_OWNERSHIP_SCHEMA_NAME as At, DOMAIN_OWNERSHIP_SCHEMA_NAME as jt, DOMAIN_OWNERSHIP_SCOPE_HOSTNAME as Mt, DOMAIN_OWNERSHIP_SCOPE_REGISTRABLE as B, EAS_CHAIN_DEPLOYMENTS as Nt, PUBLISHED_BY_SCHEMA_DEF as Pt, PUBLISHED_BY_SCHEMA_DEF as Ft, PUBLISHED_BY_SCHEMA_NAME as It, PUBLISHED_BY_SCHEMA_NAME as Lt, assessDomainOwnership as Rt, buildDomainOwnershipTxtValue as zt, decodeDomainOwnershipData as Bt, domainOwnershipTxtName as Vt, getDomainOwnershipFromEas as Ht, getEasChainDeployment as Ut, hashDomainOwnershipChallenge as Wt, hashDomainRegistryFingerprint as Gt, hashPublishedByBatch as Kt, hashPublishedByBatch as qt, isValidEasAttestationUid as V, normalizeBytes32Hex as H, parseDomainOwnershipTxtValue as Jt } from "@seedprotocol/eas";
11
+ import { jsx as U, jsxs as Yt } from "react/jsx-runtime";
12
+ import { SeedProvider as Xt, SeedProvider as Zt, useLiveQuery as W, useSeedAddressRevision as Qt } from "@seedprotocol/react";
13
13
  import { useSelector as $t } from "@xstate/react";
14
14
  import { lookup as en, toRegistrableDomain as tn } from "rdapper";
15
15
  //#region src/helpers/seedTwin.ts
@@ -25,7 +25,7 @@ function nn(e) {
25
25
  ["contracts.seedProtocolExecutor", e?.contracts?.seedProtocolExecutor]
26
26
  ].filter(([, e]) => e == null || e === "").map(([e]) => e);
27
27
  if (t.length > 0) throw Error(`seedTwinConfig: twin.json is missing ${t.join(", ")}. Re-run twin:up.`);
28
- let n = e.forkedFrom?.chain ? ` (${e.forkedFrom.chain} fork)` : "", r = vt({
28
+ let n = e.forkedFrom?.chain ? ` (${e.forkedFrom.chain} fork)` : "", r = _t({
29
29
  id: e.chainId,
30
30
  name: `Seed twin${n}`,
31
31
  nativeCurrency: {
@@ -78,13 +78,13 @@ var rn = ({ value: e, onChange: t, disabled: n = !1, "aria-label": r = "Publish
78
78
  role: "group",
79
79
  "aria-label": r,
80
80
  style: i,
81
- children: [/* @__PURE__ */ G("button", {
81
+ children: [/* @__PURE__ */ U("button", {
82
82
  type: "button",
83
83
  disabled: n,
84
84
  style: a(e === "patch"),
85
85
  onClick: () => t("patch"),
86
86
  children: "Publish updates"
87
- }), /* @__PURE__ */ G("button", {
87
+ }), /* @__PURE__ */ U("button", {
88
88
  type: "button",
89
89
  disabled: n,
90
90
  style: a(e === "new_version"),
@@ -93,10 +93,10 @@ var rn = ({ value: e, onChange: t, disabled: n = !1, "aria-label": r = "Publish
93
93
  })]
94
94
  });
95
95
  }, an = ({ children: e, config: t, queryClient: n, queryClientRef: r }) => {
96
- let i = I(void 0);
97
- return t && i.current !== t && (Me(t), i.current = t), /* @__PURE__ */ G(it.Provider, {
98
- value: t ?? Se(),
99
- children: /* @__PURE__ */ G(Zt, {
96
+ let i = F(void 0);
97
+ return t && i.current !== t && (ce(t), i.current = t), /* @__PURE__ */ U(rt.Provider, {
98
+ value: t ?? Fe(),
99
+ children: /* @__PURE__ */ U(Zt, {
100
100
  queryClient: n,
101
101
  queryClientRef: r,
102
102
  children: e
@@ -105,27 +105,27 @@ var rn = ({ value: e, onChange: t, disabled: n = !1, "aria-label": r = "Publish
105
105
  };
106
106
  //#endregion
107
107
  //#region src/helpers/adapters/eip1193.ts
108
- async function q(e, t = {}) {
109
- let n = t.chain ?? Ae(), r = t.address;
108
+ async function G(e, t = {}) {
109
+ let n = t.chain ?? ke(), r = t.address;
110
110
  if (!r) {
111
111
  let t = await e.request({ method: "eth_requestAccounts" });
112
112
  if (!t?.[0]) throw Error("@seedprotocol/publish: EIP-1193 provider returned no accounts");
113
113
  r = t[0];
114
114
  }
115
- let i = gt({
115
+ let i = ht({
116
116
  account: r,
117
117
  chain: n,
118
- transport: _t(e)
118
+ transport: gt(e)
119
119
  });
120
120
  return {
121
- signer: Xe({
121
+ signer: fe({
122
122
  address: r,
123
123
  signMessage: async ({ message: e }) => i.signMessage({
124
124
  account: r,
125
125
  message: typeof e == "string" ? e : { raw: e.raw }
126
126
  })
127
127
  }),
128
- txSender: te({
128
+ txSender: Je({
129
129
  address: r,
130
130
  sendTransaction: async (e) => ({ transactionHash: await i.sendTransaction({
131
131
  account: r,
@@ -142,47 +142,47 @@ async function q(e, t = {}) {
142
142
  async function on(e = {}) {
143
143
  let t = globalThis.ethereum;
144
144
  if (!t) throw Error("@seedprotocol/publish: window.ethereum is not available");
145
- return q(t, e);
145
+ return G(t, e);
146
146
  }
147
147
  //#endregion
148
148
  //#region src/react/useSeedWallet.ts
149
149
  function sn() {
150
- let [e, t] = L(() => k()), [n, r] = L(() => k() ? "connected" : "disconnected");
151
- P(() => {
152
- t(k());
150
+ let [e, t] = I(() => O()), [n, r] = I(() => O() ? "connected" : "disconnected");
151
+ N(() => {
152
+ t(O());
153
153
  }, []);
154
- let i = St(async (e) => {
154
+ let a = xt(async (e) => {
155
155
  r("connecting");
156
156
  try {
157
157
  let n;
158
- n = O(e) ? e : await q(e);
159
- let i = E(), a = je(i), o = n.txSender;
160
- a.sender === "eip7702" && (o = await Fe({
158
+ n = i(e) ? e : await G(e);
159
+ let a = E(), o = Be(a), s = n.txSender;
160
+ o.sender === "eip7702" && (s = await _e({
161
161
  signer: n.signer,
162
- bundlerUrl: i.bundlerUrl,
163
- paymasterUrl: i.paymasterUrl,
164
- sponsored: a.gas.payer === "sponsored"
162
+ bundlerUrl: a.bundlerUrl,
163
+ paymasterUrl: a.paymasterUrl,
164
+ sponsored: o.gas.payer === "sponsored"
165
165
  }));
166
- let s = {
166
+ let c = {
167
167
  signer: n.signer,
168
- txSender: o,
169
- ownedAddresses: [n.signer.address, o.address],
168
+ txSender: s,
169
+ ownedAddresses: [n.signer.address, s.address],
170
170
  publisherAddress: n.signer.address
171
171
  };
172
- return await $e(s), t(s), r("connected"), s;
172
+ return await Qe(c), t(c), r("connected"), c;
173
173
  } catch (e) {
174
174
  throw r("disconnected"), e;
175
175
  }
176
- }, []), a = St(() => {
177
- et(), t(null), r("disconnected");
176
+ }, []), o = xt(() => {
177
+ $e(), t(null), r("disconnected");
178
178
  }, []);
179
179
  return {
180
180
  address: e?.signer.address,
181
181
  signer: e?.signer,
182
182
  txSender: e?.txSender,
183
183
  status: n,
184
- connect: i,
185
- disconnect: a
184
+ connect: a,
185
+ disconnect: o
186
186
  };
187
187
  }
188
188
  //#endregion
@@ -192,7 +192,7 @@ function dn(e) {
192
192
  let t = e.getService().getSnapshot(), n = (t && typeof t == "object" && "context" in t ? t.context : void 0)?.propertyValue ?? e.value;
193
193
  return `${e.propertyName}:${e.uid ?? ""}:${String(n ?? "")}`;
194
194
  }
195
- function J(e) {
195
+ function K(e) {
196
196
  let t = e.properties ?? [];
197
197
  return [
198
198
  e.seedLocalId,
@@ -217,19 +217,19 @@ function pn(e) {
217
217
  return e instanceof Error ? e : Error(String(e));
218
218
  }
219
219
  function mn(e, t, n) {
220
- let r = n?.priceRefreshMs ?? cn, i = n?.itemIdleMs ?? ln, a = n?.firstEstimateRetryMs ?? un, o = n?.estimate ?? ((e) => ce(e, n)), s = n?.reprice ?? (async (e) => {
221
- let t = await Ke({ forceRefresh: !0 });
220
+ let r = n?.priceRefreshMs ?? cn, i = n?.itemIdleMs ?? ln, a = n?.firstEstimateRetryMs ?? un, o = n?.estimate ?? ((e) => ye(e, n)), s = n?.reprice ?? (async (e) => {
221
+ let t = await oe({ forceRefresh: !0 });
222
222
  return be(e.work, t, {
223
223
  evmUserPays: e.evm.userPays,
224
224
  arweavePath: e.arweave.path
225
225
  });
226
- }), c = !1, l = J(e), u = n?.previousEstimate ?? null, d = !1, f = u !== null, p = !1, m = !1, h = null, g = 0, _ = null, v = null, y = null, b = () => {
226
+ }), c = !1, l = K(e), u = n?.previousEstimate ?? null, d = !1, f = u !== null, p = !1, m = !1, h = null, g = 0, _ = null, v = null, y = null, b = () => {
227
227
  c || t({
228
228
  estimate: u,
229
229
  isEstimating: d,
230
230
  isStale: f,
231
231
  error: h,
232
- refresh: C
232
+ refresh: S
233
233
  });
234
234
  }, x = async () => {
235
235
  let t = ++g;
@@ -237,7 +237,7 @@ function mn(e, t, n) {
237
237
  try {
238
238
  let n = await o(e);
239
239
  if (c || t !== g) return;
240
- u = n, p = !0, l = J(e), f = !1, d = !1, h = null, b();
240
+ u = n, p = !0, l = K(e), f = !1, d = !1, h = null, b();
241
241
  } catch (e) {
242
242
  if (c || t !== g) return;
243
243
  if (!p && !m && a > 0) {
@@ -248,25 +248,25 @@ function mn(e, t, n) {
248
248
  }
249
249
  d = !1, h = pn(e), b();
250
250
  }
251
- }, S = () => {
251
+ }, ee = () => {
252
252
  u && (f = !0), i <= 0 ? x() : (_ && clearTimeout(_), _ = setTimeout(() => {
253
253
  _ = null, x();
254
254
  }, i), b());
255
- }, C = () => {
255
+ }, S = () => {
256
256
  _ &&= (clearTimeout(_), null), x();
257
257
  };
258
258
  x();
259
- let w = e.subscribe(() => {
259
+ let C = e.subscribe(() => {
260
260
  if (c) return;
261
- let t = J(e);
262
- t !== l && (l = t, S());
263
- }), ee = null;
261
+ let t = K(e);
262
+ t !== l && (l = t, ee());
263
+ }), te = null;
264
264
  return (n?.watchRows ?? fn)(e, () => {
265
- c || S();
265
+ c || ee();
266
266
  }).then((e) => {
267
267
  if (e) {
268
268
  if (c) return e();
269
- ee = e, w?.unsubscribe(), w = null;
269
+ te = e, C?.unsubscribe(), C = null;
270
270
  }
271
271
  }, () => {}), r > 0 && (v = setInterval(() => {
272
272
  c || !u || d || (async () => {
@@ -280,9 +280,9 @@ function mn(e, t, n) {
280
280
  }
281
281
  })();
282
282
  }, r)), {
283
- refresh: C,
283
+ refresh: S,
284
284
  dispose: () => {
285
- c = !0, w?.unsubscribe(), ee?.(), _ && clearTimeout(_), v && clearInterval(v), y && clearTimeout(y);
285
+ c = !0, C?.unsubscribe(), te?.(), _ && clearTimeout(_), v && clearInterval(v), y && clearTimeout(y);
286
286
  }
287
287
  };
288
288
  }
@@ -328,11 +328,11 @@ function vn(e) {
328
328
  return !e || e.status !== "done" ? !1 : e.value === D.SUCCESS || e.value === D.FAILURE;
329
329
  }
330
330
  function yn(e) {
331
- let t = ke.getService(), n = $t(t, (t) => t?.context?.publishProcesses?.get(e) ?? null), r = I(null);
332
- P(() => {
331
+ let t = Ne.getService(), n = $t(t, (t) => t?.context?.publishProcesses?.get(e) ?? null), r = F(null);
332
+ N(() => {
333
333
  r.current = null;
334
334
  }, [e]);
335
- let [i, a] = L(void 0), [o, s] = L(null), c = A.getAppDb(), l = F(() => e && c ? c.select().from(M).where(z(M.seedLocalId, e)).orderBy(R(M.startedAt)).limit(1) : null, [c, e]), u = K(l)?.[0], d = u?.status, f = F(() => {
335
+ let [i, a] = I(void 0), [o, s] = I(null), c = k.getAppDb(), l = P(() => e && c ? c.select().from(j).where(R(j.seedLocalId, e)).orderBy(L(j.startedAt)).limit(1) : null, [c, e]), u = W(l)?.[0], d = u?.status, f = P(() => {
336
336
  if (n != null) return i;
337
337
  if (o === "success" || o === "failure") return o;
338
338
  let e = _n(u);
@@ -344,13 +344,13 @@ function yn(e) {
344
344
  o,
345
345
  u
346
346
  ]);
347
- return P(() => {
347
+ return N(() => {
348
348
  s(null);
349
- }, [e]), P(() => {
349
+ }, [e]), N(() => {
350
350
  n ?? (d === "completed" ? s("success") : d === "failed" && s("failure"));
351
- }, [d, n]), P(() => {
351
+ }, [d, n]), N(() => {
352
352
  n != null && s(null);
353
- }, [n]), P(() => {
353
+ }, [n]), N(() => {
354
354
  if (!n) {
355
355
  let e = r.current;
356
356
  vn(e) ? (a(e.value), e.value === D.SUCCESS ? s("success") : e.value === D.FAILURE && s("failure")) : a(void 0);
@@ -378,14 +378,14 @@ function yn(e) {
378
378
  //#endregion
379
379
  //#region src/hooks/useCanPublishItem.ts
380
380
  function bn(e) {
381
- let [t, n] = L(!1), r = Qt(), i = e?.seedLocalId;
382
- return P(() => {
381
+ let [t, n] = I(!1), r = Qt(), i = e?.seedLocalId;
382
+ return N(() => {
383
383
  if (!e) {
384
384
  n(!1);
385
385
  return;
386
386
  }
387
387
  let t = !0;
388
- return n(!1), mt(e).then((e) => {
388
+ return n(!1), pt(e).then((e) => {
389
389
  t && n(e);
390
390
  }).catch(() => {
391
391
  t && n(!1);
@@ -397,8 +397,8 @@ function bn(e) {
397
397
  //#endregion
398
398
  //#region src/hooks/useArweaveL1Finalize.ts
399
399
  function xn(e) {
400
- let t = A.getAppDb(), n = F(() => e && t ? t.select().from(j).where(z(j.seedLocalId, e)).orderBy(R(j.updatedAt)) : null, [t, e]), r = K(n) ?? [];
401
- return F(() => {
400
+ let t = k.getAppDb(), n = P(() => e && t ? t.select().from(A).where(R(A.seedLocalId, e)).orderBy(L(A.updatedAt)) : null, [t, e]), r = W(n) ?? [];
401
+ return P(() => {
402
402
  let e = r.filter((e) => e.phase === "pending_l1").length, t = r.filter((e) => e.phase === "confirmed").length;
403
403
  return {
404
404
  hasPendingL1: e > 0,
@@ -411,7 +411,7 @@ function xn(e) {
411
411
  //#endregion
412
412
  //#region src/hooks/useItemPublishStatus.ts
413
413
  function Sn(e) {
414
- let { publishProcess: t, value: n } = yn(e ?? ""), r = xn(e), i = A.getAppDb(), a = F(() => e && i ? i.select().from(M).where(z(M.seedLocalId, e)).orderBy(R(M.startedAt)).limit(1) : null, [i, e]), o = K(a)?.[0];
414
+ let { publishProcess: t, value: n } = yn(e ?? ""), r = xn(e), i = k.getAppDb(), a = P(() => e && i ? i.select().from(j).where(R(j.seedLocalId, e)).orderBy(L(j.startedAt)).limit(1) : null, [i, e]), o = W(a)?.[0];
415
415
  return {
416
416
  latestRecord: o,
417
417
  publishProcess: t,
@@ -425,43 +425,43 @@ function Sn(e) {
425
425
  //#endregion
426
426
  //#region src/hooks/usePublishProcesses.ts
427
427
  function Cn() {
428
- let e = A.getAppDb();
429
- return F(() => e ? e.select().from(M).orderBy(R(M.startedAt)) : null, [e]);
428
+ let e = k.getAppDb();
429
+ return P(() => e ? e.select().from(j).orderBy(L(j.startedAt)) : null, [e]);
430
430
  }
431
431
  function wn(e) {
432
- let t = A.getAppDb();
433
- return F(() => t && e ? t.select().from(M).where(z(M.seedLocalId, e)).orderBy(R(M.startedAt)) : null, [t, e]);
432
+ let t = k.getAppDb();
433
+ return P(() => t && e ? t.select().from(j).where(R(j.seedLocalId, e)).orderBy(L(j.startedAt)) : null, [t, e]);
434
434
  }
435
435
  function Tn() {
436
- let e = Cn(), t = K(e);
436
+ let e = Cn(), t = W(e);
437
437
  return {
438
438
  records: t,
439
- nonActiveCount: F(() => t === void 0 ? void 0 : t.filter((e) => e.status !== "in_progress").length, [t])
439
+ nonActiveCount: P(() => t === void 0 ? void 0 : t.filter((e) => e.status !== "in_progress").length, [t])
440
440
  };
441
441
  }
442
442
  function En() {
443
443
  let e = Cn();
444
- return K(e);
444
+ return W(e);
445
445
  }
446
446
  function Dn() {
447
447
  return Tn().nonActiveCount;
448
448
  }
449
449
  function On(e) {
450
450
  let t = wn(e);
451
- return K(t);
451
+ return W(t);
452
452
  }
453
453
  function kn(e) {
454
- let t = wn(e), n = K(t);
454
+ let t = wn(e), n = W(t);
455
455
  return {
456
456
  records: n,
457
- nonActiveCount: F(() => n === void 0 ? void 0 : n.filter((e) => e.status !== "in_progress").length, [n])
457
+ nonActiveCount: P(() => n === void 0 ? void 0 : n.filter((e) => e.status !== "in_progress").length, [n])
458
458
  };
459
459
  }
460
460
  function An(e) {
461
461
  return kn(e).nonActiveCount;
462
462
  }
463
463
  function jn(e) {
464
- let t = A.getAppDb(), n = F(() => e != null && t ? t.select().from(M).where(z(M.id, e)).limit(1) : null, [t, e]), r = K(n), i = r === void 0;
464
+ let t = k.getAppDb(), n = P(() => e != null && t ? t.select().from(j).where(R(j.id, e)).limit(1) : null, [t, e]), r = W(n), i = r === void 0;
465
465
  return {
466
466
  record: r && r.length > 0 ? r[0] : null,
467
467
  isLoading: i
@@ -470,33 +470,33 @@ function jn(e) {
470
470
  //#endregion
471
471
  //#region src/hooks/clearCompletedPublishProcesses.ts
472
472
  async function Mn() {
473
- let e = A.getAppDb();
474
- e && await e.delete(M).where(Tt(M.status, ["in_progress"]));
473
+ let e = k.getAppDb();
474
+ e && await e.delete(j).where(wt(j.status, ["in_progress"]));
475
475
  }
476
476
  async function Nn(e) {
477
- let t = A.getAppDb();
478
- t && await t.delete(M).where(Ct(z(M.seedLocalId, e), Tt(M.status, ["in_progress"])));
477
+ let t = k.getAppDb();
478
+ t && await t.delete(j).where(St(R(j.seedLocalId, e), wt(j.status, ["in_progress"])));
479
479
  }
480
480
  async function Pn() {
481
- let e = A.getAppDb();
482
- e && await e.delete(M);
481
+ let e = k.getAppDb();
482
+ e && await e.delete(j);
483
483
  }
484
484
  async function Fn() {
485
- let e = A.getAppDb();
486
- e && await e.delete(ht);
485
+ let e = k.getAppDb();
486
+ e && await e.delete(mt);
487
487
  }
488
488
  async function In(e) {
489
- let t = A.getAppDb();
490
- t && await t.delete(M).where(z(M.seedLocalId, e));
489
+ let t = k.getAppDb();
490
+ t && await t.delete(j).where(R(j.seedLocalId, e));
491
491
  }
492
492
  async function Ln(e) {
493
- let t = A.getAppDb();
494
- t && await t.delete(M).where(z(M.id, e));
493
+ let t = k.getAppDb();
494
+ t && await t.delete(j).where(R(j.id, e));
495
495
  }
496
496
  async function Rn(e) {
497
497
  if (e.length === 0) return;
498
- let t = A.getAppDb();
499
- t && await t.delete(M).where(wt(M.id, e));
498
+ let t = k.getAppDb();
499
+ t && await t.delete(j).where(Ct(j.id, e));
500
500
  }
501
501
  //#endregion
502
502
  //#region src/hooks/publishProcessHelpers.ts
@@ -517,8 +517,8 @@ function Bn(e) {
517
517
  //#endregion
518
518
  //#region src/hooks/usePublishCostEstimate.ts
519
519
  function Vn(e, t) {
520
- let [n, r] = L(null), [i, a] = L(!1), [o, s] = L(!1), [c, l] = L(null), u = I(() => {}), d = I(null), f = t?.publishMode, p = t?.priceRefreshMs, m = t?.itemIdleMs;
521
- return P(() => {
520
+ let [n, r] = I(null), [i, a] = I(!1), [o, s] = I(!1), [c, l] = I(null), u = F(() => {}), d = F(null), f = t?.publishMode, p = t?.priceRefreshMs, m = t?.itemIdleMs;
521
+ return N(() => {
522
522
  if (!e) {
523
523
  r(null), a(!1), s(!1), l(null), u.current = () => {}, d.current = null;
524
524
  return;
@@ -547,14 +547,14 @@ function Vn(e, t) {
547
547
  isEstimating: i,
548
548
  isStale: o,
549
549
  error: c,
550
- refresh: St(() => {
550
+ refresh: xt(() => {
551
551
  u.current();
552
552
  }, [])
553
553
  };
554
554
  }
555
555
  //#endregion
556
556
  //#region src/services/domainOwnership/registry.ts
557
- function Y(e) {
557
+ function q(e) {
558
558
  let t = tn(e);
559
559
  if (!t) throw Error(`@seedprotocol/publish: unable to resolve registrable domain for "${e}"`);
560
560
  return t.toLowerCase();
@@ -562,8 +562,8 @@ function Y(e) {
562
562
  function Hn(e) {
563
563
  return e.trim().toLowerCase().replace(/\.$/, "");
564
564
  }
565
- async function Un(e) {
566
- let t = Y(e), n = await en(t);
565
+ async function J(e) {
566
+ let t = q(e), n = await en(t);
567
567
  if (!n.ok || !n.record) return null;
568
568
  let r = n.record;
569
569
  return {
@@ -577,7 +577,7 @@ async function Un(e) {
577
577
  isRegistered: r.isRegistered
578
578
  };
579
579
  }
580
- function Wn(e) {
580
+ function Un(e) {
581
581
  return Gt({
582
582
  domain: e.domain,
583
583
  creationDate: e.creationDate ?? "",
@@ -586,23 +586,23 @@ function Wn(e) {
586
586
  }
587
587
  //#endregion
588
588
  //#region src/services/domainOwnership/challenge.ts
589
- function Gn(e) {
589
+ function Wn(e) {
590
590
  let t = new Uint8Array(e);
591
591
  return crypto.getRandomValues(t), t;
592
592
  }
593
- function Kn(e) {
593
+ function Gn(e) {
594
594
  let t = "";
595
595
  for (let n of e) t += String.fromCharCode(n);
596
596
  return btoa(t).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/g, "");
597
597
  }
598
- function qn(e) {
599
- let t = e.normalizeRegistrable === !1, n = t ? Hn(e.domain) : Y(e.domain);
598
+ function Kn(e) {
599
+ let t = e.normalizeRegistrable === !1, n = t ? Hn(e.domain) : q(e.domain);
600
600
  if (!n || n.includes(" ")) throw Error("@seedprotocol/publish: createDomainOwnershipChallenge requires a valid domain");
601
601
  let r = e.claimer.trim();
602
602
  if (!/^0x[0-9a-fA-F]{40}$/.test(r)) throw Error("@seedprotocol/publish: createDomainOwnershipChallenge requires a 20-byte hex claimer address");
603
- let i = e.scope ?? (t ? Nt : V);
604
- if (i === V && n !== Y(n)) throw Error(`@seedprotocol/publish: createDomainOwnershipChallenge cannot use scope "registrable" for "${n}", which is not a registrable domain. Use the hostname scope or challenge ${Y(n)}.`);
605
- let a = e.ttlMs ?? Et, o = e.now ?? Date.now(), s = new Date(o + a).toISOString(), c = Kn(Gn(32)), l = Wt({
603
+ let i = e.scope ?? (t ? Mt : B);
604
+ if (i === B && n !== q(n)) throw Error(`@seedprotocol/publish: createDomainOwnershipChallenge cannot use scope "registrable" for "${n}", which is not a registrable domain. Use the hostname scope or challenge ${q(n)}.`);
605
+ let a = e.ttlMs ?? Tt, o = e.now ?? Date.now(), s = new Date(o + a).toISOString(), c = Gn(Wn(32)), l = Wt({
606
606
  domain: n,
607
607
  claimer: r,
608
608
  token: c,
@@ -613,11 +613,11 @@ function qn(e) {
613
613
  expiry: s
614
614
  });
615
615
  return {
616
- challengeId: Kn(Gn(16)),
616
+ challengeId: Gn(Wn(16)),
617
617
  domain: n,
618
618
  claimer: r,
619
619
  scope: i,
620
- method: kt,
620
+ method: Ot,
621
621
  token: c,
622
622
  txtName: u,
623
623
  txtValue: d,
@@ -628,14 +628,14 @@ function qn(e) {
628
628
  }
629
629
  //#endregion
630
630
  //#region src/services/domainOwnership/dnsVerify.ts
631
- async function Jn(e) {
631
+ async function qn(e) {
632
632
  let { promises: t } = await import("node:dns");
633
633
  return {
634
634
  source: "node:dns",
635
635
  values: (await t.resolveTxt(e)).map((e) => e.join(""))
636
636
  };
637
637
  }
638
- async function Yn(e, t, n) {
638
+ async function Jn(e, t, n) {
639
639
  let r = `${n}?name=${encodeURIComponent(e)}&type=TXT`, i = await fetch(r, { headers: { accept: "application/dns-json" } });
640
640
  if (!i.ok) throw Error(`DoH ${t} HTTP ${i.status}`);
641
641
  let a = await i.json();
@@ -645,11 +645,11 @@ async function Yn(e, t, n) {
645
645
  dnssecAuthenticated: !!a.AD
646
646
  };
647
647
  }
648
- function Xn() {
649
- let e = [(e) => Yn(e, "cloudflare-doh", "https://cloudflare-dns.com/dns-query"), (e) => Yn(e, "google-doh", "https://dns.google/resolve")];
650
- return typeof document > "u" && e.unshift((e) => Jn(e)), e;
648
+ function Yn() {
649
+ let e = [(e) => Jn(e, "cloudflare-doh", "https://cloudflare-dns.com/dns-query"), (e) => Jn(e, "google-doh", "https://dns.google/resolve")];
650
+ return typeof document > "u" && e.unshift((e) => qn(e)), e;
651
651
  }
652
- function Zn(e, t) {
652
+ function Xn(e, t) {
653
653
  let n = Jt(t);
654
654
  for (let r of e) {
655
655
  if (r === t || r.replace(/^"|"$/g, "") === t) return !0;
@@ -658,7 +658,7 @@ function Zn(e, t) {
658
658
  }
659
659
  return !1;
660
660
  }
661
- async function Qn(e, t) {
661
+ async function Zn(e, t) {
662
662
  let n = t?.now ?? Date.now();
663
663
  if (Date.parse(e.expiresAt) <= n) return {
664
664
  ok: !1,
@@ -677,11 +677,11 @@ async function Qn(e, t) {
677
677
  lookups: [],
678
678
  error: "Challenge txtValue does not match token/claimer/expiry"
679
679
  };
680
- let i = t?.lookups ?? Xn(), a = t?.quorum ?? 2, o = [], s = [], c = !1;
680
+ let i = t?.lookups ?? Yn(), a = t?.quorum ?? 2, o = [], s = [], c = !1;
681
681
  await Promise.all(i.map(async (t) => {
682
682
  try {
683
683
  let n = await t(e.txtName);
684
- o.push(n), Zn(n.values, r) && (s.push(n.source), n.dnssecAuthenticated && (c = !0));
684
+ o.push(n), Xn(n.values, r) && (s.push(n.source), n.dnssecAuthenticated && (c = !0));
685
685
  } catch {
686
686
  o.push({
687
687
  source: "error",
@@ -699,10 +699,10 @@ async function Qn(e, t) {
699
699
  }
700
700
  //#endregion
701
701
  //#region src/services/domainOwnership/index.ts
702
- var $n = "0x0000000000000000000000000000000000000000", er = !0;
703
- function tr(e) {
704
- if (O(e)) return e.txSender;
705
- if (l(e)) return e;
702
+ var Qn = "0x0000000000000000000000000000000000000000", $n = !0;
703
+ function Y(e) {
704
+ if (i(e)) return e.txSender;
705
+ if (w(e)) return e;
706
706
  throw Error("@seedprotocol/publish: domain ownership write APIs require a PublishWallet or SeedTxSender");
707
707
  }
708
708
  async function X(e, t) {
@@ -710,21 +710,21 @@ async function X(e, t) {
710
710
  return T(n.transactionHash);
711
711
  }
712
712
  function Z() {
713
- return xt.getSchemaUID(B, $n, er);
714
- }
715
- async function nr(e) {
716
- let n = tr(e), r = Z();
717
- return await Te(r) || (await X(n, t({
718
- schema: B,
719
- resolverAddress: $n,
720
- revocable: er
721
- })), await X(n, b({
722
- schemaUid: r,
723
- schemaName: Mt
724
- }))), r;
725
- }
726
- function rr(e) {
727
- return new bt(B).encodeData([
713
+ return bt.getSchemaUID(z, Qn, $n);
714
+ }
715
+ async function er(e) {
716
+ let t = Y(e), n = Z();
717
+ return await v(n) || (await X(t, we({
718
+ schema: z,
719
+ resolverAddress: Qn,
720
+ revocable: $n
721
+ })), await X(t, a({
722
+ schemaUid: n,
723
+ schemaName: jt
724
+ }))), n;
725
+ }
726
+ function tr(e) {
727
+ return new yt(z).encodeData([
728
728
  {
729
729
  name: "domain",
730
730
  value: e.domain,
@@ -742,7 +742,7 @@ function rr(e) {
742
742
  },
743
743
  {
744
744
  name: "challengeHash",
745
- value: W(e.challengeHash),
745
+ value: H(e.challengeHash),
746
746
  type: "bytes32"
747
747
  },
748
748
  {
@@ -762,7 +762,7 @@ function rr(e) {
762
762
  },
763
763
  {
764
764
  name: "registryFingerprint",
765
- value: W(e.registryFingerprint),
765
+ value: H(e.registryFingerprint),
766
766
  type: "bytes32"
767
767
  },
768
768
  {
@@ -772,76 +772,76 @@ function rr(e) {
772
772
  }
773
773
  ]);
774
774
  }
775
- function ir(e) {
775
+ function nr(e) {
776
776
  if (typeof e.override == "number" && e.override > 0) return e.override;
777
777
  if (e.registryExpirationDate) {
778
778
  let t = Date.parse(e.registryExpirationDate);
779
779
  if (Number.isFinite(t) && t > 0) return Math.floor(t / 1e3);
780
780
  }
781
- return e.verifiedAt + Dt;
781
+ return e.verifiedAt + Et;
782
782
  }
783
- async function ar(e) {
784
- let t = tr(e.wallet), n = e.ensureSchema === !1 ? Z() : await nr(e.wallet), r = e.scope ?? V, i = r === V ? Y(e.domain) : Hn(e.domain), a = e.claimer.trim();
783
+ async function rr(e) {
784
+ let t = Y(e.wallet), n = e.ensureSchema === !1 ? Z() : await er(e.wallet), r = e.scope ?? B, i = r === B ? q(e.domain) : Hn(e.domain), a = e.claimer.trim();
785
785
  if (!/^0x[0-9a-fA-F]{40}$/.test(a)) throw Error("@seedprotocol/publish: attestDomainOwnership requires a valid claimer address");
786
- let o = W(e.challengeHash);
787
- if (o === N) throw Error("@seedprotocol/publish: attestDomainOwnership requires a non-zero challengeHash");
788
- let s = e.verifiedAt ?? Math.floor(Date.now() / 1e3), c = Wn({
786
+ let s = H(e.challengeHash);
787
+ if (s === M) throw Error("@seedprotocol/publish: attestDomainOwnership requires a non-zero challengeHash");
788
+ let c = e.verifiedAt ?? Math.floor(Date.now() / 1e3), l = Un({
789
789
  domain: i,
790
790
  creationDate: e.registrySnapshot.creationDate ?? "",
791
791
  registrarIanaId: e.registrySnapshot.registrarIanaId ?? ""
792
- }), l = e.registrySnapshot.creationDate ?? "", u = e.registrySnapshot.expirationDate ?? "", d = e.method ?? kt, f = ir({
793
- verifiedAt: s,
794
- registryExpirationDate: u,
792
+ }), u = e.registrySnapshot.creationDate ?? "", d = e.registrySnapshot.expirationDate ?? "", f = e.method ?? Ot, p = nr({
793
+ verifiedAt: c,
794
+ registryExpirationDate: d,
795
795
  override: e.expirationTime
796
- }), p = rr({
796
+ }), m = tr({
797
797
  domain: i,
798
798
  claimer: a,
799
- method: d,
800
- challengeHash: o,
801
- verifiedAt: s,
802
- registryCreationDate: l,
803
- registryExpirationDate: u,
804
- registryFingerprint: c,
799
+ method: f,
800
+ challengeHash: s,
801
+ verifiedAt: c,
802
+ registryCreationDate: u,
803
+ registryExpirationDate: d,
804
+ registryFingerprint: l,
805
805
  scope: r
806
- }), m = await X(t, Ee({
806
+ }), h = await X(t, y({
807
807
  schema: n,
808
808
  data: {
809
809
  recipient: a,
810
- expirationTime: BigInt(f),
810
+ expirationTime: BigInt(p),
811
811
  revocable: !0,
812
- refUID: N,
813
- data: p,
812
+ refUID: M,
813
+ data: m,
814
814
  value: 0n
815
815
  }
816
816
  }));
817
- if (!m) throw Error("@seedprotocol/publish: attestDomainOwnership failed — no receipt");
818
- let { easContractAddress: h } = E(), g = x(m, h);
819
- if (!g || !U(g)) throw Error("@seedprotocol/publish: attestDomainOwnership failed — could not parse attestation UID");
817
+ if (!h) throw Error("@seedprotocol/publish: attestDomainOwnership failed — no receipt");
818
+ let { easContractAddress: g } = E(), _ = o(h, g);
819
+ if (!_ || !V(_)) throw Error("@seedprotocol/publish: attestDomainOwnership failed — could not parse attestation UID");
820
820
  return {
821
- uid: g,
821
+ uid: _,
822
822
  schemaUid: n,
823
- challengeHash: o,
824
- registryFingerprint: c,
825
- verifiedAt: s,
826
- expirationTime: f
823
+ challengeHash: s,
824
+ registryFingerprint: l,
825
+ verifiedAt: c,
826
+ expirationTime: p
827
827
  };
828
828
  }
829
- async function or(e) {
830
- let t = tr(e.wallet), r = e.schemaUid ?? Z(), i = W(e.uid);
831
- if (!U(i)) throw Error("@seedprotocol/publish: revokeDomainOwnership requires a valid attestation uid");
832
- if (!await X(t, n([{
833
- schema: r,
834
- data: [{ uid: i }]
829
+ async function ir(e) {
830
+ let t = Y(e.wallet), n = e.schemaUid ?? Z(), r = H(e.uid);
831
+ if (!V(r)) throw Error("@seedprotocol/publish: revokeDomainOwnership requires a valid attestation uid");
832
+ if (!await X(t, Te([{
833
+ schema: n,
834
+ data: [{ uid: r }]
835
835
  }]))) throw Error("@seedprotocol/publish: revokeDomainOwnership failed — no receipt");
836
836
  }
837
- async function sr(e) {
837
+ async function ar(e) {
838
838
  let { challenge: t } = e, n = Wt({
839
839
  domain: t.domain,
840
840
  claimer: t.claimer,
841
841
  token: t.token,
842
842
  scope: t.scope
843
843
  });
844
- if (W(n) !== W(t.challengeHash)) return {
844
+ if (H(n) !== H(t.challengeHash)) return {
845
845
  ok: !1,
846
846
  dns: {
847
847
  ok: !1,
@@ -853,7 +853,7 @@ async function sr(e) {
853
853
  challengeHash: n,
854
854
  error: "Challenge hash does not match domain/claimer/token/scope"
855
855
  };
856
- let r = await Qn(t, {
856
+ let r = await Zn(t, {
857
857
  lookups: e.dnsLookups,
858
858
  now: e.now
859
859
  });
@@ -864,7 +864,7 @@ async function sr(e) {
864
864
  challengeHash: n,
865
865
  error: r.error ?? "DNS verification failed"
866
866
  };
867
- let i = e.registryLookup ?? Un, a;
867
+ let i = e.registryLookup ?? J, a;
868
868
  try {
869
869
  a = await i(t.domain);
870
870
  } catch {
@@ -883,8 +883,8 @@ async function sr(e) {
883
883
  error: "Registry lookup failed"
884
884
  };
885
885
  }
886
- async function cr(e) {
887
- let t = await sr({
886
+ async function or(e) {
887
+ let t = await ar({
888
888
  challenge: e.challenge,
889
889
  dnsLookups: e.dnsLookups,
890
890
  registryLookup: e.registryLookup,
@@ -892,7 +892,7 @@ async function cr(e) {
892
892
  });
893
893
  if (!t.ok || !t.registrySnapshot) throw Error(`@seedprotocol/publish: verifyAndAttestDomainOwnership failed — ${t.error ?? "verification failed"}`);
894
894
  return {
895
- ...await ar({
895
+ ...await rr({
896
896
  wallet: e.wallet,
897
897
  domain: e.challenge.domain,
898
898
  claimer: e.challenge.claimer,
@@ -906,14 +906,14 @@ async function cr(e) {
906
906
  dns: t.dns
907
907
  };
908
908
  }
909
- async function lr(e) {
909
+ async function sr(e) {
910
910
  let t = (await Ht({
911
911
  toolAddresses: e.toolAddresses,
912
912
  schemaUid: e.schemaUid,
913
913
  excludeRevoked: !0
914
- })).find((t) => W(t.id) === W(e.uid));
914
+ })).find((t) => H(t.id) === H(e.uid));
915
915
  if (!t) throw Error("@seedprotocol/publish: assessDomainOwnershipLive could not find attestation for uid/toolAddresses");
916
- let n = Bt(t.decodedDataJson ?? "[]"), r = e.registryLookup ?? Un, i;
916
+ let n = Bt(t.decodedDataJson ?? "[]"), r = e.registryLookup ?? J, i;
917
917
  try {
918
918
  i = await r(n.domain);
919
919
  } catch {
@@ -933,10 +933,10 @@ async function lr(e) {
933
933
  }
934
934
  //#endregion
935
935
  //#region src/services/publishedBy/index.ts
936
- var ur = "0x0000000000000000000000000000000000000000", dr = !0;
937
- function fr(e) {
938
- if (O(e)) return e.txSender;
939
- if (l(e)) return e;
936
+ var cr = "0x0000000000000000000000000000000000000000", lr = !0;
937
+ function ur(e) {
938
+ if (i(e)) return e.txSender;
939
+ if (w(e)) return e;
940
940
  throw Error("@seedprotocol/publish: attestPublishedBy / revokePublishedBy require a PublishWallet or SeedTxSender");
941
941
  }
942
942
  async function Q(e, t) {
@@ -944,39 +944,39 @@ async function Q(e, t) {
944
944
  return T(n.transactionHash);
945
945
  }
946
946
  function $() {
947
- return xt.getSchemaUID(H, ur, dr);
948
- }
949
- async function pr(e) {
950
- let n = fr(e), r = $();
951
- return await Te(r) || (await Q(n, t({
952
- schema: H,
953
- resolverAddress: ur,
954
- revocable: dr
955
- })), await Q(n, b({
956
- schemaUid: r,
947
+ return bt.getSchemaUID(Ft, cr, lr);
948
+ }
949
+ async function dr(e) {
950
+ let t = ur(e), n = $();
951
+ return await v(n) || (await Q(t, we({
952
+ schema: Ft,
953
+ resolverAddress: cr,
954
+ revocable: lr
955
+ })), await Q(t, a({
956
+ schemaUid: n,
957
957
  schemaName: Lt
958
- }))), r;
958
+ }))), n;
959
959
  }
960
- function mr(e) {
961
- return new bt(H).encodeData([
960
+ function fr(e) {
961
+ return new yt(Ft).encodeData([
962
962
  {
963
963
  name: "seedUid",
964
- value: W(e.seedUid),
964
+ value: H(e.seedUid),
965
965
  type: "bytes32"
966
966
  },
967
967
  {
968
968
  name: "versionUid",
969
- value: W(e.versionUid || N),
969
+ value: H(e.versionUid || M),
970
970
  type: "bytes32"
971
971
  },
972
972
  {
973
973
  name: "attestationUids",
974
- value: e.attestationUids.map((e) => W(e)),
974
+ value: e.attestationUids.map((e) => H(e)),
975
975
  type: "bytes32[]"
976
976
  },
977
977
  {
978
978
  name: "batchHash",
979
- value: W(e.batchHash),
979
+ value: H(e.batchHash),
980
980
  type: "bytes32"
981
981
  },
982
982
  {
@@ -991,52 +991,52 @@ function mr(e) {
991
991
  }
992
992
  ]);
993
993
  }
994
- async function hr(e) {
995
- let t = fr(e.wallet), n = e.ensureSchema === !1 ? $() : await pr(e.wallet), r = [], i;
996
- if (e.mode === "uids") r = e.attestationUids.map((e) => W(e)).filter((e) => U(e)), i = e.batchHash ? W(e.batchHash) : qt(r);
994
+ async function pr(e) {
995
+ let t = ur(e.wallet), n = e.ensureSchema === !1 ? $() : await dr(e.wallet), r = [], i;
996
+ if (e.mode === "uids") r = e.attestationUids.map((e) => H(e)).filter((e) => V(e)), i = e.batchHash ? H(e.batchHash) : qt(r);
997
997
  else {
998
998
  if (!e.batchHash) throw Error("@seedprotocol/publish: attestPublishedBy hash mode requires batchHash");
999
- if (i = W(e.batchHash), i === N) throw Error("@seedprotocol/publish: attestPublishedBy hash mode requires a non-zero batchHash");
999
+ if (i = H(e.batchHash), i === M) throw Error("@seedprotocol/publish: attestPublishedBy hash mode requires a non-zero batchHash");
1000
1000
  }
1001
- let a = W(e.seedUid);
1002
- if (!U(a)) throw Error("@seedprotocol/publish: attestPublishedBy requires a valid seedUid");
1003
- let o = mr({
1001
+ let a = H(e.seedUid);
1002
+ if (!V(a)) throw Error("@seedprotocol/publish: attestPublishedBy requires a valid seedUid");
1003
+ let s = fr({
1004
1004
  seedUid: a,
1005
- versionUid: W(e.versionUid ?? N),
1005
+ versionUid: H(e.versionUid ?? M),
1006
1006
  attestationUids: r,
1007
1007
  batchHash: i,
1008
1008
  toolName: e.toolName,
1009
1009
  toolVersion: e.toolVersion
1010
- }), c = await Q(t, Ee({
1010
+ }), l = await Q(t, y({
1011
1011
  schema: n,
1012
1012
  data: {
1013
- recipient: s,
1014
- expirationTime: BigInt(yt),
1013
+ recipient: c,
1014
+ expirationTime: BigInt(vt),
1015
1015
  revocable: !0,
1016
1016
  refUID: a,
1017
- data: o,
1017
+ data: s,
1018
1018
  value: 0n
1019
1019
  }
1020
1020
  }));
1021
- if (!c) throw Error("@seedprotocol/publish: attestPublishedBy failed — no receipt");
1022
- let { easContractAddress: l } = E(), u = x(c, l);
1023
- if (!u || !U(u)) throw Error("@seedprotocol/publish: attestPublishedBy failed — could not parse attestation UID");
1021
+ if (!l) throw Error("@seedprotocol/publish: attestPublishedBy failed — no receipt");
1022
+ let { easContractAddress: u } = E(), d = o(l, u);
1023
+ if (!d || !V(d)) throw Error("@seedprotocol/publish: attestPublishedBy failed — could not parse attestation UID");
1024
1024
  return {
1025
- uid: u,
1025
+ uid: d,
1026
1026
  schemaUid: n,
1027
1027
  batchHash: i,
1028
1028
  attestationUids: r
1029
1029
  };
1030
1030
  }
1031
- async function gr(e) {
1032
- let t = fr(e.wallet), r = e.schemaUid ?? $(), i = W(e.uid);
1033
- if (!U(i)) throw Error("@seedprotocol/publish: revokePublishedBy requires a valid attestation uid");
1034
- if (!await Q(t, n([{
1035
- schema: r,
1036
- data: [{ uid: i }]
1031
+ async function mr(e) {
1032
+ let t = ur(e.wallet), n = e.schemaUid ?? $(), r = H(e.uid);
1033
+ if (!V(r)) throw Error("@seedprotocol/publish: revokePublishedBy requires a valid attestation uid");
1034
+ if (!await Q(t, Te([{
1035
+ schema: n,
1036
+ data: [{ uid: r }]
1037
1037
  }]))) throw Error("@seedprotocol/publish: revokePublishedBy failed — no receipt");
1038
1038
  }
1039
1039
  //#endregion
1040
- export { f as AttestationVerificationError, Ce as DEFAULT_PUBLISH_CHAIN, e as DEFAULT_TURBO_PAYMENT_URL, ve as DEFAULT_TURBO_UPLOAD_URL, Ot as DOMAIN_OWNERSHIP_METHOD, At as DOMAIN_OWNERSHIP_SCHEMA_DEF, jt as DOMAIN_OWNERSHIP_SCHEMA_NAME, Pt as EAS_CHAIN_DEPLOYMENTS, g as Eip7702ModularAccountPublishError, Ve as InsufficientStorageCreditsError, le as MANAGED_ACCOUNT_FACTORY_ADDRESSES, Ne as MULTI_PUBLISH_ABI_REFERENCE_ADDRESS_OP_SEPOLIA, Le as ManagedAccountPublishError, Ft as PUBLISHED_BY_SCHEMA_DEF, It as PUBLISHED_BY_SCHEMA_NAME, ue as PUBLISH_AUTHORIZATION_HEADER, dt as PUBLISH_AUTHORIZATION_SCHEMA_DEF, st as PUBLISH_AUTHORIZATION_SCHEMA_NAME, lt as PUBLISH_AUTHORIZATION_SCOPES, i as PUBLISH_GAS_HEURISTICS, ye as PublishChainConfigError, ke as PublishManager, rn as PublishModeButtons, Pe as PublishNotAuthorizedError, Ue as PublishPaymentConfigError, an as PublishProvider, h as PublishTransactionRevertedError, me as SEED_PROTOCOL_CONTRACT_ADDRESS_OP_SEPOLIA, Xt as SeedProvider, qe as asPublishWallet, Qe as asSeedSigner, fe as asSeedTxSender, u as assertExecutorModuleReadyForAccount, ne as assertManagedAccountEasMatchesConfig, lr as assessDomainOwnershipLive, at as assessPublishAuthorizationLive, ar as attestDomainOwnership, tt as attestPublishAuthorization, hr as attestPublishedBy, Ge as buildPublishAnchorBytes, Pn as clearAllPublishProcesses, Fn as clearAllUploadProcesses, Mn as clearCompletedPublishProcesses, Nn as clearCompletedPublishProcessesForSeed, et as clearPublishWallet, ft as collectPublishedBatch, be as combinePublishCostEstimate, Re as configurePublish, qn as createDomainOwnershipChallenge, Fe as createPermissionlessTxSender, Ln as deletePublishProcessById, Rn as deletePublishProcessesByIds, In as deletePublishProcessesForSeed, rr as encodeDomainOwnershipAttestationData, we as encodeEasAttest, v as encodeEasMultiAttest, y as encodeEasMultiRevoke, S as encodeMultiPublish, ct as encodePublishAuthorizationAttestationData, mr as encodePublishedByAttestationData, d as encodeSetEas, nr as ensureDomainOwnershipSchema, o as ensureEasSchemasForItem, c as ensureManagedAccountEasConfigured, ut as ensurePublishAuthorizationSchema, pr as ensurePublishedBySchema, ge as ensureWalletThenPublish, ce as estimatePublishCost, Wn as fingerprintFromRegistrySnapshot, q as fromEip1193Provider, a as fromEthersWallet, on as fromWindowEthereum, ee as getArweave, zn as getArweaveTransactionIds, Ke as getCachedMarketRates, de as getCachedTokenPrices, hn as getDisplayStepId, Z as getDomainOwnershipSchemaUid, Ut as getEasChainDeployment, Bn as getEasPayload, nt as getPublishAuthorizationSchemaUid, He as getPublishChainName, E as getPublishConfig, _n as getPublishMachineValueForUi, r as getPublishPublicClient, k as getPublishWallet, $ as getPublishedBySchemaUid, he as getTurboBalanceWinc, Oe as getTurboPriceWinc, Kt as hashPublishedByBatch, Je as heuristicPublishGas, Me as initPublish, ie as isContractDeployed, oe as isEip7702ModularAccountPublishError, ae as isManagedAccountPublishError, O as isPublishWallet, se as isRouterNonModularCoreAccountError, re as isSeedSigner, l as isSeedTxSender, Un as lookupDomainRegistry, Y as normalizeRegistrableDomain, De as publishItem, xe as publishMachine, m as readFactorySeedExecutor, _ as readGetEas, w as readIsActiveSigner, Be as requireManagedAccountFactoryAddress, Ze as resetMarketRateCache, Ye as resetTokenPriceCache, gn as resolvePublishDisplayValue, pe as resolvePublishEasChain, je as resolvePublishPayment, ze as resolvePublishSender, or as revokeDomainOwnership, ot as revokePublishAuthorization, gr as revokePublishedBy, nn as seedTwinConfig, $e as setPublishWallet, p as simulateCallFromAccount, C as stringifyUnderlyingCause, pt as uidsFromAttestationPairs, xn as useArweaveL1Finalize, bn as useCanPublishItem, Sn as useItemPublishStatus, rt as usePublishConfig, Vn as usePublishCostEstimate, yn as usePublishProcess, jn as usePublishProcessById, En as usePublishProcesses, On as usePublishProcessesForSeed, Dn as usePublishProcessesNonActiveCount, An as usePublishProcessesNonActiveCountForSeed, Tn as usePublishProcessesState, kn as usePublishProcessesStateForSeed, sn as useSeedWallet, cr as verifyAndAttestDomainOwnership, _e as verifyDataItem, sr as verifyDomainOwnershipChallenge, Qn as verifyDomainOwnershipDns, Ie as verifyPublishChain, We as waitForPublishActor, T as waitForPublishReceipt, mn as watchPublishCost };
1040
+ export { ne as AttestationVerificationError, Ie as DEFAULT_PUBLISH_CHAIN, ee as DEFAULT_TURBO_PAYMENT_URL, e as DEFAULT_TURBO_UPLOAD_URL, Dt as DOMAIN_OWNERSHIP_METHOD, kt as DOMAIN_OWNERSHIP_SCHEMA_DEF, At as DOMAIN_OWNERSHIP_SCHEMA_NAME, Nt as EAS_CHAIN_DEPLOYMENTS, d as Eip7702ModularAccountPublishError, Me as InsufficientStorageCreditsError, xe as MANAGED_ACCOUNT_FACTORY_ADDRESSES, le as MULTI_PUBLISH_ABI_REFERENCE_ADDRESS_OP_SEPOLIA, m as ManagedAccountPublishError, Pt as PUBLISHED_BY_SCHEMA_DEF, It as PUBLISHED_BY_SCHEMA_NAME, Se as PUBLISH_AUTHORIZATION_HEADER, ut as PUBLISH_AUTHORIZATION_SCHEMA_DEF, ot as PUBLISH_AUTHORIZATION_SCHEMA_NAME, ct as PUBLISH_AUTHORIZATION_SCOPES, S as PUBLISH_GAS_HEURISTICS, he as PublishChainConfigError, Ne as PublishManager, rn as PublishModeButtons, ue as PublishNotAuthorizedError, ge as PublishPaymentConfigError, an as PublishProvider, Pe as PublishTransactionRevertedError, Xt as SeedProvider, se as asPublishWallet, We as asSeedSigner, Xe as asSeedTxSender, b as assertExecutorModuleReadyForAccount, Ge as assertManagedAccountEasMatchesConfig, sr as assessDomainOwnershipLive, it as assessPublishAuthorizationLive, rr as attestDomainOwnership, et as attestPublishAuthorization, pr as attestPublishedBy, De as buildPublishAnchorBytes, Pn as clearAllPublishProcesses, Fn as clearAllUploadProcesses, Mn as clearCompletedPublishProcesses, Nn as clearCompletedPublishProcessesForSeed, $e as clearPublishWallet, dt as collectPublishedBatch, be as combinePublishCostEstimate, Kn as createDomainOwnershipChallenge, _e as createPermissionlessTxSender, Ln as deletePublishProcessById, Rn as deletePublishProcessesByIds, In as deletePublishProcessesForSeed, tr as encodeDomainOwnershipAttestationData, t as encodeEasAttest, Ce as encodeEasMultiAttest, g as encodeEasMultiRevoke, _ as encodeMultiPublish, st as encodePublishAuthorizationAttestationData, fr as encodePublishedByAttestationData, x as encodeSetEas, er as ensureDomainOwnershipSchema, s as ensureEasSchemasForItem, te as ensureManagedAccountEasConfigured, lt as ensurePublishAuthorizationSchema, dr as ensurePublishedBySchema, Ve as ensureWalletThenPublish, ye as estimatePublishCost, Un as fingerprintFromRegistrySnapshot, G as fromEip1193Provider, C as fromEthersWallet, on as fromWindowEthereum, qe as getArweave, zn as getArweaveTransactionIds, oe as getCachedMarketRates, Ye as getCachedTokenPrices, hn as getDisplayStepId, Z as getDomainOwnershipSchemaUid, Ut as getEasChainDeployment, Bn as getEasPayload, tt as getPublishAuthorizationSchemaUid, ze as getPublishChainName, E as getPublishConfig, _n as getPublishMachineValueForUi, Ze as getPublishPublicClient, O as getPublishWallet, $ as getPublishedBySchemaUid, Re as getTurboBalanceWinc, me as getTurboPriceWinc, Kt as hashPublishedByBatch, r as heuristicPublishGas, ce as initPublish, n as isContractDeployed, p as isEip7702ModularAccountPublishError, ie as isManagedAccountPublishError, i as isPublishWallet, re as isRouterNonModularCoreAccountError, Ke as isSeedSigner, w as isSeedTxSender, J as lookupDomainRegistry, q as normalizeRegistrableDomain, pe as publishItem, Oe as publishMachine, u as readFactorySeedExecutor, f as readGetEas, h as readIsActiveSigner, je as requireManagedAccountFactoryAddress, Ue as resetMarketRateCache, de as resetTokenPriceCache, gn as resolvePublishDisplayValue, Le as resolvePublishEasChain, Be as resolvePublishPayment, Ae as resolvePublishSender, ir as revokeDomainOwnership, at as revokePublishAuthorization, mr as revokePublishedBy, nn as seedTwinConfig, Qe as setPublishWallet, l as simulateCallFromAccount, ae as stringifyUnderlyingCause, ft as uidsFromAttestationPairs, xn as useArweaveL1Finalize, bn as useCanPublishItem, Sn as useItemPublishStatus, nt as usePublishConfig, Vn as usePublishCostEstimate, yn as usePublishProcess, jn as usePublishProcessById, En as usePublishProcesses, On as usePublishProcessesForSeed, Dn as usePublishProcessesNonActiveCount, An as usePublishProcessesNonActiveCountForSeed, Tn as usePublishProcessesState, kn as usePublishProcessesStateForSeed, sn as useSeedWallet, or as verifyAndAttestDomainOwnership, He as verifyDataItem, ar as verifyDomainOwnershipChallenge, Zn as verifyDomainOwnershipDns, ve as verifyPublishChain, Ee as waitForPublishActor, T as waitForPublishReceipt, mn as watchPublishCost };
1041
1041
 
1042
1042
  //# sourceMappingURL=index.js.map