@xyo-network/wallet-xl1-cli 0.1.17 → 0.1.18
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/bin/wallet.mjs +970 -511
- package/package.json +4 -4
package/dist/bin/wallet.mjs
CHANGED
|
@@ -30183,8 +30183,8 @@ var init_parse$4 = __esmMin((() => {
|
|
|
30183
30183
|
//#endregion
|
|
30184
30184
|
//#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/regexes.js
|
|
30185
30185
|
var regexes_exports = /* @__PURE__ */ __exportAll({
|
|
30186
|
-
base64: () => base64$
|
|
30187
|
-
base64url: () => base64url$
|
|
30186
|
+
base64: () => base64$3,
|
|
30187
|
+
base64url: () => base64url$2,
|
|
30188
30188
|
bigint: () => bigint$4,
|
|
30189
30189
|
boolean: () => boolean$3,
|
|
30190
30190
|
browserEmail: () => browserEmail,
|
|
@@ -30201,7 +30201,7 @@ var regexes_exports = /* @__PURE__ */ __exportAll({
|
|
|
30201
30201
|
emoji: () => emoji$1,
|
|
30202
30202
|
extendedDuration: () => extendedDuration,
|
|
30203
30203
|
guid: () => guid$1,
|
|
30204
|
-
hex: () => hex$
|
|
30204
|
+
hex: () => hex$3,
|
|
30205
30205
|
hostname: () => hostname$1,
|
|
30206
30206
|
html5Email: () => html5Email,
|
|
30207
30207
|
httpProtocol: () => httpProtocol,
|
|
@@ -30267,7 +30267,7 @@ function fixedBase64(bodyLength, padding) {
|
|
|
30267
30267
|
function fixedBase64url(length) {
|
|
30268
30268
|
return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);
|
|
30269
30269
|
}
|
|
30270
|
-
var cuid$1, cuid2$1, ulid$1, xid$1, ksuid$1, nanoid$1, duration$1, extendedDuration, guid$1, uuid$1, uuid4, uuid6, uuid7, email$1, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji$1, ipv4$1, ipv6$1, mac$1, cidrv4$1, cidrv6$1, base64$
|
|
30270
|
+
var cuid$1, cuid2$1, ulid$1, xid$1, ksuid$1, nanoid$1, duration$1, extendedDuration, guid$1, uuid$1, uuid4, uuid6, uuid7, email$1, html5Email, rfc5322Email, unicodeEmail, idnEmail, browserEmail, _emoji$1, ipv4$1, ipv6$1, mac$1, cidrv4$1, cidrv6$1, base64$3, base64url$2, hostname$1, domain, httpProtocol, e164$1, dateSource, date$3, string$5, bigint$4, integer$1, number$6, boolean$3, _null$3, _undefined$2, lowercase, uppercase, hex$3, md5_hex, md5_base64, md5_base64url, sha1_hex, sha1_base64, sha1_base64url, sha256_hex, sha256_base64, sha256_base64url, sha384_hex, sha384_base64, sha384_base64url, sha512_hex, sha512_base64, sha512_base64url;
|
|
30271
30271
|
var init_regexes = __esmMin((() => {
|
|
30272
30272
|
init_util$1();
|
|
30273
30273
|
cuid$1 = /^[cC][0-9a-z]{6,}$/;
|
|
@@ -30301,8 +30301,8 @@ var init_regexes = __esmMin((() => {
|
|
|
30301
30301
|
};
|
|
30302
30302
|
cidrv4$1 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
|
|
30303
30303
|
cidrv6$1 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
|
|
30304
|
-
base64$
|
|
30305
|
-
base64url$
|
|
30304
|
+
base64$3 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
|
|
30305
|
+
base64url$2 = /^[A-Za-z0-9_-]*$/;
|
|
30306
30306
|
hostname$1 = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/;
|
|
30307
30307
|
domain = /^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/;
|
|
30308
30308
|
httpProtocol = /^https?$/;
|
|
@@ -30321,7 +30321,7 @@ var init_regexes = __esmMin((() => {
|
|
|
30321
30321
|
_undefined$2 = /^undefined$/i;
|
|
30322
30322
|
lowercase = /^[^A-Z]*$/;
|
|
30323
30323
|
uppercase = /^[^a-z]*$/;
|
|
30324
|
-
hex$
|
|
30324
|
+
hex$3 = /^[0-9a-fA-F]*$/;
|
|
30325
30325
|
md5_hex = /^[0-9a-fA-F]{32}$/;
|
|
30326
30326
|
md5_base64 = /*@__PURE__*/ fixedBase64(22, "==");
|
|
30327
30327
|
md5_base64url = /*@__PURE__*/ fixedBase64url(22);
|
|
@@ -30911,7 +30911,7 @@ function isValidBase64(data) {
|
|
|
30911
30911
|
}
|
|
30912
30912
|
}
|
|
30913
30913
|
function isValidBase64URL(data) {
|
|
30914
|
-
if (!base64url$
|
|
30914
|
+
if (!base64url$2.test(data)) return false;
|
|
30915
30915
|
const base64 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
|
|
30916
30916
|
return isValidBase64(base64.padEnd(Math.ceil(base64.length / 4) * 4, "="));
|
|
30917
30917
|
}
|
|
@@ -31545,7 +31545,7 @@ var init_schemas$2 = __esmMin((() => {
|
|
|
31545
31545
|
};
|
|
31546
31546
|
});
|
|
31547
31547
|
$ZodBase64 = /*@__PURE__*/ $constructor("$ZodBase64", (inst, def) => {
|
|
31548
|
-
def.pattern ?? (def.pattern = base64$
|
|
31548
|
+
def.pattern ?? (def.pattern = base64$3);
|
|
31549
31549
|
$ZodStringFormat.init(inst, def);
|
|
31550
31550
|
inst._zod.bag.contentEncoding = "base64";
|
|
31551
31551
|
inst._zod.check = (payload) => {
|
|
@@ -31560,7 +31560,7 @@ var init_schemas$2 = __esmMin((() => {
|
|
|
31560
31560
|
};
|
|
31561
31561
|
});
|
|
31562
31562
|
$ZodBase64URL = /*@__PURE__*/ $constructor("$ZodBase64URL", (inst, def) => {
|
|
31563
|
-
def.pattern ?? (def.pattern = base64url$
|
|
31563
|
+
def.pattern ?? (def.pattern = base64url$2);
|
|
31564
31564
|
$ZodStringFormat.init(inst, def);
|
|
31565
31565
|
inst._zod.bag.contentEncoding = "base64url";
|
|
31566
31566
|
inst._zod.check = (payload) => {
|
|
@@ -43011,7 +43011,7 @@ var init_esm$3 = __esmMin((() => {
|
|
|
43011
43011
|
};
|
|
43012
43012
|
}));
|
|
43013
43013
|
//#endregion
|
|
43014
|
-
//#region ../../node_modules/.pnpm/@ariestools+telemetry@8.1.
|
|
43014
|
+
//#region ../../node_modules/.pnpm/@ariestools+telemetry@8.1.9_@opentelemetry+api@1.9.1/node_modules/@ariestools/telemetry/dist/neutral/index.mjs
|
|
43015
43015
|
async function timeBudget(name, logger, func, budget, status = false) {
|
|
43016
43016
|
const start = Date.now();
|
|
43017
43017
|
const timer = status ? setInterval(() => {
|
|
@@ -43229,7 +43229,7 @@ var init_neutral$5 = __esmMin((() => {
|
|
|
43229
43229
|
});
|
|
43230
43230
|
}));
|
|
43231
43231
|
//#endregion
|
|
43232
|
-
//#region ../../node_modules/.pnpm/@ariestools+sdk@8.1.
|
|
43232
|
+
//#region ../../node_modules/.pnpm/@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3/node_modules/@ariestools/sdk/dist/node/index.mjs
|
|
43233
43233
|
function findErrorCode(error) {
|
|
43234
43234
|
let current = error;
|
|
43235
43235
|
for (let depth = 0; depth < 8 && current instanceof Error; depth++) {
|
|
@@ -45222,11 +45222,15 @@ var init_node$4 = __esmMin((() => {
|
|
|
45222
45222
|
};
|
|
45223
45223
|
}));
|
|
45224
45224
|
//#endregion
|
|
45225
|
-
//#region ../../node_modules/.pnpm/@scure+base@2.
|
|
45225
|
+
//#region ../../node_modules/.pnpm/@scure+base@2.3.0/node_modules/@scure/base/index.js
|
|
45226
45226
|
/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
45227
45227
|
function isBytes$4(a) {
|
|
45228
45228
|
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array" && "BYTES_PER_ELEMENT" in a && a.BYTES_PER_ELEMENT === 1;
|
|
45229
45229
|
}
|
|
45230
|
+
/** Asserts something is Uint8Array. */
|
|
45231
|
+
function abytes$3(b) {
|
|
45232
|
+
if (!isBytes$4(b)) throw new TypeError("Uint8Array expected");
|
|
45233
|
+
}
|
|
45230
45234
|
function isArrayOf$1(isString, arr) {
|
|
45231
45235
|
if (!Array.isArray(arr)) return false;
|
|
45232
45236
|
if (arr.length === 0) return true;
|
|
@@ -45241,22 +45245,13 @@ function astr$1(label, input) {
|
|
|
45241
45245
|
if (typeof input !== "string") throw new TypeError(`${label}: string expected`);
|
|
45242
45246
|
return true;
|
|
45243
45247
|
}
|
|
45244
|
-
function anumber$3(n) {
|
|
45245
|
-
if (typeof n !== "number") throw new TypeError(
|
|
45246
|
-
if (!Number.isSafeInteger(n)) throw new RangeError(
|
|
45247
|
-
}
|
|
45248
|
-
function aArr$1(input) {
|
|
45249
|
-
if (!Array.isArray(input)) throw new TypeError("array expected");
|
|
45250
|
-
}
|
|
45251
|
-
function astrArr$1(label, input) {
|
|
45252
|
-
if (!isArrayOf$1(true, input)) throw new TypeError(`${label}: array of strings expected`);
|
|
45248
|
+
function anumber$3(n, title = "number") {
|
|
45249
|
+
if (typeof n !== "number") throw new TypeError(`${title}: expected number, got ${typeof n}`);
|
|
45250
|
+
if (!Number.isSafeInteger(n)) throw new RangeError(`${title}: expected safe integer, got ${n}`);
|
|
45253
45251
|
}
|
|
45254
45252
|
function anumArr$1(label, input) {
|
|
45255
45253
|
if (!isArrayOf$1(false, input)) throw new TypeError(`${label}: array of numbers expected`);
|
|
45256
45254
|
}
|
|
45257
|
-
/**
|
|
45258
|
-
* @__NO_SIDE_EFFECTS__
|
|
45259
|
-
*/
|
|
45260
45255
|
function chain$1(...args) {
|
|
45261
45256
|
const id = (a) => a;
|
|
45262
45257
|
const wrap = (a, b) => (c) => a(b(c));
|
|
@@ -45265,186 +45260,115 @@ function chain$1(...args) {
|
|
|
45265
45260
|
decode: args.map((x) => x.decode).reduce(wrap, id)
|
|
45266
45261
|
};
|
|
45267
45262
|
}
|
|
45268
|
-
|
|
45269
|
-
|
|
45270
|
-
|
|
45271
|
-
|
|
45272
|
-
*/
|
|
45273
|
-
function alphabet$1(letters) {
|
|
45274
|
-
const lettersA = typeof letters === "string" ? letters.split("") : letters;
|
|
45275
|
-
const len = lettersA.length;
|
|
45276
|
-
astrArr$1("alphabet", lettersA);
|
|
45277
|
-
const indexes = new Map(lettersA.map((l, i) => [l, i]));
|
|
45278
|
-
return {
|
|
45279
|
-
encode: (digits) => {
|
|
45280
|
-
aArr$1(digits);
|
|
45281
|
-
return digits.map((i) => {
|
|
45282
|
-
if (!Number.isSafeInteger(i) || i < 0 || i >= len) throw new Error(`alphabet.encode: digit index outside alphabet "${i}". Allowed: ${letters}`);
|
|
45283
|
-
return lettersA[i];
|
|
45284
|
-
});
|
|
45285
|
-
},
|
|
45286
|
-
decode: (input) => {
|
|
45287
|
-
aArr$1(input);
|
|
45288
|
-
return input.map((letter) => {
|
|
45289
|
-
astr$1("alphabet.decode", letter);
|
|
45290
|
-
const i = indexes.get(letter);
|
|
45291
|
-
if (i === void 0) throw new Error(`Unknown letter: "${letter}". Allowed: ${letters}`);
|
|
45292
|
-
return i;
|
|
45293
|
-
});
|
|
45294
|
-
}
|
|
45295
|
-
};
|
|
45296
|
-
}
|
|
45297
|
-
/**
|
|
45298
|
-
* @__NO_SIDE_EFFECTS__
|
|
45299
|
-
*/
|
|
45300
|
-
function join$2(separator = "") {
|
|
45301
|
-
astr$1("join", separator);
|
|
45302
|
-
return {
|
|
45303
|
-
encode: (from) => {
|
|
45304
|
-
astrArr$1("join.decode", from);
|
|
45305
|
-
return from.join(separator);
|
|
45306
|
-
},
|
|
45307
|
-
decode: (to) => {
|
|
45308
|
-
astr$1("join.decode", to);
|
|
45309
|
-
return to.split(separator);
|
|
45310
|
-
}
|
|
45311
|
-
};
|
|
45312
|
-
}
|
|
45313
|
-
/**
|
|
45314
|
-
* Pad strings array so it has integer number of bits
|
|
45315
|
-
* @__NO_SIDE_EFFECTS__
|
|
45316
|
-
*/
|
|
45317
|
-
function padding$2(bits, chr = "=") {
|
|
45318
|
-
anumber$3(bits);
|
|
45319
|
-
astr$1("padding", chr);
|
|
45320
|
-
return {
|
|
45321
|
-
encode(data) {
|
|
45322
|
-
astrArr$1("padding.encode", data);
|
|
45323
|
-
while (data.length * bits % 8) data.push(chr);
|
|
45324
|
-
return data;
|
|
45325
|
-
},
|
|
45326
|
-
decode(input) {
|
|
45327
|
-
astrArr$1("padding.decode", input);
|
|
45328
|
-
let end = input.length;
|
|
45329
|
-
if (end * bits % 8) throw new Error("padding: invalid, string should have whole number of bytes");
|
|
45330
|
-
for (; end > 0 && input[end - 1] === chr; end--) if ((end - 1) * bits % 8 === 0) throw new Error("padding: invalid, string has too much padding");
|
|
45331
|
-
return input.slice(0, end);
|
|
45332
|
-
}
|
|
45333
|
-
};
|
|
45334
|
-
}
|
|
45335
|
-
/**
|
|
45336
|
-
* @__NO_SIDE_EFFECTS__
|
|
45337
|
-
*/
|
|
45338
|
-
function normalize$3(fn) {
|
|
45339
|
-
afn$1(fn);
|
|
45340
|
-
return {
|
|
45341
|
-
encode: (from) => from,
|
|
45342
|
-
decode: (to) => fn(to)
|
|
45343
|
-
};
|
|
45344
|
-
}
|
|
45345
|
-
/**
|
|
45346
|
-
* Slow: O(n^2) time complexity
|
|
45347
|
-
*/
|
|
45348
|
-
function convertRadix(data, from, to) {
|
|
45349
|
-
if (from < 2) throw new RangeError(`convertRadix: invalid from=${from}, base cannot be less than 2`);
|
|
45350
|
-
if (to < 2) throw new RangeError(`convertRadix: invalid to=${to}, base cannot be less than 2`);
|
|
45351
|
-
aArr$1(data);
|
|
45352
|
-
if (!data.length) return [];
|
|
45353
|
-
let pos = 0;
|
|
45354
|
-
const res = [];
|
|
45355
|
-
const digits = Array.from(data, (d) => {
|
|
45356
|
-
anumber$3(d);
|
|
45357
|
-
if (d < 0 || d >= from) throw new Error(`invalid integer: ${d}`);
|
|
45358
|
-
return d;
|
|
45359
|
-
});
|
|
45360
|
-
const dlen = digits.length;
|
|
45361
|
-
while (true) {
|
|
45362
|
-
let carry = 0;
|
|
45363
|
-
let done = true;
|
|
45364
|
-
for (let i = pos; i < dlen; i++) {
|
|
45365
|
-
const digit = digits[i];
|
|
45366
|
-
const fromCarry = from * carry;
|
|
45367
|
-
const digitBase = fromCarry + digit;
|
|
45368
|
-
if (!Number.isSafeInteger(digitBase) || fromCarry / from !== carry || digitBase - digit !== fromCarry) throw new Error("convertRadix: carry overflow");
|
|
45369
|
-
const div = digitBase / to;
|
|
45370
|
-
carry = digitBase % to;
|
|
45371
|
-
const rounded = Math.floor(div);
|
|
45372
|
-
digits[i] = rounded;
|
|
45373
|
-
if (!Number.isSafeInteger(rounded) || rounded * to + carry !== digitBase) throw new Error("convertRadix: carry overflow");
|
|
45374
|
-
if (!done) continue;
|
|
45375
|
-
else if (!rounded) pos = i;
|
|
45376
|
-
else done = false;
|
|
45377
|
-
}
|
|
45378
|
-
res.push(carry);
|
|
45379
|
-
if (done) break;
|
|
45380
|
-
}
|
|
45381
|
-
for (let i = 0; i < data.length - 1 && data[i] === 0; i++) res.push(0);
|
|
45382
|
-
return res.reverse();
|
|
45263
|
+
function u8ToNumArr(u8, len = u8.length) {
|
|
45264
|
+
const res = new Array(len);
|
|
45265
|
+
for (let i = 0; i < len; i++) res[i] = u8[i];
|
|
45266
|
+
return res;
|
|
45383
45267
|
}
|
|
45384
|
-
|
|
45385
|
-
|
|
45386
|
-
|
|
45387
|
-
|
|
45388
|
-
|
|
45389
|
-
|
|
45390
|
-
if (to <= 0 || to > 32) throw new RangeError(`convertRadix2: wrong to=${to}`);
|
|
45391
|
-
if (/* @__PURE__ */ radix2carry$1(from, to) > 32) throw new Error(`convertRadix2: carry overflow from=${from} to=${to} carryBits=${/* @__PURE__ */ radix2carry$1(from, to)}`);
|
|
45392
|
-
let carry = 0;
|
|
45393
|
-
let pos = 0;
|
|
45394
|
-
const max = powers$1[from];
|
|
45395
|
-
const mask = powers$1[to] - 1;
|
|
45396
|
-
const res = [];
|
|
45397
|
-
for (const n of data) {
|
|
45398
|
-
anumber$3(n);
|
|
45399
|
-
if (n >= max) throw new Error(`convertRadix2: invalid data word=${n} from=${from}`);
|
|
45400
|
-
carry = carry << from | n;
|
|
45401
|
-
if (pos + from > 32) throw new Error(`convertRadix2: carry overflow pos=${pos} from=${from}`);
|
|
45402
|
-
pos += from;
|
|
45403
|
-
for (; pos >= to; pos -= to) res.push((carry >> pos - to & mask) >>> 0);
|
|
45404
|
-
const pow = powers$1[pos];
|
|
45405
|
-
if (pow === void 0) throw new Error("invalid carry");
|
|
45406
|
-
carry &= pow - 1;
|
|
45407
|
-
}
|
|
45408
|
-
carry = carry << to - pos & mask;
|
|
45409
|
-
if (!padding && pos >= from) throw new Error("Excess padding");
|
|
45410
|
-
if (!padding && carry > 0) throw new Error(`Non-zero padding: ${carry}`);
|
|
45411
|
-
if (padding && pos > 0) res.push(carry >>> 0);
|
|
45268
|
+
function charcodesToString(codes) {
|
|
45269
|
+
const len = codes.length;
|
|
45270
|
+
if (asciiDecoder !== void 0 && len >= 12) return asciiDecoder.decode(codes);
|
|
45271
|
+
if (len <= B2S_CHUNK) return String.fromCharCode.apply(null, codes);
|
|
45272
|
+
let res = "";
|
|
45273
|
+
for (let i = 0; i < len; i += B2S_CHUNK) res += String.fromCharCode.apply(null, codes.subarray(i, i + B2S_CHUNK));
|
|
45412
45274
|
return res;
|
|
45413
45275
|
}
|
|
45414
45276
|
/**
|
|
45415
|
-
*
|
|
45277
|
+
* Linear 8 <-> bits regrouping (radix2Slow semantics), with Uint8Array digits and
|
|
45278
|
+
* preallocated output.
|
|
45416
45279
|
*/
|
|
45417
|
-
function
|
|
45418
|
-
anumber$3(
|
|
45419
|
-
|
|
45280
|
+
function radix2$1(bits) {
|
|
45281
|
+
anumber$3(bits);
|
|
45282
|
+
if (bits <= 0 || bits > 8) throw new RangeError("radix2: bits should be in (0..8]");
|
|
45283
|
+
const mask = powers$1[bits] - 1;
|
|
45420
45284
|
return {
|
|
45421
45285
|
encode: (bytes) => {
|
|
45422
|
-
|
|
45423
|
-
|
|
45286
|
+
abytes$3(bytes);
|
|
45287
|
+
const len = bytes.length;
|
|
45288
|
+
const res = new Uint8Array(Math.ceil(len * 8 / bits));
|
|
45289
|
+
let carry = 0;
|
|
45290
|
+
let pos = 0;
|
|
45291
|
+
let j = 0;
|
|
45292
|
+
for (let i = 0; i < len;) {
|
|
45293
|
+
if (i + 2 < len) {
|
|
45294
|
+
carry = carry << 24 | bytes[i] << 16 | bytes[i + 1] << 8 | bytes[i + 2];
|
|
45295
|
+
pos += 24;
|
|
45296
|
+
i += 3;
|
|
45297
|
+
} else {
|
|
45298
|
+
carry = (carry << 8 | bytes[i]) & 65535;
|
|
45299
|
+
pos += 8;
|
|
45300
|
+
i++;
|
|
45301
|
+
}
|
|
45302
|
+
for (;;) {
|
|
45303
|
+
pos -= bits;
|
|
45304
|
+
res[j++] = carry >> pos & mask;
|
|
45305
|
+
if (pos < bits) break;
|
|
45306
|
+
}
|
|
45307
|
+
}
|
|
45308
|
+
if (pos > 0) res[j] = carry << bits - pos & mask;
|
|
45309
|
+
return res;
|
|
45424
45310
|
},
|
|
45425
45311
|
decode: (digits) => {
|
|
45426
|
-
|
|
45427
|
-
|
|
45312
|
+
const len = digits.length;
|
|
45313
|
+
const res = new Uint8Array(Math.floor(len * bits / 8));
|
|
45314
|
+
let carry = 0;
|
|
45315
|
+
let pos = 0;
|
|
45316
|
+
let j = 0;
|
|
45317
|
+
for (let i = 0; i < len; i++) {
|
|
45318
|
+
carry = (carry << bits | digits[i]) & 65535;
|
|
45319
|
+
pos += bits;
|
|
45320
|
+
for (; pos >= 8; pos -= 8) res[j++] = carry >> pos - 8 & 255;
|
|
45321
|
+
}
|
|
45322
|
+
carry = carry << 8 - pos & 255;
|
|
45323
|
+
if (pos >= bits) throw new Error("Excess padding");
|
|
45324
|
+
if (carry > 0) throw new Error(`Non-zero padding: ${carry}`);
|
|
45325
|
+
return res;
|
|
45428
45326
|
}
|
|
45429
45327
|
};
|
|
45430
45328
|
}
|
|
45431
45329
|
/**
|
|
45432
|
-
*
|
|
45433
|
-
*
|
|
45434
|
-
* @__NO_SIDE_EFFECTS__
|
|
45330
|
+
* Digit <-> letter mapping fused with string join (chain(alphabetSlow(letters), join(''))
|
|
45331
|
+
* semantics), via char-code lookup tables.
|
|
45435
45332
|
*/
|
|
45436
|
-
function
|
|
45437
|
-
|
|
45438
|
-
if (
|
|
45439
|
-
|
|
45333
|
+
function alphabet$1(letters, aliases) {
|
|
45334
|
+
const len = letters.length;
|
|
45335
|
+
if (len > 128) throw new Error("alphabet: max 128 letters");
|
|
45336
|
+
const encTable = new Uint8Array(len);
|
|
45337
|
+
const decTable = (/* @__PURE__ */ new Int8Array(128)).fill(-1);
|
|
45338
|
+
for (let i = 0; i < len; i++) {
|
|
45339
|
+
const code = letters.charCodeAt(i);
|
|
45340
|
+
if (letters.codePointAt(i) !== code || code > 127) throw new Error("alphabet: single-char ASCII letters only");
|
|
45341
|
+
encTable[i] = code;
|
|
45342
|
+
decTable[code] = i;
|
|
45343
|
+
}
|
|
45344
|
+
if (aliases !== void 0) for (const alias of Object.keys(aliases)) {
|
|
45345
|
+
const code = alias.charCodeAt(0);
|
|
45346
|
+
const target = decTable[aliases[alias].charCodeAt(0)];
|
|
45347
|
+
if (alias.length !== 1 || code > 127 || target === void 0 || target === -1) throw new Error(`alphabet: invalid alias ${alias}`);
|
|
45348
|
+
decTable[code] = target;
|
|
45349
|
+
}
|
|
45440
45350
|
return {
|
|
45441
|
-
encode: (
|
|
45442
|
-
|
|
45443
|
-
|
|
45351
|
+
encode: (digits) => {
|
|
45352
|
+
const codes = new Uint8Array(digits.length);
|
|
45353
|
+
for (let i = 0; i < digits.length; i++) {
|
|
45354
|
+
const d = digits[i];
|
|
45355
|
+
const code = encTable[d];
|
|
45356
|
+
if (code === void 0) throw new Error(`alphabet.encode: invalid digit ${d}`);
|
|
45357
|
+
codes[i] = code;
|
|
45358
|
+
}
|
|
45359
|
+
return charcodesToString(codes);
|
|
45444
45360
|
},
|
|
45445
|
-
decode: (
|
|
45446
|
-
|
|
45447
|
-
|
|
45361
|
+
decode: (input) => {
|
|
45362
|
+
astr$1("decode", input);
|
|
45363
|
+
const slen = input.length;
|
|
45364
|
+
const digits = new Uint8Array(slen);
|
|
45365
|
+
for (let i = 0; i < slen; i++) {
|
|
45366
|
+
const code = input.charCodeAt(i);
|
|
45367
|
+
const digit = code < 128 ? decTable[code] : -1;
|
|
45368
|
+
if (digit === -1) throw new Error(`Unknown letter "${input[i]}". Allowed: ${letters}`);
|
|
45369
|
+
digits[i] = digit;
|
|
45370
|
+
}
|
|
45371
|
+
return digits;
|
|
45448
45372
|
}
|
|
45449
45373
|
};
|
|
45450
45374
|
}
|
|
@@ -45456,29 +45380,15 @@ function unsafeWrapper$1(fn) {
|
|
|
45456
45380
|
} catch (e) {}
|
|
45457
45381
|
};
|
|
45458
45382
|
}
|
|
45459
|
-
function
|
|
45460
|
-
|
|
45461
|
-
|
|
45462
|
-
|
|
45463
|
-
|
|
45464
|
-
|
|
45465
|
-
|
|
45466
|
-
|
|
45467
|
-
|
|
45468
|
-
const res = new Uint8Array(data.length + len);
|
|
45469
|
-
res.set(data);
|
|
45470
|
-
res.set(sum, data.length);
|
|
45471
|
-
return res;
|
|
45472
|
-
},
|
|
45473
|
-
decode(data) {
|
|
45474
|
-
if (!isBytes$4(data)) throw new TypeError("checksum.decode: input should be Uint8Array");
|
|
45475
|
-
const payload = data.slice(0, -len);
|
|
45476
|
-
const oldChecksum = data.slice(-len);
|
|
45477
|
-
const newChecksum = _fn(payload).slice(0, len);
|
|
45478
|
-
for (let i = 0; i < len; i++) if (newChecksum[i] !== oldChecksum[i]) throw new Error("Invalid checksum");
|
|
45479
|
-
return payload;
|
|
45480
|
-
}
|
|
45481
|
-
};
|
|
45383
|
+
function wordsToU8(words) {
|
|
45384
|
+
const len = words.length;
|
|
45385
|
+
const res = new Uint8Array(len);
|
|
45386
|
+
for (let i = 0; i < len; i++) {
|
|
45387
|
+
const w = words[i];
|
|
45388
|
+
if (w < 0 || w >= 32) throw new Error(`alphabet.encode: invalid digit ${w}`);
|
|
45389
|
+
res[i] = w;
|
|
45390
|
+
}
|
|
45391
|
+
return res;
|
|
45482
45392
|
}
|
|
45483
45393
|
function bech32Polymod$1(pre) {
|
|
45484
45394
|
const b = pre >> 25;
|
|
@@ -45499,20 +45409,44 @@ function bechChecksum$1(prefix, words, encodingConst = 1) {
|
|
|
45499
45409
|
for (let v of words) chk = bech32Polymod$1(chk) ^ v;
|
|
45500
45410
|
for (let i = 0; i < 6; i++) chk = bech32Polymod$1(chk);
|
|
45501
45411
|
chk ^= encodingConst;
|
|
45502
|
-
|
|
45412
|
+
const sum = /* @__PURE__ */ new Uint8Array(6);
|
|
45413
|
+
for (let i = 0; i < 6; i++) sum[i] = chk >>> 5 * (5 - i) & 31;
|
|
45414
|
+
return BECH_ALPHABET$1.encode(sum);
|
|
45503
45415
|
}
|
|
45504
|
-
/**
|
|
45505
|
-
* @__NO_SIDE_EFFECTS__
|
|
45506
|
-
*/
|
|
45507
45416
|
function genBech32$1(encoding) {
|
|
45508
45417
|
const ENCODING_CONST = encoding === "bech32" ? 1 : 734539939;
|
|
45509
45418
|
const _words = radix2$1(5);
|
|
45510
|
-
const
|
|
45511
|
-
|
|
45419
|
+
const toWords = (from) => {
|
|
45420
|
+
abytes$3(from);
|
|
45421
|
+
const len = from.length;
|
|
45422
|
+
const res = new Array(Math.ceil(len * 8 / 5));
|
|
45423
|
+
let carry = 0;
|
|
45424
|
+
let pos = 0;
|
|
45425
|
+
let j = 0;
|
|
45426
|
+
for (let i = 0; i < len; i++) {
|
|
45427
|
+
carry = carry << 8 | from[i];
|
|
45428
|
+
pos += 8;
|
|
45429
|
+
for (; pos >= 5; pos -= 5) res[j++] = carry >> pos - 5 & 31;
|
|
45430
|
+
}
|
|
45431
|
+
if (pos > 0) res[j] = carry << 5 - pos & 31;
|
|
45432
|
+
return res;
|
|
45433
|
+
};
|
|
45434
|
+
const fromWords = (to) => {
|
|
45435
|
+
anumArr$1("radix2.decode", to);
|
|
45436
|
+
const len = to.length;
|
|
45437
|
+
const digits = new Uint8Array(len);
|
|
45438
|
+
for (let i = 0; i < len; i++) {
|
|
45439
|
+
const w = to[i];
|
|
45440
|
+
if (w < 0 || w >= 32) throw new Error(`convertRadix2: invalid word=${w}`);
|
|
45441
|
+
digits[i] = w;
|
|
45442
|
+
}
|
|
45443
|
+
return _words.decode(digits);
|
|
45444
|
+
};
|
|
45512
45445
|
const fromWordsUnsafe = unsafeWrapper$1(fromWords);
|
|
45513
45446
|
function encode(prefix, words, limit = 90) {
|
|
45514
45447
|
astr$1("bech32.encode prefix", prefix);
|
|
45515
|
-
if (
|
|
45448
|
+
if (limit !== false) anumber$3(limit, "limit");
|
|
45449
|
+
if (isBytes$4(words)) words = u8ToNumArr(words);
|
|
45516
45450
|
anumArr$1("bech32.encode", words);
|
|
45517
45451
|
const plen = prefix.length;
|
|
45518
45452
|
if (plen === 0) throw new TypeError(`Invalid prefix length ${plen}`);
|
|
@@ -45520,22 +45454,24 @@ function genBech32$1(encoding) {
|
|
|
45520
45454
|
if (limit !== false && actualLength > limit) throw new TypeError(`Length ${actualLength} exceeds limit ${limit}`);
|
|
45521
45455
|
const lowered = prefix.toLowerCase();
|
|
45522
45456
|
const sum = bechChecksum$1(lowered, words, ENCODING_CONST);
|
|
45523
|
-
return `${lowered}1${BECH_ALPHABET$1.encode(words)}${sum}`;
|
|
45457
|
+
return `${lowered}1${BECH_ALPHABET$1.encode(wordsToU8(words))}${sum}`;
|
|
45524
45458
|
}
|
|
45525
45459
|
function decode(str, limit = 90) {
|
|
45526
45460
|
astr$1("bech32.decode input", str);
|
|
45461
|
+
if (limit !== false) anumber$3(limit, "limit");
|
|
45527
45462
|
const slen = str.length;
|
|
45528
|
-
if (slen < 8 || limit !== false && slen > limit) throw new TypeError(`invalid string length
|
|
45463
|
+
if (slen < 8 || limit !== false && slen > limit) throw new TypeError(`invalid string length ${slen}, expected (8..${limit})`);
|
|
45529
45464
|
const lowered = str.toLowerCase();
|
|
45530
|
-
if (str !== lowered && str !== str.toUpperCase()) throw new Error(`
|
|
45465
|
+
if (str !== lowered && str !== str.toUpperCase()) throw new Error(`mixed-case string not allowed`);
|
|
45531
45466
|
const sepIndex = lowered.lastIndexOf("1");
|
|
45532
|
-
if (sepIndex === 0 || sepIndex === -1) throw new Error(`
|
|
45467
|
+
if (sepIndex === 0 || sepIndex === -1) throw new Error(`invalid separator "1"`);
|
|
45533
45468
|
const prefix = lowered.slice(0, sepIndex);
|
|
45534
45469
|
const data = lowered.slice(sepIndex + 1);
|
|
45535
|
-
if (data.length < 6) throw new Error("
|
|
45536
|
-
const
|
|
45470
|
+
if (data.length < 6) throw new Error("invalid data length");
|
|
45471
|
+
const digits = BECH_ALPHABET$1.decode(data);
|
|
45472
|
+
const words = u8ToNumArr(digits, digits.length - 6);
|
|
45537
45473
|
const sum = bechChecksum$1(prefix, words, ENCODING_CONST);
|
|
45538
|
-
if (!data.endsWith(sum)) throw new Error(`Invalid checksum in ${str}
|
|
45474
|
+
if (!data.endsWith(sum)) throw new Error(`Invalid checksum in ${str}`);
|
|
45539
45475
|
return {
|
|
45540
45476
|
prefix,
|
|
45541
45477
|
words
|
|
@@ -45564,40 +45500,112 @@ function genBech32$1(encoding) {
|
|
|
45564
45500
|
toWords
|
|
45565
45501
|
};
|
|
45566
45502
|
}
|
|
45567
|
-
var
|
|
45503
|
+
var freeze, powers$1, asciiDecoder, B2S_CHUNK, base16$1, base64urlnopad$1, B58_GROUP, radix58, genBase58, base58$1, BECH_ALPHABET$1, POLYMOD_GENERATORS$1, bech32m$1;
|
|
45568
45504
|
var init_base = __esmMin((() => {
|
|
45569
|
-
|
|
45570
|
-
radix2carry$1 = /* @__NO_SIDE_EFFECTS__ */ (from, to) => from + (to - gcd$1(from, to));
|
|
45505
|
+
freeze = (fn) => Object.freeze(fn());
|
|
45571
45506
|
powers$1 = /* @__PURE__ */ (() => {
|
|
45572
45507
|
let res = [];
|
|
45573
45508
|
for (let i = 0; i < 40; i++) res.push(2 ** i);
|
|
45574
45509
|
return res;
|
|
45575
45510
|
})();
|
|
45576
|
-
|
|
45577
|
-
|
|
45578
|
-
|
|
45579
|
-
|
|
45580
|
-
|
|
45581
|
-
|
|
45582
|
-
|
|
45583
|
-
|
|
45584
|
-
|
|
45585
|
-
|
|
45586
|
-
|
|
45587
|
-
|
|
45588
|
-
|
|
45589
|
-
|
|
45590
|
-
|
|
45591
|
-
|
|
45592
|
-
|
|
45593
|
-
|
|
45594
|
-
|
|
45595
|
-
|
|
45596
|
-
|
|
45597
|
-
|
|
45598
|
-
|
|
45599
|
-
|
|
45600
|
-
|
|
45511
|
+
asciiDecoder = /* @__PURE__ */ (() => {
|
|
45512
|
+
try {
|
|
45513
|
+
const decoder = new TextDecoder();
|
|
45514
|
+
return decoder.decode(Uint8Array.of(65, 48, 43, 127)) === "A0+" ? decoder : void 0;
|
|
45515
|
+
} catch (e) {
|
|
45516
|
+
return;
|
|
45517
|
+
}
|
|
45518
|
+
})();
|
|
45519
|
+
B2S_CHUNK = 8192;
|
|
45520
|
+
base16$1 = /* @__PURE__ */ freeze(() => chain$1(radix2$1(4), alphabet$1("0123456789ABCDEF")));
|
|
45521
|
+
base64urlnopad$1 = /* @__PURE__ */ freeze(() => chain$1(radix2$1(6), alphabet$1("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_")));
|
|
45522
|
+
B58_GROUP = 656356768;
|
|
45523
|
+
radix58 = {
|
|
45524
|
+
encode: (bytes) => {
|
|
45525
|
+
abytes$3(bytes);
|
|
45526
|
+
const blen = bytes.length;
|
|
45527
|
+
if (blen === 0) return /* @__PURE__ */ new Uint8Array(0);
|
|
45528
|
+
let zeros = 0;
|
|
45529
|
+
while (zeros < blen - 1 && bytes[zeros] === 0) zeros++;
|
|
45530
|
+
const nlimbs = Math.ceil(blen / 2);
|
|
45531
|
+
const limbs = new Uint16Array(nlimbs);
|
|
45532
|
+
const odd = blen & 1;
|
|
45533
|
+
if (odd) limbs[0] = bytes[0];
|
|
45534
|
+
for (let i = odd, j = odd; i < blen; i += 2, j++) limbs[j] = bytes[i] << 8 | bytes[i + 1];
|
|
45535
|
+
const groups = [];
|
|
45536
|
+
let pos = 0;
|
|
45537
|
+
while (pos < nlimbs) {
|
|
45538
|
+
let carry = 0;
|
|
45539
|
+
for (let i = pos; i < nlimbs; i++) {
|
|
45540
|
+
const cur = carry * 65536 + limbs[i];
|
|
45541
|
+
const q = Math.floor(cur / B58_GROUP);
|
|
45542
|
+
carry = cur - q * B58_GROUP;
|
|
45543
|
+
limbs[i] = q;
|
|
45544
|
+
if (q === 0 && i === pos) pos++;
|
|
45545
|
+
}
|
|
45546
|
+
groups.push(carry);
|
|
45547
|
+
}
|
|
45548
|
+
const top = groups.length - 1;
|
|
45549
|
+
let sig = top * 5;
|
|
45550
|
+
for (let v = groups[top];; v = Math.floor(v / 58)) {
|
|
45551
|
+
sig++;
|
|
45552
|
+
if (v < 58) break;
|
|
45553
|
+
}
|
|
45554
|
+
const res = new Uint8Array(zeros + sig);
|
|
45555
|
+
let j = res.length - 1;
|
|
45556
|
+
for (let g = 0; g < top; g++) {
|
|
45557
|
+
let v = groups[g];
|
|
45558
|
+
for (let k = 0; k < 5; k++) {
|
|
45559
|
+
res[j--] = v % 58;
|
|
45560
|
+
v = Math.floor(v / 58);
|
|
45561
|
+
}
|
|
45562
|
+
}
|
|
45563
|
+
for (let v = groups[top]; j >= zeros; v = Math.floor(v / 58)) res[j--] = v % 58;
|
|
45564
|
+
return res;
|
|
45565
|
+
},
|
|
45566
|
+
decode: (digits) => {
|
|
45567
|
+
abytes$3(digits);
|
|
45568
|
+
const dlen = digits.length;
|
|
45569
|
+
if (dlen === 0) return /* @__PURE__ */ new Uint8Array(0);
|
|
45570
|
+
if (dlen >= 65536) throw new Error("invalid length");
|
|
45571
|
+
let zeros = 0;
|
|
45572
|
+
while (zeros < dlen - 1 && digits[zeros] === 0) zeros++;
|
|
45573
|
+
const limbs = new Uint16Array(Math.ceil(dlen * 6 / 16) + 1);
|
|
45574
|
+
let used = 0;
|
|
45575
|
+
let i = 0;
|
|
45576
|
+
let group = dlen % 5 || 5;
|
|
45577
|
+
while (i < dlen) {
|
|
45578
|
+
let gval = 0;
|
|
45579
|
+
let factor = 1;
|
|
45580
|
+
for (const end = i + group; i < end; i++) {
|
|
45581
|
+
const d = digits[i];
|
|
45582
|
+
if (d >= 58) throw new Error(`invalid integer: ${d}`);
|
|
45583
|
+
gval = gval * 58 + d;
|
|
45584
|
+
factor *= 58;
|
|
45585
|
+
}
|
|
45586
|
+
group = 5;
|
|
45587
|
+
let carry = gval;
|
|
45588
|
+
for (let k = 0; k < used; k++) {
|
|
45589
|
+
const cur = limbs[k] * factor + carry;
|
|
45590
|
+
carry = Math.floor(cur / 65536);
|
|
45591
|
+
limbs[k] = cur - carry * 65536;
|
|
45592
|
+
}
|
|
45593
|
+
for (; carry > 0; carry = Math.floor(carry / 65536)) limbs[used++] = carry % 65536;
|
|
45594
|
+
}
|
|
45595
|
+
const valueBytes = used === 0 ? 1 : used * 2 - (limbs[used - 1] < 256 ? 1 : 0);
|
|
45596
|
+
const res = new Uint8Array(zeros + valueBytes);
|
|
45597
|
+
let j = res.length - 1;
|
|
45598
|
+
for (let k = 0; k < used; k++) {
|
|
45599
|
+
const limb = limbs[k];
|
|
45600
|
+
res[j--] = limb & 255;
|
|
45601
|
+
if (j >= zeros) res[j--] = limb >> 8;
|
|
45602
|
+
}
|
|
45603
|
+
return res;
|
|
45604
|
+
}
|
|
45605
|
+
};
|
|
45606
|
+
genBase58 = (abc) => chain$1(radix58, alphabet$1(abc));
|
|
45607
|
+
base58$1 = /* @__PURE__ */ freeze(() => genBase58("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"));
|
|
45608
|
+
BECH_ALPHABET$1 = /* @__PURE__ */ alphabet$1("qpzry9x8gf2tvdw0s3jn54khce6mua7l");
|
|
45601
45609
|
POLYMOD_GENERATORS$1 = [
|
|
45602
45610
|
996825010,
|
|
45603
45611
|
642813549,
|
|
@@ -45605,16 +45613,10 @@ var init_base = __esmMin((() => {
|
|
|
45605
45613
|
1027748829,
|
|
45606
45614
|
705979059
|
|
45607
45615
|
];
|
|
45608
|
-
genBech32$1("
|
|
45609
|
-
bech32m$1 = /* @__PURE__ */ Object.freeze(genBech32$1("bech32m"));
|
|
45610
|
-
hasHexBuiltin$1 = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function")();
|
|
45611
|
-
hasHexBuiltin$1 || chain$1(radix2$1(4), alphabet$1("0123456789abcdef"), join$2(""), normalize$3((s) => {
|
|
45612
|
-
if (typeof s !== "string" || s.length % 2 !== 0) throw new TypeError(`hex.decode: expected string, got ${typeof s} with length ${s.length}`);
|
|
45613
|
-
return s.toLowerCase();
|
|
45614
|
-
}));
|
|
45616
|
+
bech32m$1 = /* @__PURE__ */ freeze(() => genBech32$1("bech32m"));
|
|
45615
45617
|
}));
|
|
45616
45618
|
//#endregion
|
|
45617
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
45619
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/address.mjs
|
|
45618
45620
|
function encodeQuantAddress(hrp, bytes) {
|
|
45619
45621
|
return bech32m$1.encodeFromBytes(hrp, toUint8Array(bytes));
|
|
45620
45622
|
}
|
|
@@ -45644,7 +45646,7 @@ var init_address$5 = __esmMin((() => {
|
|
|
45644
45646
|
toXyoAddress = zodToFactory(XyoAddressZod, "toXyoAddress");
|
|
45645
45647
|
}));
|
|
45646
45648
|
//#endregion
|
|
45647
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
45649
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/account-model.mjs
|
|
45648
45650
|
function asSignOptions(value) {
|
|
45649
45651
|
if (value === void 0) return void 0;
|
|
45650
45652
|
return "byteLength" in value ? { previousHash: value } : value;
|
|
@@ -75940,7 +75942,7 @@ function concatBytes$2(...arrays) {
|
|
|
75940
75942
|
});
|
|
75941
75943
|
return r;
|
|
75942
75944
|
}
|
|
75943
|
-
function checkOpts(defaults, opts) {
|
|
75945
|
+
function checkOpts$1(defaults, opts) {
|
|
75944
75946
|
if (opts !== void 0 && toStr.call(opts) !== "[object Object]") throw new Error("Options should be object or undefined");
|
|
75945
75947
|
return Object.assign(defaults, opts);
|
|
75946
75948
|
}
|
|
@@ -76842,7 +76844,7 @@ var init_hmac$1 = __esmMin((() => {
|
|
|
76842
76844
|
//#region ../../node_modules/.pnpm/@noble+hashes@1.3.2/node_modules/@noble/hashes/esm/pbkdf2.js
|
|
76843
76845
|
function pbkdf2Init(hash, _password, _salt, _opts) {
|
|
76844
76846
|
hash$1(hash);
|
|
76845
|
-
const { c, dkLen, asyncTick } = checkOpts({
|
|
76847
|
+
const { c, dkLen, asyncTick } = checkOpts$1({
|
|
76846
76848
|
dkLen: 32,
|
|
76847
76849
|
asyncTick: 10
|
|
76848
76850
|
}, _opts);
|
|
@@ -76974,7 +76976,7 @@ function BlockMix(input, ii, out, oi, r) {
|
|
|
76974
76976
|
}
|
|
76975
76977
|
}
|
|
76976
76978
|
function scryptInit(password, salt, _opts) {
|
|
76977
|
-
const { N, r, p, dkLen, asyncTick, maxmem, onProgress } = checkOpts({
|
|
76979
|
+
const { N, r, p, dkLen, asyncTick, maxmem, onProgress } = checkOpts$1({
|
|
76978
76980
|
dkLen: 32,
|
|
76979
76981
|
asyncTick: 10,
|
|
76980
76982
|
maxmem: 1024 ** 3 + 1024
|
|
@@ -77312,7 +77314,7 @@ var utils_exports = /* @__PURE__ */ __exportAll({
|
|
|
77312
77314
|
numberToHexUnpadded: () => numberToHexUnpadded,
|
|
77313
77315
|
numberToVarBytesBE: () => numberToVarBytesBE,
|
|
77314
77316
|
utf8ToBytes: () => utf8ToBytes$1,
|
|
77315
|
-
validateObject: () => validateObject
|
|
77317
|
+
validateObject: () => validateObject$1
|
|
77316
77318
|
});
|
|
77317
77319
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
77318
77320
|
/**
|
|
@@ -77478,7 +77480,7 @@ function createHmacDrbg(hashLen, qByteLen, hmacFn) {
|
|
|
77478
77480
|
};
|
|
77479
77481
|
return genUntil;
|
|
77480
77482
|
}
|
|
77481
|
-
function validateObject(object, validators, optValidators = {}) {
|
|
77483
|
+
function validateObject$1(object, validators, optValidators = {}) {
|
|
77482
77484
|
const checkField = (fieldName, type, isOptional) => {
|
|
77483
77485
|
const checkVal = validatorFns[type];
|
|
77484
77486
|
if (typeof checkVal !== "function") throw new Error(`Invalid validator "${type}", expected function`);
|
|
@@ -77631,7 +77633,7 @@ function FpSqrt(P) {
|
|
|
77631
77633
|
return tonelliShanks(P);
|
|
77632
77634
|
}
|
|
77633
77635
|
function validateField(field) {
|
|
77634
|
-
return validateObject(field, FIELD_FIELDS.reduce((map, val) => {
|
|
77636
|
+
return validateObject$1(field, FIELD_FIELDS.reduce((map, val) => {
|
|
77635
77637
|
map[val] = "function";
|
|
77636
77638
|
return map;
|
|
77637
77639
|
}, {
|
|
@@ -77783,7 +77785,7 @@ function mapHashToField(key, fieldOrder, isLE = false) {
|
|
|
77783
77785
|
return isLE ? numberToBytesLE(reduced, fieldLen) : numberToBytesBE(reduced, fieldLen);
|
|
77784
77786
|
}
|
|
77785
77787
|
var _0n$4, _1n$5, _2n$3, _3n$1, _4n, _5n, _8n, _9n, _16n, FIELD_FIELDS;
|
|
77786
|
-
var init_modular = __esmMin((() => {
|
|
77788
|
+
var init_modular$1 = __esmMin((() => {
|
|
77787
77789
|
init_utils$9();
|
|
77788
77790
|
_0n$4 = BigInt(0);
|
|
77789
77791
|
_1n$5 = BigInt(1);
|
|
@@ -77913,7 +77915,7 @@ function wNAF(c, bits) {
|
|
|
77913
77915
|
}
|
|
77914
77916
|
function validateBasic(curve) {
|
|
77915
77917
|
validateField(curve.Fp);
|
|
77916
|
-
validateObject(curve, {
|
|
77918
|
+
validateObject$1(curve, {
|
|
77917
77919
|
n: "bigint",
|
|
77918
77920
|
h: "bigint",
|
|
77919
77921
|
Gx: "field",
|
|
@@ -77930,7 +77932,7 @@ function validateBasic(curve) {
|
|
|
77930
77932
|
}
|
|
77931
77933
|
var _0n$3, _1n$4;
|
|
77932
77934
|
var init_curve = __esmMin((() => {
|
|
77933
|
-
init_modular();
|
|
77935
|
+
init_modular$1();
|
|
77934
77936
|
init_utils$9();
|
|
77935
77937
|
_0n$3 = BigInt(0);
|
|
77936
77938
|
_1n$4 = BigInt(1);
|
|
@@ -77940,7 +77942,7 @@ var init_curve = __esmMin((() => {
|
|
|
77940
77942
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
77941
77943
|
function validatePointOpts(curve) {
|
|
77942
77944
|
const opts = validateBasic(curve);
|
|
77943
|
-
validateObject(opts, {
|
|
77945
|
+
validateObject$1(opts, {
|
|
77944
77946
|
a: "field",
|
|
77945
77947
|
b: "field"
|
|
77946
77948
|
}, {
|
|
@@ -78319,7 +78321,7 @@ function weierstrassPoints(opts) {
|
|
|
78319
78321
|
}
|
|
78320
78322
|
function validateOpts$1(curve) {
|
|
78321
78323
|
const opts = validateBasic(curve);
|
|
78322
|
-
validateObject(opts, {
|
|
78324
|
+
validateObject$1(opts, {
|
|
78323
78325
|
hash: "hash",
|
|
78324
78326
|
hmac: "function",
|
|
78325
78327
|
randomBytes: "function"
|
|
@@ -78666,7 +78668,7 @@ function weierstrass(curveDef) {
|
|
|
78666
78668
|
}
|
|
78667
78669
|
var b2n, h2b, DER, _0n$2, _1n$3, _3n;
|
|
78668
78670
|
var init_weierstrass = __esmMin((() => {
|
|
78669
|
-
init_modular();
|
|
78671
|
+
init_modular$1();
|
|
78670
78672
|
init_utils$9();
|
|
78671
78673
|
init_curve();
|
|
78672
78674
|
({bytesToNumberBE: b2n, hexToBytes: h2b} = utils_exports);
|
|
@@ -78726,7 +78728,7 @@ var init_weierstrass = __esmMin((() => {
|
|
|
78726
78728
|
//#endregion
|
|
78727
78729
|
//#region ../../node_modules/.pnpm/@noble+curves@1.2.0/node_modules/@noble/curves/esm/abstract/hash-to-curve.js
|
|
78728
78730
|
var init_hash_to_curve = __esmMin((() => {
|
|
78729
|
-
init_modular();
|
|
78731
|
+
init_modular$1();
|
|
78730
78732
|
init_utils$9();
|
|
78731
78733
|
}));
|
|
78732
78734
|
//#endregion
|
|
@@ -78779,7 +78781,7 @@ var secp256k1P, secp256k1N, _1n$2, _2n$2, divNearest, Fp, secp256k1;
|
|
|
78779
78781
|
var init_secp256k1 = __esmMin((() => {
|
|
78780
78782
|
init_sha256$1();
|
|
78781
78783
|
init_utils$10();
|
|
78782
|
-
init_modular();
|
|
78784
|
+
init_modular$1();
|
|
78783
78785
|
init_weierstrass();
|
|
78784
78786
|
init_utils$9();
|
|
78785
78787
|
init_hash_to_curve();
|
|
@@ -100397,7 +100399,7 @@ var init_lib_esm = __esmMin((() => {
|
|
|
100397
100399
|
init_ethers();
|
|
100398
100400
|
}));
|
|
100399
100401
|
//#endregion
|
|
100400
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
100402
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/data.mjs
|
|
100401
100403
|
function checkLength(bytes, length) {
|
|
100402
100404
|
assertEx(bytes.byteLength === length, () => `Length Mismatch: ${bytes.byteLength} !== ${length} => ${base16$1.encode(new Uint8Array(bytes))}`);
|
|
100403
100405
|
}
|
|
@@ -100458,7 +100460,7 @@ var init_data = __esmMin((() => {
|
|
|
100458
100460
|
};
|
|
100459
100461
|
}));
|
|
100460
100462
|
//#endregion
|
|
100461
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
100463
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/wasm.mjs
|
|
100462
100464
|
var validate$2, bigInt, bulkMemory, exceptions, extendedConst, gc, memory64, multiValue, mutableGlobals, relaxedSimd, saturatedFloatToInt, signExtensions, simd, streamingCompilation, tailCall, threads, WasmFeatureDetectors, WasmSupport;
|
|
100463
100465
|
var init_wasm = __esmMin((() => {
|
|
100464
100466
|
init_node$4();
|
|
@@ -101048,7 +101050,7 @@ var init_wasm = __esmMin((() => {
|
|
|
101048
101050
|
};
|
|
101049
101051
|
}));
|
|
101050
101052
|
//#endregion
|
|
101051
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
101053
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/elliptic.mjs
|
|
101052
101054
|
function compareArrayBuffers(b1, b2) {
|
|
101053
101055
|
if (b1.byteLength !== b2.byteLength) return false;
|
|
101054
101056
|
const a1 = new Uint8Array(b1);
|
|
@@ -101181,7 +101183,7 @@ var init_elliptic = __esmMin((async () => {
|
|
|
101181
101183
|
};
|
|
101182
101184
|
}));
|
|
101183
101185
|
//#endregion
|
|
101184
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
101186
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/account.mjs
|
|
101185
101187
|
function base64urlEncode(bytes) {
|
|
101186
101188
|
return base64urlnopad$1.encode(bytes);
|
|
101187
101189
|
}
|
|
@@ -101717,22 +101719,22 @@ var init_account = __esmMin((async () => {
|
|
|
101717
101719
|
Account = __decorateClass$19([staticImplements()], Account);
|
|
101718
101720
|
}));
|
|
101719
101721
|
//#endregion
|
|
101720
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
101722
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/huri.mjs
|
|
101721
101723
|
var init_huri = __esmMin((async () => {
|
|
101722
101724
|
init_node$4();
|
|
101723
101725
|
await init_account();
|
|
101724
101726
|
}));
|
|
101725
101727
|
//#endregion
|
|
101726
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
101728
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/api.mjs
|
|
101727
101729
|
var init_api = __esmMin((async () => {
|
|
101728
101730
|
await init_huri();
|
|
101729
101731
|
init_node$4();
|
|
101730
101732
|
}));
|
|
101731
101733
|
//#endregion
|
|
101732
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
101734
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/api-models.mjs
|
|
101733
101735
|
var init_api_models = __esmMin((() => {}));
|
|
101734
101736
|
//#endregion
|
|
101735
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
101737
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/payload-model.mjs
|
|
101736
101738
|
function WithStorageMetaZod(valueZod) {
|
|
101737
101739
|
return /* @__PURE__ */ object$4({
|
|
101738
101740
|
...valueZod.shape,
|
|
@@ -103449,7 +103451,7 @@ var init_dist_esm = __esmMin((() => {
|
|
|
103449
103451
|
init_unsubscribe();
|
|
103450
103452
|
}));
|
|
103451
103453
|
//#endregion
|
|
103452
|
-
//#region ../../node_modules/.pnpm/@ariestools+threads@8.1.
|
|
103454
|
+
//#region ../../node_modules/.pnpm/@ariestools+threads@8.1.9_@opentelemetry+api@1.9.1_observable-fns@0.6.1_supports-color@10.2.2_zod@4.4.3/node_modules/@ariestools/threads/dist/node/master/index-node.mjs
|
|
103453
103455
|
function resolveScriptPath(scriptPath, baseURL) {
|
|
103454
103456
|
const makeAbsolute = (filePath) => {
|
|
103455
103457
|
return path.isAbsolute(filePath) ? filePath : path.join(baseURL ?? cwd(), filePath);
|
|
@@ -106383,7 +106385,7 @@ var require_index_umd = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
106383
106385
|
}));
|
|
106384
106386
|
}));
|
|
106385
106387
|
//#endregion
|
|
106386
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
106388
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/node/hash.mjs
|
|
106387
106389
|
var import_index_umd, __require, createNodeWorker, removeEmptyFields, subSort, sortFields, subtleHashFunc, wasmHashFunc, wasmSupportStatic, omitByPredicate, ObjectHasher, NodeObjectHasher;
|
|
106388
106390
|
var init_hash = __esmMin((() => {
|
|
106389
106391
|
init_node$4();
|
|
@@ -106639,7 +106641,7 @@ var init_hash = __esmMin((() => {
|
|
|
106639
106641
|
};
|
|
106640
106642
|
}));
|
|
106641
106643
|
//#endregion
|
|
106642
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
106644
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/payload-builder.mjs
|
|
106643
106645
|
var omitSchema, PayloadBuilder;
|
|
106644
106646
|
var init_payload_builder = __esmMin((() => {
|
|
106645
106647
|
init_node$4();
|
|
@@ -106920,7 +106922,7 @@ var init_payload_builder = __esmMin((() => {
|
|
|
106920
106922
|
};
|
|
106921
106923
|
}));
|
|
106922
106924
|
//#endregion
|
|
106923
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
106925
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/schema-name-validator.mjs
|
|
106924
106926
|
function domainLevel(validator, level) {
|
|
106925
106927
|
return validator.parts?.slice(0, level + 1).toReversed().join(".");
|
|
106926
106928
|
}
|
|
@@ -106991,7 +106993,7 @@ var init_schema_name_validator = __esmMin((() => {
|
|
|
106991
106993
|
};
|
|
106992
106994
|
}));
|
|
106993
106995
|
//#endregion
|
|
106994
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
106996
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/payload-validator.mjs
|
|
106995
106997
|
var defaultSchemaNameValidatorFactory, PayloadValidator;
|
|
106996
106998
|
var init_payload_validator = __esmMin((() => {
|
|
106997
106999
|
init_node$4();
|
|
@@ -107045,7 +107047,7 @@ var init_payload_validator = __esmMin((() => {
|
|
|
107045
107047
|
};
|
|
107046
107048
|
}));
|
|
107047
107049
|
//#endregion
|
|
107048
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
107050
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/payload-wrapper.mjs
|
|
107049
107051
|
var isPayloadWrapperBase, PayloadWrapperBase, PayloadDataWrapper, PayloadWrapper, Uint256RegEx, payloadPropertiesJsonSchema, payloadJsonSchema;
|
|
107050
107052
|
var init_payload_wrapper = __esmMin((() => {
|
|
107051
107053
|
init_node$4();
|
|
@@ -107238,7 +107240,7 @@ var init_payload_wrapper = __esmMin((() => {
|
|
|
107238
107240
|
};
|
|
107239
107241
|
}));
|
|
107240
107242
|
//#endregion
|
|
107241
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
107243
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/payload.mjs
|
|
107242
107244
|
var init_payload = __esmMin((async () => {
|
|
107243
107245
|
await init_huri();
|
|
107244
107246
|
init_payload_builder();
|
|
@@ -107247,7 +107249,7 @@ var init_payload = __esmMin((async () => {
|
|
|
107247
107249
|
init_payload_wrapper();
|
|
107248
107250
|
}));
|
|
107249
107251
|
//#endregion
|
|
107250
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
107252
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/boundwitness-builder.mjs
|
|
107251
107253
|
function missingSchemaMessage(payload) {
|
|
107252
107254
|
return `Builder: Missing Schema
|
|
107253
107255
|
${JSON.stringify(payload, null, 2)}`;
|
|
@@ -107603,7 +107605,7 @@ var init_boundwitness_builder = __esmMin((async () => {
|
|
|
107603
107605
|
};
|
|
107604
107606
|
}));
|
|
107605
107607
|
//#endregion
|
|
107606
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
107608
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/boundwitness-validator.mjs
|
|
107607
107609
|
var boundWitnessArrayPropertyContains, addressesContains, validateArraysSameLength, BoundWitnessValidator;
|
|
107608
107610
|
var init_boundwitness_validator = __esmMin((async () => {
|
|
107609
107611
|
init_node$4();
|
|
@@ -107743,7 +107745,7 @@ var init_boundwitness_validator = __esmMin((async () => {
|
|
|
107743
107745
|
};
|
|
107744
107746
|
}));
|
|
107745
107747
|
//#endregion
|
|
107746
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
107748
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/boundwitness-wrapper.mjs
|
|
107747
107749
|
var isBoundWitnessWrapper, BoundWitnessWrapper, QueryBoundWitnessWrapper, SignatureRegEx, boundWitnessProperties, boundWitnessJsonSchema;
|
|
107748
107750
|
var init_boundwitness_wrapper = __esmMin((async () => {
|
|
107749
107751
|
init_node$4();
|
|
@@ -108131,7 +108133,7 @@ var init_boundwitness_wrapper = __esmMin((async () => {
|
|
|
108131
108133
|
};
|
|
108132
108134
|
}));
|
|
108133
108135
|
//#endregion
|
|
108134
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
108136
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/boundwitness.mjs
|
|
108135
108137
|
var init_boundwitness = __esmMin((async () => {
|
|
108136
108138
|
await init_boundwitness_builder();
|
|
108137
108139
|
init_boundwitness_model();
|
|
@@ -108153,7 +108155,7 @@ var init_config_payload_plugin = __esmMin((() => {
|
|
|
108153
108155
|
PayloadZodOfSchema(ConfigSchema);
|
|
108154
108156
|
}));
|
|
108155
108157
|
//#endregion
|
|
108156
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
108158
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/node/core.mjs
|
|
108157
108159
|
var init_core = __esmMin((() => {
|
|
108158
108160
|
init_address$5();
|
|
108159
108161
|
init_data();
|
|
@@ -108162,7 +108164,7 @@ var init_core = __esmMin((() => {
|
|
|
108162
108164
|
init_wasm();
|
|
108163
108165
|
}));
|
|
108164
108166
|
//#endregion
|
|
108165
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
108167
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/dns.mjs
|
|
108166
108168
|
var init_dns = __esmMin((() => {
|
|
108167
108169
|
init_node$4();
|
|
108168
108170
|
})), SchemaSchema, optionalStringZod$1, schemaDefinitionZod, SchemaPayloadZod, isSchemaPayload, init_schema_payload_plugin = __esmMin((() => {
|
|
@@ -108248,7 +108250,7 @@ var init_value_payload_plugin = __esmMin((() => {
|
|
|
108248
108250
|
PayloadZodOfSchema(ValueSchema);
|
|
108249
108251
|
}));
|
|
108250
108252
|
//#endregion
|
|
108251
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
108253
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/core-payload-plugins.mjs
|
|
108252
108254
|
var init_core_payload_plugins = __esmMin((async () => {
|
|
108253
108255
|
init_config_payload_plugin();
|
|
108254
108256
|
await init_domain_payload_plugin();
|
|
@@ -108263,10 +108265,10 @@ var init_core_payload_plugins = __esmMin((async () => {
|
|
|
108263
108265
|
init_schema_payload_plugin();
|
|
108264
108266
|
}));
|
|
108265
108267
|
//#endregion
|
|
108266
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
108268
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/key-model.mjs
|
|
108267
108269
|
var init_key_model = __esmMin((() => {}));
|
|
108268
108270
|
//#endregion
|
|
108269
|
-
//#region ../../node_modules/.pnpm/@noble+hashes@2.
|
|
108271
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@2.3.0/node_modules/@noble/hashes/utils.js
|
|
108270
108272
|
/**
|
|
108271
108273
|
* Checks if something is Uint8Array. Be careful: nodejs Buffer will return true.
|
|
108272
108274
|
* @param a - value to test
|
|
@@ -108284,6 +108286,7 @@ function isBytes$3(a) {
|
|
|
108284
108286
|
* Asserts something is a non-negative integer.
|
|
108285
108287
|
* @param n - number to validate
|
|
108286
108288
|
* @param title - label included in thrown errors
|
|
108289
|
+
* @returns The validated number.
|
|
108287
108290
|
* @throws On wrong argument types. {@link TypeError}
|
|
108288
108291
|
* @throws On wrong argument ranges or values. {@link RangeError}
|
|
108289
108292
|
* @example
|
|
@@ -108293,14 +108296,25 @@ function isBytes$3(a) {
|
|
|
108293
108296
|
* ```
|
|
108294
108297
|
*/
|
|
108295
108298
|
function anumber$2(n, title = "") {
|
|
108296
|
-
if (typeof n !== "number")
|
|
108297
|
-
|
|
108298
|
-
|
|
108299
|
-
|
|
108300
|
-
|
|
108301
|
-
|
|
108302
|
-
|
|
108303
|
-
|
|
108299
|
+
if (typeof n !== "number") throw new TypeError(atitle$1(title) + "expected number, got " + typeof n);
|
|
108300
|
+
if (!Number.isSafeInteger(n) || n < 0) throw new RangeError(atitle$1(title) + "expected integer >= 0, got " + n);
|
|
108301
|
+
return n;
|
|
108302
|
+
}
|
|
108303
|
+
/**
|
|
108304
|
+
* Asserts something is a boolean.
|
|
108305
|
+
* @param value - value to validate
|
|
108306
|
+
* @param title - label included in thrown errors
|
|
108307
|
+
* @returns The validated boolean.
|
|
108308
|
+
* @throws On wrong argument types. {@link TypeError}
|
|
108309
|
+
* @example
|
|
108310
|
+
* Validate a boolean option.
|
|
108311
|
+
* ```ts
|
|
108312
|
+
* abool(true, 'enableXOF');
|
|
108313
|
+
* ```
|
|
108314
|
+
*/
|
|
108315
|
+
function abool$1(value, title = "") {
|
|
108316
|
+
if (typeof value !== "boolean") throw new TypeError(atitle$1(title) + "expected boolean, got type=" + typeof value);
|
|
108317
|
+
return value;
|
|
108304
108318
|
}
|
|
108305
108319
|
/**
|
|
108306
108320
|
* Asserts something is Uint8Array.
|
|
@@ -108317,18 +108331,34 @@ function anumber$2(n, title = "") {
|
|
|
108317
108331
|
* ```
|
|
108318
108332
|
*/
|
|
108319
108333
|
function abytes$2(value, length, title = "") {
|
|
108334
|
+
if (isBytes$3(value) && (length === void 0 || value.length === length)) return value;
|
|
108335
|
+
if (length !== void 0) anumber$2(length, "length");
|
|
108320
108336
|
const bytes = isBytes$3(value);
|
|
108321
|
-
const
|
|
108322
|
-
const
|
|
108323
|
-
|
|
108324
|
-
|
|
108325
|
-
|
|
108326
|
-
|
|
108327
|
-
|
|
108328
|
-
|
|
108329
|
-
|
|
108330
|
-
|
|
108331
|
-
|
|
108337
|
+
const ofLen = length !== void 0 ? ` of length ${length}` : "";
|
|
108338
|
+
const got = bytes ? `length=${value.length}` : `type=${typeof value}`;
|
|
108339
|
+
const message = atitle$1(title) + "expected Uint8Array" + ofLen + ", got " + got;
|
|
108340
|
+
if (!bytes) throw new TypeError(message);
|
|
108341
|
+
throw new RangeError(message);
|
|
108342
|
+
}
|
|
108343
|
+
/**
|
|
108344
|
+
* Asserts something is a wrapped hash constructor.
|
|
108345
|
+
* @param h - hash constructor to validate
|
|
108346
|
+
* @throws On wrong argument types or invalid hash wrapper shape. {@link TypeError}
|
|
108347
|
+
* @throws On invalid hash metadata ranges or values. {@link RangeError}
|
|
108348
|
+
* @throws If the hash metadata allows empty outputs or block sizes. {@link Error}
|
|
108349
|
+
* @example
|
|
108350
|
+
* Validate a callable hash wrapper.
|
|
108351
|
+
* ```ts
|
|
108352
|
+
* import { ahash } from '@noble/hashes/utils.js';
|
|
108353
|
+
* import { sha256 } from '@noble/hashes/sha2.js';
|
|
108354
|
+
* ahash(sha256);
|
|
108355
|
+
* ```
|
|
108356
|
+
*/
|
|
108357
|
+
function ahash(h) {
|
|
108358
|
+
if (typeof h !== "function" || typeof h.create !== "function") throw new TypeError("expected hash wrapped by utils.createHasher");
|
|
108359
|
+
anumber$2(h.outputLen);
|
|
108360
|
+
anumber$2(h.blockLen);
|
|
108361
|
+
if (h.outputLen < 1 || h.blockLen < 1) throw new Error("hash blockLen / outputLen must be >= 1");
|
|
108332
108362
|
}
|
|
108333
108363
|
/**
|
|
108334
108364
|
* Asserts a hash instance has not been destroyed or finished.
|
|
@@ -108345,8 +108375,8 @@ function abytes$2(value, length, title = "") {
|
|
|
108345
108375
|
* ```
|
|
108346
108376
|
*/
|
|
108347
108377
|
function aexists$1(instance, checkFinished = true) {
|
|
108348
|
-
if (instance.destroyed) throw new Error("
|
|
108349
|
-
if (checkFinished && instance.finished) throw new Error("
|
|
108378
|
+
if (instance.destroyed) throw new Error("hash was destroyed");
|
|
108379
|
+
if (checkFinished && instance.finished) throw new Error("digest() was already called");
|
|
108350
108380
|
}
|
|
108351
108381
|
/**
|
|
108352
108382
|
* Asserts output is a sufficiently-sized byte array.
|
|
@@ -108365,9 +108395,9 @@ function aexists$1(instance, checkFinished = true) {
|
|
|
108365
108395
|
* ```
|
|
108366
108396
|
*/
|
|
108367
108397
|
function aoutput$1(out, instance) {
|
|
108368
|
-
abytes$2(out, void 0, "
|
|
108398
|
+
abytes$2(out, void 0, "output");
|
|
108369
108399
|
const min = instance.outputLen;
|
|
108370
|
-
if (out.length
|
|
108400
|
+
if (!(out.length >= min)) throw new RangeError("\"output\" expected length >= " + min);
|
|
108371
108401
|
}
|
|
108372
108402
|
/**
|
|
108373
108403
|
* Casts a typed array view to Uint32Array.
|
|
@@ -108477,6 +108507,24 @@ function concatBytes(...arrays) {
|
|
|
108477
108507
|
return res;
|
|
108478
108508
|
}
|
|
108479
108509
|
/**
|
|
108510
|
+
* Merges default options and passed options.
|
|
108511
|
+
* @param defaults - base option object
|
|
108512
|
+
* @param opts - user overrides
|
|
108513
|
+
* @param title - label included in thrown override errors
|
|
108514
|
+
* @returns Merged option object. The merge mutates `defaults` in place.
|
|
108515
|
+
* @throws On wrong argument types. {@link TypeError}
|
|
108516
|
+
* @example
|
|
108517
|
+
* Merge user overrides onto default options.
|
|
108518
|
+
* ```ts
|
|
108519
|
+
* checkOpts({ dkLen: 32 }, { asyncTick: 10 });
|
|
108520
|
+
* ```
|
|
108521
|
+
*/
|
|
108522
|
+
function checkOpts(defaults, opts, title = "opts") {
|
|
108523
|
+
aobject$2(defaults, "defaults");
|
|
108524
|
+
if (opts !== void 0) aobject$2(opts, title);
|
|
108525
|
+
return Object.assign(defaults, opts);
|
|
108526
|
+
}
|
|
108527
|
+
/**
|
|
108480
108528
|
* Creates a callable hash function from a stateful class constructor.
|
|
108481
108529
|
* @param hashCons - hash constructor or factory
|
|
108482
108530
|
* @param info - optional metadata such as DER OID
|
|
@@ -108484,6 +108532,7 @@ function concatBytes(...arrays) {
|
|
|
108484
108532
|
* Wrapper construction eagerly calls `hashCons(undefined)` once to read
|
|
108485
108533
|
* `outputLen` / `blockLen`, so constructor side effects happen at module
|
|
108486
108534
|
* init time.
|
|
108535
|
+
* @throws On wrong argument types. {@link TypeError}
|
|
108487
108536
|
* @example
|
|
108488
108537
|
* Wrap a stateful hash constructor into a callable helper.
|
|
108489
108538
|
* ```ts
|
|
@@ -108494,6 +108543,8 @@ function concatBytes(...arrays) {
|
|
|
108494
108543
|
* ```
|
|
108495
108544
|
*/
|
|
108496
108545
|
function createHasher$1(hashCons, info = {}) {
|
|
108546
|
+
if (typeof hashCons !== "function") throw new TypeError("\"hashCons\" expected function, got type=" + typeof hashCons);
|
|
108547
|
+
info = checkOpts({}, info, "info");
|
|
108497
108548
|
const hashC = (msg, opts) => hashCons(opts).update(msg).digest();
|
|
108498
108549
|
const tmp = hashCons(void 0);
|
|
108499
108550
|
hashC.outputLen = tmp.outputLen;
|
|
@@ -108526,8 +108577,12 @@ function randomBytes$1(bytesLength = 32) {
|
|
|
108526
108577
|
if (bytesLength > 65536) throw new RangeError(`"bytesLength" expected <= 65536, got ${bytesLength}`);
|
|
108527
108578
|
return cr.getRandomValues(new Uint8Array(bytesLength));
|
|
108528
108579
|
}
|
|
108529
|
-
var isLE$1, swap32IfBE$1, oidNist;
|
|
108580
|
+
var atitle$1, aobject$2, isLE$1, swap32IfBE$1, oidNist;
|
|
108530
108581
|
var init_utils$7 = __esmMin((() => {
|
|
108582
|
+
atitle$1 = (title) => title ? `"${title}" ` : "";
|
|
108583
|
+
aobject$2 = (value, label) => {
|
|
108584
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) throw new TypeError((label === "object" ? "" : `"${label}" `) + "expected object, got type=" + typeof value);
|
|
108585
|
+
};
|
|
108531
108586
|
isLE$1 = /* @__PURE__ */ (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
|
|
108532
108587
|
swap32IfBE$1 = isLE$1 ? (u) => u : byteSwap32$1;
|
|
108533
108588
|
oidNist = (suffix) => ({ oid: Uint8Array.from([
|
|
@@ -108545,9 +108600,26 @@ var init_utils$7 = __esmMin((() => {
|
|
|
108545
108600
|
]) });
|
|
108546
108601
|
}));
|
|
108547
108602
|
//#endregion
|
|
108548
|
-
//#region ../../node_modules/.pnpm/@noble+curves@2.
|
|
108603
|
+
//#region ../../node_modules/.pnpm/@noble+curves@2.3.0/node_modules/@noble/curves/utils.js
|
|
108549
108604
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
108550
108605
|
/**
|
|
108606
|
+
* Asserts something is a plain object-ish value, not null or array.
|
|
108607
|
+
* @param value - Value to validate.
|
|
108608
|
+
* @param title - Label included in thrown errors.
|
|
108609
|
+
* @returns The validated object.
|
|
108610
|
+
* @throws On wrong argument types. {@link TypeError}
|
|
108611
|
+
* @example
|
|
108612
|
+
* Validate an options object before checking fields.
|
|
108613
|
+
*
|
|
108614
|
+
* ```ts
|
|
108615
|
+
* aobject({ flag: true });
|
|
108616
|
+
* ```
|
|
108617
|
+
*/
|
|
108618
|
+
function aobject$1(value, title = "object") {
|
|
108619
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) throw new TypeError(title === "object" ? "expected valid options object" : `"${title}" expected object, got type=${typeof value}`);
|
|
108620
|
+
return value;
|
|
108621
|
+
}
|
|
108622
|
+
/**
|
|
108551
108623
|
* Validates that a flag is boolean.
|
|
108552
108624
|
* @param value - Value to validate.
|
|
108553
108625
|
* @param title - Optional field name.
|
|
@@ -108561,17 +108633,50 @@ var init_utils$7 = __esmMin((() => {
|
|
|
108561
108633
|
* ```
|
|
108562
108634
|
*/
|
|
108563
108635
|
function abool(value, title = "") {
|
|
108564
|
-
if (typeof value !== "boolean")
|
|
108565
|
-
const prefix = title && `"${title}" `;
|
|
108566
|
-
throw new TypeError(prefix + "expected boolean, got type=" + typeof value);
|
|
108567
|
-
}
|
|
108636
|
+
if (typeof value !== "boolean") throw new TypeError(atitle(title) + "expected boolean, got type=" + typeof value);
|
|
108568
108637
|
return value;
|
|
108569
108638
|
}
|
|
108639
|
+
/**
|
|
108640
|
+
* Validates declared required and optional field types on a plain object.
|
|
108641
|
+
* Extra keys are intentionally ignored because many callers validate only the subset they use from
|
|
108642
|
+
* richer option bags or runtime objects.
|
|
108643
|
+
* This walks field schemas and formats detailed errors, so avoid it on hot paths; use direct
|
|
108644
|
+
* one-line guards such as `aobject()`, `afunction()`, `abool()`, or `asafenumber()` instead.
|
|
108645
|
+
* @param object - Object to validate.
|
|
108646
|
+
* @param fields - Required field types.
|
|
108647
|
+
* @param optFields - Optional field types.
|
|
108648
|
+
* @param title - Object label included in thrown errors.
|
|
108649
|
+
* @throws On wrong argument types. {@link TypeError}
|
|
108650
|
+
* @example
|
|
108651
|
+
* Check user options before building a curve helper.
|
|
108652
|
+
*
|
|
108653
|
+
* ```ts
|
|
108654
|
+
* validateObject({ flag: true }, { flag: 'boolean' });
|
|
108655
|
+
* ```
|
|
108656
|
+
*/
|
|
108657
|
+
function validateObject(object, fields = {}, optFields = {}, title = "object") {
|
|
108658
|
+
aobject$1(object, title);
|
|
108659
|
+
aobject$1(fields, "fields");
|
|
108660
|
+
aobject$1(optFields, "optFields");
|
|
108661
|
+
function checkField(fieldName, expectedType, isOpt) {
|
|
108662
|
+
const label = title === "object" ? `param "${String(fieldName)}"` : `"${title}.${String(fieldName)}"`;
|
|
108663
|
+
const val = object[fieldName];
|
|
108664
|
+
if (!Object.hasOwn(object, fieldName) && (isOpt ? val !== void 0 : expectedType !== "function")) throw new TypeError(`${label} is invalid: expected own property`);
|
|
108665
|
+
if (isOpt && val === void 0) return;
|
|
108666
|
+
const current = typeof val;
|
|
108667
|
+
if (current !== expectedType || val === null) throw new TypeError(`${label} is invalid: expected ${expectedType}, got ${current}`);
|
|
108668
|
+
}
|
|
108669
|
+
const iter = (f, isOpt) => Object.entries(f).forEach(([k, v]) => checkField(k, v, isOpt));
|
|
108670
|
+
iter(fields, false);
|
|
108671
|
+
iter(optFields, true);
|
|
108672
|
+
}
|
|
108673
|
+
var atitle;
|
|
108570
108674
|
var init_utils$6 = __esmMin((() => {
|
|
108571
108675
|
init_utils$7();
|
|
108676
|
+
atitle = (title) => title ? `"${title}" ` : "";
|
|
108572
108677
|
}));
|
|
108573
108678
|
//#endregion
|
|
108574
|
-
//#region ../../node_modules/.pnpm/@noble+hashes@2.
|
|
108679
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@2.3.0/node_modules/@noble/hashes/_u64.js
|
|
108575
108680
|
function fromBig$1(n, le = false) {
|
|
108576
108681
|
if (le) return {
|
|
108577
108682
|
h: Number(n & U32_MASK64$1),
|
|
@@ -108592,22 +108697,28 @@ function split$1(lst, le = false) {
|
|
|
108592
108697
|
}
|
|
108593
108698
|
return [Ah, Al];
|
|
108594
108699
|
}
|
|
108595
|
-
|
|
108700
|
+
function setU64FromNum(view, byteOffset, n, isLE) {
|
|
108701
|
+
const h = fromNumH(n);
|
|
108702
|
+
const l = fromNumL(n);
|
|
108703
|
+
view.setUint32(byteOffset, isLE ? l : h, isLE);
|
|
108704
|
+
view.setUint32(byteOffset + 4, isLE ? h : l, isLE);
|
|
108705
|
+
}
|
|
108706
|
+
var U32_MASK64$1, _32n$1, fromNumH, fromNumL;
|
|
108596
108707
|
var init__u64$1 = __esmMin((() => {
|
|
108597
|
-
U32_MASK64$1 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
|
|
108708
|
+
U32_MASK64$1 = /* @__PURE__ */ (() => BigInt(2 ** 32 - 1))();
|
|
108598
108709
|
_32n$1 = /* @__PURE__ */ BigInt(32);
|
|
108599
|
-
|
|
108600
|
-
|
|
108601
|
-
rotlBH$1 = (h, l, s) => l << s - 32 | h >>> 64 - s;
|
|
108602
|
-
rotlBL$1 = (h, l, s) => h << s - 32 | l >>> 64 - s;
|
|
108710
|
+
fromNumH = (n) => n / 2 ** 32 | 0;
|
|
108711
|
+
fromNumL = (n) => n >>> 0;
|
|
108603
108712
|
}));
|
|
108604
108713
|
//#endregion
|
|
108605
|
-
//#region ../../node_modules/.pnpm/@noble+hashes@2.
|
|
108714
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@2.3.0/node_modules/@noble/hashes/sha3.js
|
|
108606
108715
|
/**
|
|
108607
108716
|
* `keccakf1600` internal permutation, additionally allows adjusting the round count.
|
|
108608
108717
|
* @param s - 5x5 Keccak state encoded as 25 lanes split into 50 uint32 words
|
|
108609
108718
|
* in this file's local little-endian lane-word order
|
|
108610
108719
|
* @param rounds - number of rounds to execute
|
|
108720
|
+
* @throws On wrong argument types. {@link TypeError}
|
|
108721
|
+
* @throws On wrong argument ranges or values. {@link RangeError}
|
|
108611
108722
|
* @throws If `rounds` is outside the supported `1..24` range. {@link Error}
|
|
108612
108723
|
* @example
|
|
108613
108724
|
* Permute a Keccak state with the default 24 rounds.
|
|
@@ -108616,9 +108727,10 @@ var init__u64$1 = __esmMin((() => {
|
|
|
108616
108727
|
* ```
|
|
108617
108728
|
*/
|
|
108618
108729
|
function keccakP$1(s, rounds = 24) {
|
|
108730
|
+
if (!(s instanceof Uint32Array)) throw new TypeError("\"s\" expected Uint32Array(50), got type=" + typeof s);
|
|
108731
|
+
if (s.length !== 50) throw new RangeError("\"s\" expected Uint32Array(50), got length=" + s.length);
|
|
108619
108732
|
anumber$2(rounds, "rounds");
|
|
108620
108733
|
if (rounds < 1 || rounds > 24) throw new Error("\"rounds\" expected integer 1..24");
|
|
108621
|
-
const B = /* @__PURE__ */ new Uint32Array(10);
|
|
108622
108734
|
for (let round = 24 - rounds; round < 24; round++) {
|
|
108623
108735
|
for (let x = 0; x < 10; x++) B[x] = s[x] ^ s[x + 10] ^ s[x + 20] ^ s[x + 30] ^ s[x + 40];
|
|
108624
108736
|
for (let x = 0; x < 10; x += 2) {
|
|
@@ -108663,7 +108775,7 @@ function keccakP$1(s, rounds = 24) {
|
|
|
108663
108775
|
}
|
|
108664
108776
|
clean$1(B);
|
|
108665
108777
|
}
|
|
108666
|
-
var _0n$1, _1n$1, _2n$1, _7n$1, _256n$1, _0x71n$1, SHA3_PI$1, SHA3_ROTL$1, _SHA3_IOTA$1, IOTAS$1, SHA3_IOTA_H$1, SHA3_IOTA_L$1, rotlH$1, rotlL$1, Keccak$1, genShake, shake128, shake256;
|
|
108778
|
+
var _0n$1, _1n$1, _2n$1, _7n$1, _256n$1, _0x71n$1, SHA3_PI$1, SHA3_ROTL$1, _SHA3_IOTA$1, IOTAS$1, SHA3_IOTA_H$1, SHA3_IOTA_L$1, rotlSH$1, rotlSL$1, rotlBH$1, rotlBL$1, rotlH$1, rotlL$1, B, Keccak$1, genShake, shake128, shake256;
|
|
108667
108779
|
var init_sha3$1 = __esmMin((() => {
|
|
108668
108780
|
init__u64$1();
|
|
108669
108781
|
init_utils$7();
|
|
@@ -108690,8 +108802,13 @@ var init_sha3$1 = __esmMin((() => {
|
|
|
108690
108802
|
IOTAS$1 = split$1(_SHA3_IOTA$1, true);
|
|
108691
108803
|
SHA3_IOTA_H$1 = IOTAS$1[0];
|
|
108692
108804
|
SHA3_IOTA_L$1 = IOTAS$1[1];
|
|
108805
|
+
rotlSH$1 = (h, l, s) => h << s | l >>> 32 - s;
|
|
108806
|
+
rotlSL$1 = (h, l, s) => l << s | h >>> 32 - s;
|
|
108807
|
+
rotlBH$1 = (h, l, s) => l << s - 32 | h >>> 64 - s;
|
|
108808
|
+
rotlBL$1 = (h, l, s) => h << s - 32 | l >>> 64 - s;
|
|
108693
108809
|
rotlH$1 = (h, l, s) => s > 32 ? rotlBH$1(h, l, s) : rotlSH$1(h, l, s);
|
|
108694
108810
|
rotlL$1 = (h, l, s) => s > 32 ? rotlBL$1(h, l, s) : rotlSL$1(h, l, s);
|
|
108811
|
+
B = /* @__PURE__ */ new Uint32Array(10);
|
|
108695
108812
|
Keccak$1 = class Keccak$1 {
|
|
108696
108813
|
state;
|
|
108697
108814
|
pos = 0;
|
|
@@ -108706,6 +108823,10 @@ var init_sha3$1 = __esmMin((() => {
|
|
|
108706
108823
|
enableXOF = false;
|
|
108707
108824
|
rounds;
|
|
108708
108825
|
constructor(blockLen, suffix, outputLen, enableXOF = false, rounds = 24) {
|
|
108826
|
+
anumber$2(blockLen, "blockLen");
|
|
108827
|
+
anumber$2(suffix, "suffix");
|
|
108828
|
+
anumber$2(rounds, "rounds");
|
|
108829
|
+
abool$1(enableXOF, "enableXOF");
|
|
108709
108830
|
this.blockLen = blockLen;
|
|
108710
108831
|
this.suffix = suffix;
|
|
108711
108832
|
this.outputLen = outputLen;
|
|
@@ -108713,7 +108834,7 @@ var init_sha3$1 = __esmMin((() => {
|
|
|
108713
108834
|
this.canXOF = enableXOF;
|
|
108714
108835
|
this.rounds = rounds;
|
|
108715
108836
|
anumber$2(outputLen, "outputLen");
|
|
108716
|
-
if (!(0 < blockLen && blockLen < 200)) throw new Error("
|
|
108837
|
+
if (!(0 < blockLen && blockLen < 200)) throw new Error("\"blockLen\" must be 1..199");
|
|
108717
108838
|
this.state = /* @__PURE__ */ new Uint8Array(200);
|
|
108718
108839
|
this.state32 = u32$1(this.state);
|
|
108719
108840
|
}
|
|
@@ -108730,9 +108851,19 @@ var init_sha3$1 = __esmMin((() => {
|
|
|
108730
108851
|
update(data) {
|
|
108731
108852
|
aexists$1(this);
|
|
108732
108853
|
abytes$2(data);
|
|
108733
|
-
const { blockLen, state } = this;
|
|
108854
|
+
const { blockLen, state, state32 } = this;
|
|
108734
108855
|
const len = data.length;
|
|
108856
|
+
const canUseU32 = blockLen % 4 === 0 && data.byteOffset % 4 === 0;
|
|
108857
|
+
const blockLen32 = blockLen / 4;
|
|
108858
|
+
const data32 = canUseU32 && len >= blockLen ? u32$1(data) : void 0;
|
|
108735
108859
|
for (let pos = 0; pos < len;) {
|
|
108860
|
+
if (data32 !== void 0 && this.pos === 0 && pos % 4 === 0 && len - pos >= blockLen) {
|
|
108861
|
+
for (let i = 0, o = pos / 4; i < blockLen32; i++) state32[i] ^= data32[o + i];
|
|
108862
|
+
pos += blockLen;
|
|
108863
|
+
this.pos = blockLen;
|
|
108864
|
+
this.keccak();
|
|
108865
|
+
continue;
|
|
108866
|
+
}
|
|
108736
108867
|
const take = Math.min(blockLen - this.pos, len - pos);
|
|
108737
108868
|
for (let i = 0; i < take; i++) state[this.pos++] ^= data[pos++];
|
|
108738
108869
|
if (this.pos === blockLen) this.keccak();
|
|
@@ -108764,7 +108895,7 @@ var init_sha3$1 = __esmMin((() => {
|
|
|
108764
108895
|
return out;
|
|
108765
108896
|
}
|
|
108766
108897
|
xofInto(out) {
|
|
108767
|
-
if (!this.enableXOF) throw new Error("XOF is not
|
|
108898
|
+
if (!this.enableXOF) throw new Error("XOF is not enabled");
|
|
108768
108899
|
return this.writeInto(out);
|
|
108769
108900
|
}
|
|
108770
108901
|
xof(bytes) {
|
|
@@ -108774,7 +108905,7 @@ var init_sha3$1 = __esmMin((() => {
|
|
|
108774
108905
|
digestInto(out) {
|
|
108775
108906
|
aoutput$1(out, this);
|
|
108776
108907
|
if (this.finished) throw new Error("digest() was already called");
|
|
108777
|
-
this.writeInto(out.subarray(0, this.outputLen));
|
|
108908
|
+
this.writeInto(out.length === this.outputLen ? out : out.subarray(0, this.outputLen));
|
|
108778
108909
|
this.destroy();
|
|
108779
108910
|
}
|
|
108780
108911
|
digest() {
|
|
@@ -108803,21 +108934,30 @@ var init_sha3$1 = __esmMin((() => {
|
|
|
108803
108934
|
return to;
|
|
108804
108935
|
}
|
|
108805
108936
|
};
|
|
108806
|
-
genShake = (suffix, blockLen, outputLen, info = {}) => createHasher$1((opts = {}) =>
|
|
108937
|
+
genShake = (suffix, blockLen, outputLen, info = {}) => createHasher$1((opts = {}) => {
|
|
108938
|
+
opts = checkOpts({}, opts);
|
|
108939
|
+
return new Keccak$1(blockLen, suffix, opts.dkLen === void 0 ? outputLen : opts.dkLen, true);
|
|
108940
|
+
}, info);
|
|
108807
108941
|
shake128 = /* @__PURE__ */ genShake(31, 168, 16, /* @__PURE__ */ oidNist(11));
|
|
108808
108942
|
shake256 = /* @__PURE__ */ genShake(31, 136, 32, /* @__PURE__ */ oidNist(12));
|
|
108809
108943
|
}));
|
|
108810
108944
|
//#endregion
|
|
108811
|
-
//#region ../../node_modules/.pnpm/@noble+curves@2.
|
|
108812
|
-
|
|
108813
|
-
|
|
108945
|
+
//#region ../../node_modules/.pnpm/@noble+curves@2.3.0/node_modules/@noble/curves/abstract/modular.js
|
|
108946
|
+
var init_modular = __esmMin((() => {
|
|
108947
|
+
init_utils$6();
|
|
108948
|
+
}));
|
|
108949
|
+
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
108950
|
+
//#endregion
|
|
108951
|
+
//#region ../../node_modules/.pnpm/@noble+curves@2.3.0/node_modules/@noble/curves/abstract/fft.js
|
|
108952
|
+
function checkU32(n, title = "n") {
|
|
108953
|
+
if (typeof n !== "number") throw new TypeError(`wrong u32 integer "${title}": expected number, got type=${typeof n}`);
|
|
108954
|
+
if (!Number.isSafeInteger(n) || n < 0 || n > 4294967295) throw new RangeError(`wrong u32 integer "${title}": expected 0..4294967295, got ${n}`);
|
|
108814
108955
|
return n;
|
|
108815
108956
|
}
|
|
108816
108957
|
/**
|
|
108817
108958
|
* Checks if integer is in form of `1 << X`.
|
|
108818
108959
|
* @param x - Integer to inspect.
|
|
108819
108960
|
* @returns `true` when the value is a power of two.
|
|
108820
|
-
* @throws If `x` is not a valid unsigned 32-bit integer. {@link Error}
|
|
108821
108961
|
* @example
|
|
108822
108962
|
* Validate that an FFT size is a power of two.
|
|
108823
108963
|
*
|
|
@@ -108826,7 +108966,7 @@ function checkU32(n) {
|
|
|
108826
108966
|
* ```
|
|
108827
108967
|
*/
|
|
108828
108968
|
function isPowerOfTwo(x) {
|
|
108829
|
-
checkU32(x);
|
|
108969
|
+
checkU32(x, "x");
|
|
108830
108970
|
return (x & x - 1) === 0 && x !== 0;
|
|
108831
108971
|
}
|
|
108832
108972
|
/**
|
|
@@ -108843,6 +108983,7 @@ function isPowerOfTwo(x) {
|
|
|
108843
108983
|
*/
|
|
108844
108984
|
function reverseBits(n, bits) {
|
|
108845
108985
|
checkU32(n);
|
|
108986
|
+
if (typeof bits !== "number") throw new TypeError("\"bits\" expected number, got type=" + typeof bits);
|
|
108846
108987
|
if (!Number.isSafeInteger(bits) || bits < 0 || bits > 32) throw new Error(`expected integer 0 <= bits <= 32, got ${bits}`);
|
|
108847
108988
|
let reversed = 0;
|
|
108848
108989
|
for (let i = 0; i < bits; i++, n >>>= 1) reversed = reversed << 1 | n & 1;
|
|
@@ -108852,7 +108993,6 @@ function reverseBits(n, bits) {
|
|
|
108852
108993
|
* Similar to `bitLen(x)-1` but much faster for small integers, like indices.
|
|
108853
108994
|
* @param n - Input value.
|
|
108854
108995
|
* @returns Base-2 logarithm. For `n = 0`, the current implementation returns `-1`.
|
|
108855
|
-
* @throws If `n` is not a valid unsigned 32-bit integer. {@link Error}
|
|
108856
108996
|
* @example
|
|
108857
108997
|
* Compute the radix-2 stage count for one transform size.
|
|
108858
108998
|
*
|
|
@@ -108880,6 +109020,7 @@ function log2(n) {
|
|
|
108880
109020
|
* ```
|
|
108881
109021
|
*/
|
|
108882
109022
|
function bitReversalInplace(values) {
|
|
109023
|
+
if (!values || typeof values !== "object" || typeof values.length !== "number") throw new TypeError("\"values\" expected array-like, got type=" + typeof values);
|
|
108883
109024
|
const n = values.length;
|
|
108884
109025
|
if (!isPowerOfTwo(n)) throw new Error("expected positive power-of-two length, got " + n);
|
|
108885
109026
|
const bits = log2(n);
|
|
@@ -108895,10 +109036,25 @@ function bitReversalInplace(values) {
|
|
|
108895
109036
|
}
|
|
108896
109037
|
var FFTCore;
|
|
108897
109038
|
var init_fft = __esmMin((() => {
|
|
109039
|
+
init_utils$6();
|
|
109040
|
+
init_modular();
|
|
108898
109041
|
FFTCore = (F, coreOpts) => {
|
|
109042
|
+
validateObject(coreOpts, {
|
|
109043
|
+
N: "number",
|
|
109044
|
+
roots: "object",
|
|
109045
|
+
dit: "boolean"
|
|
109046
|
+
}, {
|
|
109047
|
+
invertButterflies: "boolean",
|
|
109048
|
+
skipStages: "number",
|
|
109049
|
+
brp: "boolean"
|
|
109050
|
+
}, "coreOpts");
|
|
108899
109051
|
const { N, roots, dit, invertButterflies = false, skipStages = 0, brp = true } = coreOpts;
|
|
109052
|
+
checkU32(N, "coreOpts.N");
|
|
108900
109053
|
const bits = log2(N);
|
|
108901
109054
|
if (!isPowerOfTwo(N)) throw new Error("FFT: Polynomial size should be power of two");
|
|
109055
|
+
checkU32(skipStages, "coreOpts.skipStages");
|
|
109056
|
+
const maxSkipStages = bits === 0 ? 0 : bits - 1;
|
|
109057
|
+
if (skipStages > maxSkipStages) throw new Error(`FFT: wrong skipStages: expected 0 <= skipStages <= ${maxSkipStages}`);
|
|
108902
109058
|
if (roots.length !== N) throw new Error(`FFT: wrong roots length: expected ${N}, got ${roots.length}`);
|
|
108903
109059
|
const isDit = dit !== invertButterflies;
|
|
108904
109060
|
return (values) => {
|
|
@@ -108935,11 +109091,20 @@ var init_fft = __esmMin((() => {
|
|
|
108935
109091
|
};
|
|
108936
109092
|
}));
|
|
108937
109093
|
//#endregion
|
|
108938
|
-
//#region ../../node_modules/.pnpm/@noble+post-quantum@0.
|
|
109094
|
+
//#region ../../node_modules/.pnpm/@noble+post-quantum@0.7.0/node_modules/@noble/post-quantum/utils.js
|
|
108939
109095
|
/*! noble-post-quantum - MIT License (c) 2024 Paul Miller (paulmillr.com) */
|
|
109096
|
+
function aarray(item, title, inner = () => {}) {
|
|
109097
|
+
if (!Array.isArray(item)) throw new TypeError(`"${title}" expected array, got type=${typeof item}`);
|
|
109098
|
+
for (let i = 0; i < item.length; i++) inner(item[i], `${title}[${i}]`);
|
|
109099
|
+
return item;
|
|
109100
|
+
}
|
|
109101
|
+
function aobject(value, title = "object") {
|
|
109102
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) throw new TypeError(title === "object" ? "expected valid options object" : `"${title}" expected object, got type=${typeof value}`);
|
|
109103
|
+
return value;
|
|
109104
|
+
}
|
|
108940
109105
|
/**
|
|
108941
109106
|
* Compares two byte arrays in a length-constant way for equal lengths.
|
|
108942
|
-
*
|
|
109107
|
+
* Inputs are validated as byte arrays; unequal lengths return `false` immediately.
|
|
108943
109108
|
* @param a - First byte array.
|
|
108944
109109
|
* @param b - Second byte array.
|
|
108945
109110
|
* @returns Whether both arrays contain the same bytes.
|
|
@@ -108950,6 +109115,8 @@ var init_fft = __esmMin((() => {
|
|
|
108950
109115
|
* ```
|
|
108951
109116
|
*/
|
|
108952
109117
|
function equalBytes(a, b) {
|
|
109118
|
+
a = abytes$2(a);
|
|
109119
|
+
b = abytes$2(b);
|
|
108953
109120
|
if (a.length !== b.length) return false;
|
|
108954
109121
|
let diff = 0;
|
|
108955
109122
|
for (let i = 0; i < a.length; i++) diff |= a[i] ^ b[i];
|
|
@@ -108966,7 +109133,8 @@ function equalBytes(a, b) {
|
|
|
108966
109133
|
* ```
|
|
108967
109134
|
*/
|
|
108968
109135
|
function validateOpts(opts) {
|
|
108969
|
-
if (
|
|
109136
|
+
if (isBytes$3(opts)) throw new TypeError("\"opts\" expected object, got Uint8Array");
|
|
109137
|
+
aobject(opts, "opts");
|
|
108970
109138
|
}
|
|
108971
109139
|
/**
|
|
108972
109140
|
* Validates common verification options.
|
|
@@ -109071,10 +109239,11 @@ function vecCoder(c, vecLen) {
|
|
|
109071
109239
|
return {
|
|
109072
109240
|
bytesLen,
|
|
109073
109241
|
encode: (u) => {
|
|
109074
|
-
|
|
109242
|
+
const uArr = aarray(u, "u");
|
|
109243
|
+
if (uArr.length !== vecLen) throw new RangeError(`vecCoder.encode: wrong length=${uArr.length}. Expected: ${vecLen}`);
|
|
109075
109244
|
const res = new Uint8Array(bytesLen);
|
|
109076
|
-
for (let i = 0, pos = 0; i <
|
|
109077
|
-
const b = coder.encode(
|
|
109245
|
+
for (let i = 0, pos = 0; i < uArr.length; i++) {
|
|
109246
|
+
const b = coder.encode(uArr[i]);
|
|
109078
109247
|
res.set(b, pos);
|
|
109079
109248
|
b.fill(0);
|
|
109080
109249
|
pos += b.length;
|
|
@@ -109108,6 +109277,7 @@ function cleanBytes(...list) {
|
|
|
109108
109277
|
* Creates a 32-bit mask with the lowest `bits` bits set.
|
|
109109
109278
|
* @param bits - Number of low bits to keep.
|
|
109110
109279
|
* @returns Bit mask with `bits` ones.
|
|
109280
|
+
* @throws On wrong argument types. {@link TypeError}
|
|
109111
109281
|
* @throws On wrong argument ranges or values. {@link RangeError}
|
|
109112
109282
|
* @example
|
|
109113
109283
|
* Create a low-bit mask for packed-field operations.
|
|
@@ -109116,7 +109286,8 @@ function cleanBytes(...list) {
|
|
|
109116
109286
|
* ```
|
|
109117
109287
|
*/
|
|
109118
109288
|
function getMask(bits) {
|
|
109119
|
-
|
|
109289
|
+
anumber$2(bits, "bits");
|
|
109290
|
+
if (bits > 32) throw new RangeError("\"bits\" expected <= 32, got " + bits);
|
|
109120
109291
|
return bits === 32 ? 4294967295 : ~(-1 << bits) >>> 0;
|
|
109121
109292
|
}
|
|
109122
109293
|
/**
|
|
@@ -109133,8 +109304,8 @@ function getMask(bits) {
|
|
|
109133
109304
|
* ```
|
|
109134
109305
|
*/
|
|
109135
109306
|
function getMessage(msg, ctx = EMPTY) {
|
|
109136
|
-
abytes$2(msg);
|
|
109137
|
-
abytes$2(ctx);
|
|
109307
|
+
abytes$2(msg, void 0, "msg");
|
|
109308
|
+
abytes$2(ctx, void 0, "ctx");
|
|
109138
109309
|
if (ctx.length > 255) throw new RangeError("context should be 255 bytes or less");
|
|
109139
109310
|
return concatBytes(new Uint8Array([0, ctx.length]), ctx, msg);
|
|
109140
109311
|
}
|
|
@@ -109156,7 +109327,12 @@ function getMessage(msg, ctx = EMPTY) {
|
|
|
109156
109327
|
* ```
|
|
109157
109328
|
*/
|
|
109158
109329
|
function checkHash(hash, requiredStrength = 0) {
|
|
109159
|
-
if (
|
|
109330
|
+
if (typeof hash !== "function" || typeof hash.create !== "function") throw new TypeError("\"hash\" expected hash function, got type=" + typeof hash);
|
|
109331
|
+
ahash(hash);
|
|
109332
|
+
anumber$2(requiredStrength, "requiredStrength");
|
|
109333
|
+
const oid = hash.oid;
|
|
109334
|
+
abytes$2(oid, void 0, "hash.oid");
|
|
109335
|
+
if (!equalBytes(oid.subarray(0, 10), oidNistP)) throw new Error("\"hash.oid\" is invalid: expected NIST hash");
|
|
109160
109336
|
const collisionResistance = hash.outputLen * 8 / 2;
|
|
109161
109337
|
if (requiredStrength > collisionResistance) throw new Error("Pre-hash security strength too low: " + collisionResistance + ", required: " + requiredStrength);
|
|
109162
109338
|
}
|
|
@@ -109179,8 +109355,9 @@ function checkHash(hash, requiredStrength = 0) {
|
|
|
109179
109355
|
* ```
|
|
109180
109356
|
*/
|
|
109181
109357
|
function getMessagePrehash(hash, msg, ctx = EMPTY) {
|
|
109182
|
-
|
|
109183
|
-
abytes$2(
|
|
109358
|
+
checkHash(hash);
|
|
109359
|
+
abytes$2(msg, void 0, "msg");
|
|
109360
|
+
abytes$2(ctx, void 0, "ctx");
|
|
109184
109361
|
if (ctx.length > 255) throw new RangeError("context should be 255 bytes or less");
|
|
109185
109362
|
const hashed = hash(msg);
|
|
109186
109363
|
return concatBytes(new Uint8Array([1, ctx.length]), ctx, hash.oid, hashed);
|
|
@@ -109205,7 +109382,7 @@ var init_utils$5 = __esmMin((() => {
|
|
|
109205
109382
|
]);
|
|
109206
109383
|
}));
|
|
109207
109384
|
//#endregion
|
|
109208
|
-
//#region ../../node_modules/.pnpm/@noble+post-quantum@0.
|
|
109385
|
+
//#region ../../node_modules/.pnpm/@noble+post-quantum@0.7.0/node_modules/@noble/post-quantum/_crystals.js
|
|
109209
109386
|
var genCrystals, createXofShake, XOF128, XOF256;
|
|
109210
109387
|
var init__crystals = __esmMin((() => {
|
|
109211
109388
|
init_fft();
|
|
@@ -109232,13 +109409,25 @@ var init__crystals = __esmMin((() => {
|
|
|
109232
109409
|
return out;
|
|
109233
109410
|
}
|
|
109234
109411
|
const nttZetas = getZettas();
|
|
109235
|
-
const
|
|
109412
|
+
const inv = (_a) => {
|
|
109413
|
+
throw new Error("not implemented");
|
|
109414
|
+
};
|
|
109415
|
+
const field = isKyber ? {
|
|
109416
|
+
add: (a, b) => {
|
|
109417
|
+
const r = a + b | 0;
|
|
109418
|
+
return r >= Q ? r - Q | 0 : r;
|
|
109419
|
+
},
|
|
109420
|
+
sub: (a, b) => {
|
|
109421
|
+
const r = a - b | 0;
|
|
109422
|
+
return r < 0 ? r + Q | 0 : r;
|
|
109423
|
+
},
|
|
109424
|
+
mul: (a, b) => mod((a | 0) * (b | 0)) | 0,
|
|
109425
|
+
inv
|
|
109426
|
+
} : {
|
|
109236
109427
|
add: (a, b) => mod((a | 0) + (b | 0)) | 0,
|
|
109237
109428
|
sub: (a, b) => mod((a | 0) - (b | 0)) | 0,
|
|
109238
109429
|
mul: (a, b) => mod((a | 0) * (b | 0)) | 0,
|
|
109239
|
-
inv
|
|
109240
|
-
throw new Error("not implemented");
|
|
109241
|
-
}
|
|
109430
|
+
inv
|
|
109242
109431
|
};
|
|
109243
109432
|
const nttOpts = {
|
|
109244
109433
|
N,
|
|
@@ -109266,6 +109455,11 @@ var init__crystals = __esmMin((() => {
|
|
|
109266
109455
|
}
|
|
109267
109456
|
};
|
|
109268
109457
|
const bitsCoder = (d, c) => {
|
|
109458
|
+
for (let i = 0, bufLen = 0; i < N; i++) {
|
|
109459
|
+
bufLen += d;
|
|
109460
|
+
if (bufLen > 32) getMask(bufLen);
|
|
109461
|
+
bufLen %= 8;
|
|
109462
|
+
}
|
|
109269
109463
|
const mask = getMask(d);
|
|
109270
109464
|
const bytesLen = d * (N / 8);
|
|
109271
109465
|
return {
|
|
@@ -109276,7 +109470,7 @@ var init__crystals = __esmMin((() => {
|
|
|
109276
109470
|
for (let i = 0, buf = 0, bufLen = 0, pos = 0; i < poly.length; i++) {
|
|
109277
109471
|
buf |= (c.encode(poly[i]) & mask) << bufLen;
|
|
109278
109472
|
bufLen += d;
|
|
109279
|
-
for (; bufLen >= 8; bufLen -= 8, buf >>= 8) r[pos++] = buf &
|
|
109473
|
+
for (; bufLen >= 8; bufLen -= 8, buf >>= 8) r[pos++] = buf & 255;
|
|
109280
109474
|
}
|
|
109281
109475
|
return r;
|
|
109282
109476
|
},
|
|
@@ -109337,7 +109531,7 @@ var init__crystals = __esmMin((() => {
|
|
|
109337
109531
|
XOF256 = /* @__PURE__ */ createXofShake(shake256);
|
|
109338
109532
|
}));
|
|
109339
109533
|
//#endregion
|
|
109340
|
-
//#region ../../node_modules/.pnpm/@noble+post-quantum@0.
|
|
109534
|
+
//#region ../../node_modules/.pnpm/@noble+post-quantum@0.7.0/node_modules/@noble/post-quantum/ml-dsa.js
|
|
109341
109535
|
/*! noble-post-quantum - MIT License (c) 2024 Paul Miller (paulmillr.com) */
|
|
109342
109536
|
function validateInternalOpts(opts) {
|
|
109343
109537
|
validateOpts(opts);
|
|
@@ -109381,10 +109575,10 @@ function getDilithium(opts_) {
|
|
|
109381
109575
|
const MakeHint = (z, r) => {
|
|
109382
109576
|
return z <= GAMMA2 || z > Q - GAMMA2 || z === Q - GAMMA2 && r === 0 ? 0 : 1;
|
|
109383
109577
|
};
|
|
109578
|
+
const HINT_M = Math.floor(8380416 / (2 * GAMMA2));
|
|
109384
109579
|
const UseHint = (h, r) => {
|
|
109385
|
-
const m = Math.floor(8380416 / (2 * GAMMA2));
|
|
109386
109580
|
const { r1, r0 } = decompose(r);
|
|
109387
|
-
if (h === 1) return r0 > 0 ? crystals.mod(r1 + 1,
|
|
109581
|
+
if (h === 1) return r0 > 0 ? crystals.mod(r1 + 1, HINT_M) | 0 : crystals.mod(r1 - 1, HINT_M) | 0;
|
|
109388
109582
|
return r1 | 0;
|
|
109389
109583
|
};
|
|
109390
109584
|
const Power2Round = (r) => {
|
|
@@ -109592,8 +109786,19 @@ function getDilithium(opts_) {
|
|
|
109592
109786
|
sign: (msg, secretKey, opts = {}) => {
|
|
109593
109787
|
validateSigOpts(opts);
|
|
109594
109788
|
validateInternalOpts(opts);
|
|
109595
|
-
|
|
109596
|
-
|
|
109789
|
+
const { extraEntropy: random, externalMu = false } = opts;
|
|
109790
|
+
if (externalMu) abytesDoc(msg, CRH_BYTES, "mu");
|
|
109791
|
+
const ownRnd = random === false || random === void 0;
|
|
109792
|
+
const rnd = random === false ? /* @__PURE__ */ new Uint8Array(32) : random === void 0 ? randomBytes(signRandBytes) : random;
|
|
109793
|
+
abytesDoc(rnd, 32, "extraEntropy");
|
|
109794
|
+
const [rho, _K, tr, s1, s2, t0] = (() => {
|
|
109795
|
+
try {
|
|
109796
|
+
return secretCoder.decode(secretKey);
|
|
109797
|
+
} catch (error) {
|
|
109798
|
+
if (ownRnd) cleanBytes(rnd);
|
|
109799
|
+
throw error;
|
|
109800
|
+
}
|
|
109801
|
+
})();
|
|
109597
109802
|
const A = [];
|
|
109598
109803
|
const xof = XOF128(rho);
|
|
109599
109804
|
for (let i = 0; i < K; i++) {
|
|
@@ -109608,9 +109813,8 @@ function getDilithium(opts_) {
|
|
|
109608
109813
|
crystals.NTT.encode(t0[i]);
|
|
109609
109814
|
}
|
|
109610
109815
|
const mu = externalMu ? msg : shake256.create({ dkLen: CRH_BYTES }).update(tr).update(msg).digest();
|
|
109611
|
-
const rnd = random === false ? /* @__PURE__ */ new Uint8Array(32) : random === void 0 ? randomBytes(signRandBytes) : random;
|
|
109612
|
-
abytesDoc(rnd, 32, "extraEntropy");
|
|
109613
109816
|
const rhoprime = shake256.create({ dkLen: CRH_BYTES }).update(_K).update(rnd).update(mu).digest();
|
|
109817
|
+
if (ownRnd) cleanBytes(rnd);
|
|
109614
109818
|
abytesDoc(rhoprime, CRH_BYTES);
|
|
109615
109819
|
const x256 = XOF256(rhoprime, ZCoder.bytesLen);
|
|
109616
109820
|
main_loop: for (let kappa = 0;;) {
|
|
@@ -109661,6 +109865,7 @@ function getDilithium(opts_) {
|
|
|
109661
109865
|
verify: (sig, msg, publicKey, opts = {}) => {
|
|
109662
109866
|
validateInternalOpts(opts);
|
|
109663
109867
|
const { externalMu = false } = opts;
|
|
109868
|
+
if (externalMu) abytesDoc(msg, CRH_BYTES, "mu");
|
|
109664
109869
|
const [rho, t1] = publicCoder.decode(publicKey);
|
|
109665
109870
|
const tr = shake256(publicKey, { dkLen: TR_BYTES });
|
|
109666
109871
|
if (sig.length !== sigCoder.bytesLen) return false;
|
|
@@ -109706,10 +109911,12 @@ function getDilithium(opts_) {
|
|
|
109706
109911
|
},
|
|
109707
109912
|
verify: (sig, msg, publicKey, opts = {}) => {
|
|
109708
109913
|
validateVerOpts(opts);
|
|
109914
|
+
abytesDoc(sig, void 0, "signature");
|
|
109709
109915
|
return internal.verify(sig, getMessage(msg, opts.context), publicKey);
|
|
109710
109916
|
},
|
|
109711
109917
|
prehash: (hash) => {
|
|
109712
109918
|
checkHash(hash, securityLevel);
|
|
109919
|
+
const rawHash = hash;
|
|
109713
109920
|
return Object.freeze({
|
|
109714
109921
|
info: Object.freeze({ type: "hashml-dsa" }),
|
|
109715
109922
|
securityLevel,
|
|
@@ -109718,14 +109925,15 @@ function getDilithium(opts_) {
|
|
|
109718
109925
|
getPublicKey: internal.getPublicKey,
|
|
109719
109926
|
sign: (msg, secretKey, opts = {}) => {
|
|
109720
109927
|
validateSigOpts(opts);
|
|
109721
|
-
const M = getMessagePrehash(
|
|
109928
|
+
const M = getMessagePrehash(rawHash, msg, opts.context);
|
|
109722
109929
|
const res = internal.sign(M, secretKey, opts);
|
|
109723
109930
|
cleanBytes(M);
|
|
109724
109931
|
return res;
|
|
109725
109932
|
},
|
|
109726
109933
|
verify: (sig, msg, publicKey, opts = {}) => {
|
|
109727
109934
|
validateVerOpts(opts);
|
|
109728
|
-
|
|
109935
|
+
abytesDoc(sig, void 0, "signature");
|
|
109936
|
+
return internal.verify(sig, getMessagePrehash(rawHash, msg, opts.context), publicKey);
|
|
109729
109937
|
}
|
|
109730
109938
|
});
|
|
109731
109939
|
}
|
|
@@ -109831,7 +110039,7 @@ var init_ml_dsa = __esmMin((() => {
|
|
|
109831
110039
|
}))();
|
|
109832
110040
|
}));
|
|
109833
110041
|
//#endregion
|
|
109834
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
110042
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/pqc.mjs
|
|
109835
110043
|
var MlDsa;
|
|
109836
110044
|
var init_pqc = __esmMin((() => {
|
|
109837
110045
|
init_node$4();
|
|
@@ -110115,12 +110323,12 @@ var init_build = __esmMin((() => {
|
|
|
110115
110323
|
}));
|
|
110116
110324
|
}));
|
|
110117
110325
|
//#endregion
|
|
110118
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
110326
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/previous-hash-store-indexeddb.mjs
|
|
110119
110327
|
var init_previous_hash_store_indexeddb = __esmMin((() => {
|
|
110120
110328
|
init_build();
|
|
110121
110329
|
}));
|
|
110122
110330
|
//#endregion
|
|
110123
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
110331
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/previous-hash-store-model.mjs
|
|
110124
110332
|
var init_previous_hash_store_model = __esmMin((() => {})), InMemoryBackend;
|
|
110125
110333
|
var init_previous_hash_store_storage = __esmMin((() => {
|
|
110126
110334
|
InMemoryBackend = class {
|
|
@@ -110138,14 +110346,14 @@ var init_previous_hash_store_storage = __esmMin((() => {
|
|
|
110138
110346
|
new InMemoryBackend();
|
|
110139
110347
|
}));
|
|
110140
110348
|
//#endregion
|
|
110141
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
110349
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/previous-hash-store.mjs
|
|
110142
110350
|
var init_previous_hash_store = __esmMin((() => {
|
|
110143
110351
|
init_previous_hash_store_indexeddb();
|
|
110144
110352
|
init_previous_hash_store_model();
|
|
110145
110353
|
init_previous_hash_store_storage();
|
|
110146
110354
|
}));
|
|
110147
110355
|
//#endregion
|
|
110148
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
110356
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/quant-account.mjs
|
|
110149
110357
|
function buffersEqual(a, b) {
|
|
110150
110358
|
if (a.byteLength !== b.byteLength) return false;
|
|
110151
110359
|
const a1 = new Uint8Array(a);
|
|
@@ -110367,18 +110575,18 @@ var init_quant_account = __esmMin((() => {
|
|
|
110367
110575
|
QuantAccount = __decorateClass$18([staticImplements()], QuantAccount);
|
|
110368
110576
|
}));
|
|
110369
110577
|
//#endregion
|
|
110370
|
-
//#region ../../node_modules/.pnpm/@noble+hashes@2.
|
|
110578
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@2.3.0/node_modules/@noble/hashes/hmac.js
|
|
110371
110579
|
var init_hmac = __esmMin((() => {
|
|
110372
110580
|
init_utils$7();
|
|
110373
110581
|
}));
|
|
110374
110582
|
//#endregion
|
|
110375
|
-
//#region ../../node_modules/.pnpm/@noble+hashes@2.
|
|
110583
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@2.3.0/node_modules/@noble/hashes/pbkdf2.js
|
|
110376
110584
|
var init_pbkdf2 = __esmMin((() => {
|
|
110377
110585
|
init_hmac();
|
|
110378
110586
|
init_utils$7();
|
|
110379
110587
|
}));
|
|
110380
110588
|
//#endregion
|
|
110381
|
-
//#region ../../node_modules/.pnpm/@noble+hashes@2.
|
|
110589
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@2.3.0/node_modules/@noble/hashes/_md.js
|
|
110382
110590
|
/**
|
|
110383
110591
|
* Shared 32-bit conditional boolean primitive reused by SHA-256, SHA-1, and MD5 `F`.
|
|
110384
110592
|
* Returns bits from `b` when `a` is set, otherwise from `c`.
|
|
@@ -110415,6 +110623,7 @@ function Maj(a, b, c) {
|
|
|
110415
110623
|
}
|
|
110416
110624
|
var HashMD, SHA256_IV;
|
|
110417
110625
|
var init__md$1 = __esmMin((() => {
|
|
110626
|
+
init__u64$1();
|
|
110418
110627
|
init_utils$7();
|
|
110419
110628
|
HashMD = class {
|
|
110420
110629
|
blockLen;
|
|
@@ -110441,23 +110650,26 @@ var init__md$1 = __esmMin((() => {
|
|
|
110441
110650
|
abytes$2(data);
|
|
110442
110651
|
const { view, buffer, blockLen } = this;
|
|
110443
110652
|
const len = data.length;
|
|
110653
|
+
let processed = false;
|
|
110444
110654
|
for (let pos = 0; pos < len;) {
|
|
110445
110655
|
const take = Math.min(blockLen - this.pos, len - pos);
|
|
110446
110656
|
if (take === blockLen) {
|
|
110447
110657
|
const dataView = createView(data);
|
|
110448
110658
|
for (; blockLen <= len - pos; pos += blockLen) this.process(dataView, pos);
|
|
110659
|
+
processed = true;
|
|
110449
110660
|
continue;
|
|
110450
110661
|
}
|
|
110451
|
-
buffer.set(data.subarray(pos, pos + take), this.pos);
|
|
110662
|
+
buffer.set(pos === 0 && take === len ? data : data.subarray(pos, pos + take), this.pos);
|
|
110452
110663
|
this.pos += take;
|
|
110453
110664
|
pos += take;
|
|
110454
110665
|
if (this.pos === blockLen) {
|
|
110455
110666
|
this.process(view, 0);
|
|
110456
110667
|
this.pos = 0;
|
|
110668
|
+
processed = true;
|
|
110457
110669
|
}
|
|
110458
110670
|
}
|
|
110459
110671
|
this.length += data.length;
|
|
110460
|
-
this.roundClean();
|
|
110672
|
+
if (processed) this.roundClean();
|
|
110461
110673
|
return this;
|
|
110462
110674
|
}
|
|
110463
110675
|
digestInto(out) {
|
|
@@ -110467,20 +110679,19 @@ var init__md$1 = __esmMin((() => {
|
|
|
110467
110679
|
const { buffer, view, blockLen, isLE } = this;
|
|
110468
110680
|
let { pos } = this;
|
|
110469
110681
|
buffer[pos++] = 128;
|
|
110470
|
-
|
|
110682
|
+
buffer.fill(0, pos);
|
|
110471
110683
|
if (this.padOffset > blockLen - pos) {
|
|
110472
110684
|
this.process(view, 0);
|
|
110473
|
-
|
|
110685
|
+
buffer.fill(0);
|
|
110474
110686
|
}
|
|
110475
|
-
|
|
110476
|
-
view.setBigUint64(blockLen - 8, BigInt(this.length * 8), isLE);
|
|
110687
|
+
setU64FromNum(view, blockLen - 8, this.length * 8, isLE);
|
|
110477
110688
|
this.process(view, 0);
|
|
110478
|
-
|
|
110689
|
+
this.roundClean();
|
|
110690
|
+
const oview = out === buffer ? view : createView(out);
|
|
110479
110691
|
const len = this.outputLen;
|
|
110480
|
-
if (len % 4) throw new Error("_sha2: outputLen must be aligned to 32bit");
|
|
110481
110692
|
const outLen = len / 4;
|
|
110482
110693
|
const state = this.get();
|
|
110483
|
-
if (outLen > state.length) throw new Error("
|
|
110694
|
+
if (len % 4 || outLen > state.length) throw new Error("invalid outputLen");
|
|
110484
110695
|
for (let i = 0; i < outLen; i++) oview.setUint32(4 * i, state[i], isLE);
|
|
110485
110696
|
}
|
|
110486
110697
|
digest() {
|
|
@@ -110490,15 +110701,13 @@ var init__md$1 = __esmMin((() => {
|
|
|
110490
110701
|
this.destroy();
|
|
110491
110702
|
return res;
|
|
110492
110703
|
}
|
|
110493
|
-
|
|
110494
|
-
|
|
110495
|
-
to.set(...this.get());
|
|
110496
|
-
const { blockLen, buffer, length, finished, destroyed, pos } = this;
|
|
110704
|
+
_cloneIntoMeta(to) {
|
|
110705
|
+
const { buffer, length, finished, destroyed, pos } = this;
|
|
110497
110706
|
to.destroyed = destroyed;
|
|
110498
110707
|
to.finished = finished;
|
|
110499
110708
|
to.length = length;
|
|
110500
110709
|
to.pos = pos;
|
|
110501
|
-
if (
|
|
110710
|
+
if (pos) to.buffer.set(buffer);
|
|
110502
110711
|
return to;
|
|
110503
110712
|
}
|
|
110504
110713
|
clone() {
|
|
@@ -110517,7 +110726,7 @@ var init__md$1 = __esmMin((() => {
|
|
|
110517
110726
|
]);
|
|
110518
110727
|
}));
|
|
110519
110728
|
//#endregion
|
|
110520
|
-
//#region ../../node_modules/.pnpm/@noble+hashes@2.
|
|
110729
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@2.3.0/node_modules/@noble/hashes/sha2.js
|
|
110521
110730
|
var SHA256_K, SHA256_W, SHA2_32B, _SHA256, sha256;
|
|
110522
110731
|
var init_sha2$1 = __esmMin((() => {
|
|
110523
110732
|
init__md$1();
|
|
@@ -110591,8 +110800,24 @@ var init_sha2$1 = __esmMin((() => {
|
|
|
110591
110800
|
]);
|
|
110592
110801
|
SHA256_W = /* @__PURE__ */ new Uint32Array(64);
|
|
110593
110802
|
SHA2_32B = class extends HashMD {
|
|
110594
|
-
|
|
110803
|
+
A = 0;
|
|
110804
|
+
B = 0;
|
|
110805
|
+
C = 0;
|
|
110806
|
+
D = 0;
|
|
110807
|
+
E = 0;
|
|
110808
|
+
F = 0;
|
|
110809
|
+
G = 0;
|
|
110810
|
+
H = 0;
|
|
110811
|
+
constructor(outputLen, IV) {
|
|
110595
110812
|
super(64, outputLen, 8, false);
|
|
110813
|
+
this.A = IV[0] | 0;
|
|
110814
|
+
this.B = IV[1] | 0;
|
|
110815
|
+
this.C = IV[2] | 0;
|
|
110816
|
+
this.D = IV[3] | 0;
|
|
110817
|
+
this.E = IV[4] | 0;
|
|
110818
|
+
this.F = IV[5] | 0;
|
|
110819
|
+
this.G = IV[6] | 0;
|
|
110820
|
+
this.H = IV[7] | 0;
|
|
110596
110821
|
}
|
|
110597
110822
|
get() {
|
|
110598
110823
|
const { A, B, C, D, E, F, G, H } = this;
|
|
@@ -110617,6 +110842,10 @@ var init_sha2$1 = __esmMin((() => {
|
|
|
110617
110842
|
this.G = G | 0;
|
|
110618
110843
|
this.H = H | 0;
|
|
110619
110844
|
}
|
|
110845
|
+
_cloneInto(to) {
|
|
110846
|
+
(to ||= new this.constructor()).set(...this.get());
|
|
110847
|
+
return this._cloneIntoMeta(to);
|
|
110848
|
+
}
|
|
110620
110849
|
process(view, offset) {
|
|
110621
110850
|
for (let i = 0; i < 16; i++, offset += 4) SHA256_W[i] = view.getUint32(offset, false);
|
|
110622
110851
|
for (let i = 16; i < 64; i++) {
|
|
@@ -110660,28 +110889,20 @@ var init_sha2$1 = __esmMin((() => {
|
|
|
110660
110889
|
}
|
|
110661
110890
|
};
|
|
110662
110891
|
_SHA256 = class extends SHA2_32B {
|
|
110663
|
-
A = SHA256_IV[0] | 0;
|
|
110664
|
-
B = SHA256_IV[1] | 0;
|
|
110665
|
-
C = SHA256_IV[2] | 0;
|
|
110666
|
-
D = SHA256_IV[3] | 0;
|
|
110667
|
-
E = SHA256_IV[4] | 0;
|
|
110668
|
-
F = SHA256_IV[5] | 0;
|
|
110669
|
-
G = SHA256_IV[6] | 0;
|
|
110670
|
-
H = SHA256_IV[7] | 0;
|
|
110671
110892
|
constructor() {
|
|
110672
|
-
super(32);
|
|
110893
|
+
super(32, SHA256_IV);
|
|
110673
110894
|
}
|
|
110674
110895
|
};
|
|
110675
110896
|
sha256 = /* @__PURE__ */ createHasher$1(() => new _SHA256(), /* @__PURE__ */ oidNist(1));
|
|
110676
110897
|
}));
|
|
110677
110898
|
//#endregion
|
|
110678
|
-
//#region ../../node_modules/.pnpm/@noble+hashes@2.
|
|
110899
|
+
//#region ../../node_modules/.pnpm/@noble+hashes@2.3.0/node_modules/@noble/hashes/webcrypto.js
|
|
110679
110900
|
var init_webcrypto = __esmMin((() => {
|
|
110680
110901
|
init_pbkdf2();
|
|
110681
110902
|
init_utils$7();
|
|
110682
110903
|
}));
|
|
110683
110904
|
//#endregion
|
|
110684
|
-
//#region ../../node_modules/.pnpm/@scure+bip39@2.
|
|
110905
|
+
//#region ../../node_modules/.pnpm/@scure+bip39@2.3.0/node_modules/@scure/bip39/index.js
|
|
110685
110906
|
/*! scure-bip39 - MIT License (c) 2022 Patricio Palladino, Paul Miller (paulmillr.com) */
|
|
110686
110907
|
function aentropy(ent) {
|
|
110687
110908
|
abytes$2(ent);
|
|
@@ -110714,12 +110935,30 @@ function generateMnemonic(wordlist, strength = 128) {
|
|
|
110714
110935
|
if (strength % 32 !== 0 || strength > 256) throw new RangeError("Invalid entropy");
|
|
110715
110936
|
return entropyToMnemonic(randomBytes$1(strength / 8), wordlist);
|
|
110716
110937
|
}
|
|
110717
|
-
function
|
|
110938
|
+
function awordlist(wordlist) {
|
|
110718
110939
|
if (!Array.isArray(wordlist) || wordlist.length !== 2048 || typeof wordlist[0] !== "string") throw new TypeError("Wordlist: expected array of 2048 strings");
|
|
110719
110940
|
wordlist.forEach((i) => {
|
|
110720
110941
|
if (typeof i !== "string") throw new TypeError("wordlist: non-string element: " + i);
|
|
110721
110942
|
});
|
|
110722
|
-
|
|
110943
|
+
}
|
|
110944
|
+
function encodeWords(entropy, wordlist) {
|
|
110945
|
+
awordlist(wordlist);
|
|
110946
|
+
const bytes = new Uint8Array(entropy.length + 1);
|
|
110947
|
+
bytes.set(entropy);
|
|
110948
|
+
bytes[entropy.length] = calcChecksum(entropy);
|
|
110949
|
+
const words = [];
|
|
110950
|
+
let carry = 0;
|
|
110951
|
+
let bits = 0;
|
|
110952
|
+
for (const byte of bytes) {
|
|
110953
|
+
carry = carry << 8 | byte;
|
|
110954
|
+
bits += 8;
|
|
110955
|
+
if (bits >= 11) {
|
|
110956
|
+
bits -= 11;
|
|
110957
|
+
words.push(wordlist[carry >>> bits & 2047]);
|
|
110958
|
+
carry &= (1 << bits) - 1;
|
|
110959
|
+
}
|
|
110960
|
+
}
|
|
110961
|
+
return words;
|
|
110723
110962
|
}
|
|
110724
110963
|
/**
|
|
110725
110964
|
* Reversible: Converts raw entropy in form of byte array to mnemonic string.
|
|
@@ -110743,18 +110982,17 @@ function getCoder(wordlist) {
|
|
|
110743
110982
|
*/
|
|
110744
110983
|
function entropyToMnemonic(entropy, wordlist) {
|
|
110745
110984
|
aentropy(entropy);
|
|
110746
|
-
return
|
|
110985
|
+
return encodeWords(entropy, wordlist).join(isJapanese(wordlist) ? " " : " ");
|
|
110747
110986
|
}
|
|
110748
110987
|
var isJapanese, calcChecksum, init_bip39 = __esmMin((() => {
|
|
110749
110988
|
init_pbkdf2();
|
|
110750
110989
|
init_sha2$1();
|
|
110751
110990
|
init_utils$7();
|
|
110752
110991
|
init_webcrypto();
|
|
110753
|
-
init_base();
|
|
110754
110992
|
isJapanese = (wordlist) => wordlist[0] === "あいこくしん";
|
|
110755
110993
|
calcChecksum = (entropy) => {
|
|
110756
110994
|
const bitsLeft = 8 - entropy.length / 4;
|
|
110757
|
-
return
|
|
110995
|
+
return sha256(entropy)[0] >> bitsLeft << bitsLeft;
|
|
110758
110996
|
};
|
|
110759
110997
|
})), wordlist, init_english = __esmMin((() => {
|
|
110760
110998
|
wordlist = /* @__PURE__ */ Object.freeze(`abandon
|
|
@@ -113052,12 +113290,12 @@ var init_network = __esmMin((() => {
|
|
|
113052
113290
|
PayloadZodOfSchema(NetworkSchema);
|
|
113053
113291
|
}));
|
|
113054
113292
|
//#endregion
|
|
113055
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
113293
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/payload-utils.mjs
|
|
113056
113294
|
var init_payload_utils = __esmMin((() => {
|
|
113057
113295
|
init_hash();
|
|
113058
113296
|
}));
|
|
113059
113297
|
//#endregion
|
|
113060
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
113298
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/protocol.mjs
|
|
113061
113299
|
var init_protocol$1 = __esmMin((async () => {
|
|
113062
113300
|
await init_boundwitness();
|
|
113063
113301
|
init_core();
|
|
@@ -113065,7 +113303,7 @@ var init_protocol$1 = __esmMin((async () => {
|
|
|
113065
113303
|
await init_payload();
|
|
113066
113304
|
}));
|
|
113067
113305
|
//#endregion
|
|
113068
|
-
//#region ../../node_modules/.pnpm/@ariestools+sdk@8.1.
|
|
113306
|
+
//#region ../../node_modules/.pnpm/@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3/node_modules/@ariestools/sdk/dist/neutral/geo.mjs
|
|
113069
113307
|
function toMercatorLngLat(value) {
|
|
113070
113308
|
if (value instanceof MercatorLngLat) return value;
|
|
113071
113309
|
if (!value) return new MercatorLngLat(0, 0);
|
|
@@ -113344,7 +113582,7 @@ var init_geo = __esmMin((() => {
|
|
|
113344
113582
|
};
|
|
113345
113583
|
}));
|
|
113346
113584
|
//#endregion
|
|
113347
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
113585
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/quadkey.mjs
|
|
113348
113586
|
function gridOffsetForDigit(digit, blockSize) {
|
|
113349
113587
|
switch (digit) {
|
|
113350
113588
|
case "1": return {
|
|
@@ -113675,7 +113913,7 @@ var init_quadkey = __esmMin((() => {
|
|
|
113675
113913
|
});
|
|
113676
113914
|
}));
|
|
113677
113915
|
//#endregion
|
|
113678
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
113916
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/quant-wallet.mjs
|
|
113679
113917
|
function bip85DefaultLeafTail(index = 0) {
|
|
113680
113918
|
return `${BIP85_PURPOSE}/${BIP85_HEX_APP}/32'/${index}'`;
|
|
113681
113919
|
}
|
|
@@ -119894,7 +120132,7 @@ var init_schema_cache = __esmMin((async () => {
|
|
|
119894
120132
|
init_schema_payload_plugin();
|
|
119895
120133
|
}));
|
|
119896
120134
|
//#endregion
|
|
119897
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
120135
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/neutral/sdk-utils.mjs
|
|
119898
120136
|
var init_sdk_utils = __esmMin((async () => {
|
|
119899
120137
|
await init_api();
|
|
119900
120138
|
init_api_models();
|
|
@@ -119906,7 +120144,7 @@ var init_sdk_utils = __esmMin((async () => {
|
|
|
119906
120144
|
await init_schema_cache();
|
|
119907
120145
|
}));
|
|
119908
120146
|
//#endregion
|
|
119909
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.
|
|
120147
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol-core@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod_14a6919fde991fc75cc198abebccb44a/node_modules/@xyo-network/sdk-protocol-core/dist/node/index.mjs
|
|
119910
120148
|
var init_node$3 = __esmMin((async () => {
|
|
119911
120149
|
await init_account();
|
|
119912
120150
|
init_account_model();
|
|
@@ -119961,7 +120199,7 @@ var init_node$3 = __esmMin((async () => {
|
|
|
119961
120199
|
init_wasm();
|
|
119962
120200
|
}));
|
|
119963
120201
|
//#endregion
|
|
119964
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol@7.2.
|
|
120202
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4._e41f55d16bc58335e5d1d9702339a1d3/node_modules/@xyo-network/sdk-protocol/dist/neutral/index.mjs
|
|
119965
120203
|
var init_neutral$4 = __esmMin((async () => {
|
|
119966
120204
|
await init_node$3();
|
|
119967
120205
|
}));
|
|
@@ -120618,7 +120856,7 @@ var init_index_min = __esmMin((() => {
|
|
|
120618
120856
|
};
|
|
120619
120857
|
}));
|
|
120620
120858
|
//#endregion
|
|
120621
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
120859
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/module-model.mjs
|
|
120622
120860
|
function creatableModule() {
|
|
120623
120861
|
return (constructor) => {};
|
|
120624
120862
|
}
|
|
@@ -121373,7 +121611,7 @@ var init_node_model = __esmMin((async () => {
|
|
|
121373
121611
|
NodeConfigSchema = asSchema("network.xyo.node.config", true);
|
|
121374
121612
|
}));
|
|
121375
121613
|
//#endregion
|
|
121376
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
121614
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/module-abstract.mjs
|
|
121377
121615
|
async function determineAccount(params, allowRandomAccount = true) {
|
|
121378
121616
|
if (isDetermineAccountFromAccountParams(params)) {
|
|
121379
121617
|
if (params.account === "random") {
|
|
@@ -122801,7 +123039,7 @@ var init_bridge_model = __esmMin((async () => {
|
|
|
122801
123039
|
BridgeConfigSchema = asSchema("network.xyo.bridge.config", true);
|
|
122802
123040
|
}));
|
|
122803
123041
|
//#endregion
|
|
122804
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
123042
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/module-wrapper.mjs
|
|
122805
123043
|
function constructableModuleWrapper() {
|
|
122806
123044
|
return (constructor) => {};
|
|
122807
123045
|
}
|
|
@@ -123074,7 +123312,7 @@ var init_module_wrapper = __esmMin((async () => {
|
|
|
123074
123312
|
ModuleWrapper = __decorateClass$13([constructableModuleWrapper()], ModuleWrapper);
|
|
123075
123313
|
}));
|
|
123076
123314
|
//#endregion
|
|
123077
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
123315
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/archivist-wrapper.mjs
|
|
123078
123316
|
var ArchivistWrapper;
|
|
123079
123317
|
var init_archivist_wrapper = __esmMin((async () => {
|
|
123080
123318
|
await init_archivist_model();
|
|
@@ -123174,7 +123412,7 @@ var init_archivist_wrapper = __esmMin((async () => {
|
|
|
123174
123412
|
};
|
|
123175
123413
|
}));
|
|
123176
123414
|
//#endregion
|
|
123177
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
123415
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/diviner-wrapper.mjs
|
|
123178
123416
|
var DivinerWrapper;
|
|
123179
123417
|
var init_diviner_wrapper = __esmMin((async () => {
|
|
123180
123418
|
await init_diviner_model();
|
|
@@ -123194,7 +123432,7 @@ var init_diviner_wrapper = __esmMin((async () => {
|
|
|
123194
123432
|
};
|
|
123195
123433
|
}));
|
|
123196
123434
|
//#endregion
|
|
123197
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
123435
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/node-wrapper.mjs
|
|
123198
123436
|
var NodeWrapper, init_node_wrapper = __esmMin((async () => {
|
|
123199
123437
|
await init_neutral$4();
|
|
123200
123438
|
init_async_mutex();
|
|
@@ -123366,7 +123604,7 @@ var init_witness_model = __esmMin((async () => {
|
|
|
123366
123604
|
WitnessConfigSchema = asSchema("network.xyo.witness.config", true);
|
|
123367
123605
|
}));
|
|
123368
123606
|
//#endregion
|
|
123369
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
123607
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/witness-wrapper.mjs
|
|
123370
123608
|
var WitnessWrapper;
|
|
123371
123609
|
var init_witness_wrapper = __esmMin((async () => {
|
|
123372
123610
|
await init_module_wrapper();
|
|
@@ -123386,7 +123624,7 @@ var init_witness_wrapper = __esmMin((async () => {
|
|
|
123386
123624
|
};
|
|
123387
123625
|
}));
|
|
123388
123626
|
//#endregion
|
|
123389
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
123627
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/bridge-abstract.mjs
|
|
123390
123628
|
var AbstractBridge, AbstractBridgeModuleResolver, wrapModuleWithType, ModuleProxyResolver, AbstractModuleProxy, init_bridge_abstract = __esmMin((async () => {
|
|
123391
123629
|
init_node$4();
|
|
123392
123630
|
await init_neutral$4();
|
|
@@ -124102,7 +124340,7 @@ var init_bridge_http = __esmMin((async () => {
|
|
|
124102
124340
|
HttpBridge = __decorateClass$12([creatableModule()], HttpBridge);
|
|
124103
124341
|
}));
|
|
124104
124342
|
//#endregion
|
|
124105
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
124343
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/diviner-abstract.mjs
|
|
124106
124344
|
var delayedResolve, AbstractDiviner, init_diviner_abstract = __esmMin((async () => {
|
|
124107
124345
|
init_node$4();
|
|
124108
124346
|
await init_neutral$4();
|
|
@@ -124241,7 +124479,7 @@ var init_diviner_boundwitness = __esmMin((async () => {
|
|
|
124241
124479
|
PayloadZodOfSchema(BoundWitnessDivinerQuerySchema$1), { ...QueryFieldsZod.shape };
|
|
124242
124480
|
}));
|
|
124243
124481
|
//#endregion
|
|
124244
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
124482
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/diviner-identity.mjs
|
|
124245
124483
|
var __defProp$12, __getOwnPropDesc$11, __defNormalProp$10, __decorateClass$11, __publicField$10, IdentityDiviner;
|
|
124246
124484
|
var init_diviner_identity = __esmMin((async () => {
|
|
124247
124485
|
init_node$4();
|
|
@@ -124272,7 +124510,7 @@ var init_diviner_identity = __esmMin((async () => {
|
|
|
124272
124510
|
IdentityDiviner = __decorateClass$11([creatableModule()], IdentityDiviner);
|
|
124273
124511
|
}));
|
|
124274
124512
|
//#endregion
|
|
124275
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
124513
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/diviner-payload-abstract.mjs
|
|
124276
124514
|
var PayloadDiviner, init_diviner_payload_abstract = __esmMin((async () => {
|
|
124277
124515
|
await init_diviner_abstract();
|
|
124278
124516
|
await init_diviner_payload_model();
|
|
@@ -124591,7 +124829,7 @@ var init_archivist_memory = __esmMin((async () => {
|
|
|
124591
124829
|
MemoryArchivist = __decorateClass$9([creatableModule()], MemoryArchivist);
|
|
124592
124830
|
}));
|
|
124593
124831
|
//#endregion
|
|
124594
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
124832
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/archivist.mjs
|
|
124595
124833
|
var init_archivist = __esmMin((async () => {
|
|
124596
124834
|
await init_archivist_abstract();
|
|
124597
124835
|
await init_archivist_memory();
|
|
@@ -124599,7 +124837,7 @@ var init_archivist = __esmMin((async () => {
|
|
|
124599
124837
|
await init_archivist_wrapper();
|
|
124600
124838
|
}));
|
|
124601
124839
|
//#endregion
|
|
124602
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
124840
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/boundwitness-loader.mjs
|
|
124603
124841
|
var init_boundwitness_loader = __esmMin((async () => {
|
|
124604
124842
|
init_node$4();
|
|
124605
124843
|
await init_neutral$4();
|
|
@@ -124607,27 +124845,27 @@ var init_boundwitness_loader = __esmMin((async () => {
|
|
|
124607
124845
|
await init_archivist_memory();
|
|
124608
124846
|
}));
|
|
124609
124847
|
//#endregion
|
|
124610
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
124848
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/bridge-wrapper.mjs
|
|
124611
124849
|
var init_bridge_wrapper = __esmMin((async () => {
|
|
124612
124850
|
await init_bridge_model();
|
|
124613
124851
|
await init_module_wrapper();
|
|
124614
124852
|
}));
|
|
124615
124853
|
//#endregion
|
|
124616
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
124854
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/bridge.mjs
|
|
124617
124855
|
var init_bridge = __esmMin((async () => {
|
|
124618
124856
|
await init_bridge_abstract();
|
|
124619
124857
|
await init_bridge_model();
|
|
124620
124858
|
await init_bridge_wrapper();
|
|
124621
124859
|
}));
|
|
124622
124860
|
//#endregion
|
|
124623
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
124861
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/diviner.mjs
|
|
124624
124862
|
var init_diviner = __esmMin((async () => {
|
|
124625
124863
|
await init_diviner_abstract();
|
|
124626
124864
|
await init_diviner_model();
|
|
124627
124865
|
await init_diviner_wrapper();
|
|
124628
124866
|
}));
|
|
124629
124867
|
//#endregion
|
|
124630
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
124868
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/node-abstract.mjs
|
|
124631
124869
|
var AbstractNode, attachedPrivateModules, attachedPublicModules, NodeHelper;
|
|
124632
124870
|
var init_node_abstract = __esmMin((async () => {
|
|
124633
124871
|
init_node$4();
|
|
@@ -124837,7 +125075,7 @@ var init_node_abstract = __esmMin((async () => {
|
|
|
124837
125075
|
};
|
|
124838
125076
|
}));
|
|
124839
125077
|
//#endregion
|
|
124840
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
125078
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/node-memory.mjs
|
|
124841
125079
|
var __defProp$9, __getOwnPropDesc$8, __decorateClass$8, MemoryNode, flatAttachAllToExistingNode, flatAttachChildToExistingNode, flatAttachToExistingNode, attachToExistingNode, DEFAULT_NODE_PARAMS, attachToNewNode, flatAttachToNewNode, MemoryNodeHelper;
|
|
124842
125080
|
var init_node_memory = __esmMin((async () => {
|
|
124843
125081
|
init_node$4();
|
|
@@ -125069,7 +125307,7 @@ var init_node_memory = __esmMin((async () => {
|
|
|
125069
125307
|
};
|
|
125070
125308
|
}));
|
|
125071
125309
|
//#endregion
|
|
125072
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
125310
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/manifest-wrapper.mjs
|
|
125073
125311
|
var init_manifest_wrapper = __esmMin((async () => {
|
|
125074
125312
|
init_node$4();
|
|
125075
125313
|
await init_neutral$4();
|
|
@@ -125077,7 +125315,7 @@ var init_manifest_wrapper = __esmMin((async () => {
|
|
|
125077
125315
|
await init_node_memory();
|
|
125078
125316
|
}));
|
|
125079
125317
|
//#endregion
|
|
125080
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
125318
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/module-event-emitter.mjs
|
|
125081
125319
|
var init_module_event_emitter = __esmMin((() => {
|
|
125082
125320
|
init_node$4();
|
|
125083
125321
|
})), applyBoundWitnessDivinerQueryPayload, BoundWitnessDivinerSchema, BoundWitnessDivinerConfigSchema, BoundWitnessDiviner, BoundWitnessDivinerQuerySchema, BoundWitnessDivinerQueryPayloadZod, isBoundWitnessDivinerQueryPayload, MemoryBoundWitnessDiviner, init_diviner_boundwitness_memory = __esmMin((async () => {
|
|
@@ -125233,7 +125471,7 @@ var init_node_view = __esmMin((async () => {
|
|
|
125233
125471
|
ViewNode = __decorateClass$7([creatableModule()], ViewNode);
|
|
125234
125472
|
}));
|
|
125235
125473
|
//#endregion
|
|
125236
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
125474
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/sentinel-abstract.mjs
|
|
125237
125475
|
var AbstractSentinel;
|
|
125238
125476
|
var init_sentinel_abstract = __esmMin((async () => {
|
|
125239
125477
|
init_node$4();
|
|
@@ -125345,7 +125583,7 @@ var init_sentinel_abstract = __esmMin((async () => {
|
|
|
125345
125583
|
};
|
|
125346
125584
|
}));
|
|
125347
125585
|
//#endregion
|
|
125348
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
125586
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/sentinel-memory.mjs
|
|
125349
125587
|
var SentinelIntervalAutomationWrapper, SentinelRunner, MemorySentinel;
|
|
125350
125588
|
var init_sentinel_memory = __esmMin((async () => {
|
|
125351
125589
|
init_node$4();
|
|
@@ -125625,7 +125863,7 @@ var init_sentinel_memory = __esmMin((async () => {
|
|
|
125625
125863
|
};
|
|
125626
125864
|
}));
|
|
125627
125865
|
//#endregion
|
|
125628
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
125866
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/witness-abstract.mjs
|
|
125629
125867
|
var AbstractWitness, init_witness_abstract = __esmMin((async () => {
|
|
125630
125868
|
init_node$4();
|
|
125631
125869
|
await init_neutral$4();
|
|
@@ -125732,7 +125970,7 @@ var init_module_factory_locator = __esmMin((async () => {
|
|
|
125732
125970
|
HttpBridge.factory(), ViewArchivist.factory(), ViewNode.factory(), AdhocWitness.factory(), GenericPayloadDiviner.factory(), MemoryBoundWitnessDiviner.factory(), IdentityDiviner.factory(), MemoryArchivist.factory(), MemoryArchivist.factory(), MemoryNode.factory(), MemorySentinel.factory(), GenericPayloadDiviner.factory();
|
|
125733
125971
|
}));
|
|
125734
125972
|
//#endregion
|
|
125735
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
125973
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/module.mjs
|
|
125736
125974
|
var init_module = __esmMin((async () => {
|
|
125737
125975
|
await init_module_abstract();
|
|
125738
125976
|
init_module_event_emitter();
|
|
@@ -125742,7 +125980,7 @@ var init_module = __esmMin((async () => {
|
|
|
125742
125980
|
await init_module_wrapper();
|
|
125743
125981
|
}));
|
|
125744
125982
|
//#endregion
|
|
125745
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
125983
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/node.mjs
|
|
125746
125984
|
var init_node$2 = __esmMin((async () => {
|
|
125747
125985
|
await init_node_abstract();
|
|
125748
125986
|
await init_node_memory();
|
|
@@ -125750,13 +125988,13 @@ var init_node$2 = __esmMin((async () => {
|
|
|
125750
125988
|
await init_node_wrapper();
|
|
125751
125989
|
}));
|
|
125752
125990
|
//#endregion
|
|
125753
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
125991
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/payloadset-plugin.mjs
|
|
125754
125992
|
var init_payloadset_plugin = __esmMin((async () => {
|
|
125755
125993
|
init_node$4();
|
|
125756
125994
|
await init_neutral$4();
|
|
125757
125995
|
}));
|
|
125758
125996
|
//#endregion
|
|
125759
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
125997
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/sentinel.mjs
|
|
125760
125998
|
var init_sentinel = __esmMin((async () => {
|
|
125761
125999
|
await init_sentinel_abstract();
|
|
125762
126000
|
await init_sentinel_memory();
|
|
@@ -125764,14 +126002,14 @@ var init_sentinel = __esmMin((async () => {
|
|
|
125764
126002
|
await init_sentinel_wrapper();
|
|
125765
126003
|
}));
|
|
125766
126004
|
//#endregion
|
|
125767
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
126005
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/witness.mjs
|
|
125768
126006
|
var init_witness = __esmMin((async () => {
|
|
125769
126007
|
await init_witness_abstract();
|
|
125770
126008
|
await init_witness_model();
|
|
125771
126009
|
await init_witness_wrapper();
|
|
125772
126010
|
}));
|
|
125773
126011
|
//#endregion
|
|
125774
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
126012
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/neutral/modules.mjs
|
|
125775
126013
|
var init_modules$1 = __esmMin((async () => {
|
|
125776
126014
|
await init_address_payload_plugin();
|
|
125777
126015
|
await init_api_location_diviner();
|
|
@@ -125787,7 +126025,7 @@ var init_modules$1 = __esmMin((async () => {
|
|
|
125787
126025
|
await init_witness();
|
|
125788
126026
|
}));
|
|
125789
126027
|
//#endregion
|
|
125790
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.
|
|
126028
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk@7.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@opent_ce13df1366b1dcdb54b499e52dce1569/node_modules/@xyo-network/sdk/dist/node/index.mjs
|
|
125791
126029
|
var init_node$1 = __esmMin((async () => {
|
|
125792
126030
|
await init_neutral$4();
|
|
125793
126031
|
await init_archivist_generic();
|
|
@@ -125803,7 +126041,7 @@ var init_node$1 = __esmMin((async () => {
|
|
|
125803
126041
|
await init_witness_adhoc();
|
|
125804
126042
|
}));
|
|
125805
126043
|
//#endregion
|
|
125806
|
-
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol@7.2.
|
|
126044
|
+
//#region ../../node_modules/.pnpm/@xyo-network+sdk-protocol@7.2.4_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4._e41f55d16bc58335e5d1d9702339a1d3/node_modules/@xyo-network/sdk-protocol/dist/neutral/quant-wallet.mjs
|
|
125807
126045
|
init_source();
|
|
125808
126046
|
await init_node$1();
|
|
125809
126047
|
init_quant_wallet();
|
|
@@ -126233,7 +126471,7 @@ function hostname(_params) {
|
|
|
126233
126471
|
return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, "hostname", hostname$1, _params);
|
|
126234
126472
|
}
|
|
126235
126473
|
function hex$1(_params) {
|
|
126236
|
-
return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, "hex", hex$
|
|
126474
|
+
return /* @__PURE__ */ _stringFormat(ZodCustomStringFormat, "hex", hex$3, _params);
|
|
126237
126475
|
}
|
|
126238
126476
|
function hash(alg, params) {
|
|
126239
126477
|
const format = `${alg}_${params?.enc ?? "hex"}`;
|
|
@@ -128068,7 +128306,7 @@ var init_zod = __esmMin((() => {
|
|
|
128068
128306
|
zod_default = external_exports;
|
|
128069
128307
|
}));
|
|
128070
128308
|
//#endregion
|
|
128071
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.2.
|
|
128309
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4._8024169a86ceee117dad4c372343057e/node_modules/@xyo-network/xl1-protocol/dist/neutral/protocol-model.mjs
|
|
128072
128310
|
function isValidStep(step) {
|
|
128073
128311
|
if (typeof step === "number" && Number.isSafeInteger(step)) return step >= 0 && step < StepSizes.length;
|
|
128074
128312
|
return false;
|
|
@@ -128881,6 +129119,8 @@ srcConfirmation: (/* @__PURE__ */ optional$2(HexZod)).check(describe$1("Source c
|
|
|
128881
129119
|
"eligibility-admission",
|
|
128882
129120
|
"attestation-admission",
|
|
128883
129121
|
"certificate-execution",
|
|
129122
|
+
"fork-choice-v2",
|
|
129123
|
+
"bridge-value-ceiling",
|
|
128884
129124
|
...OffenseCodes.map((code) => `${code}.reportable`),
|
|
128885
129125
|
...OffenseCodes.map((code) => `${code}.adjudicable`)
|
|
128886
129126
|
];
|
|
@@ -128982,7 +129222,7 @@ srcConfirmation: (/* @__PURE__ */ optional$2(HexZod)).check(describe$1("Source c
|
|
|
128982
129222
|
AsObjectFactory.create(isTransactionRejection);
|
|
128983
129223
|
}));
|
|
128984
129224
|
//#endregion
|
|
128985
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.2.
|
|
129225
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4._8024169a86ceee117dad4c372343057e/node_modules/@xyo-network/xl1-protocol/dist/neutral/protocol-lib.mjs
|
|
128986
129226
|
function rewardAddressFromStepIdentity({ block, step }) {
|
|
128987
129227
|
const resolvedStepSize = step < StepSizes.length ? StepSizes[step] : step;
|
|
128988
129228
|
const hash = keccak256(new TextEncoder().encode(`${block}|${resolvedStepSize}`));
|
|
@@ -129207,10 +129447,58 @@ var init_protocol_lib = __esmMin((async () => {
|
|
|
129207
129447
|
XyoViewerMoniker = "XyoViewer";
|
|
129208
129448
|
}));
|
|
129209
129449
|
//#endregion
|
|
129210
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.2.
|
|
129450
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4._8024169a86ceee117dad4c372343057e/node_modules/@xyo-network/xl1-protocol/dist/neutral/network-model.mjs
|
|
129211
129451
|
function transactionInclusionPath(transactionHash) {
|
|
129212
129452
|
return `${TRANSACTION_INCLUSION_ROOT}/by-hash/${transactionHash}.json`;
|
|
129213
129453
|
}
|
|
129454
|
+
function chainParamsSuccessionErrors(previous, next, finalizedHeight) {
|
|
129455
|
+
if (previous === void 0) return [];
|
|
129456
|
+
const errors = [];
|
|
129457
|
+
if (next.version <= previous.version) errors.push(`version must increase: ${previous.version} -> ${next.version}`);
|
|
129458
|
+
if (next.chainId !== previous.chainId) errors.push(`chainId must not change: ${previous.chainId} -> ${next.chainId}`);
|
|
129459
|
+
if (next.protocolMin < previous.protocolMin) errors.push(`protocolMin must not lower: ${previous.protocolMin} -> ${next.protocolMin}`);
|
|
129460
|
+
const previousDeactivations = previous.deactivations ?? {};
|
|
129461
|
+
const nextDeactivations = next.deactivations ?? {};
|
|
129462
|
+
const isReactivation = (ruleId) => {
|
|
129463
|
+
const deactivation = previousDeactivations[ruleId];
|
|
129464
|
+
const nextActivation = next.activations[ruleId];
|
|
129465
|
+
return deactivation !== void 0 && deactivation <= finalizedHeight && nextActivation !== void 0 && nextActivation > finalizedHeight && nextDeactivations[ruleId] === void 0;
|
|
129466
|
+
};
|
|
129467
|
+
for (const [ruleId, height] of Object.entries(previous.activations)) {
|
|
129468
|
+
if (height > finalizedHeight) continue;
|
|
129469
|
+
if (next.activations[ruleId] === height) continue;
|
|
129470
|
+
if (isReactivation(ruleId)) continue;
|
|
129471
|
+
errors.push(`activation for '${ruleId}' is already in force at ${height} and must not move`);
|
|
129472
|
+
}
|
|
129473
|
+
for (const [ruleId, height] of Object.entries(previousDeactivations)) {
|
|
129474
|
+
if (height > finalizedHeight) continue;
|
|
129475
|
+
if (nextDeactivations[ruleId] === height) continue;
|
|
129476
|
+
if (isReactivation(ruleId)) continue;
|
|
129477
|
+
errors.push(`deactivation for '${ruleId}' is already in force at ${height} and must not move`);
|
|
129478
|
+
}
|
|
129479
|
+
for (const [ruleId, height] of Object.entries(nextDeactivations)) if (height < finalizedHeight && previousDeactivations[ruleId] !== height) errors.push(`deactivation for '${ruleId}' at ${height} is in the past`);
|
|
129480
|
+
return errors;
|
|
129481
|
+
}
|
|
129482
|
+
function chainParamsInvariantErrors(params) {
|
|
129483
|
+
const errors = [];
|
|
129484
|
+
if (params.burnFloorBps + params.bountyShareBps > 1e4) errors.push(`burnFloorBps + bountyShareBps must not exceed 10000: ${params.burnFloorBps} + ${params.bountyShareBps}`);
|
|
129485
|
+
const minValidatorStake = tryBigInt(params.minValidatorStakeAtto);
|
|
129486
|
+
const bountyCap = tryBigInt(params.bountyCapAtto);
|
|
129487
|
+
if (minValidatorStake === void 0 || bountyCap === void 0) {
|
|
129488
|
+
errors.push("minValidatorStakeAtto and bountyCapAtto must be parseable amounts");
|
|
129489
|
+
return errors;
|
|
129490
|
+
}
|
|
129491
|
+
const counterSlashMin = minValidatorStake * BigInt(params.slashFractionsBps["invalid-slash-request"] ?? 0) / 10000n;
|
|
129492
|
+
if (counterSlashMin < bountyCap * 2n) errors.push(`the counter-slash at minimum validator stake (${counterSlashMin}) must be at least twice bountyCapAtto (${bountyCap})`);
|
|
129493
|
+
return errors;
|
|
129494
|
+
}
|
|
129495
|
+
function tryBigInt(value) {
|
|
129496
|
+
try {
|
|
129497
|
+
return BigInt(value.startsWith("0x") ? value : `0x${value}`);
|
|
129498
|
+
} catch {
|
|
129499
|
+
return;
|
|
129500
|
+
}
|
|
129501
|
+
}
|
|
129214
129502
|
function root(address) {
|
|
129215
129503
|
return `evm/events/${address.toLowerCase()}`;
|
|
129216
129504
|
}
|
|
@@ -129241,7 +129529,7 @@ function networkStakeRewardsIndexSnapshotPath(policyId, snapshotHash) {
|
|
|
129241
129529
|
function networkStakeRewardsIndexStepPath(policyId, step) {
|
|
129242
129530
|
return `${root2(policyId)}/steps/${step.step}/${step.block}.json`;
|
|
129243
129531
|
}
|
|
129244
|
-
var local_default, mainnet_default, testnet_default, NetworkBootstrapSchema, isNetworkBootstrap, MainNetwork, SequenceNetwork, LocalNetwork, ChainContractBlockNumberZod, ChainContractManifestSchema, ChainContractManifestZod, asChainContractManifest, headPath, chainContractByIdPath, chainParamsVersionPath, chainParamsHeadPath, blockNumberPath, blockHashPath, payloadPath, indexSummaryPath, TRANSACTION_INCLUSION_ROOT, ChainManifestSchema, ChainManifestPathsZod, ChainParamsSchema, offenseCodeZod, RuleIdZod, HeightZod, HexAmountZod, ChainParamsZod, asChainParams, ChainParamsHeadSchema, ChainParamsHeadZod, asChainParamsHead, EvmHashZod, EvmDataZod, EvmEventIndexLogZod, EvmEventIndexFrameZod, EvmEventIndexManifestZod, EvmEventIndexHeadZod, asEvmEventIndexFrame, asEvmEventIndexHead, asEvmEventIndexManifest, IndexManifestSchema, IndexHeadSchema, IndexManifestFamilyZod, indexFamiliesZod, IndexHeadFamiliesZod, NETWORK_STAKE_REWARDS_INDEX_LAYOUT, NETWORK_STAKE_REWARDS_UNMULTIPLIED_POLICY, NetworkStakeRewardsIndexSnapshotSchema, DecimalBigIntZod, NetworkStakeRewardsPolicyIdZod, PositionRewardsZod, BlockRangeZod, StepIdentityJsonZod, NetworkStakeRewardsIndexManifestZod, NetworkStakeRewardsIndexStepZod, NetworkStakeRewardsIndexSnapshotZod, NetworkStakeRewardsIndexHeadZod, asNetworkStakeRewardsIndexManifest, asNetworkStakeRewardsIndexStep, asNetworkStakeRewardsIndexSnapshot, asNetworkStakeRewardsIndexHead, TRANSACTION_INCLUSION_INDEX_LAYOUT;
|
|
129532
|
+
var local_default, mainnet_default, testnet_default, NetworkBootstrapSchema, isNetworkBootstrap, MainNetwork, SequenceNetwork, LocalNetwork, AdmissionShadowReportSchema, AdmissionShadowAssessmentZod, ChainContractBlockNumberZod, ChainContractManifestSchema, ChainContractManifestZod, asChainContractManifest, headPath, chainContractByIdPath, chainParamsVersionPath, chainParamsHeadPath, blockNumberPath, blockHashPath, payloadPath, indexSummaryPath, TRANSACTION_INCLUSION_ROOT, ChainManifestSchema, ChainManifestPathsZod, ChainParamsSchema, offenseCodeZod, RuleIdZod, HeightZod, HexAmountZod, ChainParamsZod, asChainParams, ChainParamsHeadSchema, ChainParamsHeadZod, asChainParamsHead, EvmHashZod, EvmDataZod, EvmEventIndexLogZod, EvmEventIndexFrameZod, EvmEventIndexManifestZod, EvmEventIndexHeadZod, asEvmEventIndexFrame, asEvmEventIndexHead, asEvmEventIndexManifest, IndexManifestSchema, IndexHeadSchema, IndexManifestFamilyZod, indexFamiliesZod, IndexHeadFamiliesZod, NETWORK_STAKE_REWARDS_INDEX_LAYOUT, NETWORK_STAKE_REWARDS_UNMULTIPLIED_POLICY, NetworkStakeRewardsIndexSnapshotSchema, DecimalBigIntZod, NetworkStakeRewardsPolicyIdZod, PositionRewardsZod, BlockRangeZod, StepIdentityJsonZod, NetworkStakeRewardsIndexManifestZod, NetworkStakeRewardsIndexStepZod, NetworkStakeRewardsIndexSnapshotZod, NetworkStakeRewardsIndexHeadZod, asNetworkStakeRewardsIndexManifest, asNetworkStakeRewardsIndexStep, asNetworkStakeRewardsIndexSnapshot, asNetworkStakeRewardsIndexHead, SlashIndexHeadSchema, offenseCodeZod2, SlashIndexKeyRecordSchema, TRANSACTION_INCLUSION_INDEX_LAYOUT;
|
|
129245
129533
|
var init_network_model = __esmMin((async () => {
|
|
129246
129534
|
init_node$4();
|
|
129247
129535
|
await init_node$1();
|
|
@@ -129288,6 +129576,44 @@ var init_network_model = __esmMin((async () => {
|
|
|
129288
129576
|
explorerUrl: "http://localhost:3000"
|
|
129289
129577
|
};
|
|
129290
129578
|
MainNetwork.id, SequenceNetwork.id, LocalNetwork.id;
|
|
129579
|
+
AdmissionShadowReportSchema = asSchema("network.xyo.s3.admission.shadow", true);
|
|
129580
|
+
AdmissionShadowAssessmentZod = object$2({
|
|
129581
|
+
/** Seasoned active stake measured at the evaluation point, hex atto, when it could be. */
|
|
129582
|
+
activeStake: optional$1(string$2()),
|
|
129583
|
+
/** Whether the allow-list admits it. */
|
|
129584
|
+
admittedByAllowList: boolean$1(),
|
|
129585
|
+
/** The candidate's height. */
|
|
129586
|
+
block: int().nonnegative(),
|
|
129587
|
+
/** The candidate's signed identity. */
|
|
129588
|
+
dataHash: string$2(),
|
|
129589
|
+
/** The EVM height stake was measured at, when it could be. */
|
|
129590
|
+
eStar: optional$1(int().nonnegative()),
|
|
129591
|
+
/** Whether participation admits it, when that could be established. */
|
|
129592
|
+
eligible: optional$1(boolean$1()),
|
|
129593
|
+
/** Whether the address held a current intent, when that could be established. */
|
|
129594
|
+
intentValid: optional$1(boolean$1()),
|
|
129595
|
+
/** The producer. */
|
|
129596
|
+
producer: string$2(),
|
|
129597
|
+
/** Why participation refused, when it did. */
|
|
129598
|
+
reason: optional$1(string$2()),
|
|
129599
|
+
/** False when the participation question could not be put at all. */
|
|
129600
|
+
resolvable: boolean$1(),
|
|
129601
|
+
/** The seasoned portion staked by the address on itself, hex atto, when it could be. */
|
|
129602
|
+
selfBond: optional$1(string$2())
|
|
129603
|
+
});
|
|
129604
|
+
object$2({
|
|
129605
|
+
/** Every candidate considered this round. */
|
|
129606
|
+
assessments: array$1(AdmissionShadowAssessmentZod),
|
|
129607
|
+
/** Only those where the two gates disagreed. */
|
|
129608
|
+
divergent: array$1(AdmissionShadowAssessmentZod),
|
|
129609
|
+
/** The finalized height this round was selected against. */
|
|
129610
|
+
head: int().nonnegative(),
|
|
129611
|
+
/** The admission posture that produced the round; reports keep flowing when gating starts. */
|
|
129612
|
+
mode: optional$1(_enum(["shadow", "enforce"])),
|
|
129613
|
+
/** Height of the previous published report, so the series can be walked backwards. */
|
|
129614
|
+
previous: optional$1(int().nonnegative()),
|
|
129615
|
+
schema: literal$1(AdmissionShadowReportSchema)
|
|
129616
|
+
});
|
|
129291
129617
|
ChainContractBlockNumberZod = NumberishZod.pipe(int().nonnegative()).transform((value) => value);
|
|
129292
129618
|
ChainContractManifestSchema = "network.xyo.s3.chain.contract";
|
|
129293
129619
|
ChainContractManifestZod = object$2({
|
|
@@ -129541,6 +129867,42 @@ var init_network_model = __esmMin((async () => {
|
|
|
129541
129867
|
asNetworkStakeRewardsIndexStep = zodAsFactory(NetworkStakeRewardsIndexStepZod, "asNetworkStakeRewardsIndexStep");
|
|
129542
129868
|
asNetworkStakeRewardsIndexSnapshot = zodAsFactory(NetworkStakeRewardsIndexSnapshotZod, "asNetworkStakeRewardsIndexSnapshot");
|
|
129543
129869
|
asNetworkStakeRewardsIndexHead = zodAsFactory(NetworkStakeRewardsIndexHeadZod, "asNetworkStakeRewardsIndexHead");
|
|
129870
|
+
SlashIndexHeadSchema = asSchema("network.xyo.s3.slash.index.head", true);
|
|
129871
|
+
offenseCodeZod2 = _enum(OffenseCodes);
|
|
129872
|
+
object$2({
|
|
129873
|
+
/** Highest finalized height the index has folded in. */
|
|
129874
|
+
height: int().nonnegative(),
|
|
129875
|
+
/** Layout version of the objects this head points at. */
|
|
129876
|
+
indexVersion: int().positive(),
|
|
129877
|
+
schema: literal$1(SlashIndexHeadSchema),
|
|
129878
|
+
/** When the pass that wrote this ran, on the EVM clock, when it was known. */
|
|
129879
|
+
anchor: optional$1(int().nonnegative())
|
|
129880
|
+
});
|
|
129881
|
+
SlashIndexKeyRecordSchema = asSchema("network.xyo.s3.slash.index.key", true);
|
|
129882
|
+
object$2({
|
|
129883
|
+
/** Who is accused. */
|
|
129884
|
+
accused: string$2(),
|
|
129885
|
+
/** Hash of the adjudication that closed it, when one has. */
|
|
129886
|
+
adjudication: optional$1(string$2()),
|
|
129887
|
+
/** The canonical height the offense is located at. */
|
|
129888
|
+
block: int().nonnegative(),
|
|
129889
|
+
/** Hashes of challenges filed against reports of it. */
|
|
129890
|
+
challenges: array$1(string$2()),
|
|
129891
|
+
/** The chain it happened on. */
|
|
129892
|
+
chain: string$2(),
|
|
129893
|
+
/** How it was resolved, when it has been. */
|
|
129894
|
+
outcome: optional$1(_enum([
|
|
129895
|
+
"confirmed",
|
|
129896
|
+
"refuted",
|
|
129897
|
+
"indeterminate",
|
|
129898
|
+
"invalid"
|
|
129899
|
+
])),
|
|
129900
|
+
/** Which offense class. */
|
|
129901
|
+
offense: offenseCodeZod2,
|
|
129902
|
+
/** Hashes of every report filed for it, earliest first. */
|
|
129903
|
+
requests: array$1(string$2()),
|
|
129904
|
+
schema: literal$1(SlashIndexKeyRecordSchema)
|
|
129905
|
+
});
|
|
129544
129906
|
TRANSACTION_INCLUSION_INDEX_LAYOUT = "transaction-inclusions-v1";
|
|
129545
129907
|
object$2({
|
|
129546
129908
|
/** XL1 chain whose finalized transactions are indexed. */
|
|
@@ -129564,7 +129926,7 @@ var init_network_model = __esmMin((async () => {
|
|
|
129564
129926
|
});
|
|
129565
129927
|
}));
|
|
129566
129928
|
//#endregion
|
|
129567
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.2.
|
|
129929
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4._8024169a86ceee117dad4c372343057e/node_modules/@xyo-network/xl1-protocol/dist/neutral/schema.mjs
|
|
129568
129930
|
var asRequiredStrings, mergeJsonSchemaRequired, BlockBoundWitnessJsonSchema, BlockBoundWitnessSchemaPayload, StorageMetaJsonSchema, BlockBoundWitnessWithStorageMetaJsonSchema, BlockBoundWitnessWithStorageMetaSchemaPayload, ExecutableJsonSchema, TransactionBoundWitnessJsonSchema, TransactionBoundWitnessSchemaPayload, TransactionBoundWitnessWithStorageMetaJsonSchema, TransactionBoundWitnessWithStorageMetaSchemaPayload, ChainStakeIntentPayloadJsonSchema, ChainStakeIntentPayloadJsonSchemaPayload, HashPayloadJsonSchema, HashPayloadJsonSchemaPayload, TransferPayloadJsonSchema, TransferPayloadJsonSchemaPayload;
|
|
129569
129931
|
var init_schema = __esmMin((async () => {
|
|
129570
129932
|
init_node$4();
|
|
@@ -129806,7 +130168,7 @@ var init_schema = __esmMin((async () => {
|
|
|
129806
130168
|
TransferPayloadJsonSchemaPayload = new PayloadBuilder({ schema: SchemaSchema }).fields({ definition: TransferPayloadJsonSchema }).build();
|
|
129807
130169
|
}));
|
|
129808
130170
|
//#endregion
|
|
129809
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.2.
|
|
130171
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4._8024169a86ceee117dad4c372343057e/node_modules/@xyo-network/xl1-protocol/dist/neutral/validation.mjs
|
|
129810
130172
|
function getPayloadsFromPayloadArray(payloads, hashes) {
|
|
129811
130173
|
return hashes.map((hash) => payloads.find((payload) => payload._hash === hash || payload._dataHash === hash));
|
|
129812
130174
|
}
|
|
@@ -129977,7 +130339,7 @@ var init_validation$1 = __esmMin((async () => {
|
|
|
129977
130339
|
};
|
|
129978
130340
|
}));
|
|
129979
130341
|
//#endregion
|
|
129980
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.2.
|
|
130342
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-protocol@5.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4._8024169a86ceee117dad4c372343057e/node_modules/@xyo-network/xl1-protocol/dist/neutral/index.mjs
|
|
129981
130343
|
var init_neutral$3 = __esmMin((async () => {
|
|
129982
130344
|
await init_network_model();
|
|
129983
130345
|
await init_protocol_lib();
|
|
@@ -129985,7 +130347,7 @@ var init_neutral$3 = __esmMin((async () => {
|
|
|
129985
130347
|
await init_validation$1();
|
|
129986
130348
|
}));
|
|
129987
130349
|
//#endregion
|
|
129988
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.2.
|
|
130350
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_252fb2827c5feda163f247b20a570aee/node_modules/@xyo-network/xl1-sdk/dist/neutral/driver-memory.mjs
|
|
129989
130351
|
var LruCacheMap, MemoryMap;
|
|
129990
130352
|
var init_driver_memory = __esmMin((() => {
|
|
129991
130353
|
init_index_min();
|
|
@@ -133337,7 +133699,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
133337
133699
|
exports.cosmiconfigSync = cosmiconfigSync;
|
|
133338
133700
|
}));
|
|
133339
133701
|
//#endregion
|
|
133340
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.2.
|
|
133702
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_252fb2827c5feda163f247b20a570aee/node_modules/@xyo-network/xl1-sdk/dist/node/protocol-sdk.mjs
|
|
133341
133703
|
function blockRangeSteps(range, steps) {
|
|
133342
133704
|
const result = [];
|
|
133343
133705
|
for (const step of steps) {
|
|
@@ -134680,18 +135042,17 @@ function emptySlashHistory() {
|
|
|
134680
135042
|
requests: /* @__PURE__ */ new Map()
|
|
134681
135043
|
};
|
|
134682
135044
|
}
|
|
134683
|
-
function foldSlashHistory(payloads, into = emptySlashHistory()) {
|
|
135045
|
+
async function foldSlashHistory(payloads, into = emptySlashHistory()) {
|
|
134684
135046
|
for (const payload of payloads) {
|
|
134685
|
-
|
|
134686
|
-
|
|
134687
|
-
into.requests.set(hash, payload);
|
|
135047
|
+
if (isSlashRequest(payload)) {
|
|
135048
|
+
into.requests.set(await PayloadBuilder.dataHash(payload), payload);
|
|
134688
135049
|
continue;
|
|
134689
135050
|
}
|
|
134690
135051
|
if (isSlashAdjudication(payload)) {
|
|
134691
135052
|
into.adjudications.set(payload.request, payload);
|
|
134692
135053
|
continue;
|
|
134693
135054
|
}
|
|
134694
|
-
if (isSlashEvidence(payload)) for (const artifact of artifactHashes(payload)) into.evidenceArtifacts.add(artifact);
|
|
135055
|
+
if (isSlashEvidence(payload)) for (const artifact of await artifactHashes(payload)) into.evidenceArtifacts.add(artifact);
|
|
134695
135056
|
}
|
|
134696
135057
|
return into;
|
|
134697
135058
|
}
|
|
@@ -134706,8 +135067,8 @@ function protectedArtifactHashes(history) {
|
|
|
134706
135067
|
function hasFinalizedArtifact(history, artifact) {
|
|
134707
135068
|
return history.evidenceArtifacts.has(artifact);
|
|
134708
135069
|
}
|
|
134709
|
-
function artifactHashes(evidence) {
|
|
134710
|
-
return evidence.artifacts.map((artifact) =>
|
|
135070
|
+
async function artifactHashes(evidence) {
|
|
135071
|
+
return await Promise.all(evidence.artifacts.map((artifact) => PayloadBuilder.dataHash(artifact)));
|
|
134711
135072
|
}
|
|
134712
135073
|
function positionFromOption(option) {
|
|
134713
135074
|
return {
|
|
@@ -137366,10 +137727,14 @@ var init_protocol_sdk = __esmMin((async () => {
|
|
|
137366
137727
|
* Removes evidence whose retention has expired on both clocks, skipping anything a pending
|
|
137367
137728
|
* report still references. Returns `[pruned, checked]`.
|
|
137368
137729
|
*
|
|
137369
|
-
* Notes drive the sweep: each one names the bundle it describes, so an expired note
|
|
137370
|
-
* bundle with it.
|
|
137371
|
-
*
|
|
137372
|
-
*
|
|
137730
|
+
* Notes drive the candidate sweep: each one names the bundle it describes, so an expired note
|
|
137731
|
+
* takes its bundle with it. The index and rejection families age out on the same clocks —
|
|
137732
|
+
* candidate sightings and pair records by the height they describe, and observer-signed
|
|
137733
|
+
* rejection envelopes together with the rejection payloads they carry — because a store where
|
|
137734
|
+
* only one family is swept grows without bound wherever the subsystem runs. Anything a
|
|
137735
|
+
* protection viewer still claims is left alone regardless of age — retention deliberately
|
|
137736
|
+
* loses to reference protection, since pruning evidence out from under an open report would
|
|
137737
|
+
* destroy the case it rests on.
|
|
137373
137738
|
*/
|
|
137374
137739
|
async pruneEvidence({ batchSize = 100, maxPrune = 5e3, maxCheck = 1e4 } = {}) {
|
|
137375
137740
|
const headNumber = await this.finalizationViewer.headNumber();
|
|
@@ -137381,6 +137746,17 @@ var init_protocol_sdk = __esmMin((async () => {
|
|
|
137381
137746
|
evidenceFreshnessEvmBlocks,
|
|
137382
137747
|
evidenceRetentionXl1Blocks
|
|
137383
137748
|
};
|
|
137749
|
+
const clock = {
|
|
137750
|
+
headAnchor,
|
|
137751
|
+
headHeight: headNumber
|
|
137752
|
+
};
|
|
137753
|
+
const expiredAt = async (height, observed = height) => {
|
|
137754
|
+
return isRetentionExpired({
|
|
137755
|
+
observedHeight: observed,
|
|
137756
|
+
subjectAnchor: await this.anchorFor(asXL1BlockNumber(height, true)),
|
|
137757
|
+
subjectHeight: height
|
|
137758
|
+
}, clock, params);
|
|
137759
|
+
};
|
|
137384
137760
|
let checked = 0;
|
|
137385
137761
|
let pruned = 0;
|
|
137386
137762
|
let cursor;
|
|
@@ -137392,19 +137768,11 @@ var init_protocol_sdk = __esmMin((async () => {
|
|
|
137392
137768
|
while (batch.length > 0 && pruned < maxPrune && checked < maxCheck) {
|
|
137393
137769
|
const expired = [];
|
|
137394
137770
|
for (const payload of batch) {
|
|
137395
|
-
if (!
|
|
137771
|
+
if (!isHashMeta(payload)) continue;
|
|
137772
|
+
const hashes = await this.expiredEntryHashes(payload, protectedSubjects, expiredAt);
|
|
137773
|
+
if (hashes === void 0) continue;
|
|
137396
137774
|
checked++;
|
|
137397
|
-
|
|
137398
|
-
const subjectHeight = payload.height;
|
|
137399
|
-
const subjectAnchor = await this.anchorFor(asXL1BlockNumber(subjectHeight ?? payload.observed, true));
|
|
137400
|
-
if (isRetentionExpired({
|
|
137401
|
-
observedHeight: payload.observed,
|
|
137402
|
-
subjectAnchor,
|
|
137403
|
-
subjectHeight
|
|
137404
|
-
}, {
|
|
137405
|
-
headAnchor,
|
|
137406
|
-
headHeight: headNumber
|
|
137407
|
-
}, params)) expired.push(payload._hash, payload.bundle);
|
|
137775
|
+
expired.push(...hashes);
|
|
137408
137776
|
}
|
|
137409
137777
|
if (expired.length > 0) {
|
|
137410
137778
|
await this.archivist.delete(expired);
|
|
@@ -137439,6 +137807,44 @@ var init_protocol_sdk = __esmMin((async () => {
|
|
|
137439
137807
|
if (Number.isFinite(height) && height <= floor) this._seen.delete(key);
|
|
137440
137808
|
}
|
|
137441
137809
|
}
|
|
137810
|
+
/**
|
|
137811
|
+
* The hashes an evidence entry surrenders when its retention expires, or undefined for a
|
|
137812
|
+
* payload this sweep does not govern.
|
|
137813
|
+
*
|
|
137814
|
+
* An empty array means the entry was considered and kept — protected, or simply not old enough
|
|
137815
|
+
* on both clocks. Each family knows its own subject and its own dependents: a note takes its
|
|
137816
|
+
* bundle, an envelope takes the rejection payloads it signed over.
|
|
137817
|
+
*/
|
|
137818
|
+
async expiredEntryHashes(payload, protectedSubjects, expiredAt) {
|
|
137819
|
+
if (isEvidenceNote(payload)) {
|
|
137820
|
+
if (protectedSubjects.has(payload.subject)) return [];
|
|
137821
|
+
return await expiredAt(payload.height ?? payload.observed, payload.observed) ? [payload._hash, payload.bundle] : [];
|
|
137822
|
+
}
|
|
137823
|
+
if (isCandidateSeen(payload)) {
|
|
137824
|
+
if (protectedSubjects.has(payload.subject)) return [];
|
|
137825
|
+
return await expiredAt(payload.height) ? [payload._hash] : [];
|
|
137826
|
+
}
|
|
137827
|
+
if (isCandidatePair(payload)) {
|
|
137828
|
+
if (payload.subjects.some((subject) => protectedSubjects.has(subject))) return [];
|
|
137829
|
+
return await expiredAt(payload.height) ? [payload._hash] : [];
|
|
137830
|
+
}
|
|
137831
|
+
if (isBoundWitness(payload)) return await this.expiredRejectionHashes(payload, protectedSubjects, expiredAt);
|
|
137832
|
+
}
|
|
137833
|
+
/**
|
|
137834
|
+
* The hashes a rejection envelope surrenders, or undefined when the bound witness carries no
|
|
137835
|
+
* rejection at all — someone else's artifact, and none of this sweep's business.
|
|
137836
|
+
*/
|
|
137837
|
+
async expiredRejectionHashes(envelope, protectedSubjects, expiredAt) {
|
|
137838
|
+
const rejections = (await this.archivist.get(envelope.payload_hashes ?? [])).filter((entry) => isHashMeta(entry)).filter((entry) => isBlockRejection(entry));
|
|
137839
|
+
if (rejections.length === 0) return void 0;
|
|
137840
|
+
const heights = await Promise.all(rejections.map(async (rejection) => {
|
|
137841
|
+
const rejected = rejection.block[0];
|
|
137842
|
+
const subject = await PayloadBuilder.dataHash(rejected);
|
|
137843
|
+
return protectedSubjects.has(subject) ? void 0 : rejected.block;
|
|
137844
|
+
}));
|
|
137845
|
+
if (heights.includes(void 0)) return [];
|
|
137846
|
+
return (await Promise.all(heights.map((height) => expiredAt(height)))).every(Boolean) ? [envelope._hash, ...rejections.map((rejection) => rejection._hash)] : [];
|
|
137847
|
+
}
|
|
137442
137848
|
};
|
|
137443
137849
|
/** Connection kinds supported by this provider. */
|
|
137444
137850
|
__publicField$6(SimpleEvidenceStoreRunner, "connectionTypes", [
|
|
@@ -138683,7 +139089,7 @@ var init_protocol_sdk = __esmMin((async () => {
|
|
|
138683
139089
|
for (let hi = headNumber; hi >= floor; hi -= SCAN_PAGE_SIZE) {
|
|
138684
139090
|
const limit = Math.min(SCAN_PAGE_SIZE, hi - floor + 1);
|
|
138685
139091
|
const blocks = await this._blockViewer.blocksByNumber(asXL1BlockNumber(hi, true), limit);
|
|
138686
|
-
for (const block of blocks) foldSlashHistory(block[1], history);
|
|
139092
|
+
for (const block of blocks) await foldSlashHistory(block[1], history);
|
|
138687
139093
|
}
|
|
138688
139094
|
this.cachedHistory = history;
|
|
138689
139095
|
this.cachedAt = now;
|
|
@@ -158916,7 +159322,7 @@ var require_deep_freeze_strict = /* @__PURE__ */ __commonJSMin(((exports, module
|
|
|
158916
159322
|
};
|
|
158917
159323
|
}));
|
|
158918
159324
|
//#endregion
|
|
158919
|
-
//#region ../../node_modules/.pnpm/@ariestools+json-rpc-engine@8.1.
|
|
159325
|
+
//#region ../../node_modules/.pnpm/@ariestools+json-rpc-engine@8.1.9_supports-color@10.2.2_typescript@6.0.3/node_modules/@ariestools/json-rpc-engine/dist/neutral/index.mjs
|
|
158920
159326
|
function stringify(value) {
|
|
158921
159327
|
return JSON.stringify(value, null, 2);
|
|
158922
159328
|
}
|
|
@@ -159212,7 +159618,7 @@ var init_neutral$2 = __esmMin((() => {
|
|
|
159212
159618
|
};
|
|
159213
159619
|
}));
|
|
159214
159620
|
//#endregion
|
|
159215
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.2.
|
|
159621
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_252fb2827c5feda163f247b20a570aee/node_modules/@xyo-network/xl1-sdk/dist/neutral/rpc.mjs
|
|
159216
159622
|
function hasAllowedClaimDepth(value) {
|
|
159217
159623
|
const pending = [{
|
|
159218
159624
|
depth: 0,
|
|
@@ -161745,7 +162151,7 @@ var init_rpc = __esmMin((async () => {
|
|
|
161745
162151
|
};
|
|
161746
162152
|
}));
|
|
161747
162153
|
//#endregion
|
|
161748
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.2.
|
|
162154
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_252fb2827c5feda163f247b20a570aee/node_modules/@xyo-network/xl1-sdk/dist/neutral/rest-block-viewer.mjs
|
|
161749
162155
|
var __defProp$5, __getOwnPropDesc$4, __defNormalProp$4, __decorateClass$4, __publicField$4, REST_SUMMARY_CACHE_MAX_BY_STEP, RestBlockViewerOptionsZod, MIN_HEAD_POLL_INTERVAL_MS$1, CURRENT_BLOCK_CACHE_TTL_MS, CURRENT_BLOCK_CACHE_KEY, BLOCKS_BY_NUMBER_STEP_ACCEL_MIN_LIMIT, PayloadFileZod, RestBlockViewer, RestChainContractViewer, RestChainStateViewerOptionsZod, MIN_HEAD_POLL_INTERVAL_MS2, RestChainStateViewer, RestFinalizationViewer, MAX_STEP_BY_FAMILY, RestIndexViewer;
|
|
161750
162156
|
var init_rest_block_viewer = __esmMin((async () => {
|
|
161751
162157
|
await init_network_model();
|
|
@@ -182426,7 +182832,7 @@ var init_neutral$1 = __esmMin((() => {
|
|
|
182426
182832
|
};
|
|
182427
182833
|
}));
|
|
182428
182834
|
//#endregion
|
|
182429
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.2.
|
|
182835
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_252fb2827c5feda163f247b20a570aee/node_modules/@xyo-network/xl1-sdk/dist/neutral/providers.mjs
|
|
182430
182836
|
async function resolveEvmProviderFromContext(context) {
|
|
182431
182837
|
const evmChainViewer = await context.locator.tryGetInstance(EvmChainViewerMoniker);
|
|
182432
182838
|
if (isDefined(evmChainViewer)) return await evmChainViewer.provider();
|
|
@@ -184812,6 +185218,14 @@ timeAnchor: ExternalTimeAnchorOptionsZod.optional() });
|
|
|
184812
185218
|
/** How often the mutable head pointer is re-read. */
|
|
184813
185219
|
headPollIntervalMs: number$1().default(3e4) });
|
|
184814
185220
|
RestChainParamsViewer = class extends AbstractCreatableProvider {
|
|
185221
|
+
/**
|
|
185222
|
+
* Supplies the finalized height succession is judged against, when the host has one.
|
|
185223
|
+
*
|
|
185224
|
+
* Without it the reader still refuses version regressions, chain-id changes, protocolMin
|
|
185225
|
+
* lowering, and broken economics; with it, moves to activations the chain has already passed
|
|
185226
|
+
* are refused too. Hosts with a finalized view should set it.
|
|
185227
|
+
*/
|
|
185228
|
+
finalizedHeight;
|
|
184815
185229
|
/** Moniker implemented by this provider instance. */
|
|
184816
185230
|
moniker = RestChainParamsViewer.defaultMoniker;
|
|
184817
185231
|
_options;
|
|
@@ -184838,13 +185252,14 @@ headPollIntervalMs: number$1().default(3e4) });
|
|
|
184838
185252
|
async currentParams() {
|
|
184839
185253
|
return assertEx(await this.tryCurrentParams(), () => "No chain parameter register could be resolved");
|
|
184840
185254
|
}
|
|
184841
|
-
/** A specific register version, or null when it is not published. */
|
|
185255
|
+
/** A specific register version, or null when it is not published or does not validate. */
|
|
184842
185256
|
async paramsByVersion(version) {
|
|
184843
185257
|
const cached = this.versions.get(version);
|
|
184844
185258
|
if (cached !== void 0) return cached;
|
|
184845
185259
|
const document = await this.tryFetchJson(chainParamsVersionPath(this.chainId, version));
|
|
184846
185260
|
if (document === void 0) return null;
|
|
184847
|
-
const params =
|
|
185261
|
+
const params = this.tryParseParams(document, `version ${version}`);
|
|
185262
|
+
if (params === void 0) return null;
|
|
184848
185263
|
this.versions.set(version, params);
|
|
184849
185264
|
return params;
|
|
184850
185265
|
}
|
|
@@ -184858,12 +185273,48 @@ headPollIntervalMs: number$1().default(3e4) });
|
|
|
184858
185273
|
if (this.lastResolved?.version === head.version) return this.lastResolved;
|
|
184859
185274
|
const params = await this.paramsByVersion(head.version);
|
|
184860
185275
|
if (params === null) return this.lastResolved;
|
|
185276
|
+
if (!await this.tryAccept(head, params)) return this.lastResolved;
|
|
184861
185277
|
this.lastResolved = params;
|
|
184862
185278
|
return params;
|
|
184863
185279
|
}
|
|
185280
|
+
/**
|
|
185281
|
+
* Judges a fetched version before it replaces the one in force.
|
|
185282
|
+
*
|
|
185283
|
+
* Order matters only for the reporting: the hash binding proves the head meant this document,
|
|
185284
|
+
* the invariants prove the document holds together, and succession proves it may follow what
|
|
185285
|
+
* this reader already trusted.
|
|
185286
|
+
*/
|
|
185287
|
+
async tryAccept(head, params) {
|
|
185288
|
+
const hash = await PayloadBuilder.dataHash(params);
|
|
185289
|
+
if (hash !== head.hash) {
|
|
185290
|
+
this.versions.delete(head.version);
|
|
185291
|
+
this.logger?.warn(`[RestChainParamsViewer] head names version ${head.version} as ${head.hash} but the document hashes to ${hash}; keeping the version in force`);
|
|
185292
|
+
return false;
|
|
185293
|
+
}
|
|
185294
|
+
const invariantErrors = chainParamsInvariantErrors(params);
|
|
185295
|
+
if (invariantErrors.length > 0) {
|
|
185296
|
+
this.logger?.warn(`[RestChainParamsViewer] version ${params.version} violates invariants: ${invariantErrors.join("; ")}`);
|
|
185297
|
+
return false;
|
|
185298
|
+
}
|
|
185299
|
+
if (this.lastResolved !== void 0) {
|
|
185300
|
+
const finalizedHeight = await this.finalizedHeight?.() ?? -1;
|
|
185301
|
+
const successionErrors = chainParamsSuccessionErrors(this.lastResolved, params, finalizedHeight);
|
|
185302
|
+
if (successionErrors.length > 0) {
|
|
185303
|
+
this.logger?.warn(`[RestChainParamsViewer] version ${params.version} may not follow ${this.lastResolved.version}: ${successionErrors.join("; ")}`);
|
|
185304
|
+
return false;
|
|
185305
|
+
}
|
|
185306
|
+
}
|
|
185307
|
+
return true;
|
|
185308
|
+
}
|
|
184864
185309
|
async tryFetchHead() {
|
|
184865
185310
|
const document = await this.tryFetchJson(chainParamsHeadPath(this.chainId));
|
|
184866
|
-
|
|
185311
|
+
if (document === void 0) return void 0;
|
|
185312
|
+
try {
|
|
185313
|
+
return asChainParamsHead(document, true);
|
|
185314
|
+
} catch (error) {
|
|
185315
|
+
this.logger?.warn(`[RestChainParamsViewer] register head failed validation: ${String(error)}`);
|
|
185316
|
+
return;
|
|
185317
|
+
}
|
|
184867
185318
|
}
|
|
184868
185319
|
async tryFetchJson(path) {
|
|
184869
185320
|
try {
|
|
@@ -184875,6 +185326,14 @@ headPollIntervalMs: number$1().default(3e4) });
|
|
|
184875
185326
|
return;
|
|
184876
185327
|
}
|
|
184877
185328
|
}
|
|
185329
|
+
tryParseParams(document, label) {
|
|
185330
|
+
try {
|
|
185331
|
+
return asChainParams(document, true);
|
|
185332
|
+
} catch (error) {
|
|
185333
|
+
this.logger?.warn(`[RestChainParamsViewer] register ${label} failed validation: ${String(error)}`);
|
|
185334
|
+
return;
|
|
185335
|
+
}
|
|
185336
|
+
}
|
|
184878
185337
|
};
|
|
184879
185338
|
/** Connection kinds supported by this provider. */
|
|
184880
185339
|
__publicField$3(RestChainParamsViewer, "connectionTypes", ["rest"]);
|
|
@@ -185062,7 +185521,7 @@ headPollIntervalMs: number$1().default(3e4) });
|
|
|
185062
185521
|
RestNetworkStakeStepRewardsByPositionViewer = __decorateClass$3([creatableProvider()], RestNetworkStakeStepRewardsByPositionViewer);
|
|
185063
185522
|
}));
|
|
185064
185523
|
//#endregion
|
|
185065
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.2.
|
|
185524
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_252fb2827c5feda163f247b20a570aee/node_modules/@xyo-network/xl1-sdk/dist/neutral/gateway.mjs
|
|
185066
185525
|
var init_gateway = __esmMin((async () => {
|
|
185067
185526
|
await init_protocol_lib();
|
|
185068
185527
|
await init_rpc();
|
|
@@ -185072,7 +185531,7 @@ var init_gateway = __esmMin((async () => {
|
|
|
185072
185531
|
await init_node$1();
|
|
185073
185532
|
}));
|
|
185074
185533
|
//#endregion
|
|
185075
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.2.
|
|
185534
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_252fb2827c5feda163f247b20a570aee/node_modules/@xyo-network/xl1-sdk/dist/neutral/wrappers.mjs
|
|
185076
185535
|
function parseHexOrBigInt(value) {
|
|
185077
185536
|
return AttoXL1(typeof value === "bigint" ? value : hexToBigInt(value));
|
|
185078
185537
|
}
|
|
@@ -185312,7 +185771,7 @@ var init_wrappers$1 = __esmMin((async () => {
|
|
|
185312
185771
|
};
|
|
185313
185772
|
}));
|
|
185314
185773
|
//#endregion
|
|
185315
|
-
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.2.
|
|
185774
|
+
//#region ../../node_modules/.pnpm/@xyo-network+xl1-sdk@5.2.3_@ariestools+sdk@8.1.9_@opentelemetry+api@1.9.1_zod@4.4.3__@o_252fb2827c5feda163f247b20a570aee/node_modules/@xyo-network/xl1-sdk/dist/neutral/index.mjs
|
|
185316
185775
|
var init_neutral = __esmMin((async () => {
|
|
185317
185776
|
await init_neutral$3();
|
|
185318
185777
|
init_driver_memory();
|
|
@@ -185337,7 +185796,7 @@ async function createJwt$1(options) {
|
|
|
185337
185796
|
});
|
|
185338
185797
|
}
|
|
185339
185798
|
//#endregion
|
|
185340
|
-
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.
|
|
185799
|
+
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.4_dd5e413d309696eada5e777ed22584f3/node_modules/@xyo-network/chain-sdk/dist/neutral/analyze.mjs
|
|
185341
185800
|
var analyzeBlock, analyzeChain, ChainSummaryBalancesSchema, isChainSummaryBalances, bigintBalances, BalanceAnalyzer, ChainFinalizer, ChainHeadSelector, ChainSummaryProducersSchema, isChainSummaryProducers, ChainProducersAnalyzer, ChainSummaryStakeIntentSchema, isChainSummaryStakeIntent, ChainStakeIntentAnalyzer, ChainSummaryTransfersSchema, isChainSummaryTransfers, bigintTransfers, TransferAnalyzer;
|
|
185342
185801
|
var init_analyze = __esmMin((async () => {
|
|
185343
185802
|
init_node$4();
|
|
@@ -185632,7 +186091,7 @@ var init_analyze = __esmMin((async () => {
|
|
|
185632
186091
|
};
|
|
185633
186092
|
}));
|
|
185634
186093
|
//#endregion
|
|
185635
|
-
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.
|
|
186094
|
+
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.4_dd5e413d309696eada5e777ed22584f3/node_modules/@xyo-network/chain-sdk/dist/neutral/protocol.mjs
|
|
185636
186095
|
function calculateCompletedStepReward(step, balance) {
|
|
185637
186096
|
return AttoXL1(StepRewardFractions[step][0] * balance / StepRewardFractions[step][1]);
|
|
185638
186097
|
}
|
|
@@ -185806,7 +186265,7 @@ var init_protocol = __esmMin((async () => {
|
|
|
185806
186265
|
toSortedBlocks = (blocks, compareFn = sortBlocksAscending) => sortBlocks([...blocks], compareFn);
|
|
185807
186266
|
}));
|
|
185808
186267
|
//#endregion
|
|
185809
|
-
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.
|
|
186268
|
+
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.4_dd5e413d309696eada5e777ed22584f3/node_modules/@xyo-network/chain-sdk/dist/neutral/ethereum.mjs
|
|
185810
186269
|
function blockRangeChunks(fromBlock, toBlock, chunkSize) {
|
|
185811
186270
|
if (!Number.isInteger(chunkSize) || chunkSize < 1) throw new TypeError(`chunkSize must be an integer >= 1, got ${chunkSize}`);
|
|
185812
186271
|
if (!Number.isFinite(fromBlock) || !Number.isFinite(toBlock)) throw new TypeError(`fromBlock and toBlock must be finite numbers, got [${fromBlock}, ${toBlock}]`);
|
|
@@ -186470,7 +186929,7 @@ var init_ethereum = __esmMin((async () => {
|
|
|
186470
186929
|
EvmStakeRunner = __decorateClass$2([creatableProvider()], EvmStakeRunner);
|
|
186471
186930
|
}));
|
|
186472
186931
|
//#endregion
|
|
186473
|
-
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.
|
|
186932
|
+
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.4_dd5e413d309696eada5e777ed22584f3/node_modules/@xyo-network/chain-sdk/dist/neutral/validation.mjs
|
|
186474
186933
|
function TransactionTransfersInBlockValidatorFactory(transfersValidator) {
|
|
186475
186934
|
return async (context, hydratedBlock) => {
|
|
186476
186935
|
const [block, payloads] = hydratedBlock;
|
|
@@ -186891,7 +187350,7 @@ var init_validation = __esmMin((async () => {
|
|
|
186891
187350
|
};
|
|
186892
187351
|
}));
|
|
186893
187352
|
//#endregion
|
|
186894
|
-
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.
|
|
187353
|
+
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.4_dd5e413d309696eada5e777ed22584f3/node_modules/@xyo-network/chain-sdk/dist/neutral/modules.mjs
|
|
186895
187354
|
var __defProp$1, __getOwnPropDesc$1, __getProtoOf, __reflectGet, __defNormalProp$1, __decorateClass$1, __publicField$1, __superGet, BlockRewardDivinerConfigSchema, BlockRewardDiviner, BlockRewardSchema, isBlockReward, asBlockReward, asOptionalBlockReward, isBlockRewardWithSources, asBlockRewardWithSources, asOptionalBlockRewardWithSources, FixedPercentageBlockRewardDivinerConfigSchema, FixedPercentageBlockRewardDiviner, countDecimalPlaces, BlockValidationDivinerConfigSchema, BlockValidationDiviner, HeadValidationDivinerConfigSchema, HeadValidationDiviner, ArchivistNextWitnessConfigSchema, ArchivistNextWitness, WeightedNetworkStakeSchema, isWeightedNetworkStake, asWeightedNetworkStakePayload, asWeightedNetworkStakePayloadWithStorageMeta, NetworkStakeObserveSchema, isNetworkStakeObserve, asNetworkStakeObservePayload, asNetworkStakeObservePayloadWithStorageMeta;
|
|
186896
187355
|
var init_modules = __esmMin((async () => {
|
|
186897
187356
|
await init_node$1();
|
|
@@ -193882,7 +194341,7 @@ var require_index_shim = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
193882
194341
|
});
|
|
193883
194342
|
}));
|
|
193884
194343
|
//#endregion
|
|
193885
|
-
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.
|
|
194344
|
+
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.4_dd5e413d309696eada5e777ed22584f3/node_modules/@xyo-network/chain-sdk/dist/neutral/utils.mjs
|
|
193886
194345
|
function formatNumberForDisplay(value, significantFigures = 5, bigIntShift = 18) {
|
|
193887
194346
|
const resolvedValue = typeof value === "bigint" ? bigIntToFixedPointString(value, bigIntShift) : value;
|
|
193888
194347
|
if (!resolvedValue.includes(".")) return safeReturnInteger(resolvedValue);
|
|
@@ -194577,7 +195036,7 @@ var init_utils = __esmMin((async () => {
|
|
|
194577
195036
|
};
|
|
194578
195037
|
}));
|
|
194579
195038
|
//#endregion
|
|
194580
|
-
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.
|
|
195039
|
+
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.4_dd5e413d309696eada5e777ed22584f3/node_modules/@xyo-network/chain-sdk/dist/neutral/services.mjs
|
|
194581
195040
|
function hasMessage(value) {
|
|
194582
195041
|
return typeof value === "object" && value !== null && "message" in value;
|
|
194583
195042
|
}
|
|
@@ -235935,7 +236394,7 @@ var require_src = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
235935
236394
|
});
|
|
235936
236395
|
}));
|
|
235937
236396
|
//#endregion
|
|
235938
|
-
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.
|
|
236397
|
+
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.4_dd5e413d309696eada5e777ed22584f3/node_modules/@xyo-network/chain-sdk/dist/node/telemetry.mjs
|
|
235939
236398
|
function createTelemetryGlobalCleanup({ contextManager, isGlobalContextManagerOwner, isGlobalMeterProviderOwner, isGlobalPropagatorOwner, isGlobalTracerProviderOwner, runtimeInstrumentation }) {
|
|
235940
236399
|
const cleanup = [];
|
|
235941
236400
|
if (runtimeInstrumentation !== void 0) cleanup.push(() => runtimeInstrumentation.disable());
|
|
@@ -236127,7 +236586,7 @@ var init_telemetry = __esmMin((() => {
|
|
|
236127
236586
|
};
|
|
236128
236587
|
}));
|
|
236129
236588
|
//#endregion
|
|
236130
|
-
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.
|
|
236589
|
+
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.4_dd5e413d309696eada5e777ed22584f3/node_modules/@xyo-network/chain-sdk/dist/neutral/wrappers.mjs
|
|
236131
236590
|
var sumTransfers, HydratedBlockWrapper;
|
|
236132
236591
|
var init_wrappers = __esmMin((async () => {
|
|
236133
236592
|
init_node$4();
|
|
@@ -236222,7 +236681,7 @@ var init_wrappers = __esmMin((async () => {
|
|
|
236222
236681
|
};
|
|
236223
236682
|
}));
|
|
236224
236683
|
//#endregion
|
|
236225
|
-
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.
|
|
236684
|
+
//#region ../../node_modules/.pnpm/@xyo-network+chain-sdk@5.0.4_dd5e413d309696eada5e777ed22584f3/node_modules/@xyo-network/chain-sdk/dist/node/index.mjs
|
|
236226
236685
|
var node_exports = /* @__PURE__ */ __exportAll({
|
|
236227
236686
|
AbstractEvmRunner: () => AbstractEvmRunner,
|
|
236228
236687
|
AbstractStepStakeService: () => AbstractStepStakeService,
|