@seedprotocol/publish 0.7.3 → 0.7.4-next.784.g879c6a3

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