@seedprotocol/publish 0.4.8 → 0.4.11
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.
- package/dist/index.js +308 -296
- package/dist/index.js.map +1 -1
- package/dist/services/publish/helpers/ensureEasSchemas.d.ts.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -72,12 +72,12 @@ var Rt = {};
|
|
|
72
72
|
var ts;
|
|
73
73
|
function Ca() {
|
|
74
74
|
return ts || (ts = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
75
|
-
function e(
|
|
76
|
-
if (
|
|
77
|
-
if (typeof
|
|
78
|
-
return
|
|
79
|
-
if (typeof
|
|
80
|
-
switch (
|
|
75
|
+
function e(R) {
|
|
76
|
+
if (R == null) return null;
|
|
77
|
+
if (typeof R == "function")
|
|
78
|
+
return R.$$typeof === V ? null : R.displayName || R.name || null;
|
|
79
|
+
if (typeof R == "string") return R;
|
|
80
|
+
switch (R) {
|
|
81
81
|
case T:
|
|
82
82
|
return "Fragment";
|
|
83
83
|
case B:
|
|
@@ -88,130 +88,130 @@ function Ca() {
|
|
|
88
88
|
return "Suspense";
|
|
89
89
|
case I:
|
|
90
90
|
return "SuspenseList";
|
|
91
|
-
case
|
|
91
|
+
case P:
|
|
92
92
|
return "Activity";
|
|
93
93
|
}
|
|
94
|
-
if (typeof
|
|
95
|
-
switch (typeof
|
|
94
|
+
if (typeof R == "object")
|
|
95
|
+
switch (typeof R.tag == "number" && console.error(
|
|
96
96
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
97
|
-
),
|
|
97
|
+
), R.$$typeof) {
|
|
98
98
|
case A:
|
|
99
99
|
return "Portal";
|
|
100
|
+
case z:
|
|
101
|
+
return R.displayName || "Context";
|
|
100
102
|
case F:
|
|
101
|
-
return
|
|
102
|
-
case N:
|
|
103
|
-
return (P._context.displayName || "Context") + ".Consumer";
|
|
103
|
+
return (R._context.displayName || "Context") + ".Consumer";
|
|
104
104
|
case O:
|
|
105
|
-
var q =
|
|
106
|
-
return
|
|
105
|
+
var q = R.render;
|
|
106
|
+
return R = R.displayName, R || (R = q.displayName || q.name || "", R = R !== "" ? "ForwardRef(" + R + ")" : "ForwardRef"), R;
|
|
107
107
|
case L:
|
|
108
|
-
return q =
|
|
109
|
-
case
|
|
110
|
-
q =
|
|
108
|
+
return q = R.displayName || null, q !== null ? q : e(R.type) || "Memo";
|
|
109
|
+
case M:
|
|
110
|
+
q = R._payload, R = R._init;
|
|
111
111
|
try {
|
|
112
|
-
return e(
|
|
112
|
+
return e(R(q));
|
|
113
113
|
} catch {
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
return null;
|
|
117
117
|
}
|
|
118
|
-
function t(
|
|
119
|
-
return "" +
|
|
118
|
+
function t(R) {
|
|
119
|
+
return "" + R;
|
|
120
120
|
}
|
|
121
|
-
function n(
|
|
121
|
+
function n(R) {
|
|
122
122
|
try {
|
|
123
|
-
t(
|
|
123
|
+
t(R);
|
|
124
124
|
var q = !1;
|
|
125
125
|
} catch {
|
|
126
126
|
q = !0;
|
|
127
127
|
}
|
|
128
128
|
if (q) {
|
|
129
129
|
q = console;
|
|
130
|
-
var
|
|
131
|
-
return
|
|
130
|
+
var N = q.error, U = typeof Symbol == "function" && Symbol.toStringTag && R[Symbol.toStringTag] || R.constructor.name || "Object";
|
|
131
|
+
return N.call(
|
|
132
132
|
q,
|
|
133
133
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
134
134
|
U
|
|
135
|
-
), t(
|
|
135
|
+
), t(R);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
function r(
|
|
139
|
-
if (
|
|
140
|
-
if (typeof
|
|
138
|
+
function r(R) {
|
|
139
|
+
if (R === T) return "<>";
|
|
140
|
+
if (typeof R == "object" && R !== null && R.$$typeof === M)
|
|
141
141
|
return "<...>";
|
|
142
142
|
try {
|
|
143
|
-
var q = e(
|
|
143
|
+
var q = e(R);
|
|
144
144
|
return q ? "<" + q + ">" : "<...>";
|
|
145
145
|
} catch {
|
|
146
146
|
return "<...>";
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
function s() {
|
|
150
|
-
var
|
|
151
|
-
return
|
|
150
|
+
var R = W.A;
|
|
151
|
+
return R === null ? null : R.getOwner();
|
|
152
152
|
}
|
|
153
153
|
function o() {
|
|
154
154
|
return Error("react-stack-top-frame");
|
|
155
155
|
}
|
|
156
|
-
function i(
|
|
157
|
-
if (G.call(
|
|
158
|
-
var q = Object.getOwnPropertyDescriptor(
|
|
156
|
+
function i(R) {
|
|
157
|
+
if (G.call(R, "key")) {
|
|
158
|
+
var q = Object.getOwnPropertyDescriptor(R, "key").get;
|
|
159
159
|
if (q && q.isReactWarning) return !1;
|
|
160
160
|
}
|
|
161
|
-
return
|
|
161
|
+
return R.key !== void 0;
|
|
162
162
|
}
|
|
163
|
-
function a(
|
|
164
|
-
function
|
|
163
|
+
function a(R, q) {
|
|
164
|
+
function N() {
|
|
165
165
|
de || (de = !0, console.error(
|
|
166
166
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
167
167
|
q
|
|
168
168
|
));
|
|
169
169
|
}
|
|
170
|
-
|
|
171
|
-
get:
|
|
170
|
+
N.isReactWarning = !0, Object.defineProperty(R, "key", {
|
|
171
|
+
get: N,
|
|
172
172
|
configurable: !0
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
175
|
function c() {
|
|
176
|
-
var
|
|
177
|
-
return le[
|
|
176
|
+
var R = e(this.type);
|
|
177
|
+
return le[R] || (le[R] = !0, console.error(
|
|
178
178
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
179
|
-
)),
|
|
179
|
+
)), R = this.props.ref, R !== void 0 ? R : null;
|
|
180
180
|
}
|
|
181
|
-
function u(
|
|
182
|
-
var Z =
|
|
183
|
-
return
|
|
181
|
+
function u(R, q, N, U, ee, te) {
|
|
182
|
+
var Z = N.ref;
|
|
183
|
+
return R = {
|
|
184
184
|
$$typeof: m,
|
|
185
|
-
type:
|
|
185
|
+
type: R,
|
|
186
186
|
key: q,
|
|
187
|
-
props:
|
|
187
|
+
props: N,
|
|
188
188
|
_owner: U
|
|
189
|
-
}, (Z !== void 0 ? Z : null) !== null ? Object.defineProperty(
|
|
189
|
+
}, (Z !== void 0 ? Z : null) !== null ? Object.defineProperty(R, "ref", {
|
|
190
190
|
enumerable: !1,
|
|
191
191
|
get: c
|
|
192
|
-
}) : Object.defineProperty(
|
|
192
|
+
}) : Object.defineProperty(R, "ref", { enumerable: !1, value: null }), R._store = {}, Object.defineProperty(R._store, "validated", {
|
|
193
193
|
configurable: !1,
|
|
194
194
|
enumerable: !1,
|
|
195
195
|
writable: !0,
|
|
196
196
|
value: 0
|
|
197
|
-
}), Object.defineProperty(
|
|
197
|
+
}), Object.defineProperty(R, "_debugInfo", {
|
|
198
198
|
configurable: !1,
|
|
199
199
|
enumerable: !1,
|
|
200
200
|
writable: !0,
|
|
201
201
|
value: null
|
|
202
|
-
}), Object.defineProperty(
|
|
202
|
+
}), Object.defineProperty(R, "_debugStack", {
|
|
203
203
|
configurable: !1,
|
|
204
204
|
enumerable: !1,
|
|
205
205
|
writable: !0,
|
|
206
206
|
value: ee
|
|
207
|
-
}), Object.defineProperty(
|
|
207
|
+
}), Object.defineProperty(R, "_debugTask", {
|
|
208
208
|
configurable: !1,
|
|
209
209
|
enumerable: !1,
|
|
210
210
|
writable: !0,
|
|
211
211
|
value: te
|
|
212
|
-
}), Object.freeze && (Object.freeze(
|
|
212
|
+
}), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
|
|
213
213
|
}
|
|
214
|
-
function p(
|
|
214
|
+
function p(R, q, N, U, ee, te) {
|
|
215
215
|
var Z = q.children;
|
|
216
216
|
if (Z !== void 0)
|
|
217
217
|
if (U)
|
|
@@ -225,7 +225,7 @@ function Ca() {
|
|
|
225
225
|
);
|
|
226
226
|
else d(Z);
|
|
227
227
|
if (G.call(q, "key")) {
|
|
228
|
-
Z = e(
|
|
228
|
+
Z = e(R);
|
|
229
229
|
var J = Object.keys(q).filter(function(h) {
|
|
230
230
|
return h !== "key";
|
|
231
231
|
});
|
|
@@ -242,60 +242,60 @@ React keys must be passed directly to JSX without using spread:
|
|
|
242
242
|
Z
|
|
243
243
|
), be[Z + U] = !0);
|
|
244
244
|
}
|
|
245
|
-
if (Z = null,
|
|
246
|
-
|
|
245
|
+
if (Z = null, N !== void 0 && (n(N), Z = "" + N), i(q) && (n(q.key), Z = "" + q.key), "key" in q) {
|
|
246
|
+
N = {};
|
|
247
247
|
for (var ge in q)
|
|
248
|
-
ge !== "key" && (
|
|
249
|
-
} else
|
|
248
|
+
ge !== "key" && (N[ge] = q[ge]);
|
|
249
|
+
} else N = q;
|
|
250
250
|
return Z && a(
|
|
251
|
-
|
|
252
|
-
typeof
|
|
251
|
+
N,
|
|
252
|
+
typeof R == "function" ? R.displayName || R.name || "Unknown" : R
|
|
253
253
|
), u(
|
|
254
|
-
|
|
254
|
+
R,
|
|
255
255
|
Z,
|
|
256
|
-
|
|
256
|
+
N,
|
|
257
257
|
s(),
|
|
258
258
|
ee,
|
|
259
259
|
te
|
|
260
260
|
);
|
|
261
261
|
}
|
|
262
|
-
function d(
|
|
263
|
-
l(
|
|
262
|
+
function d(R) {
|
|
263
|
+
l(R) ? R._store && (R._store.validated = 1) : typeof R == "object" && R !== null && R.$$typeof === M && (R._payload.status === "fulfilled" ? l(R._payload.value) && R._payload.value._store && (R._payload.value._store.validated = 1) : R._store && (R._store.validated = 1));
|
|
264
264
|
}
|
|
265
|
-
function l(
|
|
266
|
-
return typeof
|
|
265
|
+
function l(R) {
|
|
266
|
+
return typeof R == "object" && R !== null && R.$$typeof === m;
|
|
267
267
|
}
|
|
268
|
-
var f = oa, m = Symbol.for("react.transitional.element"), A = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), D = Symbol.for("react.strict_mode"), B = Symbol.for("react.profiler"),
|
|
268
|
+
var f = oa, m = Symbol.for("react.transitional.element"), A = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), D = Symbol.for("react.strict_mode"), B = Symbol.for("react.profiler"), F = Symbol.for("react.consumer"), z = Symbol.for("react.context"), O = Symbol.for("react.forward_ref"), C = Symbol.for("react.suspense"), I = Symbol.for("react.suspense_list"), L = Symbol.for("react.memo"), M = Symbol.for("react.lazy"), P = Symbol.for("react.activity"), V = Symbol.for("react.client.reference"), W = f.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, G = Object.prototype.hasOwnProperty, ne = Array.isArray, se = console.createTask ? console.createTask : function() {
|
|
269
269
|
return null;
|
|
270
270
|
};
|
|
271
271
|
f = {
|
|
272
|
-
react_stack_bottom_frame: function(
|
|
273
|
-
return
|
|
272
|
+
react_stack_bottom_frame: function(R) {
|
|
273
|
+
return R();
|
|
274
274
|
}
|
|
275
275
|
};
|
|
276
276
|
var de, le = {}, we = f.react_stack_bottom_frame.bind(
|
|
277
277
|
f,
|
|
278
278
|
o
|
|
279
279
|
)(), Oe = se(r(o)), be = {};
|
|
280
|
-
Rt.Fragment = T, Rt.jsx = function(
|
|
280
|
+
Rt.Fragment = T, Rt.jsx = function(R, q, N) {
|
|
281
281
|
var U = 1e4 > W.recentlyCreatedOwnerStacks++;
|
|
282
282
|
return p(
|
|
283
|
-
|
|
283
|
+
R,
|
|
284
284
|
q,
|
|
285
|
-
|
|
285
|
+
N,
|
|
286
286
|
!1,
|
|
287
287
|
U ? Error("react-stack-top-frame") : we,
|
|
288
|
-
U ? se(r(
|
|
288
|
+
U ? se(r(R)) : Oe
|
|
289
289
|
);
|
|
290
|
-
}, Rt.jsxs = function(
|
|
290
|
+
}, Rt.jsxs = function(R, q, N) {
|
|
291
291
|
var U = 1e4 > W.recentlyCreatedOwnerStacks++;
|
|
292
292
|
return p(
|
|
293
|
-
|
|
293
|
+
R,
|
|
294
294
|
q,
|
|
295
|
-
|
|
295
|
+
N,
|
|
296
296
|
!0,
|
|
297
297
|
U ? Error("react-stack-top-frame") : we,
|
|
298
|
-
U ? se(r(
|
|
298
|
+
U ? se(r(R)) : Oe
|
|
299
299
|
);
|
|
300
300
|
};
|
|
301
301
|
})()), Rt;
|
|
@@ -455,17 +455,17 @@ function ka() {
|
|
|
455
455
|
function T(...D) {
|
|
456
456
|
if (!T.enabled)
|
|
457
457
|
return;
|
|
458
|
-
const B = T,
|
|
459
|
-
B.diff =
|
|
458
|
+
const B = T, F = Number(/* @__PURE__ */ new Date()), z = F - (l || F);
|
|
459
|
+
B.diff = z, B.prev = l, B.curr = F, l = F, D[0] = r.coerce(D[0]), typeof D[0] != "string" && D.unshift("%O");
|
|
460
460
|
let O = 0;
|
|
461
461
|
D[0] = D[0].replace(/%([a-zA-Z%])/g, (I, L) => {
|
|
462
462
|
if (I === "%%")
|
|
463
463
|
return "%";
|
|
464
464
|
O++;
|
|
465
|
-
const
|
|
466
|
-
if (typeof
|
|
467
|
-
const
|
|
468
|
-
I =
|
|
465
|
+
const M = r.formatters[L];
|
|
466
|
+
if (typeof M == "function") {
|
|
467
|
+
const P = D[O];
|
|
468
|
+
I = M.call(B, P), D.splice(O, 1), O--;
|
|
469
469
|
}
|
|
470
470
|
return I;
|
|
471
471
|
}), r.formatArgs.call(B, D), (B.log || r.log).apply(B, D);
|
|
@@ -4685,40 +4685,40 @@ async function Nr(e, t, n, r) {
|
|
|
4685
4685
|
continue;
|
|
4686
4686
|
}
|
|
4687
4687
|
try {
|
|
4688
|
-
const
|
|
4688
|
+
const z = Jn(n, r, {
|
|
4689
4689
|
schema: D,
|
|
4690
4690
|
resolverAddress: ut,
|
|
4691
4691
|
revocable: lt
|
|
4692
4692
|
}), O = await $e({
|
|
4693
4693
|
account: t,
|
|
4694
|
-
transaction:
|
|
4694
|
+
transaction: z
|
|
4695
4695
|
});
|
|
4696
4696
|
await Ie({
|
|
4697
4697
|
client: n,
|
|
4698
4698
|
chain: r,
|
|
4699
4699
|
transactionHash: O.transactionHash
|
|
4700
4700
|
});
|
|
4701
|
-
} catch (
|
|
4701
|
+
} catch (z) {
|
|
4702
4702
|
throw new Error(
|
|
4703
|
-
`Failed to register EAS schema for model ${T}: ${
|
|
4703
|
+
`Failed to register EAS schema for model ${T}: ${z instanceof Error ? z.message : String(z)}`
|
|
4704
4704
|
);
|
|
4705
4705
|
}
|
|
4706
4706
|
try {
|
|
4707
|
-
const
|
|
4707
|
+
const z = Xn(n, r, {
|
|
4708
4708
|
schemaUid: B,
|
|
4709
4709
|
schemaName: Zn(T)
|
|
4710
4710
|
}), O = await $e({
|
|
4711
4711
|
account: t,
|
|
4712
|
-
transaction:
|
|
4712
|
+
transaction: z
|
|
4713
4713
|
});
|
|
4714
4714
|
await Ie({
|
|
4715
4715
|
client: n,
|
|
4716
4716
|
chain: r,
|
|
4717
4717
|
transactionHash: O.transactionHash
|
|
4718
4718
|
});
|
|
4719
|
-
} catch (
|
|
4719
|
+
} catch (z) {
|
|
4720
4720
|
throw new Error(
|
|
4721
|
-
`Failed to name EAS schema for model ${T}: ${
|
|
4721
|
+
`Failed to name EAS schema for model ${T}: ${z instanceof Error ? z.message : String(z)}`
|
|
4722
4722
|
);
|
|
4723
4723
|
}
|
|
4724
4724
|
d.add(B), Bn({ modelName: T, schemaUid: B });
|
|
@@ -4741,8 +4741,8 @@ async function Nr(e, t, n, r) {
|
|
|
4741
4741
|
const B = Xn(n, r, {
|
|
4742
4742
|
schemaUid: f,
|
|
4743
4743
|
schemaName: "storage_transaction_id"
|
|
4744
|
-
}),
|
|
4745
|
-
await Ie({ client: n, chain: r, transactionHash:
|
|
4744
|
+
}), F = await $e({ account: t, transaction: B });
|
|
4745
|
+
await Ie({ client: n, chain: r, transactionHash: F.transactionHash });
|
|
4746
4746
|
} catch (T) {
|
|
4747
4747
|
throw new Error(
|
|
4748
4748
|
`Failed to register EAS schema for storageTransactionId: ${T instanceof Error ? T.message : String(T)}`
|
|
@@ -4752,66 +4752,78 @@ async function Nr(e, t, n, r) {
|
|
|
4752
4752
|
}
|
|
4753
4753
|
for (const T of c) {
|
|
4754
4754
|
if (!T.propertyDef) continue;
|
|
4755
|
-
const D = pa[T.propertyDef.dataType]?.eas ?? "string", B = Zn(T.propertyName),
|
|
4756
|
-
|
|
4755
|
+
const D = pa[T.propertyDef.dataType]?.eas ?? "string", B = Zn(T.propertyName), F = `${D} ${B}`, O = [
|
|
4756
|
+
"string",
|
|
4757
|
+
"address",
|
|
4758
|
+
"bool",
|
|
4759
|
+
"bytes",
|
|
4760
|
+
"bytes32",
|
|
4761
|
+
"uint8",
|
|
4762
|
+
"uint16",
|
|
4763
|
+
"uint32",
|
|
4764
|
+
"uint64",
|
|
4765
|
+
"uint128",
|
|
4766
|
+
"uint256"
|
|
4767
|
+
].includes(D) ? D : void 0;
|
|
4768
|
+
let C = await ya({
|
|
4757
4769
|
schemaUid: T.schemaUid,
|
|
4758
4770
|
propertyName: T.propertyName,
|
|
4759
|
-
easDataType:
|
|
4771
|
+
easDataType: O
|
|
4760
4772
|
});
|
|
4761
|
-
if (
|
|
4762
|
-
const
|
|
4763
|
-
if (
|
|
4764
|
-
ct({ text:
|
|
4773
|
+
if (C) {
|
|
4774
|
+
const M = await rn(n, r, C.id);
|
|
4775
|
+
if (M && M.schema === F) {
|
|
4776
|
+
ct({ text: F, schemaUid: C.id });
|
|
4765
4777
|
continue;
|
|
4766
4778
|
}
|
|
4767
4779
|
}
|
|
4768
|
-
const
|
|
4769
|
-
if (await rn(n, r,
|
|
4770
|
-
ct({ text:
|
|
4780
|
+
const I = Dn.getSchemaUID(F, ut, lt);
|
|
4781
|
+
if (await rn(n, r, I)) {
|
|
4782
|
+
ct({ text: F, schemaUid: I });
|
|
4771
4783
|
continue;
|
|
4772
4784
|
}
|
|
4773
|
-
if (u.has(
|
|
4774
|
-
ct({ text:
|
|
4785
|
+
if (u.has(I)) {
|
|
4786
|
+
ct({ text: F, schemaUid: I });
|
|
4775
4787
|
continue;
|
|
4776
4788
|
}
|
|
4777
4789
|
try {
|
|
4778
|
-
const
|
|
4779
|
-
schema:
|
|
4790
|
+
const M = Jn(n, r, {
|
|
4791
|
+
schema: F,
|
|
4780
4792
|
resolverAddress: ut,
|
|
4781
4793
|
revocable: lt
|
|
4782
|
-
}),
|
|
4794
|
+
}), P = await $e({
|
|
4783
4795
|
account: t,
|
|
4784
|
-
transaction:
|
|
4796
|
+
transaction: M
|
|
4785
4797
|
});
|
|
4786
4798
|
await Ie({
|
|
4787
4799
|
client: n,
|
|
4788
4800
|
chain: r,
|
|
4789
|
-
transactionHash:
|
|
4801
|
+
transactionHash: P.transactionHash
|
|
4790
4802
|
});
|
|
4791
|
-
} catch (
|
|
4803
|
+
} catch (M) {
|
|
4792
4804
|
throw new Error(
|
|
4793
|
-
`Failed to register EAS schema for property ${T.propertyName}: ${
|
|
4805
|
+
`Failed to register EAS schema for property ${T.propertyName}: ${M instanceof Error ? M.message : String(M)}`
|
|
4794
4806
|
);
|
|
4795
4807
|
}
|
|
4796
4808
|
try {
|
|
4797
|
-
const
|
|
4798
|
-
schemaUid:
|
|
4809
|
+
const M = Xn(n, r, {
|
|
4810
|
+
schemaUid: I,
|
|
4799
4811
|
schemaName: B
|
|
4800
|
-
}),
|
|
4812
|
+
}), P = await $e({
|
|
4801
4813
|
account: t,
|
|
4802
|
-
transaction:
|
|
4814
|
+
transaction: M
|
|
4803
4815
|
});
|
|
4804
4816
|
await Ie({
|
|
4805
4817
|
client: n,
|
|
4806
4818
|
chain: r,
|
|
4807
|
-
transactionHash:
|
|
4819
|
+
transactionHash: P.transactionHash
|
|
4808
4820
|
});
|
|
4809
|
-
} catch (
|
|
4821
|
+
} catch (M) {
|
|
4810
4822
|
throw new Error(
|
|
4811
|
-
`Failed to name EAS schema for property ${T.propertyName}: ${
|
|
4823
|
+
`Failed to name EAS schema for property ${T.propertyName}: ${M instanceof Error ? M.message : String(M)}`
|
|
4812
4824
|
);
|
|
4813
4825
|
}
|
|
4814
|
-
u.add(
|
|
4826
|
+
u.add(I), ct({ text: F, schemaUid: I });
|
|
4815
4827
|
}
|
|
4816
4828
|
const A = await ga(e);
|
|
4817
4829
|
for (const T of A)
|
|
@@ -6385,10 +6397,10 @@ function wh(e, t) {
|
|
|
6385
6397
|
startedAt: Date.now()
|
|
6386
6398
|
}, B = Ms(l, T);
|
|
6387
6399
|
d._snapshot._scheduledEvents[B] = D;
|
|
6388
|
-
const
|
|
6400
|
+
const F = a.setTimeout(() => {
|
|
6389
6401
|
delete i[B], delete d._snapshot._scheduledEvents[B], d._relay(l, f, m);
|
|
6390
6402
|
}, A);
|
|
6391
|
-
i[B] =
|
|
6403
|
+
i[B] = F;
|
|
6392
6404
|
},
|
|
6393
6405
|
cancel: (l, f) => {
|
|
6394
6406
|
const m = Ms(l, f), A = i[m];
|
|
@@ -8609,7 +8621,7 @@ function Ap() {
|
|
|
8609
8621
|
(function(t) {
|
|
8610
8622
|
var n, r = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, s = Math.ceil, o = Math.floor, i = "[BigNumber Error] ", a = i + "Number primitive has more than 15 significant digits: ", c = 1e14, u = 14, p = 9007199254740991, d = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], l = 1e7, f = 1e9;
|
|
8611
8623
|
function m(C) {
|
|
8612
|
-
var I, L,
|
|
8624
|
+
var I, L, M, P = U.prototype = { constructor: U, toString: null, valueOf: null }, V = new U(1), W = 20, G = 4, ne = -7, se = 21, de = -1e7, le = 1e7, we = !1, Oe = 1, be = 0, R = {
|
|
8613
8625
|
prefix: "",
|
|
8614
8626
|
groupSize: 3,
|
|
8615
8627
|
secondaryGroupSize: 0,
|
|
@@ -8619,7 +8631,7 @@ function Ap() {
|
|
|
8619
8631
|
fractionGroupSeparator: " ",
|
|
8620
8632
|
// non-breaking space
|
|
8621
8633
|
suffix: ""
|
|
8622
|
-
}, q = "0123456789abcdefghijklmnopqrstuvwxyz",
|
|
8634
|
+
}, q = "0123456789abcdefghijklmnopqrstuvwxyz", N = !0;
|
|
8623
8635
|
function U(h, y) {
|
|
8624
8636
|
var g, S, b, E, $, w, v, _, x = this;
|
|
8625
8637
|
if (!(x instanceof U)) return new U(h, y);
|
|
@@ -8636,15 +8648,15 @@ function Ap() {
|
|
|
8636
8648
|
}
|
|
8637
8649
|
_ = String(h);
|
|
8638
8650
|
} else {
|
|
8639
|
-
if (!r.test(_ = String(h))) return
|
|
8651
|
+
if (!r.test(_ = String(h))) return M(x, _, w);
|
|
8640
8652
|
x.s = _.charCodeAt(0) == 45 ? (_ = _.slice(1), -1) : 1;
|
|
8641
8653
|
}
|
|
8642
8654
|
(E = _.indexOf(".")) > -1 && (_ = _.replace(".", "")), ($ = _.search(/e/i)) > 0 ? (E < 0 && (E = $), E += +_.slice($ + 1), _ = _.substring(0, $)) : E < 0 && (E = _.length);
|
|
8643
8655
|
} else {
|
|
8644
|
-
if (B(y, 2, q.length, "Base"), y == 10 &&
|
|
8656
|
+
if (B(y, 2, q.length, "Base"), y == 10 && N)
|
|
8645
8657
|
return x = new U(h), J(x, W + x.e + 1, G);
|
|
8646
8658
|
if (_ = String(h), w = typeof h == "number") {
|
|
8647
|
-
if (h * 0 != 0) return
|
|
8659
|
+
if (h * 0 != 0) return M(x, _, w, y);
|
|
8648
8660
|
if (x.s = 1 / h < 0 ? (_ = _.slice(1), -1) : 1, U.DEBUG && _.replace(/^0\.0*|\./, "").length > 15)
|
|
8649
8661
|
throw Error(a + h);
|
|
8650
8662
|
} else
|
|
@@ -8660,7 +8672,7 @@ function Ap() {
|
|
|
8660
8672
|
b = !0, $ = -1, E = 0;
|
|
8661
8673
|
continue;
|
|
8662
8674
|
}
|
|
8663
|
-
return
|
|
8675
|
+
return M(x, String(h), w, y);
|
|
8664
8676
|
}
|
|
8665
8677
|
w = !1, _ = L(_, y, 10, x.s), (E = _.indexOf(".")) > -1 ? _ = _.replace(".", "") : E = _.length;
|
|
8666
8678
|
}
|
|
@@ -8709,11 +8721,11 @@ function Ap() {
|
|
|
8709
8721
|
else
|
|
8710
8722
|
throw Error(i + y + " not true or false: " + g);
|
|
8711
8723
|
if (h.hasOwnProperty(y = "MODULO_MODE") && (g = h[y], B(g, 0, 9, y), Oe = g), h.hasOwnProperty(y = "POW_PRECISION") && (g = h[y], B(g, 0, f, y), be = g), h.hasOwnProperty(y = "FORMAT"))
|
|
8712
|
-
if (g = h[y], typeof g == "object")
|
|
8724
|
+
if (g = h[y], typeof g == "object") R = g;
|
|
8713
8725
|
else throw Error(i + y + " not an object: " + g);
|
|
8714
8726
|
if (h.hasOwnProperty(y = "ALPHABET"))
|
|
8715
8727
|
if (g = h[y], typeof g == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(g))
|
|
8716
|
-
|
|
8728
|
+
N = g.slice(0, 10) == "0123456789", q = g;
|
|
8717
8729
|
else
|
|
8718
8730
|
throw Error(i + y + " invalid: " + g);
|
|
8719
8731
|
} else
|
|
@@ -8726,7 +8738,7 @@ function Ap() {
|
|
|
8726
8738
|
CRYPTO: we,
|
|
8727
8739
|
MODULO_MODE: Oe,
|
|
8728
8740
|
POW_PRECISION: be,
|
|
8729
|
-
FORMAT:
|
|
8741
|
+
FORMAT: R,
|
|
8730
8742
|
ALPHABET: q
|
|
8731
8743
|
};
|
|
8732
8744
|
}, U.isBigNumber = function(h) {
|
|
@@ -8885,10 +8897,10 @@ function Ap() {
|
|
|
8885
8897
|
var b, E, $, w, v;
|
|
8886
8898
|
if (g == null ? g = G : B(g, 0, 8), !h.c) return h.toString();
|
|
8887
8899
|
if (b = h.c[0], $ = h.e, y == null)
|
|
8888
|
-
v = T(h.c), v = S == 1 || S == 2 && ($ <= ne || $ >= se) ?
|
|
8900
|
+
v = T(h.c), v = S == 1 || S == 2 && ($ <= ne || $ >= se) ? z(v, $) : O(v, $, "0");
|
|
8889
8901
|
else if (h = J(new U(h), y, g), E = h.e, v = T(h.c), w = v.length, S == 1 || S == 2 && (y <= E || E <= ne)) {
|
|
8890
8902
|
for (; w < y; v += "0", w++) ;
|
|
8891
|
-
v =
|
|
8903
|
+
v = z(v, E);
|
|
8892
8904
|
} else if (y -= $ + (S === 2 && E > $), v = O(v, E, "0"), E + 1 > w) {
|
|
8893
8905
|
if (--y > 0) for (v += "."; y--; v += "0") ;
|
|
8894
8906
|
} else if (y += E - w, y > 0)
|
|
@@ -8905,7 +8917,7 @@ function Ap() {
|
|
|
8905
8917
|
for (b = y[0]; b >= 10; b /= 10, S++) ;
|
|
8906
8918
|
return (g = S + g * u - 1) > le ? h.c = h.e = null : g < de ? h.c = [h.e = 0] : (h.e = g, h.c = y), h;
|
|
8907
8919
|
}
|
|
8908
|
-
|
|
8920
|
+
M = /* @__PURE__ */ (function() {
|
|
8909
8921
|
var h = /^(-?)0([xbo])(?=\w[\w.]*$)/i, y = /^([^.]+)\.$/, g = /^\.([^.]+)$/, S = /^-?(Infinity|NaN)$/, b = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
|
|
8910
8922
|
return function(E, $, w, v) {
|
|
8911
8923
|
var _, x = w ? $ : $.replace(b, "");
|
|
@@ -8965,39 +8977,39 @@ function Ap() {
|
|
|
8965
8977
|
}
|
|
8966
8978
|
function ge(h) {
|
|
8967
8979
|
var y, g = h.e;
|
|
8968
|
-
return g === null ? h.toString() : (y = T(h.c), y = g <= ne || g >= se ?
|
|
8980
|
+
return g === null ? h.toString() : (y = T(h.c), y = g <= ne || g >= se ? z(y, g) : O(y, g, "0"), h.s < 0 ? "-" + y : y);
|
|
8969
8981
|
}
|
|
8970
|
-
return
|
|
8982
|
+
return P.absoluteValue = P.abs = function() {
|
|
8971
8983
|
var h = new U(this);
|
|
8972
8984
|
return h.s < 0 && (h.s = 1), h;
|
|
8973
|
-
},
|
|
8985
|
+
}, P.comparedTo = function(h, y) {
|
|
8974
8986
|
return D(this, new U(h, y));
|
|
8975
|
-
},
|
|
8987
|
+
}, P.decimalPlaces = P.dp = function(h, y) {
|
|
8976
8988
|
var g, S, b, E = this;
|
|
8977
8989
|
if (h != null)
|
|
8978
8990
|
return B(h, 0, f), y == null ? y = G : B(y, 0, 8), J(new U(E), h + E.e + 1, y);
|
|
8979
8991
|
if (!(g = E.c)) return null;
|
|
8980
8992
|
if (S = ((b = g.length - 1) - A(this.e / u)) * u, b = g[b]) for (; b % 10 == 0; b /= 10, S--) ;
|
|
8981
8993
|
return S < 0 && (S = 0), S;
|
|
8982
|
-
},
|
|
8994
|
+
}, P.dividedBy = P.div = function(h, y) {
|
|
8983
8995
|
return I(this, new U(h, y), W, G);
|
|
8984
|
-
},
|
|
8996
|
+
}, P.dividedToIntegerBy = P.idiv = function(h, y) {
|
|
8985
8997
|
return I(this, new U(h, y), 0, 1);
|
|
8986
|
-
},
|
|
8998
|
+
}, P.exponentiatedBy = P.pow = function(h, y) {
|
|
8987
8999
|
var g, S, b, E, $, w, v, _, x, k = this;
|
|
8988
9000
|
if (h = new U(h), h.c && !h.isInteger())
|
|
8989
9001
|
throw Error(i + "Exponent not an integer: " + ge(h));
|
|
8990
9002
|
if (y != null && (y = new U(y)), w = h.e > 14, !k.c || !k.c[0] || k.c[0] == 1 && !k.e && k.c.length == 1 || !h.c || !h.c[0])
|
|
8991
|
-
return x = new U(Math.pow(+ge(k), w ? h.s * (2 -
|
|
9003
|
+
return x = new U(Math.pow(+ge(k), w ? h.s * (2 - F(h)) : +ge(h))), y ? x.mod(y) : x;
|
|
8992
9004
|
if (v = h.s < 0, y) {
|
|
8993
9005
|
if (y.c ? !y.c[0] : !y.s) return new U(NaN);
|
|
8994
9006
|
S = !v && k.isInteger() && y.isInteger(), S && (k = k.mod(y));
|
|
8995
9007
|
} else {
|
|
8996
9008
|
if (h.e > 9 && (k.e > 0 || k.e < -1 || (k.e == 0 ? k.c[0] > 1 || w && k.c[1] >= 24e7 : k.c[0] < 8e13 || w && k.c[0] <= 9999975e7)))
|
|
8997
|
-
return E = k.s < 0 &&
|
|
9009
|
+
return E = k.s < 0 && F(h) ? -0 : 0, k.e > -1 && (E = 1 / E), new U(v ? 1 / E : E);
|
|
8998
9010
|
be && (E = s(be / u + 2));
|
|
8999
9011
|
}
|
|
9000
|
-
for (w ? (g = new U(0.5), v && (h.s = 1), _ =
|
|
9012
|
+
for (w ? (g = new U(0.5), v && (h.s = 1), _ = F(h)) : (b = Math.abs(+ge(h)), _ = b % 2), x = new U(V); ; ) {
|
|
9001
9013
|
if (_) {
|
|
9002
9014
|
if (x = x.times(k), !x.c) break;
|
|
9003
9015
|
E ? x.c.length > E && (x.c.length = E) : S && (x = x.mod(y));
|
|
@@ -9006,7 +9018,7 @@ function Ap() {
|
|
|
9006
9018
|
if (b = o(b / 2), b === 0) break;
|
|
9007
9019
|
_ = b % 2;
|
|
9008
9020
|
} else if (h = h.times(g), J(h, h.e + 1, 1), h.e > 14)
|
|
9009
|
-
_ =
|
|
9021
|
+
_ = F(h);
|
|
9010
9022
|
else {
|
|
9011
9023
|
if (b = +ge(h), b === 0) break;
|
|
9012
9024
|
_ = b % 2;
|
|
@@ -9014,32 +9026,32 @@ function Ap() {
|
|
|
9014
9026
|
k = k.times(k), E ? k.c && k.c.length > E && (k.c.length = E) : S && (k = k.mod(y));
|
|
9015
9027
|
}
|
|
9016
9028
|
return S ? x : (v && (x = V.div(x)), y ? x.mod(y) : E ? J(x, be, G, $) : x);
|
|
9017
|
-
},
|
|
9029
|
+
}, P.integerValue = function(h) {
|
|
9018
9030
|
var y = new U(this);
|
|
9019
9031
|
return h == null ? h = G : B(h, 0, 8), J(y, y.e + 1, h);
|
|
9020
|
-
},
|
|
9032
|
+
}, P.isEqualTo = P.eq = function(h, y) {
|
|
9021
9033
|
return D(this, new U(h, y)) === 0;
|
|
9022
|
-
},
|
|
9034
|
+
}, P.isFinite = function() {
|
|
9023
9035
|
return !!this.c;
|
|
9024
|
-
},
|
|
9036
|
+
}, P.isGreaterThan = P.gt = function(h, y) {
|
|
9025
9037
|
return D(this, new U(h, y)) > 0;
|
|
9026
|
-
},
|
|
9038
|
+
}, P.isGreaterThanOrEqualTo = P.gte = function(h, y) {
|
|
9027
9039
|
return (y = D(this, new U(h, y))) === 1 || y === 0;
|
|
9028
|
-
},
|
|
9040
|
+
}, P.isInteger = function() {
|
|
9029
9041
|
return !!this.c && A(this.e / u) > this.c.length - 2;
|
|
9030
|
-
},
|
|
9042
|
+
}, P.isLessThan = P.lt = function(h, y) {
|
|
9031
9043
|
return D(this, new U(h, y)) < 0;
|
|
9032
|
-
},
|
|
9044
|
+
}, P.isLessThanOrEqualTo = P.lte = function(h, y) {
|
|
9033
9045
|
return (y = D(this, new U(h, y))) === -1 || y === 0;
|
|
9034
|
-
},
|
|
9046
|
+
}, P.isNaN = function() {
|
|
9035
9047
|
return !this.s;
|
|
9036
|
-
},
|
|
9048
|
+
}, P.isNegative = function() {
|
|
9037
9049
|
return this.s < 0;
|
|
9038
|
-
},
|
|
9050
|
+
}, P.isPositive = function() {
|
|
9039
9051
|
return this.s > 0;
|
|
9040
|
-
},
|
|
9052
|
+
}, P.isZero = function() {
|
|
9041
9053
|
return !!this.c && this.c[0] == 0;
|
|
9042
|
-
},
|
|
9054
|
+
}, P.minus = function(h, y) {
|
|
9043
9055
|
var g, S, b, E, $ = this, w = $.s;
|
|
9044
9056
|
if (h = new U(h, y), y = h.s, !w || !y) return new U(NaN);
|
|
9045
9057
|
if (w != y)
|
|
@@ -9072,10 +9084,10 @@ function Ap() {
|
|
|
9072
9084
|
}
|
|
9073
9085
|
for (; x[0] == 0; x.splice(0, 1), --_) ;
|
|
9074
9086
|
return x[0] ? Z(h, x, _) : (h.s = G == 3 ? -1 : 1, h.c = [h.e = 0], h);
|
|
9075
|
-
},
|
|
9087
|
+
}, P.modulo = P.mod = function(h, y) {
|
|
9076
9088
|
var g, S, b = this;
|
|
9077
9089
|
return h = new U(h, y), !b.c || !h.s || h.c && !h.c[0] ? new U(NaN) : !h.c || b.c && !b.c[0] ? new U(b) : (Oe == 9 ? (S = h.s, h.s = 1, g = I(b, h, 0, 3), h.s = S, g.s *= S) : g = I(b, h, 0, Oe), h = b.minus(g.times(h)), !h.c[0] && Oe == 1 && (h.s = b.s), h);
|
|
9078
|
-
},
|
|
9090
|
+
}, P.multipliedBy = P.times = function(h, y) {
|
|
9079
9091
|
var g, S, b, E, $, w, v, _, x, k, j, H, X, ie, ue, K = this, Y = K.c, he = (h = new U(h, y)).c;
|
|
9080
9092
|
if (!Y || !he || !Y[0] || !he[0])
|
|
9081
9093
|
return !K.s || !h.s || Y && !Y[0] && !he || he && !he[0] && !Y ? h.c = h.e = h.s = null : (h.s *= K.s, !Y || !he ? h.c = h.e = null : (h.c = [0], h.e = 0)), h;
|
|
@@ -9086,10 +9098,10 @@ function Ap() {
|
|
|
9086
9098
|
X[E] = g;
|
|
9087
9099
|
}
|
|
9088
9100
|
return g ? ++S : X.splice(0, 1), Z(h, X, S);
|
|
9089
|
-
},
|
|
9101
|
+
}, P.negated = function() {
|
|
9090
9102
|
var h = new U(this);
|
|
9091
9103
|
return h.s = -h.s || null, h;
|
|
9092
|
-
},
|
|
9104
|
+
}, P.plus = function(h, y) {
|
|
9093
9105
|
var g, S = this, b = S.s;
|
|
9094
9106
|
if (h = new U(h, y), y = h.s, !b || !y) return new U(NaN);
|
|
9095
9107
|
if (b != y)
|
|
@@ -9106,7 +9118,7 @@ function Ap() {
|
|
|
9106
9118
|
for (b = w.length, y = v.length, b - y < 0 && (g = v, v = w, w = g, y = b), b = 0; y; )
|
|
9107
9119
|
b = (w[--y] = w[y] + v[y] + b) / c | 0, w[y] = c === w[y] ? 0 : w[y] % c;
|
|
9108
9120
|
return b && (w = [b].concat(w), ++$), Z(h, w, $);
|
|
9109
|
-
},
|
|
9121
|
+
}, P.precision = P.sd = function(h, y) {
|
|
9110
9122
|
var g, S, b, E = this;
|
|
9111
9123
|
if (h != null && h !== !!h)
|
|
9112
9124
|
return B(h, 1, f), y == null ? y = G : B(y, 0, 8), J(new U(E), h, y);
|
|
@@ -9116,9 +9128,9 @@ function Ap() {
|
|
|
9116
9128
|
for (b = g[0]; b >= 10; b /= 10, S++) ;
|
|
9117
9129
|
}
|
|
9118
9130
|
return h && E.e + 1 > S && (S = E.e + 1), S;
|
|
9119
|
-
},
|
|
9131
|
+
}, P.shiftedBy = function(h) {
|
|
9120
9132
|
return B(h, -p, p), this.times("1e" + h);
|
|
9121
|
-
},
|
|
9133
|
+
}, P.squareRoot = P.sqrt = function() {
|
|
9122
9134
|
var h, y, g, S, b, E = this, $ = E.c, w = E.s, v = E.e, _ = W + 4, x = new U("0.5");
|
|
9123
9135
|
if (w !== 1 || !$ || !$[0])
|
|
9124
9136
|
return new U(!w || w < 0 && (!$ || $[0]) ? NaN : $ ? E : 1 / 0);
|
|
@@ -9137,14 +9149,14 @@ function Ap() {
|
|
|
9137
9149
|
}
|
|
9138
9150
|
}
|
|
9139
9151
|
return J(g, g.e + W + 1, G, h);
|
|
9140
|
-
},
|
|
9152
|
+
}, P.toExponential = function(h, y) {
|
|
9141
9153
|
return h != null && (B(h, 0, f), h++), ee(this, h, y, 1);
|
|
9142
|
-
},
|
|
9154
|
+
}, P.toFixed = function(h, y) {
|
|
9143
9155
|
return h != null && (B(h, 0, f), h = h + this.e + 1), ee(this, h, y);
|
|
9144
|
-
},
|
|
9156
|
+
}, P.toFormat = function(h, y, g) {
|
|
9145
9157
|
var S, b = this;
|
|
9146
9158
|
if (g == null)
|
|
9147
|
-
h != null && y && typeof y == "object" ? (g = y, y = null) : h && typeof h == "object" ? (g = h, h = y = null) : g =
|
|
9159
|
+
h != null && y && typeof y == "object" ? (g = y, y = null) : h && typeof h == "object" ? (g = h, h = y = null) : g = R;
|
|
9148
9160
|
else if (typeof g != "object")
|
|
9149
9161
|
throw Error(i + "Argument not an object: " + g);
|
|
9150
9162
|
if (S = b.toFixed(h, y), b.c) {
|
|
@@ -9159,7 +9171,7 @@ function Ap() {
|
|
|
9159
9171
|
) : k) : x;
|
|
9160
9172
|
}
|
|
9161
9173
|
return (g.prefix || "") + S + (g.suffix || "");
|
|
9162
|
-
},
|
|
9174
|
+
}, P.toFraction = function(h) {
|
|
9163
9175
|
var y, g, S, b, E, $, w, v, _, x, k, j, H = this, X = H.c;
|
|
9164
9176
|
if (h != null && (w = new U(h), !w.isInteger() && (w.c || w.s !== 1) || w.lt(V)))
|
|
9165
9177
|
throw Error(i + "Argument " + (w.isInteger() ? "out of range: " : "not an integer: ") + ge(w));
|
|
@@ -9169,59 +9181,59 @@ function Ap() {
|
|
|
9169
9181
|
return b = I(h.minus(g), S, 0, 1), v = v.plus(b.times(_)), g = g.plus(b.times(S)), v.s = _.s = H.s, E = E * 2, k = I(_, S, E, G).minus(H).abs().comparedTo(
|
|
9170
9182
|
I(v, g, E, G).minus(H).abs()
|
|
9171
9183
|
) < 1 ? [_, S] : [v, g], le = $, k;
|
|
9172
|
-
},
|
|
9184
|
+
}, P.toNumber = function() {
|
|
9173
9185
|
return +ge(this);
|
|
9174
|
-
},
|
|
9186
|
+
}, P.toPrecision = function(h, y) {
|
|
9175
9187
|
return h != null && B(h, 1, f), ee(this, h, y, 2);
|
|
9176
|
-
},
|
|
9188
|
+
}, P.toString = function(h) {
|
|
9177
9189
|
var y, g = this, S = g.s, b = g.e;
|
|
9178
|
-
return b === null ? S ? (y = "Infinity", S < 0 && (y = "-" + y)) : y = "NaN" : (h == null ? y = b <= ne || b >= se ?
|
|
9179
|
-
},
|
|
9190
|
+
return b === null ? S ? (y = "Infinity", S < 0 && (y = "-" + y)) : y = "NaN" : (h == null ? y = b <= ne || b >= se ? z(T(g.c), b) : O(T(g.c), b, "0") : h === 10 && N ? (g = J(new U(g), W + b + 1, G), y = O(T(g.c), g.e, "0")) : (B(h, 2, q.length, "Base"), y = L(O(T(g.c), b, "0"), 10, h, S, !0)), S < 0 && g.c[0] && (y = "-" + y)), y;
|
|
9191
|
+
}, P.valueOf = P.toJSON = function() {
|
|
9180
9192
|
return ge(this);
|
|
9181
|
-
},
|
|
9193
|
+
}, P._isBigNumber = !0, C != null && U.set(C), U;
|
|
9182
9194
|
}
|
|
9183
9195
|
function A(C) {
|
|
9184
9196
|
var I = C | 0;
|
|
9185
9197
|
return C > 0 || C === I ? I : I - 1;
|
|
9186
9198
|
}
|
|
9187
9199
|
function T(C) {
|
|
9188
|
-
for (var I, L,
|
|
9189
|
-
for (I = C[
|
|
9200
|
+
for (var I, L, M = 1, P = C.length, V = C[0] + ""; M < P; ) {
|
|
9201
|
+
for (I = C[M++] + "", L = u - I.length; L--; I = "0" + I) ;
|
|
9190
9202
|
V += I;
|
|
9191
9203
|
}
|
|
9192
|
-
for (
|
|
9193
|
-
return V.slice(0,
|
|
9204
|
+
for (P = V.length; V.charCodeAt(--P) === 48; ) ;
|
|
9205
|
+
return V.slice(0, P + 1 || 1);
|
|
9194
9206
|
}
|
|
9195
9207
|
function D(C, I) {
|
|
9196
|
-
var L,
|
|
9208
|
+
var L, M, P = C.c, V = I.c, W = C.s, G = I.s, ne = C.e, se = I.e;
|
|
9197
9209
|
if (!W || !G) return null;
|
|
9198
|
-
if (L =
|
|
9210
|
+
if (L = P && !P[0], M = V && !V[0], L || M) return L ? M ? 0 : -G : W;
|
|
9199
9211
|
if (W != G) return W;
|
|
9200
|
-
if (L = W < 0,
|
|
9201
|
-
if (!
|
|
9202
|
-
for (G = (ne =
|
|
9212
|
+
if (L = W < 0, M = ne == se, !P || !V) return M ? 0 : !P ^ L ? 1 : -1;
|
|
9213
|
+
if (!M) return ne > se ^ L ? 1 : -1;
|
|
9214
|
+
for (G = (ne = P.length) < (se = V.length) ? ne : se, W = 0; W < G; W++) if (P[W] != V[W]) return P[W] > V[W] ^ L ? 1 : -1;
|
|
9203
9215
|
return ne == se ? 0 : ne > se ^ L ? 1 : -1;
|
|
9204
9216
|
}
|
|
9205
|
-
function B(C, I, L,
|
|
9217
|
+
function B(C, I, L, M) {
|
|
9206
9218
|
if (C < I || C > L || C !== o(C))
|
|
9207
|
-
throw Error(i + (
|
|
9219
|
+
throw Error(i + (M || "Argument") + (typeof C == "number" ? C < I || C > L ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(C));
|
|
9208
9220
|
}
|
|
9209
|
-
function
|
|
9221
|
+
function F(C) {
|
|
9210
9222
|
var I = C.c.length - 1;
|
|
9211
9223
|
return A(C.e / u) == I && C.c[I] % 2 != 0;
|
|
9212
9224
|
}
|
|
9213
|
-
function
|
|
9225
|
+
function z(C, I) {
|
|
9214
9226
|
return (C.length > 1 ? C.charAt(0) + "." + C.slice(1) : C) + (I < 0 ? "e" : "e+") + I;
|
|
9215
9227
|
}
|
|
9216
9228
|
function O(C, I, L) {
|
|
9217
|
-
var
|
|
9229
|
+
var M, P;
|
|
9218
9230
|
if (I < 0) {
|
|
9219
|
-
for (
|
|
9220
|
-
C =
|
|
9221
|
-
} else if (
|
|
9222
|
-
for (
|
|
9223
|
-
C +=
|
|
9224
|
-
} else I <
|
|
9231
|
+
for (P = L + "."; ++I; P += L) ;
|
|
9232
|
+
C = P + C;
|
|
9233
|
+
} else if (M = C.length, ++I > M) {
|
|
9234
|
+
for (P = L, I -= M; --I; P += L) ;
|
|
9235
|
+
C += P;
|
|
9236
|
+
} else I < M && (C = C.slice(0, I) + "." + C.slice(I));
|
|
9225
9237
|
return C;
|
|
9226
9238
|
}
|
|
9227
9239
|
n = m(), n.default = n.BigNumber = n, e.exports ? e.exports = n : (t || (t = typeof self < "u" && self ? self : window), t.BigNumber = n);
|
|
@@ -9405,10 +9417,10 @@ function $p() {
|
|
|
9405
9417
|
return (m + A) * 3 / 4 - A;
|
|
9406
9418
|
}
|
|
9407
9419
|
function u(f) {
|
|
9408
|
-
var m, A = i(f), T = A[0], D = A[1], B = new n(c(f, T, D)),
|
|
9409
|
-
for (O = 0; O <
|
|
9410
|
-
m = t[f.charCodeAt(O)] << 18 | t[f.charCodeAt(O + 1)] << 12 | t[f.charCodeAt(O + 2)] << 6 | t[f.charCodeAt(O + 3)], B[
|
|
9411
|
-
return D === 2 && (m = t[f.charCodeAt(O)] << 2 | t[f.charCodeAt(O + 1)] >> 4, B[
|
|
9420
|
+
var m, A = i(f), T = A[0], D = A[1], B = new n(c(f, T, D)), F = 0, z = D > 0 ? T - 4 : T, O;
|
|
9421
|
+
for (O = 0; O < z; O += 4)
|
|
9422
|
+
m = t[f.charCodeAt(O)] << 18 | t[f.charCodeAt(O + 1)] << 12 | t[f.charCodeAt(O + 2)] << 6 | t[f.charCodeAt(O + 3)], B[F++] = m >> 16 & 255, B[F++] = m >> 8 & 255, B[F++] = m & 255;
|
|
9423
|
+
return D === 2 && (m = t[f.charCodeAt(O)] << 2 | t[f.charCodeAt(O + 1)] >> 4, B[F++] = m & 255), D === 1 && (m = t[f.charCodeAt(O)] << 10 | t[f.charCodeAt(O + 1)] << 4 | t[f.charCodeAt(O + 2)] >> 2, B[F++] = m >> 8 & 255, B[F++] = m & 255), B;
|
|
9412
9424
|
}
|
|
9413
9425
|
function p(f) {
|
|
9414
9426
|
return e[f >> 18 & 63] + e[f >> 12 & 63] + e[f >> 6 & 63] + e[f & 63];
|
|
@@ -9419,8 +9431,8 @@ function $p() {
|
|
|
9419
9431
|
return D.join("");
|
|
9420
9432
|
}
|
|
9421
9433
|
function l(f) {
|
|
9422
|
-
for (var m, A = f.length, T = A % 3, D = [], B = 16383,
|
|
9423
|
-
D.push(d(f,
|
|
9434
|
+
for (var m, A = f.length, T = A % 3, D = [], B = 16383, F = 0, z = A - T; F < z; F += B)
|
|
9435
|
+
D.push(d(f, F, F + B > z ? z : F + B));
|
|
9424
9436
|
return T === 1 ? (m = f[A - 1], D.push(
|
|
9425
9437
|
e[m >> 2] + e[m << 4 & 63] + "=="
|
|
9426
9438
|
)) : T === 2 && (m = (f[A - 2] << 8) + f[A - 1], D.push(
|
|
@@ -9713,21 +9725,21 @@ function Up() {
|
|
|
9713
9725
|
var nr = {}, ei;
|
|
9714
9726
|
function sa() {
|
|
9715
9727
|
return ei || (ei = 1, (function(e) {
|
|
9716
|
-
Object.defineProperty(e, "__esModule", { value: !0 }), e.arrayCompare = e.MIN_CHUNK_SIZE = e.MAX_CHUNK_SIZE = void 0, e.chunkData = o, e.generateLeaves = i, e.computeRootHash = a, e.generateTree = c, e.generateTransactionChunks = u, e.buildLayers = p, e.generateProofs = d, e.arrayFlatten = f, e.intToBuffer = T, e.bufferToInt = D, e.validatePath =
|
|
9728
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.arrayCompare = e.MIN_CHUNK_SIZE = e.MAX_CHUNK_SIZE = void 0, e.chunkData = o, e.generateLeaves = i, e.computeRootHash = a, e.generateTree = c, e.generateTransactionChunks = u, e.buildLayers = p, e.generateProofs = d, e.arrayFlatten = f, e.intToBuffer = T, e.bufferToInt = D, e.validatePath = F, e.debug = z;
|
|
9717
9729
|
const t = Tn(), n = Ge();
|
|
9718
9730
|
e.MAX_CHUNK_SIZE = 256 * 1024, e.MIN_CHUNK_SIZE = 32 * 1024;
|
|
9719
9731
|
const r = 32, s = 32;
|
|
9720
9732
|
async function o(O) {
|
|
9721
9733
|
let C = [], I = O, L = 0;
|
|
9722
9734
|
for (; I.byteLength >= e.MAX_CHUNK_SIZE; ) {
|
|
9723
|
-
let
|
|
9724
|
-
|
|
9725
|
-
const V = I.slice(0,
|
|
9735
|
+
let M = e.MAX_CHUNK_SIZE, P = I.byteLength - e.MAX_CHUNK_SIZE;
|
|
9736
|
+
P > 0 && P < e.MIN_CHUNK_SIZE && (M = Math.ceil(I.byteLength / 2));
|
|
9737
|
+
const V = I.slice(0, M), W = await t.default.crypto.hash(V);
|
|
9726
9738
|
L += V.byteLength, C.push({
|
|
9727
9739
|
dataHash: W,
|
|
9728
9740
|
minByteRange: L - V.byteLength,
|
|
9729
9741
|
maxByteRange: L
|
|
9730
|
-
}), I = I.slice(
|
|
9742
|
+
}), I = I.slice(M);
|
|
9731
9743
|
}
|
|
9732
9744
|
return C.push({
|
|
9733
9745
|
dataHash: await t.default.crypto.hash(I),
|
|
@@ -9751,11 +9763,11 @@ function sa() {
|
|
|
9751
9763
|
return await p(await i(await o(O)));
|
|
9752
9764
|
}
|
|
9753
9765
|
async function u(O) {
|
|
9754
|
-
const C = await o(O), I = await i(C), L = await p(I),
|
|
9755
|
-
return
|
|
9766
|
+
const C = await o(O), I = await i(C), L = await p(I), M = await d(L), P = C.slice(-1)[0];
|
|
9767
|
+
return P.maxByteRange - P.minByteRange === 0 && (C.splice(C.length - 1, 1), M.splice(M.length - 1, 1)), {
|
|
9756
9768
|
data_root: L.id,
|
|
9757
9769
|
chunks: C,
|
|
9758
|
-
proofs:
|
|
9770
|
+
proofs: M
|
|
9759
9771
|
};
|
|
9760
9772
|
}
|
|
9761
9773
|
async function p(O, C = 0) {
|
|
@@ -9833,15 +9845,15 @@ function sa() {
|
|
|
9833
9845
|
}
|
|
9834
9846
|
const B = (O, C) => O.every((I, L) => C[L] === I);
|
|
9835
9847
|
e.arrayCompare = B;
|
|
9836
|
-
async function
|
|
9848
|
+
async function F(O, C, I, L, M) {
|
|
9837
9849
|
if (L <= 0)
|
|
9838
9850
|
return !1;
|
|
9839
9851
|
if (C >= L)
|
|
9840
|
-
return
|
|
9852
|
+
return F(O, 0, L - 1, L, M);
|
|
9841
9853
|
if (C < 0)
|
|
9842
|
-
return
|
|
9843
|
-
if (
|
|
9844
|
-
const de =
|
|
9854
|
+
return F(O, 0, 0, L, M);
|
|
9855
|
+
if (M.length == s + r) {
|
|
9856
|
+
const de = M.slice(0, s), le = M.slice(de.length, de.length + r), we = await A([
|
|
9845
9857
|
await A(de),
|
|
9846
9858
|
await A(le)
|
|
9847
9859
|
]);
|
|
@@ -9852,23 +9864,23 @@ function sa() {
|
|
|
9852
9864
|
chunkSize: L - I
|
|
9853
9865
|
} : !1;
|
|
9854
9866
|
}
|
|
9855
|
-
const
|
|
9856
|
-
await A(
|
|
9867
|
+
const P = M.slice(0, s), V = M.slice(P.length, P.length + s), W = M.slice(P.length + V.length, P.length + V.length + r), G = D(W), ne = M.slice(P.length + V.length + W.length), se = await A([
|
|
9868
|
+
await A(P),
|
|
9857
9869
|
await A(V),
|
|
9858
9870
|
await A(W)
|
|
9859
9871
|
]);
|
|
9860
|
-
return (0, e.arrayCompare)(O, se) ? C < G ? await
|
|
9872
|
+
return (0, e.arrayCompare)(O, se) ? C < G ? await F(P, C, I, Math.min(L, G), ne) : await F(V, C, Math.max(I, G), L, ne) : !1;
|
|
9861
9873
|
}
|
|
9862
|
-
async function
|
|
9874
|
+
async function z(O, C = "") {
|
|
9863
9875
|
if (O.byteLength < 1)
|
|
9864
9876
|
return C;
|
|
9865
|
-
const I = O.slice(0, s), L = O.slice(I.length, I.length + s),
|
|
9877
|
+
const I = O.slice(0, s), L = O.slice(I.length, I.length + s), M = O.slice(I.length + L.length, I.length + L.length + r), P = D(M), V = O.slice(I.length + L.length + M.length), W = await A([
|
|
9866
9878
|
await A(I),
|
|
9867
9879
|
await A(L),
|
|
9868
|
-
await A(
|
|
9880
|
+
await A(M)
|
|
9869
9881
|
]), G = `${C}
|
|
9870
|
-
${JSON.stringify(Buffer.from(I))},${JSON.stringify(Buffer.from(L))},${
|
|
9871
|
-
return
|
|
9882
|
+
${JSON.stringify(Buffer.from(I))},${JSON.stringify(Buffer.from(L))},${P} => ${JSON.stringify(W)}`;
|
|
9883
|
+
return z(V, G);
|
|
9872
9884
|
}
|
|
9873
9885
|
})(nr)), nr;
|
|
9874
9886
|
}
|
|
@@ -10634,12 +10646,12 @@ function Tn() {
|
|
|
10634
10646
|
f.last_tx == null && (T.last_tx = await this.transactions.getTransactionAnchor());
|
|
10635
10647
|
const D = await this.silo.parseUri(A);
|
|
10636
10648
|
if (typeof f.data == "string") {
|
|
10637
|
-
const
|
|
10638
|
-
T.reward = await this.transactions.getPrice(
|
|
10649
|
+
const F = await this.crypto.encrypt(a.stringToBuffer(f.data), D.getEncryptionKey());
|
|
10650
|
+
T.reward = await this.transactions.getPrice(F.byteLength), T.data = a.bufferTob64Url(F);
|
|
10639
10651
|
}
|
|
10640
10652
|
if (f.data instanceof Uint8Array) {
|
|
10641
|
-
const
|
|
10642
|
-
T.reward = await this.transactions.getPrice(
|
|
10653
|
+
const F = await this.crypto.encrypt(f.data, D.getEncryptionKey());
|
|
10654
|
+
T.reward = await this.transactions.getPrice(F.byteLength), T.data = a.bufferTob64Url(F);
|
|
10643
10655
|
}
|
|
10644
10656
|
const B = new i.default(T);
|
|
10645
10657
|
return B.addTag("Silo-Name", D.getAccessKey()), B.addTag("Silo-Version", "0.1.0"), B;
|
|
@@ -11029,8 +11041,8 @@ const Xp = Xt(async ({
|
|
|
11029
11041
|
address: a
|
|
11030
11042
|
}) : l;
|
|
11031
11043
|
await Nr(i, r, pe(), re);
|
|
11032
|
-
const m = s.map((
|
|
11033
|
-
const te =
|
|
11044
|
+
const m = s.map((N, U) => {
|
|
11045
|
+
const te = N.transaction?.id;
|
|
11034
11046
|
if (!te || typeof te != "string")
|
|
11035
11047
|
throw new Error(
|
|
11036
11048
|
"Attestation recovery failed: Arweave transaction data did not survive restore. Delete this publish record and try a full publish from the beginning."
|
|
@@ -11038,28 +11050,28 @@ const Xp = Xt(async ({
|
|
|
11038
11050
|
const Z = o[U];
|
|
11039
11051
|
if (!Z) throw new Error("Publish upload index mismatch");
|
|
11040
11052
|
return { ...Z, txId: te };
|
|
11041
|
-
}), A = await i.getPublishPayload(m), T = 64, D = (
|
|
11042
|
-
if (
|
|
11043
|
-
if (typeof
|
|
11044
|
-
return "0x" + (
|
|
11045
|
-
if (
|
|
11046
|
-
const U =
|
|
11053
|
+
}), A = await i.getPublishPayload(m), T = 64, D = (N) => {
|
|
11054
|
+
if (N == null) return "0x" + "0".repeat(T);
|
|
11055
|
+
if (typeof N == "string")
|
|
11056
|
+
return "0x" + (N.startsWith("0x") ? N.slice(2) : N).replace(/[^0-9a-fA-F]/g, "0").padStart(T, "0").slice(-T);
|
|
11057
|
+
if (N instanceof Uint8Array || typeof ArrayBuffer < "u" && N instanceof ArrayBuffer) {
|
|
11058
|
+
const U = N instanceof Uint8Array ? N : new Uint8Array(N);
|
|
11047
11059
|
return "0x" + Array.from(U).map((te) => te.toString(16).padStart(2, "0")).join("").padStart(T, "0").slice(-T);
|
|
11048
11060
|
}
|
|
11049
11061
|
return "0x" + "0".repeat(T);
|
|
11050
|
-
}, B = (
|
|
11051
|
-
if (
|
|
11052
|
-
if (typeof
|
|
11053
|
-
const ee = (
|
|
11062
|
+
}, B = (N) => {
|
|
11063
|
+
if (N == null || typeof N == "string" && (N === "" || N === "0x")) return "0x";
|
|
11064
|
+
if (typeof N == "string") {
|
|
11065
|
+
const ee = (N.startsWith("0x") ? N.slice(2) : N).replace(/[^0-9a-fA-F]/g, "0");
|
|
11054
11066
|
return "0x" + (ee.length % 2 === 1 ? "0" + ee : ee);
|
|
11055
11067
|
}
|
|
11056
|
-
if (
|
|
11057
|
-
const U =
|
|
11068
|
+
if (N instanceof Uint8Array || typeof ArrayBuffer < "u" && N instanceof ArrayBuffer) {
|
|
11069
|
+
const U = N instanceof Uint8Array ? N : new Uint8Array(N);
|
|
11058
11070
|
return "0x" + Array.from(U).map((ee) => ee.toString(16).padStart(2, "0")).join("");
|
|
11059
11071
|
}
|
|
11060
11072
|
return "0x";
|
|
11061
|
-
},
|
|
11062
|
-
const U = (
|
|
11073
|
+
}, z = (Array.isArray(A) ? A : [A]).map((N) => {
|
|
11074
|
+
const U = (N?.listOfAttestations ?? []).map((te) => {
|
|
11063
11075
|
const Z = Array.isArray(te?.data) ? te.data : [];
|
|
11064
11076
|
return {
|
|
11065
11077
|
schema: D(te?.schema),
|
|
@@ -11071,20 +11083,20 @@ const Xp = Xt(async ({
|
|
|
11071
11083
|
value: J?.value != null ? BigInt(J.value) : BigInt(0)
|
|
11072
11084
|
}))
|
|
11073
11085
|
};
|
|
11074
|
-
}), ee = (
|
|
11086
|
+
}), ee = (N?.propertiesToUpdate ?? []).map((te) => ({
|
|
11075
11087
|
...te,
|
|
11076
11088
|
propertySchemaUid: D(te?.propertySchemaUid)
|
|
11077
11089
|
}));
|
|
11078
11090
|
return {
|
|
11079
|
-
...
|
|
11080
|
-
seedUid: D(
|
|
11081
|
-
seedSchemaUid: D(
|
|
11082
|
-
versionUid: D(
|
|
11083
|
-
versionSchemaUid: D(
|
|
11091
|
+
...N,
|
|
11092
|
+
seedUid: D(N?.seedUid),
|
|
11093
|
+
seedSchemaUid: D(N?.seedSchemaUid),
|
|
11094
|
+
versionUid: D(N?.versionUid),
|
|
11095
|
+
versionSchemaUid: D(N?.versionSchemaUid),
|
|
11084
11096
|
listOfAttestations: U,
|
|
11085
11097
|
propertiesToUpdate: ee
|
|
11086
11098
|
};
|
|
11087
|
-
}), O = new Map(
|
|
11099
|
+
}), O = new Map(z.map((N) => [N?.localId, N])), C = {
|
|
11088
11100
|
recipient: ir,
|
|
11089
11101
|
expirationTime: BigInt(0),
|
|
11090
11102
|
revocable: !0,
|
|
@@ -11092,8 +11104,8 @@ const Xp = Xt(async ({
|
|
|
11092
11104
|
data: Me,
|
|
11093
11105
|
value: BigInt(0)
|
|
11094
11106
|
};
|
|
11095
|
-
for (const
|
|
11096
|
-
for (const U of
|
|
11107
|
+
for (const N of z)
|
|
11108
|
+
for (const U of N?.propertiesToUpdate ?? []) {
|
|
11097
11109
|
const ee = U?.publishLocalId, te = D(U?.propertySchemaUid);
|
|
11098
11110
|
if (!ee || !te) continue;
|
|
11099
11111
|
const Z = O.get(ee);
|
|
@@ -11103,13 +11115,13 @@ const Xp = Xt(async ({
|
|
|
11103
11115
|
);
|
|
11104
11116
|
J && (!Array.isArray(J.data) || J.data.length === 0) && (J.data = [{ ...C, refUID: Me }]);
|
|
11105
11117
|
}
|
|
11106
|
-
const I = Array.isArray(A) ?
|
|
11118
|
+
const I = Array.isArray(A) ? z : [z[0]];
|
|
11107
11119
|
u && zp(I);
|
|
11108
|
-
let L,
|
|
11120
|
+
let L, M = r;
|
|
11109
11121
|
if (u) {
|
|
11110
|
-
const
|
|
11111
|
-
await
|
|
11112
|
-
const U =
|
|
11122
|
+
const N = Na();
|
|
11123
|
+
await N.autoConnect({ client: pe(), chain: re });
|
|
11124
|
+
const U = N.getAccount();
|
|
11113
11125
|
if (!U)
|
|
11114
11126
|
throw new Error("Failed to get managed account");
|
|
11115
11127
|
L = U.address, f = Ce({
|
|
@@ -11122,23 +11134,23 @@ const Xp = Xt(async ({
|
|
|
11122
11134
|
const te = ee.getAccount();
|
|
11123
11135
|
if (!te)
|
|
11124
11136
|
throw new Error("Failed to get modular account");
|
|
11125
|
-
|
|
11137
|
+
M = te;
|
|
11126
11138
|
}
|
|
11127
|
-
const
|
|
11139
|
+
const P = {
|
|
11128
11140
|
...rh({
|
|
11129
11141
|
contract: f,
|
|
11130
11142
|
requests: I
|
|
11131
11143
|
}),
|
|
11132
11144
|
gas: 5000000n
|
|
11133
|
-
}, V = await Promise.resolve(
|
|
11145
|
+
}, V = await Promise.resolve(P);
|
|
11134
11146
|
let W;
|
|
11135
11147
|
try {
|
|
11136
11148
|
W = await $e({
|
|
11137
|
-
account:
|
|
11149
|
+
account: M,
|
|
11138
11150
|
transaction: V
|
|
11139
11151
|
});
|
|
11140
|
-
} catch (
|
|
11141
|
-
throw
|
|
11152
|
+
} catch (N) {
|
|
11153
|
+
throw N;
|
|
11142
11154
|
}
|
|
11143
11155
|
const G = await Ie({
|
|
11144
11156
|
client: pe(),
|
|
@@ -11147,10 +11159,10 @@ const Xp = Xt(async ({
|
|
|
11147
11159
|
});
|
|
11148
11160
|
if (!G)
|
|
11149
11161
|
throw new Error("Failed to send transaction");
|
|
11150
|
-
const ne =
|
|
11151
|
-
ra(i,
|
|
11162
|
+
const ne = z[0], se = ne?.seedUid, de = se === Me || !se, le = ne?.listOfAttestations?.length ?? 0, we = ne?.seedSchemaUid, Oe = u && a ? a : n, be = de ? Gp(G, we, u) ?? Kp(G, Oe, le, u) : void 0, R = be && z.length > 0 ? [{ ...z[0], seedUid: be }, ...z.slice(1)] : z;
|
|
11163
|
+
ra(i, R);
|
|
11152
11164
|
const q = i;
|
|
11153
|
-
|
|
11165
|
+
R[0]?.seedUid && typeof q.persistSeedUid == "function" && await q.persistSeedUid(), De("result", W), De("requestData", A);
|
|
11154
11166
|
}), ty = () => Ue({
|
|
11155
11167
|
signature: "event Attested(address indexed recipient, address indexed attester, bytes32 uid, bytes32 indexed schemaUID)"
|
|
11156
11168
|
}), ny = "0x0000000000000000000000000000000000000000", Te = "0x" + "0".repeat(64);
|
|
@@ -11264,29 +11276,29 @@ const yn = Er("seedProtocol:services:publish:createAttestationsDirectToEas"), pt
|
|
|
11264
11276
|
await Nr(i, r, pe(), re);
|
|
11265
11277
|
const u = s.map(
|
|
11266
11278
|
(D, B) => {
|
|
11267
|
-
const
|
|
11268
|
-
if (!
|
|
11279
|
+
const z = D.transaction?.id;
|
|
11280
|
+
if (!z || typeof z != "string")
|
|
11269
11281
|
throw new Error(
|
|
11270
11282
|
"Attestation recovery failed: Arweave transaction data did not survive restore. Delete this publish record and try a full publish from the beginning."
|
|
11271
11283
|
);
|
|
11272
11284
|
const O = o[B];
|
|
11273
11285
|
if (!O) throw new Error("Publish upload index mismatch");
|
|
11274
|
-
return { ...O, txId:
|
|
11286
|
+
return { ...O, txId: z };
|
|
11275
11287
|
}
|
|
11276
11288
|
), p = await i.getPublishPayload(u), l = (Array.isArray(p) ? p : [p]).map((D) => {
|
|
11277
|
-
const B = (D?.listOfAttestations ?? []).map((
|
|
11278
|
-
const O = Array.isArray(
|
|
11289
|
+
const B = (D?.listOfAttestations ?? []).map((z) => {
|
|
11290
|
+
const O = Array.isArray(z?.data) ? z.data : [];
|
|
11279
11291
|
return {
|
|
11280
|
-
schema: Pe(
|
|
11292
|
+
schema: Pe(z?.schema),
|
|
11281
11293
|
data: O.map((C) => ({
|
|
11282
11294
|
...C,
|
|
11283
11295
|
refUID: Pe(C?.refUID),
|
|
11284
11296
|
data: sy(C?.data)
|
|
11285
11297
|
}))
|
|
11286
11298
|
};
|
|
11287
|
-
}),
|
|
11288
|
-
...
|
|
11289
|
-
propertySchemaUid: Pe(
|
|
11299
|
+
}), F = (D?.propertiesToUpdate ?? []).map((z) => ({
|
|
11300
|
+
...z,
|
|
11301
|
+
propertySchemaUid: Pe(z?.propertySchemaUid)
|
|
11290
11302
|
}));
|
|
11291
11303
|
return {
|
|
11292
11304
|
...D,
|
|
@@ -11295,7 +11307,7 @@ const yn = Er("seedProtocol:services:publish:createAttestationsDirectToEas"), pt
|
|
|
11295
11307
|
versionUid: Pe(D?.versionUid),
|
|
11296
11308
|
versionSchemaUid: Pe(D?.versionSchemaUid),
|
|
11297
11309
|
listOfAttestations: B,
|
|
11298
|
-
propertiesToUpdate:
|
|
11310
|
+
propertiesToUpdate: F
|
|
11299
11311
|
};
|
|
11300
11312
|
}), f = new Map(l.map((D) => [D.localId, D])), m = {
|
|
11301
11313
|
recipient: ir,
|
|
@@ -11307,20 +11319,20 @@ const yn = Er("seedProtocol:services:publish:createAttestationsDirectToEas"), pt
|
|
|
11307
11319
|
};
|
|
11308
11320
|
for (const D of l)
|
|
11309
11321
|
for (const B of D.propertiesToUpdate ?? []) {
|
|
11310
|
-
const
|
|
11311
|
-
if (!
|
|
11312
|
-
const O = f.get(
|
|
11322
|
+
const F = B.publishLocalId, z = Pe(B.propertySchemaUid);
|
|
11323
|
+
if (!F || !z) continue;
|
|
11324
|
+
const O = f.get(F);
|
|
11313
11325
|
if (!O?.listOfAttestations) continue;
|
|
11314
11326
|
const C = O.listOfAttestations.find(
|
|
11315
|
-
(I) => Pe(I?.schema)?.toLowerCase() ===
|
|
11327
|
+
(I) => Pe(I?.schema)?.toLowerCase() === z?.toLowerCase()
|
|
11316
11328
|
);
|
|
11317
11329
|
C && (!Array.isArray(C.data) || C.data.length === 0) && (C.data = [{ ...m, refUID: Te }]);
|
|
11318
11330
|
}
|
|
11319
11331
|
const A = pe();
|
|
11320
11332
|
for (let D = 0; D < l.length; D++) {
|
|
11321
11333
|
const B = l[D];
|
|
11322
|
-
let
|
|
11323
|
-
if (
|
|
11334
|
+
let F = B.seedUid, z = B.versionUid;
|
|
11335
|
+
if (F === Te) {
|
|
11324
11336
|
const C = hi(A, re, {
|
|
11325
11337
|
schema: B.seedSchemaUid,
|
|
11326
11338
|
data: {
|
|
@@ -11334,16 +11346,16 @@ const yn = Er("seedProtocol:services:publish:createAttestationsDirectToEas"), pt
|
|
|
11334
11346
|
transactionHash: I.transactionHash
|
|
11335
11347
|
});
|
|
11336
11348
|
if (!L) throw new Error("Failed to create Seed attestation");
|
|
11337
|
-
const { easContractAddress:
|
|
11338
|
-
if (!
|
|
11349
|
+
const { easContractAddress: M } = Ee(), P = pi(L, M);
|
|
11350
|
+
if (!P || P === Te)
|
|
11339
11351
|
throw new Error("Failed to get Seed UID from attestation receipt");
|
|
11340
|
-
|
|
11352
|
+
F = P, B.seedUid = P, yn("created Seed attestation", F);
|
|
11341
11353
|
}
|
|
11342
|
-
if (
|
|
11354
|
+
if (F !== Te && z === Te) {
|
|
11343
11355
|
const C = hi(A, re, {
|
|
11344
11356
|
schema: B.versionSchemaUid,
|
|
11345
11357
|
data: {
|
|
11346
|
-
refUID:
|
|
11358
|
+
refUID: F,
|
|
11347
11359
|
data: rr(B.versionSchemaUid),
|
|
11348
11360
|
revocable: !0
|
|
11349
11361
|
}
|
|
@@ -11353,21 +11365,21 @@ const yn = Er("seedProtocol:services:publish:createAttestationsDirectToEas"), pt
|
|
|
11353
11365
|
transactionHash: I.transactionHash
|
|
11354
11366
|
});
|
|
11355
11367
|
if (!L) throw new Error("Failed to create Version attestation");
|
|
11356
|
-
const { easContractAddress:
|
|
11357
|
-
if (!
|
|
11368
|
+
const { easContractAddress: M } = Ee(), P = pi(L, M);
|
|
11369
|
+
if (!P || P === Te)
|
|
11358
11370
|
throw new Error("Failed to get Version UID from attestation receipt");
|
|
11359
|
-
|
|
11371
|
+
z = P, B.versionUid = P, yn("created Version attestation", z);
|
|
11360
11372
|
}
|
|
11361
11373
|
for (const C of B.listOfAttestations)
|
|
11362
11374
|
for (const I of C.data)
|
|
11363
|
-
I.refUID =
|
|
11375
|
+
I.refUID = z;
|
|
11364
11376
|
for (const C of B.propertiesToUpdate ?? []) {
|
|
11365
11377
|
const I = f.get(C.publishLocalId);
|
|
11366
11378
|
if (!I?.listOfAttestations) continue;
|
|
11367
|
-
const L = Pe(C.propertySchemaUid),
|
|
11368
|
-
(
|
|
11379
|
+
const L = Pe(C.propertySchemaUid), M = I.listOfAttestations.find(
|
|
11380
|
+
(P) => Pe(P?.schema)?.toLowerCase() === L?.toLowerCase()
|
|
11369
11381
|
);
|
|
11370
|
-
|
|
11382
|
+
M?.data?.[0] && (M.data[0].data = rr(F));
|
|
11371
11383
|
}
|
|
11372
11384
|
const O = B.listOfAttestations.map((C) => ({
|
|
11373
11385
|
schema: C.schema,
|