@seedprotocol/publish 0.7.3-next.613.g79a8dfd → 0.7.3

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 (44) hide show
  1. package/README.md +4 -2
  2. package/dist/chainConfig-RhKIuGtN.js +5289 -0
  3. package/dist/chainConfig-RhKIuGtN.js.map +1 -0
  4. package/dist/config.d.ts +3 -1
  5. package/dist/config.d.ts.map +1 -1
  6. package/dist/{ensureAutomationSessionKey-bw6knEyC.js → ensureAutomationSessionKey-CvUntLne.js} +25 -26
  7. package/dist/{ensureAutomationSessionKey-bw6knEyC.js.map → ensureAutomationSessionKey-CvUntLne.js.map} +1 -1
  8. package/dist/{ensureModularPublishBootstrap-Vc4Jz_B9.js → ensureModularPublishBootstrap-D9q246TT.js} +9 -11
  9. package/dist/{ensureModularPublishBootstrap-Vc4Jz_B9.js.map → ensureModularPublishBootstrap-D9q246TT.js.map} +1 -1
  10. package/dist/ensureSmartWalletThenPublish-C_iS5Wb-.js +52 -0
  11. package/dist/ensureSmartWalletThenPublish-C_iS5Wb-.js.map +1 -0
  12. package/dist/helpers/ensureSmartWalletThenPublish.d.ts +1 -0
  13. package/dist/helpers/ensureSmartWalletThenPublish.d.ts.map +1 -1
  14. package/dist/helpers/ensureWalletThenPublish.d.ts +7 -0
  15. package/dist/helpers/ensureWalletThenPublish.d.ts.map +1 -1
  16. package/dist/helpers/publishItem.d.ts +21 -0
  17. package/dist/helpers/publishItem.d.ts.map +1 -0
  18. package/dist/index.d.ts +2 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +341 -476
  21. package/dist/index.js.map +1 -1
  22. package/dist/managedAccountAdmin-CLVRJEKI.js +26 -0
  23. package/dist/{managedAccountAdmin-B3DPMmhR.js.map → managedAccountAdmin-CLVRJEKI.js.map} +1 -1
  24. package/dist/publishAuthorization-DAarz1JK.js +176 -0
  25. package/dist/publishAuthorization-DAarz1JK.js.map +1 -0
  26. package/dist/{resolveRevokeAccount-CkbTpC27.js → resolveRevokeAccount-TRcqJtIO.js} +13 -15
  27. package/dist/{resolveRevokeAccount-CkbTpC27.js.map → resolveRevokeAccount-TRcqJtIO.js.map} +1 -1
  28. package/dist/services/publish/helpers/getPublishUploadData.d.ts +12 -23
  29. package/dist/services/publish/helpers/getPublishUploadData.d.ts.map +1 -1
  30. package/dist/services/upload/uploadMachine.d.ts +1 -1
  31. package/dist/thirdweb.js +144 -145
  32. package/dist/thirdweb.js.map +1 -1
  33. package/dist/{worker-CCQ7KBMm.js → worker-CyuMiBB-.js} +2 -2
  34. package/dist/{worker-CCQ7KBMm.js.map → worker-CyuMiBB-.js.map} +1 -1
  35. package/package.json +6 -6
  36. package/dist/chainConfig-BDMRU4m8.js +0 -1455
  37. package/dist/chainConfig-BDMRU4m8.js.map +0 -1
  38. package/dist/ensureSmartWalletThenPublish-42iEhiHG.js +0 -47
  39. package/dist/ensureSmartWalletThenPublish-42iEhiHG.js.map +0 -1
  40. package/dist/managedAccountAdmin-B3DPMmhR.js +0 -28
  41. package/dist/publishAuthorization-CAFF5jQ2.js +0 -4023
  42. package/dist/publishAuthorization-CAFF5jQ2.js.map +0 -1
  43. package/dist/publishThirdwebClient-CPzAjnmf.js +0 -18
  44. package/dist/publishThirdwebClient-CPzAjnmf.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,19 +1,14 @@
1
- import { $ as e, A as t, B as n, C as r, D as i, E as a, H as o, I as s, M as c, Mt as l, N as u, O as d, Ot as f, R as p, S as m, T as h, Tt as g, U as _, W as v, Y as y, _t as ee, a as te, c as ne, ct as re, d as ie, dt as b, et as ae, f as oe, ft as se, gt as ce, ht as le, i as ue, j as x, jt as S, k as C, kt as de, l as fe, mt as pe, n as me, o as w, pt as he, q as ge, r as _e, s as ve, st as ye, t as be, tt as xe, vt as Se, w as Ce, x as we, yt as Te } from "./chainConfig-BDMRU4m8.js";
2
- import { $ as Ee, C as De, J as Oe, Q as ke, X as Ae, Y as je, Z as Me, _ as Ne, a as Pe, c as Fe, et as Ie, g as Le, h as Re, i as ze, l as Be, n as Ve, nt as He, o as Ue, q as We, r as Ge, s as Ke, t as qe, tt as Je, v as Ye, w as Xe } from "./publishAuthorization-CAFF5jQ2.js";
3
- import { n as Ze, r as Qe } from "./collectBatchUids-CnIe9jUB.js";
4
- import { BaseDb as T, arweaveL1FinalizeJobs as E, isItemOwned as $e, publishProcesses as D, uploadProcesses as et } from "@seedprotocol/sdk";
5
- import { createPublicClient as tt, createWalletClient as nt, custom as rt, defineChain as it, http as O } from "viem";
6
- import { ethers as at } from "ethers";
7
- import { DOMAIN_OWNERSHIP_CHALLENGE_TTL_MS as ot, DOMAIN_OWNERSHIP_DEFAULT_EXPIRATION_SECS as st, DOMAIN_OWNERSHIP_METHOD as ct, DOMAIN_OWNERSHIP_METHOD as lt, DOMAIN_OWNERSHIP_SCHEMA_DEF as ut, DOMAIN_OWNERSHIP_SCHEMA_DEF as k, DOMAIN_OWNERSHIP_SCHEMA_NAME as dt, DOMAIN_OWNERSHIP_SCHEMA_NAME as ft, DOMAIN_OWNERSHIP_SCOPE_REGISTRABLE as pt, EAS_CHAIN_DEPLOYMENTS as mt, PUBLISHED_BY_SCHEMA_DEF as ht, PUBLISHED_BY_SCHEMA_DEF as A, PUBLISHED_BY_SCHEMA_NAME as gt, PUBLISHED_BY_SCHEMA_NAME as _t, assessDomainOwnership as vt, buildDomainOwnershipTxtValue as yt, decodeDomainOwnershipData as bt, domainOwnershipTxtName as xt, getDomainOwnershipFromEas as St, getEasChainDeployment as Ct, hashDomainOwnershipChallenge as wt, hashDomainRegistryFingerprint as Tt, hashPublishedByBatch as Et, hashPublishedByBatch as Dt, isValidEasAttestationUid as j, normalizeBytes32Hex as M, parseDomainOwnershipTxtValue as Ot } from "@seedprotocol/eas";
8
- import { useCallback as kt, useEffect as N, useMemo as P, useRef as At, useState as F } from "react";
9
- import { jsx as I, jsxs as jt } from "react/jsx-runtime";
10
- import { SeedProvider as Mt, SeedProvider as Nt, useLiveQuery as L } from "@seedprotocol/react";
11
- import { entryPoint08Address as R } from "viem/account-abstraction";
12
- import { createSmartAccountClient as Pt } from "permissionless";
13
- import { to7702SimpleSmartAccount as Ft } from "permissionless/accounts";
14
- import { createPimlicoClient as It } from "permissionless/clients/pimlico";
15
- import { NO_EXPIRATION as Lt, SchemaEncoder as Rt, SchemaRegistry as zt, ZERO_BYTES32 as z } from "@ethereum-attestation-service/eas-sdk";
16
- import { and as Bt, desc as B, eq as V, inArray as Vt, notInArray as Ht } from "drizzle-orm";
1
+ import { $ as e, At as t, Bt as n, Ct as r, Dt as i, E as a, Et as o, Ft as s, Gt as c, Ht as l, It as u, Kt as d, Lt as f, Nt as p, Pt as m, Q as h, Rt as g, St as _, T as ee, Tt as te, Ut as ne, Vt as re, Wt as ie, X as ae, Y as oe, Z as se, _ as ce, _t as le, a as v, at as ue, b as de, bt as fe, c as pe, ct as me, d as he, dt as ge, f as _e, ft as y, g as ve, gt as ye, h as be, ht as xe, i as Se, it as Ce, kt as we, l as Te, lt as Ee, m as De, mt as b, n as Oe, o as ke, ot as Ae, p as je, pt as Me, r as Ne, s as Pe, st as Fe, t as Ie, u as Le, ut as x, v as Re, vt as ze, wt as Be, xt as Ve, y as He, yt as Ue, zt as We } from "./chainConfig-RhKIuGtN.js";
2
+ import { a as Ge, c as Ke, g as qe, h as Je, i as Ye, l as Xe, n as Ze, o as Qe, r as $e, s as et, t as tt } from "./publishAuthorization-DAarz1JK.js";
3
+ import { n as nt, r as rt } from "./collectBatchUids-CnIe9jUB.js";
4
+ import { BaseDb as S, arweaveL1FinalizeJobs as it, isItemOwned as at, publishProcesses as C, uploadProcesses as ot } from "@seedprotocol/sdk";
5
+ import { createWalletClient as st, custom as ct, defineChain as lt } from "viem";
6
+ import { NO_EXPIRATION as ut, SchemaEncoder as dt, SchemaRegistry as ft, ZERO_BYTES32 as w } from "@ethereum-attestation-service/eas-sdk";
7
+ import { useCallback as T, useEffect as E, useMemo as D, useRef as pt, useState as O } from "react";
8
+ import { and as mt, desc as k, eq as A, inArray as ht, notInArray as gt } from "drizzle-orm";
9
+ import { DOMAIN_OWNERSHIP_CHALLENGE_TTL_MS as _t, DOMAIN_OWNERSHIP_DEFAULT_EXPIRATION_SECS as vt, DOMAIN_OWNERSHIP_METHOD as yt, DOMAIN_OWNERSHIP_METHOD as bt, DOMAIN_OWNERSHIP_SCHEMA_DEF as xt, DOMAIN_OWNERSHIP_SCHEMA_DEF as j, DOMAIN_OWNERSHIP_SCHEMA_NAME as St, DOMAIN_OWNERSHIP_SCHEMA_NAME as Ct, DOMAIN_OWNERSHIP_SCOPE_REGISTRABLE as wt, EAS_CHAIN_DEPLOYMENTS as Tt, PUBLISHED_BY_SCHEMA_DEF as Et, PUBLISHED_BY_SCHEMA_DEF as M, PUBLISHED_BY_SCHEMA_NAME as Dt, PUBLISHED_BY_SCHEMA_NAME as Ot, assessDomainOwnership as kt, buildDomainOwnershipTxtValue as At, decodeDomainOwnershipData as jt, domainOwnershipTxtName as Mt, getDomainOwnershipFromEas as Nt, getEasChainDeployment as Pt, hashDomainOwnershipChallenge as Ft, hashDomainRegistryFingerprint as It, hashPublishedByBatch as Lt, hashPublishedByBatch as Rt, isValidEasAttestationUid as N, normalizeBytes32Hex as P, parseDomainOwnershipTxtValue as zt } from "@seedprotocol/eas";
10
+ import { jsx as F, jsxs as Bt } from "react/jsx-runtime";
11
+ import { SeedProvider as Vt, SeedProvider as Ht, useLiveQuery as I } from "@seedprotocol/react";
17
12
  import { useSelector as Ut } from "@xstate/react";
18
13
  import { lookup as Wt, toRegistrableDomain as Gt } from "rdapper";
19
14
  //#region src/helpers/seedTwin.ts
@@ -29,7 +24,7 @@ function Kt(e) {
29
24
  ["contracts.seedProtocolExecutor", e?.contracts?.seedProtocolExecutor]
30
25
  ].filter(([, e]) => e == null || e === "").map(([e]) => e);
31
26
  if (t.length > 0) throw Error(`seedTwinConfig: twin.json is missing ${t.join(", ")}. Re-run twin:up.`);
32
- let n = e.forkedFrom?.chain ? ` (${e.forkedFrom.chain} fork)` : "", r = it({
27
+ let n = e.forkedFrom?.chain ? ` (${e.forkedFrom.chain} fork)` : "", r = lt({
33
28
  id: e.chainId,
34
29
  name: `Seed twin${n}`,
35
30
  nativeCurrency: {
@@ -78,17 +73,17 @@ var qt = ({ value: e, onChange: t, disabled: n = !1, "aria-label": r = "Publish
78
73
  cursor: n ? "not-allowed" : "pointer",
79
74
  opacity: n ? .6 : 1
80
75
  });
81
- return /* @__PURE__ */ jt("div", {
76
+ return /* @__PURE__ */ Bt("div", {
82
77
  role: "group",
83
78
  "aria-label": r,
84
79
  style: i,
85
- children: [/* @__PURE__ */ I("button", {
80
+ children: [/* @__PURE__ */ F("button", {
86
81
  type: "button",
87
82
  disabled: n,
88
83
  style: a(e === "patch"),
89
84
  onClick: () => t("patch"),
90
85
  children: "Publish updates"
91
- }), /* @__PURE__ */ I("button", {
86
+ }), /* @__PURE__ */ F("button", {
92
87
  type: "button",
93
88
  disabled: n,
94
89
  style: a(e === "new_version"),
@@ -96,11 +91,11 @@ var qt = ({ value: e, onChange: t, disabled: n = !1, "aria-label": r = "Publish
96
91
  children: "New version"
97
92
  })]
98
93
  });
99
- }, Jt = ({ children: e, config: t, queryClient: n, queryClientRef: r }) => (N(() => {
100
- t && ve(t);
101
- }, [t]), /* @__PURE__ */ I(Je.Provider, {
102
- value: t ?? te(),
103
- children: /* @__PURE__ */ I(Nt, {
94
+ }, Jt = ({ children: e, config: t, queryClient: n, queryClientRef: r }) => (E(() => {
95
+ t && ke(t);
96
+ }, [t]), /* @__PURE__ */ F(Je.Provider, {
97
+ value: t ?? Se(),
98
+ children: /* @__PURE__ */ F(Ht, {
104
99
  queryClient: n,
105
100
  queryClientRef: r,
106
101
  children: e
@@ -108,27 +103,27 @@ var qt = ({ value: e, onChange: t, disabled: n = !1, "aria-label": r = "Publish
108
103
  }));
109
104
  //#endregion
110
105
  //#region src/helpers/adapters/eip1193.ts
111
- async function H(e, t = {}) {
112
- let n = t.chain ?? _e(), r = t.address;
106
+ async function L(e, t = {}) {
107
+ let n = t.chain ?? Oe(), r = t.address;
113
108
  if (!r) {
114
109
  let t = await e.request({ method: "eth_requestAccounts" });
115
110
  if (!t?.[0]) throw Error("@seedprotocol/publish: EIP-1193 provider returned no accounts");
116
111
  r = t[0];
117
112
  }
118
- let i = nt({
113
+ let i = st({
119
114
  account: r,
120
115
  chain: n,
121
- transport: rt(e)
116
+ transport: ct(e)
122
117
  });
123
118
  return {
124
- signer: Ce({
119
+ signer: Fe({
125
120
  address: r,
126
121
  signMessage: async ({ message: e }) => i.signMessage({
127
122
  account: r,
128
123
  message: typeof e == "string" ? e : { raw: e.raw }
129
124
  })
130
125
  }),
131
- txSender: h({
126
+ txSender: me({
132
127
  address: r,
133
128
  sendTransaction: async (e) => ({ transactionHash: await i.sendTransaction({
134
129
  account: r,
@@ -144,238 +139,146 @@ async function H(e, t = {}) {
144
139
  async function Yt(e = {}) {
145
140
  let t = globalThis.ethereum;
146
141
  if (!t) throw Error("@seedprotocol/publish: window.ethereum is not available");
147
- return H(t, e);
148
- }
149
- //#endregion
150
- //#region src/helpers/adapters/permissionlessTxSender.ts
151
- function Xt(e) {
152
- return {
153
- address: e.address,
154
- type: "local",
155
- source: "custom",
156
- publicKey: "0x",
157
- signMessage: async ({ message: t }) => e.signMessage({ message: t }),
158
- signTransaction: async () => {
159
- throw Error("@seedprotocol/publish: permissionless EIP-7702 path does not use signTransaction");
160
- },
161
- signTypedData: async () => {
162
- throw Error("@seedprotocol/publish: signTypedData is not implemented on SeedSigner yet");
163
- }
164
- };
165
- }
166
- async function Zt(e) {
167
- let t;
168
- try {
169
- t = (await (await fetch(e, {
170
- method: "POST",
171
- headers: { "Content-Type": "application/json" },
172
- body: JSON.stringify({
173
- jsonrpc: "2.0",
174
- id: 1,
175
- method: "eth_supportedEntryPoints",
176
- params: []
177
- })
178
- })).json()).result;
179
- } catch {
180
- return;
181
- }
182
- if (!Array.isArray(t)) return;
183
- let n = t.map((e) => String(e).toLowerCase());
184
- if (!n.includes(R.toLowerCase())) throw Error(`@seedprotocol/publish: PublishConfig.bundlerUrl (${e}) does not support EntryPoint v0.8 (it lists ${n.join(", ") || "none"}). The top-level bundlerUrl is only for the permissionless EIP-7702 sender. For Thirdweb in-app wallets (e.g. a local twin's bundler), set PublishConfig.thirdweb.bundlerUrl instead.`);
185
- }
186
- async function U(e) {
187
- let { signer: t, bundlerUrl: n, paymasterUrl: r } = e;
188
- await Zt(n);
189
- let i = _e(), a = me(), o = t.address, s = tt({
190
- chain: i,
191
- transport: O(a)
192
- }), c = Xt(t), l = await Ft({
193
- client: s,
194
- owner: c,
195
- entryPoint: {
196
- address: R,
197
- version: "0.8"
198
- }
199
- }), u = It({
200
- transport: O(r ?? n),
201
- entryPoint: {
202
- address: R,
203
- version: "0.8"
204
- }
205
- }), d = Pt({
206
- account: l,
207
- chain: i,
208
- bundlerTransport: O(n),
209
- paymaster: u,
210
- userOperation: { estimateFeesPerGas: async () => (await u.getUserOperationGasPrice()).fast }
211
- });
212
- return h({
213
- address: l.address ?? o,
214
- sendTransaction: async (e) => {
215
- let t;
216
- try {
217
- let n = await d.sendUserOperation({ calls: [{
218
- to: e.to,
219
- data: e.data,
220
- value: e.value ?? 0n
221
- }] });
222
- t = await d.waitForUserOperationReceipt({ hash: n });
223
- } catch (e) {
224
- let t = e instanceof Error ? e.message : String(e);
225
- throw Error(`@seedprotocol/publish: permissionless/EIP-7702 send failed (${t}). Ensure bundlerUrl/paymasterUrl support EntryPoint v0.8, or use accountMode: 'eoa' / Thirdweb adapter.`, { cause: e });
226
- }
227
- return { transactionHash: Qt(t, l.address) };
228
- }
229
- });
230
- }
231
- function Qt(e, t) {
232
- let n = e.receipt.transactionHash;
233
- if (e.success) return n;
234
- let r = e.reason;
235
- throw r && !/^0x[0-9a-f]*$/i.test(r) ? new pe(`The publish UserOp in transaction ${n} failed: ${r}`, "USEROP_REVERTED", t) : Ie({
236
- txHash: n,
237
- revertData: r,
238
- sender: t
239
- });
142
+ return L(t, e);
240
143
  }
241
144
  //#endregion
242
145
  //#region src/react/useSeedWallet.ts
243
- function $t() {
244
- let [e, n] = F(() => x()), [r, a] = F(() => x() ? "connected" : "disconnected");
245
- N(() => {
246
- n(x());
146
+ function Xt() {
147
+ let [e, t] = O(() => b()), [n, r] = O(() => b() ? "connected" : "disconnected");
148
+ E(() => {
149
+ t(b());
247
150
  }, []);
248
- let o = kt(async (e) => {
249
- a("connecting");
151
+ let i = T(async (e) => {
152
+ r("connecting");
250
153
  try {
251
- let t;
252
- t = i(e) ? e : await H(e);
253
- let r = w(), o = t.txSender;
254
- r.accountMode === "eip7702" && r.bundlerUrl && (o = await U({
255
- signer: t.signer,
256
- bundlerUrl: r.bundlerUrl,
257
- paymasterUrl: r.paymasterUrl
154
+ let n;
155
+ n = x(e) ? e : await L(e);
156
+ let i = v(), a = n.txSender;
157
+ i.accountMode === "eip7702" && i.bundlerUrl && (a = await _e({
158
+ signer: n.signer,
159
+ bundlerUrl: i.bundlerUrl,
160
+ paymasterUrl: i.paymasterUrl
258
161
  }));
259
- let s = {
260
- signer: t.signer,
261
- txSender: o,
262
- ownedAddresses: [t.signer.address, o.address],
263
- publisherAddress: t.signer.address
162
+ let o = {
163
+ signer: n.signer,
164
+ txSender: a,
165
+ ownedAddresses: [n.signer.address, a.address],
166
+ publisherAddress: n.signer.address
264
167
  };
265
- return await c(s), n(s), a("connected"), s;
168
+ return await xe(o), t(o), r("connected"), o;
266
169
  } catch (e) {
267
- throw a("disconnected"), e;
170
+ throw r("disconnected"), e;
268
171
  }
269
- }, []), s = kt(() => {
270
- t(), n(null), a("disconnected");
172
+ }, []), a = T(() => {
173
+ Me(), t(null), r("disconnected");
271
174
  }, []);
272
175
  return {
273
176
  address: e?.signer.address,
274
177
  signer: e?.signer,
275
178
  txSender: e?.txSender,
276
- status: r,
277
- connect: o,
278
- disconnect: s
179
+ status: n,
180
+ connect: i,
181
+ disconnect: a
279
182
  };
280
183
  }
281
184
  //#endregion
282
185
  //#region src/services/publishCost/gasHeuristics.ts
283
- var W = {
186
+ var R = {
284
187
  BASE: 80000n,
285
188
  NEW_SEED: 120000n,
286
189
  NEW_VERSION: 80000n,
287
190
  ATTESTATION: 55000n
288
191
  };
289
- function en(e) {
290
- return W.BASE + W.NEW_SEED * BigInt(e.newSeedCount) + W.NEW_VERSION * BigInt(e.newVersionCount) + W.ATTESTATION * BigInt(e.attestationCount);
192
+ function Zt(e) {
193
+ return R.BASE + R.NEW_SEED * BigInt(e.newSeedCount) + R.NEW_VERSION * BigInt(e.newVersionCount) + R.ATTESTATION * BigInt(e.attestationCount);
291
194
  }
292
195
  //#endregion
293
196
  //#region src/services/publishCost/tokenPrices.ts
294
- var tn = 6e4, G = null, K = null;
295
- function nn() {
197
+ var Qt = 6e4, z = null, B = null;
198
+ function $t() {
296
199
  try {
297
- return w().getTokenPrices;
200
+ return v().getTokenPrices;
298
201
  } catch {
299
202
  return;
300
203
  }
301
204
  }
302
- async function rn(e) {
205
+ async function en(e) {
303
206
  let t = await fetch(`https://api.coinbase.com/v2/prices/${e}-USD/spot`);
304
207
  if (!t.ok) throw Error(`Coinbase ${e}-USD spot failed: ${t.status}`);
305
208
  let n = await t.json(), r = Number(n.data?.amount);
306
209
  if (!Number.isFinite(r) || r <= 0) throw Error(`Invalid ${e} USD price`);
307
210
  return r;
308
211
  }
309
- async function an() {
310
- let [e, t] = await Promise.all([rn("ETH"), rn("AR")]);
212
+ async function tn() {
213
+ let [e, t] = await Promise.all([en("ETH"), en("AR")]);
311
214
  return {
312
215
  ethUsd: e,
313
216
  arUsd: t
314
217
  };
315
218
  }
316
- async function on(e) {
219
+ async function nn(e) {
317
220
  let t = Date.now();
318
- return !e?.forceRefresh && G && t - G.fetchedAt < tn ? G : (K && !e?.forceRefresh || (K = (async () => {
221
+ return !e?.forceRefresh && z && t - z.fetchedAt < Qt ? z : (B && !e?.forceRefresh || (B = (async () => {
319
222
  try {
320
- let e = nn(), t = e ? await e() : await an(), n = {
223
+ let e = $t(), t = e ? await e() : await tn(), n = {
321
224
  ethUsd: t.ethUsd,
322
225
  arUsd: t.arUsd,
323
226
  fetchedAt: Date.now()
324
227
  };
325
- return G = n, n;
228
+ return z = n, n;
326
229
  } catch (e) {
327
- if (G) return G;
230
+ if (z) return z;
328
231
  throw e;
329
232
  } finally {
330
- K = null;
233
+ B = null;
331
234
  }
332
- })()), K);
235
+ })()), B);
333
236
  }
334
- function sn() {
335
- G = null, K = null;
237
+ function rn() {
238
+ z = null, B = null;
336
239
  }
337
240
  //#endregion
338
241
  //#region src/services/publishCost/marketRates.ts
339
- var cn = 6e4, ln = 1e6, q = null, J = null;
340
- async function un() {
341
- return ye().getGasPrice();
242
+ var an = 6e4, on = 1e6, V = null, H = null;
243
+ async function sn() {
244
+ return we().getGasPrice();
342
245
  }
343
- async function dn() {
344
- let e = BigInt(await Ee().transactions.getPrice(ln));
345
- return Number(e) / ln;
246
+ async function cn() {
247
+ let e = BigInt(await se().transactions.getPrice(on));
248
+ return Number(e) / on;
346
249
  }
347
- async function fn(e) {
250
+ async function U(e) {
348
251
  let t = Date.now();
349
- return !e?.forceRefresh && q && t - q.fetchedAt < cn ? q : (J && !e?.forceRefresh || (J = (async () => {
252
+ return !e?.forceRefresh && V && t - V.fetchedAt < an ? V : (H && !e?.forceRefresh || (H = (async () => {
350
253
  try {
351
254
  let [t, n, r] = await Promise.all([
352
- on({ forceRefresh: e?.forceRefresh }),
353
- un(),
354
- dn()
255
+ nn({ forceRefresh: e?.forceRefresh }),
256
+ sn(),
257
+ cn()
355
258
  ]), i = {
356
259
  ...t,
357
260
  gasPriceWei: n,
358
261
  winstonPerByte: r,
359
262
  fetchedAt: Date.now()
360
263
  };
361
- return q = i, i;
264
+ return V = i, i;
362
265
  } catch (e) {
363
- if (q) return q;
266
+ if (V) return V;
364
267
  throw e;
365
268
  } finally {
366
- J = null;
269
+ H = null;
367
270
  }
368
- })()), J);
271
+ })()), H);
369
272
  }
370
- function pn() {
371
- q = null, J = null, sn();
273
+ function ln() {
274
+ V = null, H = null, rn();
372
275
  }
373
276
  //#endregion
374
277
  //#region src/services/publishCost/estimatePublishCost.ts
375
- var mn = 0xe8d4a51000, hn = 0xde0b6b3a7640000;
376
- function gn() {
278
+ var un = 0xe8d4a51000, dn = 0xde0b6b3a7640000;
279
+ function fn() {
377
280
  try {
378
- let e = w();
281
+ let e = v();
379
282
  return {
380
283
  evmUserPays: !e.paymasterUrl,
381
284
  arweavePath: e.useArweaveBundler ? "bundler" : "l1"
@@ -387,22 +290,22 @@ function gn() {
387
290
  };
388
291
  }
389
292
  }
390
- function _n(e) {
293
+ function W(e) {
391
294
  return Math.round(e * 100) / 100;
392
295
  }
393
- function vn(e, t, n) {
394
- let r = n?.evmUserPays ?? !0, i = n?.arweavePath ?? "l1", a = en(e), o = a * t.gasPriceWei, s = Number(o) / hn, c = s * t.ethUsd, l = Math.max(0, Math.round(e.uploadBytes * t.winstonPerByte)) / mn, u = l * t.arUsd;
296
+ function G(e, t, n) {
297
+ let r = n?.evmUserPays ?? !0, i = n?.arweavePath ?? "l1", a = Zt(e), o = a * t.gasPriceWei, s = Number(o) / dn, c = s * t.ethUsd, l = Math.max(0, Math.round(e.uploadBytes * t.winstonPerByte)) / un, u = l * t.arUsd;
395
298
  return {
396
- totalUsd: _n(c + u),
299
+ totalUsd: W(c + u),
397
300
  evm: {
398
301
  eth: s.toPrecision(6),
399
- usd: _n(c),
302
+ usd: W(c),
400
303
  gas: a,
401
304
  userPays: r
402
305
  },
403
306
  arweave: {
404
307
  ar: l.toPrecision(6),
405
- usd: _n(u),
308
+ usd: W(u),
406
309
  bytes: e.uploadBytes,
407
310
  uploadCount: e.uploadCount,
408
311
  path: i,
@@ -417,48 +320,48 @@ function vn(e, t, n) {
417
320
  estimatedAt: Date.now()
418
321
  };
419
322
  }
420
- async function yn(e, t) {
421
- let n = gn(), r = t?.work;
323
+ async function pn(e, t) {
324
+ let n = fn(), r = t?.work;
422
325
  if (!r) {
423
326
  let { summarizePublishWork: n } = await import("@seedprotocol/sdk");
424
327
  r = await n(e, { publishMode: t?.publishMode });
425
328
  }
426
- let i = t?.rates ?? await fn();
427
- return vn(r, i, n);
329
+ let i = t?.rates ?? await U();
330
+ return G(r, i, n);
428
331
  }
429
332
  //#endregion
430
333
  //#region src/services/publishCost/watchPublishCost.ts
431
- var bn = 6e4, xn = 15e3;
432
- function Sn(e) {
334
+ var mn = 6e4, hn = 15e3;
335
+ function gn(e) {
433
336
  let t = e.getService().getSnapshot(), n = (t && typeof t == "object" && "context" in t ? t.context : void 0)?.propertyValue ?? e.value;
434
337
  return `${e.propertyName}:${e.uid ?? ""}:${String(n ?? "")}`;
435
338
  }
436
- function Cn(e) {
339
+ function K(e) {
437
340
  let t = e.properties ?? [];
438
341
  return [
439
342
  e.seedLocalId,
440
343
  e.seedUid ?? "",
441
344
  e.latestVersionLocalId ?? "",
442
- ...t.map(Sn)
345
+ ...t.map(gn)
443
346
  ].join("|");
444
347
  }
445
- function wn(e) {
348
+ function _n(e) {
446
349
  return e instanceof Error ? e : Error(String(e));
447
350
  }
448
- function Tn(e, t, n) {
449
- let r = n?.priceRefreshMs ?? bn, i = n?.itemIdleMs ?? xn, a = n?.estimate ?? ((e) => yn(e, n)), o = n?.reprice ?? (async (e) => {
450
- let t = await fn({ forceRefresh: !0 });
451
- return vn(e.work, t, {
351
+ function vn(e, t, n) {
352
+ let r = n?.priceRefreshMs ?? mn, i = n?.itemIdleMs ?? hn, a = n?.estimate ?? ((e) => pn(e, n)), o = n?.reprice ?? (async (e) => {
353
+ let t = await U({ forceRefresh: !0 });
354
+ return G(e.work, t, {
452
355
  evmUserPays: e.evm.userPays,
453
356
  arweavePath: e.arweave.path
454
357
  });
455
- }), s = !1, c = Cn(e), l = null, u = !1, d = !1, f = null, p = 0, m = null, h = null, g = () => {
358
+ }), s = !1, c = K(e), l = null, u = !1, d = !1, f = null, p = 0, m = null, h = null, g = () => {
456
359
  s || t({
457
360
  estimate: l,
458
361
  isEstimating: u,
459
362
  isStale: d,
460
363
  error: f,
461
- refresh: y
364
+ refresh: te
462
365
  });
463
366
  }, _ = async () => {
464
367
  let t = ++p;
@@ -466,23 +369,23 @@ function Tn(e, t, n) {
466
369
  try {
467
370
  let n = await a(e);
468
371
  if (s || t !== p) return;
469
- l = n, c = Cn(e), d = !1, u = !1, f = null, g();
372
+ l = n, c = K(e), d = !1, u = !1, f = null, g();
470
373
  } catch (e) {
471
374
  if (s || t !== p) return;
472
- u = !1, f = wn(e), g();
375
+ u = !1, f = _n(e), g();
473
376
  }
474
- }, v = () => {
377
+ }, ee = () => {
475
378
  l && (d = !0), i <= 0 ? _() : (m && clearTimeout(m), m = setTimeout(() => {
476
379
  m = null, _();
477
380
  }, i), g());
478
- }, y = () => {
381
+ }, te = () => {
479
382
  m &&= (clearTimeout(m), null), _();
480
383
  };
481
384
  _();
482
- let ee = e.subscribe(() => {
385
+ let ne = e.subscribe(() => {
483
386
  if (s) return;
484
- let t = Cn(e);
485
- t !== c && (c = t, v());
387
+ let t = K(e);
388
+ t !== c && (c = t, ee());
486
389
  });
487
390
  return r > 0 && (h = setInterval(() => {
488
391
  s || !l || u || (async () => {
@@ -492,44 +395,44 @@ function Tn(e, t, n) {
492
395
  l = e, g();
493
396
  } catch (e) {
494
397
  if (s) return;
495
- f = wn(e), g();
398
+ f = _n(e), g();
496
399
  }
497
400
  })();
498
401
  }, r)), {
499
- refresh: y,
402
+ refresh: te,
500
403
  dispose: () => {
501
- s = !0, ee.unsubscribe(), m && clearTimeout(m), h && clearInterval(h);
404
+ s = !0, ne.unsubscribe(), m && clearTimeout(m), h && clearInterval(h);
502
405
  }
503
406
  };
504
407
  }
505
408
  //#endregion
506
409
  //#region src/helpers/publishDisplayHelpers.ts
507
- function En(e) {
410
+ function yn(e) {
508
411
  return e === "creatingAttestationsDirectToEas" ? "creatingAttestations" : e;
509
412
  }
510
- function Dn(e, t, n) {
413
+ function bn(e, t, n) {
511
414
  if (e != null) return n;
512
- if (t?.status === "completed") return S.SUCCESS;
513
- if (t?.status === "failed") return S.FAILURE;
415
+ if (t?.status === "completed") return c.SUCCESS;
416
+ if (t?.status === "failed") return c.FAILURE;
514
417
  if (t?.status !== "interrupted") return n;
515
418
  }
516
- function On(e) {
419
+ function xn(e) {
517
420
  if (e) {
518
- if (e.status === "failed") return S.FAILURE;
519
- if (e.status === "completed") return S.SUCCESS;
421
+ if (e.status === "failed") return c.FAILURE;
422
+ if (e.status === "completed") return c.SUCCESS;
520
423
  if (e.status !== "interrupted") {
521
424
  if (e.completedAt != null) {
522
425
  try {
523
426
  let t = JSON.parse(e.persistedSnapshot);
524
- if (t.status === "done" && t.value === S.FAILURE) return S.FAILURE;
427
+ if (t.status === "done" && t.value === c.FAILURE) return c.FAILURE;
525
428
  } catch {}
526
- return S.SUCCESS;
429
+ return c.SUCCESS;
527
430
  }
528
431
  try {
529
432
  let t = JSON.parse(e.persistedSnapshot);
530
433
  if (t.status === "done") {
531
- if (t.value === S.SUCCESS) return S.SUCCESS;
532
- if (t.value === S.FAILURE) return S.FAILURE;
434
+ if (t.value === c.SUCCESS) return c.SUCCESS;
435
+ if (t.value === c.FAILURE) return c.FAILURE;
533
436
  }
534
437
  if (typeof t.value == "string") return t.value;
535
438
  } catch {
@@ -540,36 +443,36 @@ function On(e) {
540
443
  }
541
444
  //#endregion
542
445
  //#region src/hooks/usePublishProcess.ts
543
- function kn(e) {
544
- return !e || e.status !== "done" ? !1 : e.value === S.SUCCESS || e.value === S.FAILURE;
446
+ function Sn(e) {
447
+ return !e || e.status !== "done" ? !1 : e.value === c.SUCCESS || e.value === c.FAILURE;
545
448
  }
546
- function An(e) {
547
- let t = Re.getService(), n = Ut(t, (t) => t?.context?.publishProcesses?.get(e) ?? null), r = At(null);
548
- N(() => {
449
+ function Cn(e) {
450
+ let t = je.getService(), n = Ut(t, (t) => t?.context?.publishProcesses?.get(e) ?? null), r = pt(null);
451
+ E(() => {
549
452
  r.current = null;
550
453
  }, [e]);
551
- let [i, a] = F(void 0), [o, s] = F(null), c = T.getAppDb(), l = P(() => e && c ? c.select().from(D).where(V(D.seedLocalId, e)).orderBy(B(D.startedAt)).limit(1) : null, [c, e]), u = L(l)?.[0], d = u?.status, f = P(() => {
454
+ let [i, a] = O(void 0), [o, s] = O(null), l = S.getAppDb(), u = D(() => e && l ? l.select().from(C).where(A(C.seedLocalId, e)).orderBy(k(C.startedAt)).limit(1) : null, [l, e]), d = I(u)?.[0], f = d?.status, p = D(() => {
552
455
  if (n != null) return i;
553
456
  if (o === "success" || o === "failure") return o;
554
- let e = On(u);
555
- return e === S.SUCCESS || e === S.FAILURE ? e : Dn(n, d == null ? void 0 : { status: d }, i);
457
+ let e = xn(d);
458
+ return e === c.SUCCESS || e === c.FAILURE ? e : bn(n, f == null ? void 0 : { status: f }, i);
556
459
  }, [
557
460
  n,
558
- d,
461
+ f,
559
462
  i,
560
463
  o,
561
- u
464
+ d
562
465
  ]);
563
- return N(() => {
466
+ return E(() => {
564
467
  s(null);
565
- }, [e]), N(() => {
566
- n ?? (d === "completed" ? s("success") : d === "failed" && s("failure"));
567
- }, [d, n]), N(() => {
468
+ }, [e]), E(() => {
469
+ n ?? (f === "completed" ? s("success") : f === "failed" && s("failure"));
470
+ }, [f, n]), E(() => {
568
471
  n != null && s(null);
569
- }, [n]), N(() => {
472
+ }, [n]), E(() => {
570
473
  if (!n) {
571
474
  let e = r.current;
572
- kn(e) ? (a(e.value), e.value === S.SUCCESS ? s("success") : e.value === S.FAILURE && s("failure")) : a(void 0);
475
+ Sn(e) ? (a(e.value), e.value === c.SUCCESS ? s("success") : e.value === c.FAILURE && s("failure")) : a(void 0);
573
476
  return;
574
477
  }
575
478
  let e = n.getSnapshot();
@@ -588,22 +491,22 @@ function An(e) {
588
491
  };
589
492
  }, [n, e]), {
590
493
  publishProcess: n ?? null,
591
- value: f
494
+ value: p
592
495
  };
593
496
  }
594
497
  //#endregion
595
498
  //#region src/hooks/useCanPublishItem.ts
596
- function jn(e) {
597
- let [t, n] = F(!0);
598
- return N(() => {
599
- e ? $e(e).then(n).catch(() => n(!1)) : n(!1);
499
+ function wn(e) {
500
+ let [t, n] = O(!0);
501
+ return E(() => {
502
+ e ? at(e).then(n).catch(() => n(!1)) : n(!1);
600
503
  }, [e?.seedLocalId]), t;
601
504
  }
602
505
  //#endregion
603
506
  //#region src/hooks/useArweaveL1Finalize.ts
604
- function Mn(e) {
605
- let t = T.getAppDb(), n = P(() => e && t ? t.select().from(E).where(V(E.seedLocalId, e)).orderBy(B(E.updatedAt)) : null, [t, e]), r = L(n) ?? [];
606
- return P(() => {
507
+ function Tn(e) {
508
+ let t = S.getAppDb(), n = D(() => e && t ? t.select().from(it).where(A(it.seedLocalId, e)).orderBy(k(it.updatedAt)) : null, [t, e]), r = I(n) ?? [];
509
+ return D(() => {
607
510
  let e = r.filter((e) => e.phase === "pending_l1").length, t = r.filter((e) => e.phase === "confirmed").length;
608
511
  return {
609
512
  hasPendingL1: e > 0,
@@ -615,8 +518,8 @@ function Mn(e) {
615
518
  }
616
519
  //#endregion
617
520
  //#region src/hooks/useItemPublishStatus.ts
618
- function Nn(e) {
619
- let { publishProcess: t, value: n } = An(e ?? ""), r = Mn(e), i = T.getAppDb(), a = P(() => e && i ? i.select().from(D).where(V(D.seedLocalId, e)).orderBy(B(D.startedAt)).limit(1) : null, [i, e]), o = L(a)?.[0];
521
+ function En(e) {
522
+ let { publishProcess: t, value: n } = Cn(e ?? ""), r = Tn(e), i = S.getAppDb(), a = D(() => e && i ? i.select().from(C).where(A(C.seedLocalId, e)).orderBy(k(C.startedAt)).limit(1) : null, [i, e]), o = I(a)?.[0];
620
523
  return {
621
524
  latestRecord: o,
622
525
  publishProcess: t,
@@ -629,44 +532,44 @@ function Nn(e) {
629
532
  }
630
533
  //#endregion
631
534
  //#region src/hooks/usePublishProcesses.ts
632
- function Pn() {
633
- let e = T.getAppDb();
634
- return P(() => e ? e.select().from(D).orderBy(B(D.startedAt)) : null, [e]);
535
+ function Dn() {
536
+ let e = S.getAppDb();
537
+ return D(() => e ? e.select().from(C).orderBy(k(C.startedAt)) : null, [e]);
635
538
  }
636
- function Fn(e) {
637
- let t = T.getAppDb();
638
- return P(() => t && e ? t.select().from(D).where(V(D.seedLocalId, e)).orderBy(B(D.startedAt)) : null, [t, e]);
539
+ function On(e) {
540
+ let t = S.getAppDb();
541
+ return D(() => t && e ? t.select().from(C).where(A(C.seedLocalId, e)).orderBy(k(C.startedAt)) : null, [t, e]);
639
542
  }
640
- function In() {
641
- let e = Pn(), t = L(e);
543
+ function kn() {
544
+ let e = Dn(), t = I(e);
642
545
  return {
643
546
  records: t,
644
- nonActiveCount: P(() => t === void 0 ? void 0 : t.filter((e) => e.status !== "in_progress").length, [t])
547
+ nonActiveCount: D(() => t === void 0 ? void 0 : t.filter((e) => e.status !== "in_progress").length, [t])
645
548
  };
646
549
  }
647
- function Ln() {
648
- let e = Pn();
649
- return L(e);
550
+ function An() {
551
+ let e = Dn();
552
+ return I(e);
650
553
  }
651
- function Rn() {
652
- return In().nonActiveCount;
554
+ function jn() {
555
+ return kn().nonActiveCount;
653
556
  }
654
- function zn(e) {
655
- let t = Fn(e);
656
- return L(t);
557
+ function Mn(e) {
558
+ let t = On(e);
559
+ return I(t);
657
560
  }
658
- function Bn(e) {
659
- let t = Fn(e), n = L(t);
561
+ function Nn(e) {
562
+ let t = On(e), n = I(t);
660
563
  return {
661
564
  records: n,
662
- nonActiveCount: P(() => n === void 0 ? void 0 : n.filter((e) => e.status !== "in_progress").length, [n])
565
+ nonActiveCount: D(() => n === void 0 ? void 0 : n.filter((e) => e.status !== "in_progress").length, [n])
663
566
  };
664
567
  }
665
- function Vn(e) {
666
- return Bn(e).nonActiveCount;
568
+ function Pn(e) {
569
+ return Nn(e).nonActiveCount;
667
570
  }
668
- function Hn(e) {
669
- let t = T.getAppDb(), n = P(() => e != null && t ? t.select().from(D).where(V(D.id, e)).limit(1) : null, [t, e]), r = L(n), i = r === void 0;
571
+ function Fn(e) {
572
+ let t = S.getAppDb(), n = D(() => e != null && t ? t.select().from(C).where(A(C.id, e)).limit(1) : null, [t, e]), r = I(n), i = r === void 0;
670
573
  return {
671
574
  record: r && r.length > 0 ? r[0] : null,
672
575
  isLoading: i
@@ -674,45 +577,45 @@ function Hn(e) {
674
577
  }
675
578
  //#endregion
676
579
  //#region src/hooks/clearCompletedPublishProcesses.ts
677
- async function Un() {
678
- let e = T.getAppDb();
679
- e && await e.delete(D).where(Ht(D.status, ["in_progress"]));
580
+ async function In() {
581
+ let e = S.getAppDb();
582
+ e && await e.delete(C).where(gt(C.status, ["in_progress"]));
680
583
  }
681
- async function Wn(e) {
682
- let t = T.getAppDb();
683
- t && await t.delete(D).where(Bt(V(D.seedLocalId, e), Ht(D.status, ["in_progress"])));
584
+ async function Ln(e) {
585
+ let t = S.getAppDb();
586
+ t && await t.delete(C).where(mt(A(C.seedLocalId, e), gt(C.status, ["in_progress"])));
684
587
  }
685
- async function Gn() {
686
- let e = T.getAppDb();
687
- e && await e.delete(D);
588
+ async function Rn() {
589
+ let e = S.getAppDb();
590
+ e && await e.delete(C);
688
591
  }
689
- async function Kn() {
690
- let e = T.getAppDb();
691
- e && await e.delete(et);
592
+ async function zn() {
593
+ let e = S.getAppDb();
594
+ e && await e.delete(ot);
692
595
  }
693
- async function qn(e) {
694
- let t = T.getAppDb();
695
- t && await t.delete(D).where(V(D.seedLocalId, e));
596
+ async function Bn(e) {
597
+ let t = S.getAppDb();
598
+ t && await t.delete(C).where(A(C.seedLocalId, e));
696
599
  }
697
- async function Jn(e) {
698
- let t = T.getAppDb();
699
- t && await t.delete(D).where(V(D.id, e));
600
+ async function Vn(e) {
601
+ let t = S.getAppDb();
602
+ t && await t.delete(C).where(A(C.id, e));
700
603
  }
701
- async function Yn(e) {
604
+ async function Hn(e) {
702
605
  if (e.length === 0) return;
703
- let t = T.getAppDb();
704
- t && await t.delete(D).where(Vt(D.id, e));
606
+ let t = S.getAppDb();
607
+ t && await t.delete(C).where(ht(C.id, e));
705
608
  }
706
609
  //#endregion
707
610
  //#region src/hooks/publishProcessHelpers.ts
708
- function Xn(e) {
611
+ function Un(e) {
709
612
  try {
710
613
  return (JSON.parse(e.persistedSnapshot).context?.arweaveTransactions ?? []).map((e) => e.transaction?.id).filter((e) => typeof e == "string");
711
614
  } catch {
712
615
  return [];
713
616
  }
714
617
  }
715
- function Zn(e) {
618
+ function Wn(e) {
716
619
  try {
717
620
  return JSON.parse(e.persistedSnapshot).context?.easPayload ?? void 0;
718
621
  } catch {
@@ -721,14 +624,14 @@ function Zn(e) {
721
624
  }
722
625
  //#endregion
723
626
  //#region src/hooks/usePublishCostEstimate.ts
724
- function Qn(e, t) {
725
- let [n, r] = F(null), [i, a] = F(!1), [o, s] = F(!1), [c, l] = F(null), u = At(() => {}), d = t?.publishMode, f = t?.priceRefreshMs, p = t?.itemIdleMs;
726
- return N(() => {
627
+ function Gn(e, t) {
628
+ let [n, r] = O(null), [i, a] = O(!1), [o, s] = O(!1), [c, l] = O(null), u = pt(() => {}), d = t?.publishMode, f = t?.priceRefreshMs, p = t?.itemIdleMs;
629
+ return E(() => {
727
630
  if (!e) {
728
631
  r(null), a(!1), s(!1), l(null), u.current = () => {};
729
632
  return;
730
633
  }
731
- let n = Tn(e, (e) => {
634
+ let n = vn(e, (e) => {
732
635
  r(e.estimate), a(e.isEstimating), s(e.isStale), l(e.error), u.current = e.refresh;
733
636
  }, t);
734
637
  return () => {
@@ -745,58 +648,20 @@ function Qn(e, t) {
745
648
  isEstimating: i,
746
649
  isStale: o,
747
650
  error: c,
748
- refresh: kt(() => {
651
+ refresh: T(() => {
749
652
  u.current();
750
653
  }, [])
751
654
  };
752
655
  }
753
656
  //#endregion
754
- //#region src/helpers/ensureWalletThenPublish.ts
755
- function $n(e) {
756
- if (e) {
757
- if (e instanceof at.Wallet) return e;
758
- if (i(e)) return e.signer;
759
- if (d(e)) return e;
760
- }
761
- }
762
- async function er(e, t) {
763
- let n = w();
764
- if (n.useModularExecutor) {
765
- let { ensureSmartWalletThenPublish: n } = await import("./ensureSmartWalletThenPublish-42iEhiHG.js").then((e) => e.n);
766
- return n(e, null, async () => {
767
- let e = x();
768
- return e?.publisherAddress ?? e?.signer.address ?? null;
769
- }, t);
770
- }
771
- let r = x();
772
- if (!r) return { outcome: "no_wallet" };
773
- if (n.accountMode === "eip7702" && n.bundlerUrl) {
774
- let e = await U({
775
- signer: r.signer,
776
- bundlerUrl: n.bundlerUrl,
777
- paymasterUrl: n.paymasterUrl
778
- });
779
- r = {
780
- ...r,
781
- txSender: e,
782
- publisherAddress: r.publisherAddress ?? r.signer.address
783
- };
784
- }
785
- let i = r.publisherAddress ?? r.txSender.address ?? r.signer.address;
786
- return i?.trim() ? (Re.createPublish(e, i, r, {
787
- ...t,
788
- dataItemSigner: $n(t?.dataItemSigner) ?? r.signer
789
- }), { outcome: "started" }) : { outcome: "no_address" };
790
- }
791
- //#endregion
792
657
  //#region src/services/domainOwnership/registry.ts
793
- function Y(e) {
658
+ function q(e) {
794
659
  let t = Gt(e);
795
660
  if (!t) throw Error(`@seedprotocol/publish: unable to resolve registrable domain for "${e}"`);
796
661
  return t.toLowerCase();
797
662
  }
798
- async function tr(e) {
799
- let t = Y(e), n = await Wt(t);
663
+ async function J(e) {
664
+ let t = q(e), n = await Wt(t);
800
665
  if (!n.ok || !n.record) return null;
801
666
  let r = n.record;
802
667
  return {
@@ -810,8 +675,8 @@ async function tr(e) {
810
675
  isRegistered: r.isRegistered
811
676
  };
812
677
  }
813
- function nr(e) {
814
- return Tt({
678
+ function Kn(e) {
679
+ return It({
815
680
  domain: e.domain,
816
681
  creationDate: e.creationDate ?? "",
817
682
  registrarIanaId: e.registrarIanaId ?? ""
@@ -819,36 +684,36 @@ function nr(e) {
819
684
  }
820
685
  //#endregion
821
686
  //#region src/services/domainOwnership/challenge.ts
822
- function rr(e) {
687
+ function qn(e) {
823
688
  let t = new Uint8Array(e);
824
689
  return crypto.getRandomValues(t), t;
825
690
  }
826
- function ir(e) {
691
+ function Jn(e) {
827
692
  let t = "";
828
693
  for (let n of e) t += String.fromCharCode(n);
829
694
  return btoa(t).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/g, "");
830
695
  }
831
- function ar(e) {
832
- let t = e.normalizeRegistrable === !1 ? e.domain.trim().toLowerCase().replace(/\.$/, "") : Y(e.domain);
696
+ function Yn(e) {
697
+ let t = e.normalizeRegistrable === !1 ? e.domain.trim().toLowerCase().replace(/\.$/, "") : q(e.domain);
833
698
  if (!t || t.includes(" ")) throw Error("@seedprotocol/publish: createDomainOwnershipChallenge requires a valid domain");
834
699
  let n = e.claimer.trim();
835
700
  if (!/^0x[0-9a-fA-F]{40}$/.test(n)) throw Error("@seedprotocol/publish: createDomainOwnershipChallenge requires a 20-byte hex claimer address");
836
- let r = e.scope ?? pt, i = e.ttlMs ?? ot, a = e.now ?? Date.now(), o = new Date(a + i).toISOString(), s = ir(rr(32)), c = wt({
701
+ let r = e.scope ?? wt, i = e.ttlMs ?? _t, a = e.now ?? Date.now(), o = new Date(a + i).toISOString(), s = Jn(qn(32)), c = Ft({
837
702
  domain: t,
838
703
  claimer: n,
839
704
  token: s,
840
705
  scope: r
841
- }), l = xt(t), u = yt({
706
+ }), l = Mt(t), u = At({
842
707
  token: s,
843
708
  claimer: n,
844
709
  expiry: o
845
710
  });
846
711
  return {
847
- challengeId: ir(rr(16)),
712
+ challengeId: Jn(qn(16)),
848
713
  domain: t,
849
714
  claimer: n,
850
715
  scope: r,
851
- method: lt,
716
+ method: bt,
852
717
  token: s,
853
718
  txtName: l,
854
719
  txtValue: u,
@@ -859,14 +724,14 @@ function ar(e) {
859
724
  }
860
725
  //#endregion
861
726
  //#region src/services/domainOwnership/dnsVerify.ts
862
- async function or(e) {
727
+ async function Xn(e) {
863
728
  let { promises: t } = await import("node:dns");
864
729
  return {
865
730
  source: "node:dns",
866
731
  values: (await t.resolveTxt(e)).map((e) => e.join(""))
867
732
  };
868
733
  }
869
- async function sr(e, t, n) {
734
+ async function Zn(e, t, n) {
870
735
  let r = `${n}?name=${encodeURIComponent(e)}&type=TXT`, i = await fetch(r, { headers: { accept: "application/dns-json" } });
871
736
  if (!i.ok) throw Error(`DoH ${t} HTTP ${i.status}`);
872
737
  let a = await i.json();
@@ -876,20 +741,20 @@ async function sr(e, t, n) {
876
741
  dnssecAuthenticated: !!a.AD
877
742
  };
878
743
  }
879
- function cr() {
880
- let e = [(e) => sr(e, "cloudflare-doh", "https://cloudflare-dns.com/dns-query"), (e) => sr(e, "google-doh", "https://dns.google/resolve")];
881
- return typeof document > "u" && e.unshift((e) => or(e)), e;
744
+ function Qn() {
745
+ let e = [(e) => Zn(e, "cloudflare-doh", "https://cloudflare-dns.com/dns-query"), (e) => Zn(e, "google-doh", "https://dns.google/resolve")];
746
+ return typeof document > "u" && e.unshift((e) => Xn(e)), e;
882
747
  }
883
- function lr(e, t) {
884
- let n = Ot(t);
748
+ function $n(e, t) {
749
+ let n = zt(t);
885
750
  for (let r of e) {
886
751
  if (r === t || r.replace(/^"|"$/g, "") === t) return !0;
887
- let e = Ot(r);
752
+ let e = zt(r);
888
753
  if (n && e && e.token === n.token && e.claimer === n.claimer) return !0;
889
754
  }
890
755
  return !1;
891
756
  }
892
- async function ur(e, t) {
757
+ async function er(e, t) {
893
758
  let n = t?.now ?? Date.now();
894
759
  if (Date.parse(e.expiresAt) <= n) return {
895
760
  ok: !1,
@@ -897,7 +762,7 @@ async function ur(e, t) {
897
762
  lookups: [],
898
763
  error: "Challenge expired"
899
764
  };
900
- let r = yt({
765
+ let r = At({
901
766
  token: e.token,
902
767
  claimer: e.claimer,
903
768
  expiry: e.expiresAt
@@ -908,11 +773,11 @@ async function ur(e, t) {
908
773
  lookups: [],
909
774
  error: "Challenge txtValue does not match token/claimer/expiry"
910
775
  };
911
- let i = t?.lookups ?? cr(), a = t?.quorum ?? 2, o = [], s = [], c = !1;
776
+ let i = t?.lookups ?? Qn(), a = t?.quorum ?? 2, o = [], s = [], c = !1;
912
777
  await Promise.all(i.map(async (t) => {
913
778
  try {
914
779
  let n = await t(e.txtName);
915
- o.push(n), lr(n.values, r) && (s.push(n.source), n.dnssecAuthenticated && (c = !0));
780
+ o.push(n), $n(n.values, r) && (s.push(n.source), n.dnssecAuthenticated && (c = !0));
916
781
  } catch {
917
782
  o.push({
918
783
  source: "error",
@@ -930,32 +795,32 @@ async function ur(e, t) {
930
795
  }
931
796
  //#endregion
932
797
  //#region src/services/domainOwnership/index.ts
933
- var dr = "0x0000000000000000000000000000000000000000", fr = !0;
934
- function pr(e) {
935
- if (i(e)) return e.txSender;
936
- if (C(e)) return e;
798
+ var tr = "0x0000000000000000000000000000000000000000", nr = !0;
799
+ function Y(e) {
800
+ if (x(e)) return e.txSender;
801
+ if (y(e)) return e;
937
802
  throw Error("@seedprotocol/publish: domain ownership write APIs require a PublishWallet or SeedTxSender");
938
803
  }
939
804
  async function X(e, t) {
940
805
  let n = await e.sendTransaction(t);
941
- return b(n.transactionHash);
806
+ return p(n.transactionHash);
942
807
  }
943
808
  function Z() {
944
- return zt.getSchemaUID(k, dr, fr);
945
- }
946
- async function mr(e) {
947
- let t = pr(e), n = Z();
948
- return await Me(n) || (await X(t, ke({
949
- schema: k,
950
- resolverAddress: dr,
951
- revocable: fr
952
- })), await X(t, Ae({
809
+ return ft.getSchemaUID(j, tr, nr);
810
+ }
811
+ async function rr(e) {
812
+ let t = Y(e), n = Z();
813
+ return await He(n) || (await X(t, de({
814
+ schema: j,
815
+ resolverAddress: tr,
816
+ revocable: nr
817
+ })), await X(t, Re({
953
818
  schemaUid: n,
954
- schemaName: ft
819
+ schemaName: Ct
955
820
  }))), n;
956
821
  }
957
- function hr(e) {
958
- return new Rt(k).encodeData([
822
+ function ir(e) {
823
+ return new dt(j).encodeData([
959
824
  {
960
825
  name: "domain",
961
826
  value: e.domain,
@@ -973,7 +838,7 @@ function hr(e) {
973
838
  },
974
839
  {
975
840
  name: "challengeHash",
976
- value: M(e.challengeHash),
841
+ value: P(e.challengeHash),
977
842
  type: "bytes32"
978
843
  },
979
844
  {
@@ -993,7 +858,7 @@ function hr(e) {
993
858
  },
994
859
  {
995
860
  name: "registryFingerprint",
996
- value: M(e.registryFingerprint),
861
+ value: P(e.registryFingerprint),
997
862
  type: "bytes32"
998
863
  },
999
864
  {
@@ -1003,76 +868,76 @@ function hr(e) {
1003
868
  }
1004
869
  ]);
1005
870
  }
1006
- function gr(e) {
871
+ function ar(e) {
1007
872
  if (typeof e.override == "number" && e.override > 0) return e.override;
1008
873
  if (e.registryExpirationDate) {
1009
874
  let t = Date.parse(e.registryExpirationDate);
1010
875
  if (Number.isFinite(t) && t > 0) return Math.floor(t / 1e3);
1011
876
  }
1012
- return e.verifiedAt + st;
877
+ return e.verifiedAt + vt;
1013
878
  }
1014
- async function _r(e) {
1015
- let t = pr(e.wallet), n = e.ensureSchema === !1 ? Z() : await mr(e.wallet), r = Y(e.domain), i = e.claimer.trim();
879
+ async function or(e) {
880
+ let t = Y(e.wallet), n = e.ensureSchema === !1 ? Z() : await rr(e.wallet), r = q(e.domain), i = e.claimer.trim();
1016
881
  if (!/^0x[0-9a-fA-F]{40}$/.test(i)) throw Error("@seedprotocol/publish: attestDomainOwnership requires a valid claimer address");
1017
- let a = M(e.challengeHash);
1018
- if (a === z) throw Error("@seedprotocol/publish: attestDomainOwnership requires a non-zero challengeHash");
1019
- let o = e.verifiedAt ?? Math.floor(Date.now() / 1e3), c = nr({
882
+ let a = P(e.challengeHash);
883
+ if (a === w) throw Error("@seedprotocol/publish: attestDomainOwnership requires a non-zero challengeHash");
884
+ let o = e.verifiedAt ?? Math.floor(Date.now() / 1e3), s = Kn({
1020
885
  domain: r,
1021
886
  creationDate: e.registrySnapshot.creationDate ?? "",
1022
887
  registrarIanaId: e.registrySnapshot.registrarIanaId ?? ""
1023
- }), l = e.registrySnapshot.creationDate ?? "", u = e.registrySnapshot.expirationDate ?? "", d = e.scope ?? pt, f = e.method ?? lt, m = gr({
888
+ }), c = e.registrySnapshot.creationDate ?? "", l = e.registrySnapshot.expirationDate ?? "", u = e.scope ?? wt, d = e.method ?? bt, f = ar({
1024
889
  verifiedAt: o,
1025
- registryExpirationDate: u,
890
+ registryExpirationDate: l,
1026
891
  override: e.expirationTime
1027
- }), h = hr({
892
+ }), p = ir({
1028
893
  domain: r,
1029
894
  claimer: i,
1030
- method: f,
895
+ method: d,
1031
896
  challengeHash: a,
1032
897
  verifiedAt: o,
1033
- registryCreationDate: l,
1034
- registryExpirationDate: u,
1035
- registryFingerprint: c,
1036
- scope: d
1037
- }), g = await X(t, p({
898
+ registryCreationDate: c,
899
+ registryExpirationDate: l,
900
+ registryFingerprint: s,
901
+ scope: u
902
+ }), m = await X(t, ze({
1038
903
  schema: n,
1039
904
  data: {
1040
905
  recipient: i,
1041
- expirationTime: BigInt(m),
906
+ expirationTime: BigInt(f),
1042
907
  revocable: !0,
1043
- refUID: z,
1044
- data: h,
908
+ refUID: w,
909
+ data: p,
1045
910
  value: 0n
1046
911
  }
1047
912
  }));
1048
- if (!g) throw Error("@seedprotocol/publish: attestDomainOwnership failed — no receipt");
1049
- let { easContractAddress: _ } = w(), v = s(g, _);
1050
- if (!v || !j(v)) throw Error("@seedprotocol/publish: attestDomainOwnership failed — could not parse attestation UID");
913
+ if (!m) throw Error("@seedprotocol/publish: attestDomainOwnership failed — no receipt");
914
+ let { easContractAddress: h } = v(), g = le(m, h);
915
+ if (!g || !N(g)) throw Error("@seedprotocol/publish: attestDomainOwnership failed — could not parse attestation UID");
1051
916
  return {
1052
- uid: v,
917
+ uid: g,
1053
918
  schemaUid: n,
1054
919
  challengeHash: a,
1055
- registryFingerprint: c,
920
+ registryFingerprint: s,
1056
921
  verifiedAt: o,
1057
- expirationTime: m
922
+ expirationTime: f
1058
923
  };
1059
924
  }
1060
- async function vr(e) {
1061
- let t = pr(e.wallet), r = e.schemaUid ?? Z(), i = M(e.uid);
1062
- if (!j(i)) throw Error("@seedprotocol/publish: revokeDomainOwnership requires a valid attestation uid");
1063
- if (!await X(t, n([{
1064
- schema: r,
1065
- data: [{ uid: i }]
925
+ async function sr(e) {
926
+ let t = Y(e.wallet), n = e.schemaUid ?? Z(), r = P(e.uid);
927
+ if (!N(r)) throw Error("@seedprotocol/publish: revokeDomainOwnership requires a valid attestation uid");
928
+ if (!await X(t, Ue([{
929
+ schema: n,
930
+ data: [{ uid: r }]
1066
931
  }]))) throw Error("@seedprotocol/publish: revokeDomainOwnership failed — no receipt");
1067
932
  }
1068
- async function yr(e) {
1069
- let { challenge: t } = e, n = wt({
933
+ async function cr(e) {
934
+ let { challenge: t } = e, n = Ft({
1070
935
  domain: t.domain,
1071
936
  claimer: t.claimer,
1072
937
  token: t.token,
1073
938
  scope: t.scope
1074
939
  });
1075
- if (M(n) !== M(t.challengeHash)) return {
940
+ if (P(n) !== P(t.challengeHash)) return {
1076
941
  ok: !1,
1077
942
  dns: {
1078
943
  ok: !1,
@@ -1084,7 +949,7 @@ async function yr(e) {
1084
949
  challengeHash: n,
1085
950
  error: "Challenge hash does not match domain/claimer/token/scope"
1086
951
  };
1087
- let r = await ur(t, {
952
+ let r = await er(t, {
1088
953
  lookups: e.dnsLookups,
1089
954
  now: e.now
1090
955
  });
@@ -1095,7 +960,7 @@ async function yr(e) {
1095
960
  challengeHash: n,
1096
961
  error: r.error ?? "DNS verification failed"
1097
962
  };
1098
- let i = e.registryLookup ?? tr, a;
963
+ let i = e.registryLookup ?? J, a;
1099
964
  try {
1100
965
  a = await i(t.domain);
1101
966
  } catch {
@@ -1114,8 +979,8 @@ async function yr(e) {
1114
979
  error: "Registry lookup failed"
1115
980
  };
1116
981
  }
1117
- async function br(e) {
1118
- let t = await yr({
982
+ async function lr(e) {
983
+ let t = await cr({
1119
984
  challenge: e.challenge,
1120
985
  dnsLookups: e.dnsLookups,
1121
986
  registryLookup: e.registryLookup,
@@ -1123,7 +988,7 @@ async function br(e) {
1123
988
  });
1124
989
  if (!t.ok || !t.registrySnapshot) throw Error(`@seedprotocol/publish: verifyAndAttestDomainOwnership failed — ${t.error ?? "verification failed"}`);
1125
990
  return {
1126
- ...await _r({
991
+ ...await or({
1127
992
  wallet: e.wallet,
1128
993
  domain: e.challenge.domain,
1129
994
  claimer: e.challenge.claimer,
@@ -1137,21 +1002,21 @@ async function br(e) {
1137
1002
  dns: t.dns
1138
1003
  };
1139
1004
  }
1140
- async function xr(e) {
1141
- let t = (await St({
1005
+ async function ur(e) {
1006
+ let t = (await Nt({
1142
1007
  toolAddresses: e.toolAddresses,
1143
1008
  schemaUid: e.schemaUid,
1144
1009
  excludeRevoked: !0
1145
- })).find((t) => M(t.id) === M(e.uid));
1010
+ })).find((t) => P(t.id) === P(e.uid));
1146
1011
  if (!t) throw Error("@seedprotocol/publish: assessDomainOwnershipLive could not find attestation for uid/toolAddresses");
1147
- let n = bt(t.decodedDataJson ?? "[]"), r = e.registryLookup ?? tr, i;
1012
+ let n = jt(t.decodedDataJson ?? "[]"), r = e.registryLookup ?? J, i;
1148
1013
  try {
1149
1014
  i = await r(n.domain);
1150
1015
  } catch {
1151
1016
  i = null;
1152
1017
  }
1153
1018
  return {
1154
- ...vt({
1019
+ ...kt({
1155
1020
  decoded: n,
1156
1021
  registrySnapshot: i,
1157
1022
  now: e.now
@@ -1163,50 +1028,50 @@ async function xr(e) {
1163
1028
  }
1164
1029
  //#endregion
1165
1030
  //#region src/services/publishedBy/index.ts
1166
- var Sr = "0x0000000000000000000000000000000000000000", Cr = !0;
1167
- function wr(e) {
1168
- if (i(e)) return e.txSender;
1169
- if (C(e)) return e;
1031
+ var dr = "0x0000000000000000000000000000000000000000", fr = !0;
1032
+ function pr(e) {
1033
+ if (x(e)) return e.txSender;
1034
+ if (y(e)) return e;
1170
1035
  throw Error("@seedprotocol/publish: attestPublishedBy / revokePublishedBy require a PublishWallet or SeedTxSender");
1171
1036
  }
1172
1037
  async function Q(e, t) {
1173
1038
  let n = await e.sendTransaction(t);
1174
- return b(n.transactionHash);
1039
+ return p(n.transactionHash);
1175
1040
  }
1176
1041
  function $() {
1177
- return zt.getSchemaUID(A, Sr, Cr);
1178
- }
1179
- async function Tr(e) {
1180
- let t = wr(e), n = $();
1181
- return await Me(n) || (await Q(t, ke({
1182
- schema: A,
1183
- resolverAddress: Sr,
1184
- revocable: Cr
1185
- })), await Q(t, Ae({
1042
+ return ft.getSchemaUID(M, dr, fr);
1043
+ }
1044
+ async function mr(e) {
1045
+ let t = pr(e), n = $();
1046
+ return await He(n) || (await Q(t, de({
1047
+ schema: M,
1048
+ resolverAddress: dr,
1049
+ revocable: fr
1050
+ })), await Q(t, Re({
1186
1051
  schemaUid: n,
1187
- schemaName: _t
1052
+ schemaName: Ot
1188
1053
  }))), n;
1189
1054
  }
1190
- function Er(e) {
1191
- return new Rt(A).encodeData([
1055
+ function hr(e) {
1056
+ return new dt(M).encodeData([
1192
1057
  {
1193
1058
  name: "seedUid",
1194
- value: M(e.seedUid),
1059
+ value: P(e.seedUid),
1195
1060
  type: "bytes32"
1196
1061
  },
1197
1062
  {
1198
1063
  name: "versionUid",
1199
- value: M(e.versionUid || z),
1064
+ value: P(e.versionUid || w),
1200
1065
  type: "bytes32"
1201
1066
  },
1202
1067
  {
1203
1068
  name: "attestationUids",
1204
- value: e.attestationUids.map((e) => M(e)),
1069
+ value: e.attestationUids.map((e) => P(e)),
1205
1070
  type: "bytes32[]"
1206
1071
  },
1207
1072
  {
1208
1073
  name: "batchHash",
1209
- value: M(e.batchHash),
1074
+ value: P(e.batchHash),
1210
1075
  type: "bytes32"
1211
1076
  },
1212
1077
  {
@@ -1221,52 +1086,52 @@ function Er(e) {
1221
1086
  }
1222
1087
  ]);
1223
1088
  }
1224
- async function Dr(e) {
1225
- let t = wr(e.wallet), n = e.ensureSchema === !1 ? $() : await Tr(e.wallet), r = [], i;
1226
- if (e.mode === "uids") r = e.attestationUids.map((e) => M(e)).filter((e) => j(e)), i = e.batchHash ? M(e.batchHash) : Dt(r);
1089
+ async function gr(e) {
1090
+ let t = pr(e.wallet), n = e.ensureSchema === !1 ? $() : await mr(e.wallet), r = [], i;
1091
+ if (e.mode === "uids") r = e.attestationUids.map((e) => P(e)).filter((e) => N(e)), i = e.batchHash ? P(e.batchHash) : Rt(r);
1227
1092
  else {
1228
1093
  if (!e.batchHash) throw Error("@seedprotocol/publish: attestPublishedBy hash mode requires batchHash");
1229
- if (i = M(e.batchHash), i === z) throw Error("@seedprotocol/publish: attestPublishedBy hash mode requires a non-zero batchHash");
1094
+ if (i = P(e.batchHash), i === w) throw Error("@seedprotocol/publish: attestPublishedBy hash mode requires a non-zero batchHash");
1230
1095
  }
1231
- let a = M(e.seedUid);
1232
- if (!j(a)) throw Error("@seedprotocol/publish: attestPublishedBy requires a valid seedUid");
1233
- let o = Er({
1096
+ let a = P(e.seedUid);
1097
+ if (!N(a)) throw Error("@seedprotocol/publish: attestPublishedBy requires a valid seedUid");
1098
+ let o = hr({
1234
1099
  seedUid: a,
1235
- versionUid: M(e.versionUid ?? z),
1100
+ versionUid: P(e.versionUid ?? w),
1236
1101
  attestationUids: r,
1237
1102
  batchHash: i,
1238
1103
  toolName: e.toolName,
1239
1104
  toolVersion: e.toolVersion
1240
- }), c = await Q(t, p({
1105
+ }), s = await Q(t, ze({
1241
1106
  schema: n,
1242
1107
  data: {
1243
- recipient: u,
1244
- expirationTime: BigInt(Lt),
1108
+ recipient: ye,
1109
+ expirationTime: BigInt(ut),
1245
1110
  revocable: !0,
1246
1111
  refUID: a,
1247
1112
  data: o,
1248
1113
  value: 0n
1249
1114
  }
1250
1115
  }));
1251
- if (!c) throw Error("@seedprotocol/publish: attestPublishedBy failed — no receipt");
1252
- let { easContractAddress: l } = w(), d = s(c, l);
1253
- if (!d || !j(d)) throw Error("@seedprotocol/publish: attestPublishedBy failed — could not parse attestation UID");
1116
+ if (!s) throw Error("@seedprotocol/publish: attestPublishedBy failed — no receipt");
1117
+ let { easContractAddress: c } = v(), l = le(s, c);
1118
+ if (!l || !N(l)) throw Error("@seedprotocol/publish: attestPublishedBy failed — could not parse attestation UID");
1254
1119
  return {
1255
- uid: d,
1120
+ uid: l,
1256
1121
  schemaUid: n,
1257
1122
  batchHash: i,
1258
1123
  attestationUids: r
1259
1124
  };
1260
1125
  }
1261
- async function Or(e) {
1262
- let t = wr(e.wallet), r = e.schemaUid ?? $(), i = M(e.uid);
1263
- if (!j(i)) throw Error("@seedprotocol/publish: revokePublishedBy requires a valid attestation uid");
1264
- if (!await Q(t, n([{
1265
- schema: r,
1266
- data: [{ uid: i }]
1126
+ async function _r(e) {
1127
+ let t = pr(e.wallet), n = e.schemaUid ?? $(), r = P(e.uid);
1128
+ if (!N(r)) throw Error("@seedprotocol/publish: revokePublishedBy requires a valid attestation uid");
1129
+ if (!await Q(t, Ue([{
1130
+ schema: n,
1131
+ data: [{ uid: r }]
1267
1132
  }]))) throw Error("@seedprotocol/publish: revokePublishedBy failed — no receipt");
1268
1133
  }
1269
1134
  //#endregion
1270
- export { se as AttestationVerificationError, g as DEFAULT_PUBLISH_CHAIN, ct as DOMAIN_OWNERSHIP_METHOD, ut as DOMAIN_OWNERSHIP_SCHEMA_DEF, dt as DOMAIN_OWNERSHIP_SCHEMA_NAME, mt as EAS_CHAIN_DEPLOYMENTS, he as Eip7702ModularAccountPublishError, f as MANAGED_ACCOUNT_FACTORY_ADDRESSES, de as MULTI_PUBLISH_ABI_REFERENCE_ADDRESS_OP_SEPOLIA, pe as ManagedAccountPublishError, ht as PUBLISHED_BY_SCHEMA_DEF, gt as PUBLISHED_BY_SCHEMA_NAME, qe as PUBLISH_AUTHORIZATION_SCHEMA_DEF, Ve as PUBLISH_AUTHORIZATION_SCHEMA_NAME, Ge as PUBLISH_AUTHORIZATION_SCOPES, W as PUBLISH_GAS_HEURISTICS, ie as PublishChainConfigError, Re as PublishManager, qt as PublishModeButtons, Jt as PublishProvider, le as PublishTransactionRevertedError, l as SEED_PROTOCOL_CONTRACT_ADDRESS_OP_SEPOLIA, Mt as SeedProvider, we as asPublishWallet, m as asSeedSigner, r as asSeedTxSender, De as assertExecutorModuleReadyForAccount, Ne as assertManagedAccountEasMatchesConfig, xr as assessDomainOwnershipLive, ze as assessPublishAuthorizationLive, _r as attestDomainOwnership, Pe as attestPublishAuthorization, Dr as attestPublishedBy, We as buildPublishAnchorBytes, Gn as clearAllPublishProcesses, Kn as clearAllUploadProcesses, Un as clearCompletedPublishProcesses, Wn as clearCompletedPublishProcessesForSeed, t as clearPublishWallet, Ze as collectPublishedBatch, vn as combinePublishCostEstimate, ue as configurePublish, ar as createDomainOwnershipChallenge, U as createPermissionlessTxSender, Jn as deletePublishProcessById, Yn as deletePublishProcessesByIds, qn as deletePublishProcessesForSeed, hr as encodeDomainOwnershipAttestationData, o as encodeEasAttest, _ as encodeEasMultiAttest, v as encodeEasMultiRevoke, ge as encodeMultiPublish, Ue as encodePublishAuthorizationAttestationData, Er as encodePublishedByAttestationData, y as encodeSetEas, mr as ensureDomainOwnershipSchema, je as ensureEasSchemasForItem, Ye as ensureManagedAccountEasConfigured, Ke as ensurePublishAuthorizationSchema, Tr as ensurePublishedBySchema, er as ensureWalletThenPublish, yn as estimatePublishCost, nr as fingerprintFromRegistrySnapshot, H as fromEip1193Provider, a as fromEthersWallet, Yt as fromWindowEthereum, Ee as getArweave, Xn as getArweaveTransactionIds, fn as getCachedMarketRates, on as getCachedTokenPrices, En as getDisplayStepId, Z as getDomainOwnershipSchemaUid, Ct as getEasChainDeployment, Zn as getEasPayload, Fe as getPublishAuthorizationSchemaUid, be as getPublishChainName, w as getPublishConfig, On as getPublishMachineValueForUi, ye as getPublishPublicClient, x as getPublishWallet, $ as getPublishedBySchemaUid, Et as hashPublishedByBatch, en as heuristicPublishGas, ve as initPublish, re as isContractDeployed, ce as isEip7702ModularAccountPublishError, ee as isManagedAccountPublishError, i as isPublishWallet, Se as isRouterNonModularCoreAccountError, d as isSeedSigner, C as isSeedTxSender, tr as lookupDomainRegistry, Y as normalizeRegistrableDomain, Le as publishMachine, e as readFactorySeedExecutor, ae as readGetEas, xe as readIsActiveSigner, ne as requireManagedAccountFactoryAddress, pn as resetMarketRateCache, sn as resetTokenPriceCache, Dn as resolvePublishDisplayValue, fe as resolvePublishEasChain, vr as revokeDomainOwnership, Be as revokePublishAuthorization, Or as revokePublishedBy, Kt as seedTwinConfig, c as setPublishWallet, Xe as simulateCallFromAccount, Te as stringifyUnderlyingCause, Qe as uidsFromAttestationPairs, Mn as useArweaveL1Finalize, jn as useCanPublishItem, Nn as useItemPublishStatus, He as usePublishConfig, Qn as usePublishCostEstimate, An as usePublishProcess, Hn as usePublishProcessById, Ln as usePublishProcesses, zn as usePublishProcessesForSeed, Rn as usePublishProcessesNonActiveCount, Vn as usePublishProcessesNonActiveCountForSeed, In as usePublishProcessesState, Bn as usePublishProcessesStateForSeed, $t as useSeedWallet, br as verifyAndAttestDomainOwnership, Oe as verifyDataItem, yr as verifyDomainOwnershipChallenge, ur as verifyDomainOwnershipDns, oe as verifyPublishChain, b as waitForPublishReceipt, Tn as watchPublishCost };
1135
+ export { m as AttestationVerificationError, l as DEFAULT_PUBLISH_CHAIN, yt as DOMAIN_OWNERSHIP_METHOD, xt as DOMAIN_OWNERSHIP_SCHEMA_DEF, St as DOMAIN_OWNERSHIP_SCHEMA_NAME, Tt as EAS_CHAIN_DEPLOYMENTS, s as Eip7702ModularAccountPublishError, ne as MANAGED_ACCOUNT_FACTORY_ADDRESSES, ie as MULTI_PUBLISH_ABI_REFERENCE_ADDRESS_OP_SEPOLIA, u as ManagedAccountPublishError, Et as PUBLISHED_BY_SCHEMA_DEF, Dt as PUBLISHED_BY_SCHEMA_NAME, tt as PUBLISH_AUTHORIZATION_SCHEMA_DEF, Ze as PUBLISH_AUTHORIZATION_SCHEMA_NAME, $e as PUBLISH_AUTHORIZATION_SCOPES, R as PUBLISH_GAS_HEURISTICS, h as PublishChainConfigError, je as PublishManager, qt as PublishModeButtons, Jt as PublishProvider, f as PublishTransactionRevertedError, d as SEED_PROTOCOL_CONTRACT_ADDRESS_OP_SEPOLIA, Vt as SeedProvider, Ce as asPublishWallet, ue as asSeedSigner, Ae as asSeedTxSender, ee as assertExecutorModuleReadyForAccount, be as assertManagedAccountEasMatchesConfig, ur as assessDomainOwnershipLive, Ye as assessPublishAuthorizationLive, or as attestDomainOwnership, Ge as attestPublishAuthorization, gr as attestPublishedBy, oe as buildPublishAnchorBytes, Rn as clearAllPublishProcesses, zn as clearAllUploadProcesses, In as clearCompletedPublishProcesses, Ln as clearCompletedPublishProcessesForSeed, Me as clearPublishWallet, nt as collectPublishedBatch, G as combinePublishCostEstimate, Ne as configurePublish, Yn as createDomainOwnershipChallenge, _e as createPermissionlessTxSender, Vn as deletePublishProcessById, Hn as deletePublishProcessesByIds, Bn as deletePublishProcessesForSeed, ir as encodeDomainOwnershipAttestationData, fe as encodeEasAttest, Ve as encodeEasMultiAttest, _ as encodeEasMultiRevoke, r as encodeMultiPublish, Qe as encodePublishAuthorizationAttestationData, hr as encodePublishedByAttestationData, Be as encodeSetEas, rr as ensureDomainOwnershipSchema, ce as ensureEasSchemasForItem, ve as ensureManagedAccountEasConfigured, et as ensurePublishAuthorizationSchema, mr as ensurePublishedBySchema, he as ensureWalletThenPublish, pn as estimatePublishCost, Kn as fingerprintFromRegistrySnapshot, L as fromEip1193Provider, Ee as fromEthersWallet, Yt as fromWindowEthereum, se as getArweave, Un as getArweaveTransactionIds, U as getCachedMarketRates, nn as getCachedTokenPrices, yn as getDisplayStepId, Z as getDomainOwnershipSchemaUid, Pt as getEasChainDeployment, Wn as getEasPayload, Ke as getPublishAuthorizationSchemaUid, Ie as getPublishChainName, v as getPublishConfig, xn as getPublishMachineValueForUi, we as getPublishPublicClient, b as getPublishWallet, $ as getPublishedBySchemaUid, Lt as hashPublishedByBatch, Zt as heuristicPublishGas, ke as initPublish, t as isContractDeployed, g as isEip7702ModularAccountPublishError, We as isManagedAccountPublishError, x as isPublishWallet, n as isRouterNonModularCoreAccountError, ge as isSeedSigner, y as isSeedTxSender, J as lookupDomainRegistry, q as normalizeRegistrableDomain, Te as publishItem, De as publishMachine, te as readFactorySeedExecutor, o as readGetEas, i as readIsActiveSigner, Pe as requireManagedAccountFactoryAddress, ln as resetMarketRateCache, rn as resetTokenPriceCache, bn as resolvePublishDisplayValue, pe as resolvePublishEasChain, sr as revokeDomainOwnership, Xe as revokePublishAuthorization, _r as revokePublishedBy, Kt as seedTwinConfig, xe as setPublishWallet, a as simulateCallFromAccount, re as stringifyUnderlyingCause, rt as uidsFromAttestationPairs, Tn as useArweaveL1Finalize, wn as useCanPublishItem, En as useItemPublishStatus, qe as usePublishConfig, Gn as usePublishCostEstimate, Cn as usePublishProcess, Fn as usePublishProcessById, An as usePublishProcesses, Mn as usePublishProcessesForSeed, jn as usePublishProcessesNonActiveCount, Pn as usePublishProcessesNonActiveCountForSeed, kn as usePublishProcessesState, Nn as usePublishProcessesStateForSeed, Xt as useSeedWallet, lr as verifyAndAttestDomainOwnership, ae as verifyDataItem, cr as verifyDomainOwnershipChallenge, er as verifyDomainOwnershipDns, e as verifyPublishChain, Le as waitForPublishActor, p as waitForPublishReceipt, vn as watchPublishCost };
1271
1136
 
1272
1137
  //# sourceMappingURL=index.js.map