@latticexyz/world-module-erc20 2.2.23-7f943837a0636a7043fe659074a05f82e66b5edf → 2.2.23-84b8926b9c97fd6d0807aa5b84326fe9a698f264
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/{_esm-4QBXERIC.js → _esm-GD2BESU2.js} +36 -34
- package/dist/{_esm-4QBXERIC.js.map → _esm-GD2BESU2.js.map} +1 -1
- package/dist/{ccip-POWS7KFG.js → ccip-YKKDCE4N.js} +3 -3
- package/dist/{chunk-Y6LDJZ7L.js → chunk-EPZFKNND.js} +36 -235
- package/dist/chunk-EPZFKNND.js.map +1 -0
- package/dist/{chunk-5LBWQX65.js → chunk-OBYRQQ4V.js} +168 -135
- package/dist/chunk-OBYRQQ4V.js.map +1 -0
- package/dist/internal.js +2 -2
- package/dist/{secp256k1-QCGY4Z6Q.js → secp256k1-ELJ5HZRX.js} +1302 -909
- package/dist/secp256k1-ELJ5HZRX.js.map +1 -0
- package/package.json +8 -8
- package/dist/chunk-5LBWQX65.js.map +0 -1
- package/dist/chunk-Y6LDJZ7L.js.map +0 -1
- package/dist/secp256k1-QCGY4Z6Q.js.map +0 -1
- /package/dist/{ccip-POWS7KFG.js.map → ccip-YKKDCE4N.js.map} +0 -0
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
offchainLookup,
|
|
4
4
|
offchainLookupAbiItem,
|
|
5
5
|
offchainLookupSignature
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-OBYRQQ4V.js";
|
|
7
|
+
import "./chunk-EPZFKNND.js";
|
|
8
8
|
import "./chunk-PR4QN5HX.js";
|
|
9
9
|
export {
|
|
10
10
|
ccipRequest,
|
|
@@ -12,4 +12,4 @@ export {
|
|
|
12
12
|
offchainLookupAbiItem,
|
|
13
13
|
offchainLookupSignature
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=ccip-
|
|
15
|
+
//# sourceMappingURL=ccip-YKKDCE4N.js.map
|
|
@@ -60,82 +60,13 @@ function byteSwap32(arr) {
|
|
|
60
60
|
return arr;
|
|
61
61
|
}
|
|
62
62
|
var swap32IfBE = isLE ? (u) => u : byteSwap32;
|
|
63
|
-
|
|
64
|
-
if (typeof str !== "string")
|
|
65
|
-
throw new Error("string expected");
|
|
66
|
-
return new Uint8Array(new TextEncoder().encode(str));
|
|
67
|
-
}
|
|
68
|
-
function toBytes(data) {
|
|
69
|
-
if (typeof data === "string")
|
|
70
|
-
data = utf8ToBytes(data);
|
|
71
|
-
abytes(data);
|
|
72
|
-
return data;
|
|
73
|
-
}
|
|
74
|
-
function concatBytes(...arrays) {
|
|
75
|
-
let sum = 0;
|
|
76
|
-
for (let i = 0; i < arrays.length; i++) {
|
|
77
|
-
const a = arrays[i];
|
|
78
|
-
abytes(a);
|
|
79
|
-
sum += a.length;
|
|
80
|
-
}
|
|
81
|
-
const res = new Uint8Array(sum);
|
|
82
|
-
for (let i = 0, pad = 0; i < arrays.length; i++) {
|
|
83
|
-
const a = arrays[i];
|
|
84
|
-
res.set(a, pad);
|
|
85
|
-
pad += a.length;
|
|
86
|
-
}
|
|
87
|
-
return res;
|
|
88
|
-
}
|
|
89
|
-
var Hash = class {
|
|
90
|
-
};
|
|
91
|
-
function createHasher(hashCons) {
|
|
92
|
-
const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
|
|
93
|
-
const tmp = hashCons();
|
|
94
|
-
hashC.outputLen = tmp.outputLen;
|
|
95
|
-
hashC.blockLen = tmp.blockLen;
|
|
96
|
-
hashC.create = () => hashCons();
|
|
97
|
-
return hashC;
|
|
98
|
-
}
|
|
99
|
-
function randomBytes(bytesLength = 32) {
|
|
100
|
-
if (crypto && typeof crypto.getRandomValues === "function") {
|
|
101
|
-
return crypto.getRandomValues(new Uint8Array(bytesLength));
|
|
102
|
-
}
|
|
103
|
-
if (crypto && typeof crypto.randomBytes === "function") {
|
|
104
|
-
return Uint8Array.from(crypto.randomBytes(bytesLength));
|
|
105
|
-
}
|
|
106
|
-
throw new Error("crypto.getRandomValues must be defined");
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// ../../node_modules/.pnpm/@noble+curves@1.9.1/node_modules/@noble/curves/esm/abstract/utils.js
|
|
110
|
-
var _0n = /* @__PURE__ */ BigInt(0);
|
|
111
|
-
var _1n = /* @__PURE__ */ BigInt(1);
|
|
112
|
-
function isBytes2(a) {
|
|
113
|
-
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
114
|
-
}
|
|
115
|
-
function abytes2(item) {
|
|
116
|
-
if (!isBytes2(item))
|
|
117
|
-
throw new Error("Uint8Array expected");
|
|
118
|
-
}
|
|
119
|
-
function abool(title, value) {
|
|
120
|
-
if (typeof value !== "boolean")
|
|
121
|
-
throw new Error(title + " boolean expected, got " + value);
|
|
122
|
-
}
|
|
123
|
-
function numberToHexUnpadded(num) {
|
|
124
|
-
const hex = num.toString(16);
|
|
125
|
-
return hex.length & 1 ? "0" + hex : hex;
|
|
126
|
-
}
|
|
127
|
-
function hexToNumber(hex) {
|
|
128
|
-
if (typeof hex !== "string")
|
|
129
|
-
throw new Error("hex string expected, got " + typeof hex);
|
|
130
|
-
return hex === "" ? _0n : BigInt("0x" + hex);
|
|
131
|
-
}
|
|
132
|
-
var hasHexBuiltin = (
|
|
63
|
+
var hasHexBuiltin = /* @__PURE__ */ (() => (
|
|
133
64
|
// @ts-ignore
|
|
134
65
|
typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function"
|
|
135
|
-
);
|
|
66
|
+
))();
|
|
136
67
|
var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
|
|
137
68
|
function bytesToHex(bytes) {
|
|
138
|
-
|
|
69
|
+
abytes(bytes);
|
|
139
70
|
if (hasHexBuiltin)
|
|
140
71
|
return bytes.toHex();
|
|
141
72
|
let hex = "";
|
|
@@ -175,42 +106,22 @@ function hexToBytes(hex) {
|
|
|
175
106
|
}
|
|
176
107
|
return array;
|
|
177
108
|
}
|
|
178
|
-
function
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
abytes2(bytes);
|
|
183
|
-
return hexToNumber(bytesToHex(Uint8Array.from(bytes).reverse()));
|
|
184
|
-
}
|
|
185
|
-
function numberToBytesBE(n, len) {
|
|
186
|
-
return hexToBytes(n.toString(16).padStart(len * 2, "0"));
|
|
187
|
-
}
|
|
188
|
-
function numberToBytesLE(n, len) {
|
|
189
|
-
return numberToBytesBE(n, len).reverse();
|
|
109
|
+
function utf8ToBytes(str) {
|
|
110
|
+
if (typeof str !== "string")
|
|
111
|
+
throw new Error("string expected");
|
|
112
|
+
return new Uint8Array(new TextEncoder().encode(str));
|
|
190
113
|
}
|
|
191
|
-
function
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
} catch (e) {
|
|
197
|
-
throw new Error(title + " must be hex string or Uint8Array, cause: " + e);
|
|
198
|
-
}
|
|
199
|
-
} else if (isBytes2(hex)) {
|
|
200
|
-
res = Uint8Array.from(hex);
|
|
201
|
-
} else {
|
|
202
|
-
throw new Error(title + " must be hex string or Uint8Array");
|
|
203
|
-
}
|
|
204
|
-
const len = res.length;
|
|
205
|
-
if (typeof expectedLength === "number" && len !== expectedLength)
|
|
206
|
-
throw new Error(title + " of length " + expectedLength + " expected, got " + len);
|
|
207
|
-
return res;
|
|
114
|
+
function toBytes(data) {
|
|
115
|
+
if (typeof data === "string")
|
|
116
|
+
data = utf8ToBytes(data);
|
|
117
|
+
abytes(data);
|
|
118
|
+
return data;
|
|
208
119
|
}
|
|
209
|
-
function
|
|
120
|
+
function concatBytes(...arrays) {
|
|
210
121
|
let sum = 0;
|
|
211
122
|
for (let i = 0; i < arrays.length; i++) {
|
|
212
123
|
const a = arrays[i];
|
|
213
|
-
|
|
124
|
+
abytes(a);
|
|
214
125
|
sum += a.length;
|
|
215
126
|
}
|
|
216
127
|
const res = new Uint8Array(sum);
|
|
@@ -221,115 +132,24 @@ function concatBytes2(...arrays) {
|
|
|
221
132
|
}
|
|
222
133
|
return res;
|
|
223
134
|
}
|
|
224
|
-
|
|
225
|
-
if (typeof str !== "string")
|
|
226
|
-
throw new Error("string expected");
|
|
227
|
-
return new Uint8Array(new TextEncoder().encode(str));
|
|
228
|
-
}
|
|
229
|
-
var isPosBig = (n) => typeof n === "bigint" && _0n <= n;
|
|
230
|
-
function inRange(n, min, max) {
|
|
231
|
-
return isPosBig(n) && isPosBig(min) && isPosBig(max) && min <= n && n < max;
|
|
232
|
-
}
|
|
233
|
-
function aInRange(title, n, min, max) {
|
|
234
|
-
if (!inRange(n, min, max))
|
|
235
|
-
throw new Error("expected valid " + title + ": " + min + " <= n < " + max + ", got " + n);
|
|
236
|
-
}
|
|
237
|
-
function bitLen(n) {
|
|
238
|
-
let len;
|
|
239
|
-
for (len = 0; n > _0n; n >>= _1n, len += 1)
|
|
240
|
-
;
|
|
241
|
-
return len;
|
|
242
|
-
}
|
|
243
|
-
var bitMask = (n) => (_1n << BigInt(n)) - _1n;
|
|
244
|
-
var u8n = (len) => new Uint8Array(len);
|
|
245
|
-
var u8fr = (arr) => Uint8Array.from(arr);
|
|
246
|
-
function createHmacDrbg(hashLen, qByteLen, hmacFn) {
|
|
247
|
-
if (typeof hashLen !== "number" || hashLen < 2)
|
|
248
|
-
throw new Error("hashLen must be a number");
|
|
249
|
-
if (typeof qByteLen !== "number" || qByteLen < 2)
|
|
250
|
-
throw new Error("qByteLen must be a number");
|
|
251
|
-
if (typeof hmacFn !== "function")
|
|
252
|
-
throw new Error("hmacFn must be a function");
|
|
253
|
-
let v = u8n(hashLen);
|
|
254
|
-
let k = u8n(hashLen);
|
|
255
|
-
let i = 0;
|
|
256
|
-
const reset = () => {
|
|
257
|
-
v.fill(1);
|
|
258
|
-
k.fill(0);
|
|
259
|
-
i = 0;
|
|
260
|
-
};
|
|
261
|
-
const h = (...b) => hmacFn(k, v, ...b);
|
|
262
|
-
const reseed = (seed = u8n(0)) => {
|
|
263
|
-
k = h(u8fr([0]), seed);
|
|
264
|
-
v = h();
|
|
265
|
-
if (seed.length === 0)
|
|
266
|
-
return;
|
|
267
|
-
k = h(u8fr([1]), seed);
|
|
268
|
-
v = h();
|
|
269
|
-
};
|
|
270
|
-
const gen = () => {
|
|
271
|
-
if (i++ >= 1e3)
|
|
272
|
-
throw new Error("drbg: tried 1000 values");
|
|
273
|
-
let len = 0;
|
|
274
|
-
const out = [];
|
|
275
|
-
while (len < qByteLen) {
|
|
276
|
-
v = h();
|
|
277
|
-
const sl = v.slice();
|
|
278
|
-
out.push(sl);
|
|
279
|
-
len += v.length;
|
|
280
|
-
}
|
|
281
|
-
return concatBytes2(...out);
|
|
282
|
-
};
|
|
283
|
-
const genUntil = (seed, pred) => {
|
|
284
|
-
reset();
|
|
285
|
-
reseed(seed);
|
|
286
|
-
let res = void 0;
|
|
287
|
-
while (!(res = pred(gen())))
|
|
288
|
-
reseed();
|
|
289
|
-
reset();
|
|
290
|
-
return res;
|
|
291
|
-
};
|
|
292
|
-
return genUntil;
|
|
293
|
-
}
|
|
294
|
-
var validatorFns = {
|
|
295
|
-
bigint: (val) => typeof val === "bigint",
|
|
296
|
-
function: (val) => typeof val === "function",
|
|
297
|
-
boolean: (val) => typeof val === "boolean",
|
|
298
|
-
string: (val) => typeof val === "string",
|
|
299
|
-
stringOrUint8Array: (val) => typeof val === "string" || isBytes2(val),
|
|
300
|
-
isSafeInteger: (val) => Number.isSafeInteger(val),
|
|
301
|
-
array: (val) => Array.isArray(val),
|
|
302
|
-
field: (val, object) => object.Fp.isValid(val),
|
|
303
|
-
hash: (val) => typeof val === "function" && Number.isSafeInteger(val.outputLen)
|
|
135
|
+
var Hash = class {
|
|
304
136
|
};
|
|
305
|
-
function
|
|
306
|
-
const
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
return;
|
|
313
|
-
if (!checkVal(val, object)) {
|
|
314
|
-
throw new Error("param " + String(fieldName) + " is invalid. Expected " + type + ", got " + val);
|
|
315
|
-
}
|
|
316
|
-
};
|
|
317
|
-
for (const [fieldName, type] of Object.entries(validators))
|
|
318
|
-
checkField(fieldName, type, false);
|
|
319
|
-
for (const [fieldName, type] of Object.entries(optValidators))
|
|
320
|
-
checkField(fieldName, type, true);
|
|
321
|
-
return object;
|
|
137
|
+
function createHasher(hashCons) {
|
|
138
|
+
const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
|
|
139
|
+
const tmp = hashCons();
|
|
140
|
+
hashC.outputLen = tmp.outputLen;
|
|
141
|
+
hashC.blockLen = tmp.blockLen;
|
|
142
|
+
hashC.create = () => hashCons();
|
|
143
|
+
return hashC;
|
|
322
144
|
}
|
|
323
|
-
function
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
return computed;
|
|
332
|
-
};
|
|
145
|
+
function randomBytes(bytesLength = 32) {
|
|
146
|
+
if (crypto && typeof crypto.getRandomValues === "function") {
|
|
147
|
+
return crypto.getRandomValues(new Uint8Array(bytesLength));
|
|
148
|
+
}
|
|
149
|
+
if (crypto && typeof crypto.randomBytes === "function") {
|
|
150
|
+
return Uint8Array.from(crypto.randomBytes(bytesLength));
|
|
151
|
+
}
|
|
152
|
+
throw new Error("crypto.getRandomValues must be defined");
|
|
333
153
|
}
|
|
334
154
|
|
|
335
155
|
// ../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/esm/_u64.js
|
|
@@ -361,6 +181,7 @@ export {
|
|
|
361
181
|
rotlSL,
|
|
362
182
|
rotlBH,
|
|
363
183
|
rotlBL,
|
|
184
|
+
isBytes,
|
|
364
185
|
anumber,
|
|
365
186
|
abytes,
|
|
366
187
|
ahash,
|
|
@@ -371,38 +192,18 @@ export {
|
|
|
371
192
|
createView,
|
|
372
193
|
rotr,
|
|
373
194
|
swap32IfBE,
|
|
195
|
+
bytesToHex,
|
|
196
|
+
hexToBytes,
|
|
197
|
+
utf8ToBytes,
|
|
374
198
|
toBytes,
|
|
375
199
|
concatBytes,
|
|
376
200
|
Hash,
|
|
377
201
|
createHasher,
|
|
378
|
-
randomBytes
|
|
379
|
-
isBytes2 as isBytes,
|
|
380
|
-
abytes2,
|
|
381
|
-
abool,
|
|
382
|
-
numberToHexUnpadded,
|
|
383
|
-
bytesToHex,
|
|
384
|
-
hexToBytes,
|
|
385
|
-
bytesToNumberBE,
|
|
386
|
-
bytesToNumberLE,
|
|
387
|
-
numberToBytesBE,
|
|
388
|
-
numberToBytesLE,
|
|
389
|
-
ensureBytes,
|
|
390
|
-
concatBytes2,
|
|
391
|
-
utf8ToBytes2 as utf8ToBytes,
|
|
392
|
-
inRange,
|
|
393
|
-
aInRange,
|
|
394
|
-
bitLen,
|
|
395
|
-
bitMask,
|
|
396
|
-
createHmacDrbg,
|
|
397
|
-
validateObject,
|
|
398
|
-
memoized
|
|
202
|
+
randomBytes
|
|
399
203
|
};
|
|
400
204
|
/*! Bundled license information:
|
|
401
205
|
|
|
402
206
|
@noble/hashes/esm/utils.js:
|
|
403
207
|
(*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
404
|
-
|
|
405
|
-
@noble/curves/esm/abstract/utils.js:
|
|
406
|
-
(*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
|
|
407
208
|
*/
|
|
408
|
-
//# sourceMappingURL=chunk-
|
|
209
|
+
//# sourceMappingURL=chunk-EPZFKNND.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/src/cryptoNode.ts","../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/src/utils.ts","../../../node_modules/.pnpm/@noble+hashes@1.8.0/node_modules/@noble/hashes/src/_u64.ts"],"sourcesContent":["/**\n * Internal webcrypto alias.\n * We prefer WebCrypto aka globalThis.crypto, which exists in node.js 16+.\n * Falls back to Node.js built-in crypto for Node.js <=v14.\n * See utils.ts for details.\n * @module\n */\n// @ts-ignore\nimport * as nc from 'node:crypto';\nexport const crypto: any =\n nc && typeof nc === 'object' && 'webcrypto' in nc\n ? (nc.webcrypto as any)\n : nc && typeof nc === 'object' && 'randomBytes' in nc\n ? nc\n : undefined;\n","/**\n * Utilities for hex, bytes, CSPRNG.\n * @module\n */\n/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\n\n/** Checks if something is Uint8Array. Be careful: nodejs Buffer will return true. */\nexport function isBytes(a: unknown): a is Uint8Array {\n return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\n\n/** Asserts something is positive integer. */\nexport function anumber(n: number): void {\n if (!Number.isSafeInteger(n) || n < 0) throw new Error('positive integer expected, got ' + n);\n}\n\n/** Asserts something is Uint8Array. */\nexport function abytes(b: Uint8Array | undefined, ...lengths: number[]): void {\n if (!isBytes(b)) throw new Error('Uint8Array expected');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error('Uint8Array expected of length ' + lengths + ', got length=' + b.length);\n}\n\n/** Asserts something is hash */\nexport function ahash(h: IHash): void {\n if (typeof h !== 'function' || typeof h.create !== 'function')\n throw new Error('Hash should be wrapped by utils.createHasher');\n anumber(h.outputLen);\n anumber(h.blockLen);\n}\n\n/** Asserts a hash instance has not been destroyed / finished */\nexport function aexists(instance: any, checkFinished = true): void {\n if (instance.destroyed) throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished) throw new Error('Hash#digest() has already been called');\n}\n\n/** Asserts output is properly-sized byte array */\nexport function aoutput(out: any, instance: any): void {\n abytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error('digestInto() expects output buffer of length at least ' + min);\n }\n}\n\n/** Generic type encompassing 8/16/32-byte arrays - but not 64-byte. */\n// prettier-ignore\nexport type TypedArray = Int8Array | Uint8ClampedArray | Uint8Array |\n Uint16Array | Int16Array | Uint32Array | Int32Array;\n\n/** Cast u8 / u16 / u32 to u8. */\nexport function u8(arr: TypedArray): Uint8Array {\n return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\n}\n\n/** Cast u8 / u16 / u32 to u32. */\nexport function u32(arr: TypedArray): Uint32Array {\n return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n}\n\n/** Zeroize a byte array. Warning: JS provides no guarantees. */\nexport function clean(...arrays: TypedArray[]): void {\n for (let i = 0; i < arrays.length; i++) {\n arrays[i].fill(0);\n }\n}\n\n/** Create DataView of an array for easy byte-level manipulation. */\nexport function createView(arr: TypedArray): DataView {\n return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n}\n\n/** The rotate right (circular right shift) operation for uint32 */\nexport function rotr(word: number, shift: number): number {\n return (word << (32 - shift)) | (word >>> shift);\n}\n\n/** The rotate left (circular left shift) operation for uint32 */\nexport function rotl(word: number, shift: number): number {\n return (word << shift) | ((word >>> (32 - shift)) >>> 0);\n}\n\n/** Is current platform little-endian? Most are. Big-Endian platform: IBM */\nexport const isLE: boolean = /* @__PURE__ */ (() =>\n new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44)();\n\n/** The byte swap operation for uint32 */\nexport function byteSwap(word: number): number {\n return (\n ((word << 24) & 0xff000000) |\n ((word << 8) & 0xff0000) |\n ((word >>> 8) & 0xff00) |\n ((word >>> 24) & 0xff)\n );\n}\n/** Conditionally byte swap if on a big-endian platform */\nexport const swap8IfBE: (n: number) => number = isLE\n ? (n: number) => n\n : (n: number) => byteSwap(n);\n\n/** @deprecated */\nexport const byteSwapIfBE: typeof swap8IfBE = swap8IfBE;\n/** In place byte swap for Uint32Array */\nexport function byteSwap32(arr: Uint32Array): Uint32Array {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = byteSwap(arr[i]);\n }\n return arr;\n}\n\nexport const swap32IfBE: (u: Uint32Array) => Uint32Array = isLE\n ? (u: Uint32Array) => u\n : byteSwap32;\n\n// Built-in hex conversion https://caniuse.com/mdn-javascript_builtins_uint8array_fromhex\nconst hasHexBuiltin: boolean = /* @__PURE__ */ (() =>\n // @ts-ignore\n typeof Uint8Array.from([]).toHex === 'function' && typeof Uint8Array.fromHex === 'function')();\n\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) =>\n i.toString(16).padStart(2, '0')\n);\n\n/**\n * Convert byte array to hex string. Uses built-in function, when available.\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes: Uint8Array): string {\n abytes(bytes);\n // @ts-ignore\n if (hasHexBuiltin) return bytes.toHex();\n // pre-caching improves the speed 6x\n let hex = '';\n for (let i = 0; i < bytes.length; i++) {\n hex += hexes[bytes[i]];\n }\n return hex;\n}\n\n// We use optimized technique to convert hex string to byte array\nconst asciis = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 } as const;\nfunction asciiToBase16(ch: number): number | undefined {\n if (ch >= asciis._0 && ch <= asciis._9) return ch - asciis._0; // '2' => 50-48\n if (ch >= asciis.A && ch <= asciis.F) return ch - (asciis.A - 10); // 'B' => 66-(65-10)\n if (ch >= asciis.a && ch <= asciis.f) return ch - (asciis.a - 10); // 'b' => 98-(97-10)\n return;\n}\n\n/**\n * Convert hex string to byte array. Uses built-in function, when available.\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex: string): Uint8Array {\n if (typeof hex !== 'string') throw new Error('hex string expected, got ' + typeof hex);\n // @ts-ignore\n if (hasHexBuiltin) return Uint8Array.fromHex(hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2) throw new Error('hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2; // multiply first octet, e.g. 'a3' => 10*16+3 => 160 + 3 => 163\n }\n return array;\n}\n\n/**\n * There is no setImmediate in browser and setTimeout is slow.\n * Call of async fn will return Promise, which will be fullfiled only on\n * next scheduler queue processing step and this is exactly what we need.\n */\nexport const nextTick = async (): Promise<void> => {};\n\n/** Returns control to thread each 'tick' ms to avoid blocking. */\nexport async function asyncLoop(\n iters: number,\n tick: number,\n cb: (i: number) => void\n): Promise<void> {\n let ts = Date.now();\n for (let i = 0; i < iters; i++) {\n cb(i);\n // Date.now() is not monotonic, so in case if clock goes backwards we return return control too\n const diff = Date.now() - ts;\n if (diff >= 0 && diff < tick) continue;\n await nextTick();\n ts += diff;\n }\n}\n\n// Global symbols, but ts doesn't see them: https://github.com/microsoft/TypeScript/issues/31535\ndeclare const TextEncoder: any;\ndeclare const TextDecoder: any;\n\n/**\n * Converts string to bytes using UTF8 encoding.\n * @example utf8ToBytes('abc') // Uint8Array.from([97, 98, 99])\n */\nexport function utf8ToBytes(str: string): Uint8Array {\n if (typeof str !== 'string') throw new Error('string expected');\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n\n/**\n * Converts bytes to string using UTF8 encoding.\n * @example bytesToUtf8(Uint8Array.from([97, 98, 99])) // 'abc'\n */\nexport function bytesToUtf8(bytes: Uint8Array): string {\n return new TextDecoder().decode(bytes);\n}\n\n/** Accepted input of hash functions. Strings are converted to byte arrays. */\nexport type Input = string | Uint8Array;\n/**\n * Normalizes (non-hex) string or Uint8Array to Uint8Array.\n * Warning: when Uint8Array is passed, it would NOT get copied.\n * Keep in mind for future mutable operations.\n */\nexport function toBytes(data: Input): Uint8Array {\n if (typeof data === 'string') data = utf8ToBytes(data);\n abytes(data);\n return data;\n}\n\n/** KDFs can accept string or Uint8Array for user convenience. */\nexport type KDFInput = string | Uint8Array;\n/**\n * Helper for KDFs: consumes uint8array or string.\n * When string is passed, does utf8 decoding, using TextDecoder.\n */\nexport function kdfInputToBytes(data: KDFInput): Uint8Array {\n if (typeof data === 'string') data = utf8ToBytes(data);\n abytes(data);\n return data;\n}\n\n/** Copies several Uint8Arrays into one. */\nexport function concatBytes(...arrays: Uint8Array[]): Uint8Array {\n let sum = 0;\n for (let i = 0; i < arrays.length; i++) {\n const a = arrays[i];\n abytes(a);\n sum += a.length;\n }\n const res = new Uint8Array(sum);\n for (let i = 0, pad = 0; i < arrays.length; i++) {\n const a = arrays[i];\n res.set(a, pad);\n pad += a.length;\n }\n return res;\n}\n\ntype EmptyObj = {};\nexport function checkOpts<T1 extends EmptyObj, T2 extends EmptyObj>(\n defaults: T1,\n opts?: T2\n): T1 & T2 {\n if (opts !== undefined && {}.toString.call(opts) !== '[object Object]')\n throw new Error('options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged as T1 & T2;\n}\n\n/** Hash interface. */\nexport type IHash = {\n (data: Uint8Array): Uint8Array;\n blockLen: number;\n outputLen: number;\n create: any;\n};\n\n/** For runtime check if class implements interface */\nexport abstract class Hash<T extends Hash<T>> {\n abstract blockLen: number; // Bytes per block\n abstract outputLen: number; // Bytes in output\n abstract update(buf: Input): this;\n // Writes digest into buf\n abstract digestInto(buf: Uint8Array): void;\n abstract digest(): Uint8Array;\n /**\n * Resets internal state. Makes Hash instance unusable.\n * Reset is impossible for keyed hashes if key is consumed into state. If digest is not consumed\n * by user, they will need to manually call `destroy()` when zeroing is necessary.\n */\n abstract destroy(): void;\n /**\n * Clones hash instance. Unsafe: doesn't check whether `to` is valid. Can be used as `clone()`\n * when no options are passed.\n * Reasons to use `_cloneInto` instead of clone: 1) performance 2) reuse instance => all internal\n * buffers are overwritten => causes buffer overwrite which is used for digest in some cases.\n * There are no guarantees for clean-up because it's impossible in JS.\n */\n abstract _cloneInto(to?: T): T;\n // Safe version that clones internal state\n abstract clone(): T;\n}\n\n/**\n * XOF: streaming API to read digest in chunks.\n * Same as 'squeeze' in keccak/k12 and 'seek' in blake3, but more generic name.\n * When hash used in XOF mode it is up to user to call '.destroy' afterwards, since we cannot\n * destroy state, next call can require more bytes.\n */\nexport type HashXOF<T extends Hash<T>> = Hash<T> & {\n xof(bytes: number): Uint8Array; // Read 'bytes' bytes from digest stream\n xofInto(buf: Uint8Array): Uint8Array; // read buf.length bytes from digest stream into buf\n};\n\n/** Hash function */\nexport type CHash = ReturnType<typeof createHasher>;\n/** Hash function with output */\nexport type CHashO = ReturnType<typeof createOptHasher>;\n/** XOF with output */\nexport type CHashXO = ReturnType<typeof createXOFer>;\n\n/** Wraps hash function, creating an interface on top of it */\nexport function createHasher<T extends Hash<T>>(\n hashCons: () => Hash<T>\n): {\n (msg: Input): Uint8Array;\n outputLen: number;\n blockLen: number;\n create(): Hash<T>;\n} {\n const hashC = (msg: Input): Uint8Array => hashCons().update(toBytes(msg)).digest();\n const tmp = hashCons();\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = () => hashCons();\n return hashC;\n}\n\nexport function createOptHasher<H extends Hash<H>, T extends Object>(\n hashCons: (opts?: T) => Hash<H>\n): {\n (msg: Input, opts?: T): Uint8Array;\n outputLen: number;\n blockLen: number;\n create(opts?: T): Hash<H>;\n} {\n const hashC = (msg: Input, opts?: T): Uint8Array => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({} as T);\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts?: T) => hashCons(opts);\n return hashC;\n}\n\nexport function createXOFer<H extends HashXOF<H>, T extends Object>(\n hashCons: (opts?: T) => HashXOF<H>\n): {\n (msg: Input, opts?: T): Uint8Array;\n outputLen: number;\n blockLen: number;\n create(opts?: T): HashXOF<H>;\n} {\n const hashC = (msg: Input, opts?: T): Uint8Array => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({} as T);\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts?: T) => hashCons(opts);\n return hashC;\n}\nexport const wrapConstructor: typeof createHasher = createHasher;\nexport const wrapConstructorWithOpts: typeof createOptHasher = createOptHasher;\nexport const wrapXOFConstructorWithOpts: typeof createXOFer = createXOFer;\n\n/** Cryptographically secure PRNG. Uses internal OS-level `crypto.getRandomValues`. */\nexport function randomBytes(bytesLength = 32): Uint8Array {\n if (crypto && typeof crypto.getRandomValues === 'function') {\n return crypto.getRandomValues(new Uint8Array(bytesLength));\n }\n // Legacy Node.js compatibility\n if (crypto && typeof crypto.randomBytes === 'function') {\n return Uint8Array.from(crypto.randomBytes(bytesLength));\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n","/**\n * Internal helpers for u64. BigUint64Array is too slow as per 2025, so we implement it using Uint32Array.\n * @todo re-check https://issues.chromium.org/issues/42212588\n * @module\n */\nconst U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n\nfunction fromBig(\n n: bigint,\n le = false\n): {\n h: number;\n l: number;\n} {\n if (le) return { h: Number(n & U32_MASK64), l: Number((n >> _32n) & U32_MASK64) };\n return { h: Number((n >> _32n) & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };\n}\n\nfunction split(lst: bigint[], le = false): Uint32Array[] {\n const len = lst.length;\n let Ah = new Uint32Array(len);\n let Al = new Uint32Array(len);\n for (let i = 0; i < len; i++) {\n const { h, l } = fromBig(lst[i], le);\n [Ah[i], Al[i]] = [h, l];\n }\n return [Ah, Al];\n}\n\nconst toBig = (h: number, l: number): bigint => (BigInt(h >>> 0) << _32n) | BigInt(l >>> 0);\n// for Shift in [0, 32)\nconst shrSH = (h: number, _l: number, s: number): number => h >>> s;\nconst shrSL = (h: number, l: number, s: number): number => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in [1, 32)\nconst rotrSH = (h: number, l: number, s: number): number => (h >>> s) | (l << (32 - s));\nconst rotrSL = (h: number, l: number, s: number): number => (h << (32 - s)) | (l >>> s);\n// Right rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotrBH = (h: number, l: number, s: number): number => (h << (64 - s)) | (l >>> (s - 32));\nconst rotrBL = (h: number, l: number, s: number): number => (h >>> (s - 32)) | (l << (64 - s));\n// Right rotate for shift===32 (just swaps l&h)\nconst rotr32H = (_h: number, l: number): number => l;\nconst rotr32L = (h: number, _l: number): number => h;\n// Left rotate for Shift in [1, 32)\nconst rotlSH = (h: number, l: number, s: number): number => (h << s) | (l >>> (32 - s));\nconst rotlSL = (h: number, l: number, s: number): number => (l << s) | (h >>> (32 - s));\n// Left rotate for Shift in (32, 64), NOTE: 32 is special case.\nconst rotlBH = (h: number, l: number, s: number): number => (l << (s - 32)) | (h >>> (64 - s));\nconst rotlBL = (h: number, l: number, s: number): number => (h << (s - 32)) | (l >>> (64 - s));\n\n// JS uses 32-bit signed integers for bitwise operations which means we cannot\n// simple take carry out of low bit sum by shift, we need to use division.\nfunction add(\n Ah: number,\n Al: number,\n Bh: number,\n Bl: number\n): {\n h: number;\n l: number;\n} {\n const l = (Al >>> 0) + (Bl >>> 0);\n return { h: (Ah + Bh + ((l / 2 ** 32) | 0)) | 0, l: l | 0 };\n}\n// Addition with more than 2 elements\nconst add3L = (Al: number, Bl: number, Cl: number): number => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);\nconst add3H = (low: number, Ah: number, Bh: number, Ch: number): number =>\n (Ah + Bh + Ch + ((low / 2 ** 32) | 0)) | 0;\nconst add4L = (Al: number, Bl: number, Cl: number, Dl: number): number =>\n (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);\nconst add4H = (low: number, Ah: number, Bh: number, Ch: number, Dh: number): number =>\n (Ah + Bh + Ch + Dh + ((low / 2 ** 32) | 0)) | 0;\nconst add5L = (Al: number, Bl: number, Cl: number, Dl: number, El: number): number =>\n (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);\nconst add5H = (low: number, Ah: number, Bh: number, Ch: number, Dh: number, Eh: number): number =>\n (Ah + Bh + Ch + Dh + Eh + ((low / 2 ** 32) | 0)) | 0;\n\n// prettier-ignore\nexport {\n add, add3H, add3L, add4H, add4L, add5H, add5L, fromBig, rotlBH, rotlBL, rotlSH, rotlSL, rotr32H, rotr32L, rotrBH, rotrBL, rotrSH, rotrSL, shrSH, shrSL, split, toBig\n};\n// prettier-ignore\nconst u64: { fromBig: typeof fromBig; split: typeof split; toBig: (h: number, l: number) => bigint; shrSH: (h: number, _l: number, s: number) => number; shrSL: (h: number, l: number, s: number) => number; rotrSH: (h: number, l: number, s: number) => number; rotrSL: (h: number, l: number, s: number) => number; rotrBH: (h: number, l: number, s: number) => number; rotrBL: (h: number, l: number, s: number) => number; rotr32H: (_h: number, l: number) => number; rotr32L: (h: number, _l: number) => number; rotlSH: (h: number, l: number, s: number) => number; rotlSL: (h: number, l: number, s: number) => number; rotlBH: (h: number, l: number, s: number) => number; rotlBL: (h: number, l: number, s: number) => number; add: typeof add; add3L: (Al: number, Bl: number, Cl: number) => number; add3H: (low: number, Ah: number, Bh: number, Ch: number) => number; add4L: (Al: number, Bl: number, Cl: number, Dl: number) => number; add4H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number) => number; add5H: (low: number, Ah: number, Bh: number, Ch: number, Dh: number, Eh: number) => number; add5L: (Al: number, Bl: number, Cl: number, Dl: number, El: number) => number; } = {\n fromBig, split, toBig,\n shrSH, shrSL,\n rotrSH, rotrSL, rotrBH, rotrBL,\n rotr32H, rotr32L,\n rotlSH, rotlSL, rotlBH, rotlBL,\n add, add3L, add3H, add4L, add4H, add5H, add5L,\n};\nexport default u64;\n"],"mappings":";AAQA,YAAY,QAAQ;AACb,IAAM,SACX,MAAM,OAAO,OAAO,YAAY,eAAe,KACvC,eACJ,MAAM,OAAO,OAAO,YAAY,iBAAiB,KAC/C,KACA;;;ACCF,SAAU,QAAQ,GAAU;AAChC,SAAO,aAAa,cAAe,YAAY,OAAO,CAAC,KAAK,EAAE,YAAY,SAAS;AACrF;AAGM,SAAU,QAAQ,GAAS;AAC/B,MAAI,CAAC,OAAO,cAAc,CAAC,KAAK,IAAI;AAAG,UAAM,IAAI,MAAM,oCAAoC,CAAC;AAC9F;AAGM,SAAU,OAAO,MAA8B,SAAiB;AACpE,MAAI,CAAC,QAAQ,CAAC;AAAG,UAAM,IAAI,MAAM,qBAAqB;AACtD,MAAI,QAAQ,SAAS,KAAK,CAAC,QAAQ,SAAS,EAAE,MAAM;AAClD,UAAM,IAAI,MAAM,mCAAmC,UAAU,kBAAkB,EAAE,MAAM;AAC3F;AAGM,SAAU,MAAM,GAAQ;AAC5B,MAAI,OAAO,MAAM,cAAc,OAAO,EAAE,WAAW;AACjD,UAAM,IAAI,MAAM,8CAA8C;AAChE,UAAQ,EAAE,SAAS;AACnB,UAAQ,EAAE,QAAQ;AACpB;AAGM,SAAU,QAAQ,UAAe,gBAAgB,MAAI;AACzD,MAAI,SAAS;AAAW,UAAM,IAAI,MAAM,kCAAkC;AAC1E,MAAI,iBAAiB,SAAS;AAAU,UAAM,IAAI,MAAM,uCAAuC;AACjG;AAGM,SAAU,QAAQ,KAAU,UAAa;AAC7C,SAAO,GAAG;AACV,QAAM,MAAM,SAAS;AACrB,MAAI,IAAI,SAAS,KAAK;AACpB,UAAM,IAAI,MAAM,2DAA2D,GAAG;EAChF;AACF;AAaM,S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