@seedprotocol/arweave 0.7.9-next.1110.g7eb9e57 → 0.7.9-next.1177.ga3e08ed

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.
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Base URL of the public gateway for links written into published content. The read host
3
+ * ({@link BaseArweaveClient.getBaseUrl}) can be a local Hyper sidecar or an app-server proxy,
4
+ * which nobody else can reach. Before client init resolves endpoints, falls back to the read host.
5
+ */
6
+ export declare function getPublicArweaveBaseUrl(): string;
7
+ /** `{public gateway}/raw/{transactionId}`, for URLs that get uploaded or attested. */
8
+ export declare function getPublicArweaveRawUrl(transactionId: string): string;
9
+ //# sourceMappingURL=publicUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publicUrl.d.ts","sourceRoot":"","sources":["../../src/gateway/publicUrl.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED,sFAAsF;AACtF,wBAAgB,sBAAsB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAEpE"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolveSeedGatewayEndpoints.d.ts","sourceRoot":"","sources":["../../src/gateway/resolveSeedGatewayEndpoints.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,4BAA4B,EAC5B,iBAAiB,EAElB,MAAM,qBAAqB,CAAA;AAO5B,sEAAsE;AACtE,wBAAgB,2BAA2B,IAAI,IAAI,CAGlD;AAsCD;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5B,MAAM,CAkBR;AA+ED,MAAM,MAAM,kCAAkC,GAAG;IAC/C,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,kDAAkD;IAClD,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAkBD;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,iBAAiB,EACzB,OAAO,CAAC,EAAE,kCAAkC,GAC3C,OAAO,CAAC,4BAA4B,CAAC,CAyDvC;AAED,2FAA2F;AAC3F,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,4BAA4B,EACtC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,GAC5B,MAAM,EAAE,CAKV"}
1
+ {"version":3,"file":"resolveSeedGatewayEndpoints.d.ts","sourceRoot":"","sources":["../../src/gateway/resolveSeedGatewayEndpoints.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,4BAA4B,EAC5B,iBAAiB,EAElB,MAAM,qBAAqB,CAAA;AAO5B,sEAAsE;AACtE,wBAAgB,2BAA2B,IAAI,IAAI,CAGlD;AA2CD;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5B,MAAM,CAkBR;AAkFD,MAAM,MAAM,kCAAkC,GAAG;IAC/C,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,kDAAkD;IAClD,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAkBD;;;;;GAKG;AACH,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,iBAAiB,EACzB,OAAO,CAAC,EAAE,kCAAkC,GAC3C,OAAO,CAAC,4BAA4B,CAAC,CAyDvC;AAED,2FAA2F;AAC3F,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,4BAA4B,EACtC,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,GAC5B,MAAM,EAAE,CAKV"}
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ export * from './ArweaveClient/selectReadGateway.js';
16
16
  export * from './ArweaveClient/uploadApiVerification.js';
17
17
  export * from './ArweaveClient/arweaveL1UploadApi.js';
18
18
  export * from './gateway/gatewayState.js';
19
+ export * from './gateway/publicUrl.js';
19
20
  export * from './gateway/gatewayCircuitBreaker.js';
20
21
  export * from './gateway/resolveSeedGatewayEndpoints.js';
21
22
  export * from './gateway/seedGatewayConfig.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,eAAe,CAAA;AAC7B,cAAc,qCAAqC,CAAA;AACnD,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,YAAY,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAC9F,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yCAAyC,CAAA;AACvD,cAAc,sCAAsC,CAAA;AACpD,OAAO,EAAE,iBAAiB,IAAI,aAAa,EAAE,MAAM,sCAAsC,CAAA;AACzF,YAAY,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAA;AACvE,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,kBAAkB,CAAA;AACzB,cAAc,sCAAsC,CAAA;AACpD,cAAc,0CAA0C,CAAA;AACxD,cAAc,uCAAuC,CAAA;AACrD,cAAc,2BAA2B,CAAA;AACzC,cAAc,oCAAoC,CAAA;AAClD,cAAc,0CAA0C,CAAA;AACxD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,2BAA2B,CAAA;AACzC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,eAAe,CAAA;AAC7B,cAAc,qCAAqC,CAAA;AACnD,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,YAAY,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAA;AAC9F,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yCAAyC,CAAA;AACvD,cAAc,sCAAsC,CAAA;AACpD,OAAO,EAAE,iBAAiB,IAAI,aAAa,EAAE,MAAM,sCAAsC,CAAA;AACzF,YAAY,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAA;AACvE,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,kBAAkB,CAAA;AACzB,cAAc,sCAAsC,CAAA;AACpD,cAAc,0CAA0C,CAAA;AACxD,cAAc,uCAAuC,CAAA;AACrD,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,oCAAoC,CAAA;AAClD,cAAc,0CAA0C,CAAA;AACxD,cAAc,gCAAgC,CAAA;AAC9C,cAAc,2BAA2B,CAAA;AACzC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA"}
package/dist/index.js CHANGED
@@ -1,26 +1,26 @@
1
- import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as ee, K as te, L as ne, M as re, N as ie, O as ae, P as oe, Q as se, R as ce, S as u, T as d, U as le, V as ue, W as de, X as fe, Y as pe, Z as me, _ as he, a as ge, b as _e, c as f, d as p, et as m, f as h, g, h as _, i as v, j as y, k as b, l as x, m as S, n as C, nt as w, o as T, p as E, q as D, r as O, rt as k, s as A, t as j, tt as M, u as N, v as P, w as F, x as I, y as ve, z as ye } from "./transactionStatus-BpYIaQyY.js";
1
+ import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as ee, K as te, L as ne, M as re, N as ie, O as ae, P as oe, Q as se, R as ce, S as u, T as le, U as d, V as ue, W as de, X as fe, Y as pe, Z as me, _ as he, a as ge, b as _e, c as ve, d as f, et as p, f as m, g as h, h as g, i as _, j as v, k as y, l as b, m as x, n as S, nt as C, o as w, p as T, q as E, r as D, rt as O, s as k, t as A, tt as j, u as M, v as N, w as P, x as F, y as ye, z as be } from "./transactionStatus-zdutyXNX.js";
2
2
  //#region src/easAttestationUrl.ts
3
- var L = /(^|\.)easscan\.(org|xyz)$/i;
4
- function R(e) {
3
+ var xe = /(^|\.)easscan\.(org|xyz)$/i;
4
+ function I(e) {
5
5
  let t = e.trim();
6
6
  if (!t) return !1;
7
7
  try {
8
8
  let e = new URL(t);
9
- return L.test(e.hostname) ? /\/attestation\/view\//i.test(e.pathname) : !1;
9
+ return xe.test(e.hostname) ? /\/attestation\/view\//i.test(e.pathname) : !1;
10
10
  } catch {
11
11
  return !1;
12
12
  }
13
13
  }
14
14
  //#endregion
15
15
  //#region src/relationSeedRef.ts
16
- function be(e) {
16
+ function Se(e) {
17
17
  let t = {
18
18
  localId: void 0,
19
19
  uid: void 0
20
20
  };
21
21
  return e && (e.length === 10 && (t.localId = e), e.startsWith("0x") && e.length === 66 && (t.uid = e)), t;
22
22
  }
23
- function z(e) {
23
+ function L(e) {
24
24
  if (e != null) {
25
25
  if (typeof e == "string") {
26
26
  let t = e.trim();
@@ -33,35 +33,35 @@ function z(e) {
33
33
  }
34
34
  }
35
35
  }
36
- var xe = /^[a-zA-Z0-9_-]{10,21}$/;
37
- function B(e) {
38
- let t = be(e);
36
+ var R = /^[a-zA-Z0-9_-]{10,21}$/;
37
+ function z(e) {
38
+ let t = Se(e);
39
39
  return t.localId || t.uid ? {
40
40
  seedLocalId: t.localId,
41
41
  seedUid: t.uid
42
- } : xe.test(e) && !e.startsWith("0x") ? { seedLocalId: e } : {};
42
+ } : R.test(e) && !e.startsWith("0x") ? { seedLocalId: e } : {};
43
43
  }
44
44
  //#endregion
45
45
  //#region src/mediaRef.ts
46
- var Se = /^[a-zA-Z0-9_-]{43}$/;
47
- function Ce(e) {
46
+ var Ce = /^[a-zA-Z0-9_-]{43}$/;
47
+ function we(e) {
48
48
  return e == null ? "" : typeof e == "string" ? e.trim() : String(e).trim();
49
49
  }
50
- function V(e, t) {
50
+ function B(e, t) {
51
51
  let n = e[t];
52
52
  return n == null ? "" : typeof n == "string" ? n.trim() : typeof n == "number" || typeof n == "boolean" ? String(n) : "";
53
53
  }
54
- function we(e) {
54
+ function Te(e) {
55
55
  let t = e.trim();
56
56
  if (!t) return t;
57
57
  try {
58
- let e = z(JSON.parse(t));
58
+ let e = L(JSON.parse(t));
59
59
  if (e) return e;
60
60
  } catch {}
61
61
  return t;
62
62
  }
63
- function H(e, t) {
64
- let n = Ce(e);
63
+ function V(e, t) {
64
+ let n = we(e);
65
65
  if (!n) return { kind: "empty" };
66
66
  let r = t?.treatAs;
67
67
  if (r === "url") return {
@@ -79,14 +79,14 @@ function H(e, t) {
79
79
  kind: "unknown",
80
80
  raw: n
81
81
  };
82
- if (n.startsWith("http://") || n.startsWith("https://") || n.startsWith("blob:") || n.startsWith("data:")) return R(n) ? {
82
+ if (n.startsWith("http://") || n.startsWith("https://") || n.startsWith("blob:") || n.startsWith("data:")) return I(n) ? {
83
83
  kind: "nonMediaUrl",
84
84
  href: n
85
85
  } : {
86
86
  kind: "url",
87
87
  href: n
88
88
  };
89
- let i = we(n), a = B(i);
89
+ let i = Te(n), a = z(i);
90
90
  return a.seedUid ? {
91
91
  kind: "seedUid",
92
92
  uid: a.seedUid
@@ -96,7 +96,7 @@ function H(e, t) {
96
96
  } : i.startsWith("0x") && i.length === 66 ? {
97
97
  kind: "seedUid",
98
98
  uid: i
99
- } : Se.test(i) && !i.startsWith("0x") ? {
99
+ } : Ce.test(i) && !i.startsWith("0x") ? {
100
100
  kind: "arweaveTxId",
101
101
  txId: i
102
102
  } : {
@@ -104,25 +104,25 @@ function H(e, t) {
104
104
  raw: n
105
105
  };
106
106
  }
107
- function U(e, t) {
108
- let n = V(e, t);
107
+ function H(e, t) {
108
+ let n = B(e, t);
109
109
  if (n) return n;
110
110
  let r = t.replace(/[A-Z]/g, (e) => `_${e.toLowerCase()}`);
111
111
  if (r !== t) {
112
- let t = V(e, r);
112
+ let t = B(e, r);
113
113
  if (t) return t;
114
114
  }
115
115
  let i = t.split("_");
116
116
  if (i.length > 1) {
117
- let t = V(e, i[0] + i.slice(1).map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(""));
117
+ let t = B(e, i[0] + i.slice(1).map((e) => e.charAt(0).toUpperCase() + e.slice(1)).join(""));
118
118
  if (t) return t;
119
119
  }
120
120
  return "";
121
121
  }
122
- function Te(e, t) {
122
+ function Ee(e, t) {
123
123
  let n = {};
124
124
  for (let [r, i] of Object.entries(t)) {
125
- let t = U(e, r);
125
+ let t = H(e, r);
126
126
  if (!t) {
127
127
  n[r] = void 0;
128
128
  continue;
@@ -141,7 +141,7 @@ function Te(e, t) {
141
141
  };
142
142
  continue;
143
143
  }
144
- let a = H(t, { treatAs: i.treatAs });
144
+ let a = V(t, { treatAs: i.treatAs });
145
145
  n[r] = {
146
146
  role: i.role,
147
147
  raw: t,
@@ -150,12 +150,12 @@ function Te(e, t) {
150
150
  }
151
151
  return n;
152
152
  }
153
- function Ee(e) {
153
+ function De(e) {
154
154
  return `${l.getBaseUrl()}/${e}`;
155
155
  }
156
156
  //#endregion
157
157
  //#region src/resolveSeedRssImageRelationRef.ts
158
- var W = [
158
+ var U = [
159
159
  "featureImage",
160
160
  "feature_image",
161
161
  "image",
@@ -166,25 +166,25 @@ var W = [
166
166
  "thumbnail_image",
167
167
  "thumbnailImage"
168
168
  ];
169
- function G(e) {
169
+ function W(e) {
170
170
  return e == null ? "" : typeof e == "string" ? e.trim() : typeof e == "number" || typeof e == "boolean" ? String(e) : "";
171
171
  }
172
- function K(e, ...t) {
172
+ function G(e, ...t) {
173
173
  for (let n of t) {
174
- let t = G(e[n]);
174
+ let t = W(e[n]);
175
175
  if (t) return t;
176
176
  }
177
177
  let n = t.map((e) => e.split(":").pop().toLowerCase());
178
178
  for (let [t, r] of Object.entries(e)) {
179
179
  let e = (t.includes(":") ? t.split(":").pop() : t).toLowerCase();
180
180
  if (n.some((t) => e === t.toLowerCase())) {
181
- let e = G(r);
181
+ let e = W(r);
182
182
  if (e) return e;
183
183
  }
184
184
  }
185
185
  return "";
186
186
  }
187
- function q(e) {
187
+ function K(e) {
188
188
  let t = e.trim();
189
189
  if (t && !t.startsWith("0x")) try {
190
190
  return `${l.getBaseUrl()}/${t}`;
@@ -192,23 +192,23 @@ function q(e) {
192
192
  return;
193
193
  }
194
194
  }
195
- function De(e) {
195
+ function Oe(e) {
196
196
  let t = e.storageTransactionId?.trim();
197
197
  if (t) {
198
- let e = q(t);
198
+ let e = K(t);
199
199
  if (e) return e;
200
200
  }
201
201
  let n = e.arweaveUrl?.trim();
202
- if (n && !R(n)) return n;
202
+ if (n && !I(n)) return n;
203
203
  }
204
- function Oe(e) {
204
+ function ke(e) {
205
205
  let t = e.trim();
206
- if (!t || R(t)) return;
207
- let n = H(t);
206
+ if (!t || I(t)) return;
207
+ let n = V(t);
208
208
  switch (n.kind) {
209
209
  case "url": return { mediaUrl: n.href };
210
210
  case "arweaveTxId": {
211
- let e = q(n.txId);
211
+ let e = K(n.txId);
212
212
  return {
213
213
  storageTransactionId: n.txId,
214
214
  ...e ? { mediaUrl: e } : {}
@@ -216,7 +216,7 @@ function Oe(e) {
216
216
  }
217
217
  case "seedUid": return { seedUid: n.uid };
218
218
  default: {
219
- let e = q(t);
219
+ let e = K(t);
220
220
  return e ? {
221
221
  storageTransactionId: t,
222
222
  mediaUrl: e
@@ -224,46 +224,46 @@ function Oe(e) {
224
224
  }
225
225
  }
226
226
  }
227
- function ke(e) {
228
- let t = K(e, "storageTransactionId", "storage_transaction_id"), n = K(e, "arweaveUrl", "arweave_url"), r = K(e, "seedUid", "SeedUid", "seed_uid"), i = K(e, "link", "Link"), a = De({
227
+ function Ae(e) {
228
+ let t = G(e, "storageTransactionId", "storage_transaction_id"), n = G(e, "arweaveUrl", "arweave_url"), r = G(e, "seedUid", "SeedUid", "seed_uid"), i = G(e, "link", "Link"), a = Oe({
229
229
  storageTransactionId: t,
230
230
  arweaveUrl: n
231
- }) ?? (i && !R(i) ? i : void 0);
231
+ }) ?? (i && !I(i) ? i : void 0);
232
232
  if (t || n || r || a) return {
233
233
  ...t ? { storageTransactionId: t } : {},
234
- ...n && !R(n) ? { arweaveUrl: n } : {},
234
+ ...n && !I(n) ? { arweaveUrl: n } : {},
235
235
  ...r ? { seedUid: r } : {},
236
236
  ...a ? { mediaUrl: a } : {}
237
237
  };
238
238
  }
239
- function J(e) {
239
+ function q(e) {
240
240
  if (e != null) {
241
- if (typeof e == "string") return Oe(e);
241
+ if (typeof e == "string") return ke(e);
242
242
  if (Array.isArray(e)) for (let t of e) {
243
- let e = J(t);
243
+ let e = q(t);
244
244
  if (e?.mediaUrl || e?.storageTransactionId || e?.seedUid) return e;
245
245
  }
246
- else if (typeof e == "object") return ke(e);
246
+ else if (typeof e == "object") return Ae(e);
247
247
  }
248
248
  }
249
- function Ae(e, t = W) {
249
+ function je(e, t = U) {
250
250
  for (let n of t) {
251
251
  if (!(n in e)) continue;
252
- let t = J(e[n]);
252
+ let t = q(e[n]);
253
253
  if (t) return t;
254
254
  }
255
255
  }
256
256
  //#endregion
257
257
  //#region src/ArweaveClient/transactionTagsByIds.ts
258
- var je = 100, Y = "\n query GetTransactionsTagsByIds($ids: [ID!], $first: Int) {\n transactions(ids: $ids, first: $first) {\n edges {\n node {\n id\n tags {\n name\n value\n }\n }\n }\n }\n }\n";
259
- async function Me(e, t) {
258
+ var Me = 100, J = "\n query GetTransactionsTagsByIds($ids: [ID!], $first: Int) {\n transactions(ids: $ids, first: $first) {\n edges {\n node {\n id\n tags {\n name\n value\n }\n }\n }\n }\n }\n";
259
+ async function Ne(e, t) {
260
260
  let n = /* @__PURE__ */ new Map(), r = Array.from(new Set(e.filter((e) => typeof e == "string" && e.trim())));
261
261
  if (r.length === 0) return n;
262
262
  let i = t?.client ?? l.getArweaveClient(), a = Math.max(1, Math.min(t?.batchSize ?? 100, 100));
263
263
  for (let e = 0; e < r.length; e += a) {
264
264
  let o = r.slice(e, e + a);
265
265
  try {
266
- let e = await i.request(Y, {
266
+ let e = await i.request(J, {
267
267
  ids: o,
268
268
  first: o.length
269
269
  });
@@ -282,15 +282,15 @@ async function Me(e, t) {
282
282
  }
283
283
  //#endregion
284
284
  //#region src/ArweaveClient/uploadApiVerification.ts
285
- function X(e) {
285
+ function Y(e) {
286
286
  return e.trim().replace(/\/+$/, "");
287
287
  }
288
- function Z(e, t) {
289
- return `${X(e)}/api/upload/arweave/data/${encodeURIComponent(t)}`;
288
+ function X(e, t) {
289
+ return `${Y(e)}/api/upload/arweave/data/${encodeURIComponent(t)}`;
290
290
  }
291
- var Ne = 45e3;
292
- async function Pe(e, t, n) {
293
- let r = Z(e, t), i = n?.timeoutMs ?? Ne, a = new AbortController(), o = setTimeout(() => a.abort(), i);
291
+ var Pe = 45e3;
292
+ async function Fe(e, t, n) {
293
+ let r = X(e, t), i = n?.timeoutMs ?? Pe, a = new AbortController(), o = setTimeout(() => a.abort(), i);
294
294
  try {
295
295
  let e = await fetch(r, { signal: a.signal });
296
296
  return clearTimeout(o), e.status === 404 ? {
@@ -315,16 +315,16 @@ async function Pe(e, t, n) {
315
315
  }
316
316
  //#endregion
317
317
  //#region src/ArweaveClient/arweaveL1UploadApi.ts
318
- var Fe = "\n query ArweaveGatewayTransaction($id: String!) {\n transaction(id: $id) {\n id\n bundledIn {\n id\n }\n block {\n height\n timestamp\n }\n }\n }\n";
319
- function Q(e, t) {
320
- return `${X(e)}/api/upload/arweave/status/${encodeURIComponent(t)}`;
318
+ var Ie = "\n query ArweaveGatewayTransaction($id: String!) {\n transaction(id: $id) {\n id\n bundledIn {\n id\n }\n block {\n height\n timestamp\n }\n }\n }\n";
319
+ function Z(e, t) {
320
+ return `${Y(e)}/api/upload/arweave/status/${encodeURIComponent(t)}`;
321
321
  }
322
- function Ie(e) {
322
+ function Le(e) {
323
323
  let t = e.l1;
324
324
  return t ? t.meetsMinConfirmations === !0 || t.confirmed === !0 : !1;
325
325
  }
326
- async function Le(e, t) {
327
- let n = Q(e, t);
326
+ async function Re(e, t) {
327
+ let n = Z(e, t);
328
328
  try {
329
329
  let e = await fetch(n);
330
330
  if (!e.ok) return null;
@@ -334,7 +334,7 @@ async function Le(e, t) {
334
334
  return null;
335
335
  }
336
336
  }
337
- async function $(e, t, n) {
337
+ async function Q(e, t, n) {
338
338
  let r = e.trim();
339
339
  if (!r) return null;
340
340
  try {
@@ -342,7 +342,7 @@ async function $(e, t, n) {
342
342
  method: "POST",
343
343
  headers: { "Content-Type": "application/json" },
344
344
  body: JSON.stringify({
345
- query: Fe,
345
+ query: Ie,
346
346
  variables: { id: t }
347
347
  }),
348
348
  signal: n?.signal
@@ -366,8 +366,8 @@ async function $(e, t, n) {
366
366
  return null;
367
367
  }
368
368
  }
369
- async function Re(t, n, r) {
370
- let i = m(), a = t?.trim(), o = "https", s = null;
369
+ async function ze(t, n, r) {
370
+ let i = p(), a = t?.trim(), o = "https", s = null;
371
371
  if (a) try {
372
372
  let e = new URL(a);
373
373
  o = e.protocol === "http:" ? "http" : "https", s = e.hostname || null;
@@ -378,14 +378,22 @@ async function Re(t, n, r) {
378
378
  for (let e of c) {
379
379
  let t = `${o}://${e}`;
380
380
  if (!await u(t, l ?? void 0)) continue;
381
- let i = await $(`${o}://${e}/graphql`, n, r);
381
+ let i = await Q(`${o}://${e}/graphql`, n, r);
382
382
  if (i !== null) return i;
383
383
  }
384
384
  return null;
385
385
  }
386
386
  //#endregion
387
+ //#region src/gateway/publicUrl.ts
388
+ function $() {
389
+ return f()?.publicArweaveBaseUrl ?? l.getBaseUrl();
390
+ }
391
+ function Be(e) {
392
+ return `${$()}/raw/${e}`;
393
+ }
394
+ //#endregion
387
395
  //#region src/gateway/seedGatewayConfig.ts
388
- function ze(e) {
396
+ function Ve(e) {
389
397
  let t = e.gateway ?? {};
390
398
  return {
391
399
  transport: t.transport,
@@ -401,7 +409,7 @@ function ze(e) {
401
409
  }
402
410
  };
403
411
  }
404
- function Be(e) {
412
+ function He(e) {
405
413
  return {
406
414
  transport: e.gatewayTransport,
407
415
  arweaveDomain: e.arweaveDomain,
@@ -415,6 +423,6 @@ function Be(e) {
415
423
  };
416
424
  }
417
425
  //#endregion
418
- export { s as ARWEAVE_HOST_ENV_KEYS, l as ArweaveClient, l as BaseArweaveClient, te as DEFAULT_ARWEAVE_GATEWAYS, D as DEFAULT_ARWEAVE_GRAPHQL_URL, ee as DEFAULT_ARWEAVE_HOST, v as DEFAULT_ARWEAVE_RAW_READ_TIMEOUT_MS, pe as DEFAULT_GATEWAY_SIDECAR_HOST, fe as DEFAULT_GATEWAY_SIDECAR_PORT, me as DEFAULT_SEED_FEED_HYPER_KEY, se as DEFAULT_SEED_GATEWAY_HYPER_KEY, j as DEFAULT_TRANSACTION_STATUS_TIMEOUT_MS, C as DEFAULT_TRANSACTION_STATUS_TOTAL_TIMEOUT_MS, ne as DuplicateArweaveModuleError, oe as GET_ARWEAVE_TRANSACTIONS, Y as GET_TRANSACTIONS_TAGS_BY_IDS, o as GET_TRANSACTION_TAGS, W as SEED_RSS_IMAGE_RELATION_FIELD_KEYS, je as TRANSACTION_TAGS_BATCH_SIZE, ce as assertSingleArweaveModule, d as beginGatewayHostHalfOpenProbe, H as classifyMediaRef, a as configureGatewayCircuitBreaker, ge as ensureArweaveReadGatewayForFallback, P as ensureReadGatewaySelected, T as fetchArweaveRawFromBaseUrl, A as fetchArweaveRawTextAcrossGateways, O as fetchTransactionStatusAcrossGateways, f as getArweaveReadBaseUrls, e as getArweaveReadGatewayHostsForPrimary, Le as getArweaveUploadStatus, Ee as getArweaveUrlForTransaction, m as getDefaultArweaveReadGatewayHostsOrdered, U as getFeedItemStringField, i as getGatewayHostCircuitState, ve as getLastHealthyReadGatewayHost, N as getPreferredArweaveReadBaseUrls, S as getReadGatewayHostsForConfig, x as getResolvedArweaveReadBaseUrls, p as getResolvedSeedGatewayEndpoints, n as getResponseMediaType, Me as getTransactionTagsByIds, Z as getUploadApiArweaveDataUrl, Q as getUploadApiArweaveStatusUrl, Pe as getUploadPipelineTransactionStatus, ue as hasArweaveContentReadTransform, _e as invalidateReadGatewayCache, _ as invalidateSidecarProbeCache, Ie as isArweaveL1AnchoringComplete, R as isEasAttestationExplorerUrl, ae as isGatewayHostCircuitOpen, M as isKnownArweaveGatewayHostname, I as isReadGatewayKnownHealthy, b as listOpenGatewayCircuitHosts, w as mergePrimaryHostWithDefaults, Te as normalizeFeedItemFields, t as normalizeGatewayHostKey, z as normalizeRelationPropertyValue, X as normalizeUploadApiBaseUrl, u as probeGateway, $ as queryArweaveGatewayTransaction, Re as queryArweaveGatewayTransactionWithFallback, c as readArweaveContentResponse, y as recordGatewayHostFailure, re as recordGatewayHostSuccess, ye as resetArweaveClientOwnerForTests, r as resetArweaveReadGatewayForTests, ie as resetGatewayCircuitBreakerForTests, k as resolveArweaveHostFromEnv, g as resolveProxyBaseUrl, he as resolveSeedGatewayEndpoints, B as resolveSeedIdsFromRefString, Ae as resolveSeedRssImageRelationFromItem, J as resolveSeedRssImageRelationRef, Be as seedGatewayConfigFromClientContext, ze as seedGatewayConfigFromSeedConfig, F as selectFirstHealthyReadGateway, le as setArweaveContentReadTransform, h as setPreferredArweaveReadBaseUrls, E as setResolvedSeedGatewayEndpoints, de as transformArweaveContent };
426
+ export { s as ARWEAVE_HOST_ENV_KEYS, l as ArweaveClient, l as BaseArweaveClient, te as DEFAULT_ARWEAVE_GATEWAYS, E as DEFAULT_ARWEAVE_GRAPHQL_URL, ee as DEFAULT_ARWEAVE_HOST, _ as DEFAULT_ARWEAVE_RAW_READ_TIMEOUT_MS, pe as DEFAULT_GATEWAY_SIDECAR_HOST, fe as DEFAULT_GATEWAY_SIDECAR_PORT, me as DEFAULT_SEED_FEED_HYPER_KEY, se as DEFAULT_SEED_GATEWAY_HYPER_KEY, A as DEFAULT_TRANSACTION_STATUS_TIMEOUT_MS, S as DEFAULT_TRANSACTION_STATUS_TOTAL_TIMEOUT_MS, ne as DuplicateArweaveModuleError, oe as GET_ARWEAVE_TRANSACTIONS, J as GET_TRANSACTIONS_TAGS_BY_IDS, o as GET_TRANSACTION_TAGS, U as SEED_RSS_IMAGE_RELATION_FIELD_KEYS, Me as TRANSACTION_TAGS_BATCH_SIZE, ce as assertSingleArweaveModule, le as beginGatewayHostHalfOpenProbe, V as classifyMediaRef, a as configureGatewayCircuitBreaker, ge as ensureArweaveReadGatewayForFallback, N as ensureReadGatewaySelected, w as fetchArweaveRawFromBaseUrl, k as fetchArweaveRawTextAcrossGateways, D as fetchTransactionStatusAcrossGateways, ve as getArweaveReadBaseUrls, e as getArweaveReadGatewayHostsForPrimary, Re as getArweaveUploadStatus, De as getArweaveUrlForTransaction, p as getDefaultArweaveReadGatewayHostsOrdered, H as getFeedItemStringField, i as getGatewayHostCircuitState, ye as getLastHealthyReadGatewayHost, M as getPreferredArweaveReadBaseUrls, $ as getPublicArweaveBaseUrl, Be as getPublicArweaveRawUrl, x as getReadGatewayHostsForConfig, b as getResolvedArweaveReadBaseUrls, f as getResolvedSeedGatewayEndpoints, n as getResponseMediaType, Ne as getTransactionTagsByIds, X as getUploadApiArweaveDataUrl, Z as getUploadApiArweaveStatusUrl, Fe as getUploadPipelineTransactionStatus, ue as hasArweaveContentReadTransform, _e as invalidateReadGatewayCache, g as invalidateSidecarProbeCache, Le as isArweaveL1AnchoringComplete, I as isEasAttestationExplorerUrl, ae as isGatewayHostCircuitOpen, j as isKnownArweaveGatewayHostname, F as isReadGatewayKnownHealthy, y as listOpenGatewayCircuitHosts, C as mergePrimaryHostWithDefaults, Ee as normalizeFeedItemFields, t as normalizeGatewayHostKey, L as normalizeRelationPropertyValue, Y as normalizeUploadApiBaseUrl, u as probeGateway, Q as queryArweaveGatewayTransaction, ze as queryArweaveGatewayTransactionWithFallback, c as readArweaveContentResponse, v as recordGatewayHostFailure, re as recordGatewayHostSuccess, be as resetArweaveClientOwnerForTests, r as resetArweaveReadGatewayForTests, ie as resetGatewayCircuitBreakerForTests, O as resolveArweaveHostFromEnv, h as resolveProxyBaseUrl, he as resolveSeedGatewayEndpoints, z as resolveSeedIdsFromRefString, je as resolveSeedRssImageRelationFromItem, q as resolveSeedRssImageRelationRef, He as seedGatewayConfigFromClientContext, Ve as seedGatewayConfigFromSeedConfig, P as selectFirstHealthyReadGateway, d as setArweaveContentReadTransform, m as setPreferredArweaveReadBaseUrls, T as setResolvedSeedGatewayEndpoints, de as transformArweaveContent };
419
427
 
420
428
  //# sourceMappingURL=index.js.map