@settlemint/sdk-mcp 2.2.0 → 2.2.1
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/README.md +0 -2
- package/dist/mcp.js +572 -464
- package/dist/mcp.js.map +25 -27
- package/package.json +3 -3
package/dist/mcp.js
CHANGED
|
@@ -25,11 +25,11 @@ var require_version = __commonJS((exports) => {
|
|
|
25
25
|
value: true
|
|
26
26
|
});
|
|
27
27
|
exports.versionInfo = exports.version = undefined;
|
|
28
|
-
var version = "16.
|
|
28
|
+
var version = "16.11.0";
|
|
29
29
|
exports.version = version;
|
|
30
30
|
var versionInfo = Object.freeze({
|
|
31
31
|
major: 16,
|
|
32
|
-
minor:
|
|
32
|
+
minor: 11,
|
|
33
33
|
patch: 0,
|
|
34
34
|
preReleaseTag: null
|
|
35
35
|
});
|
|
@@ -2631,7 +2631,7 @@ var require_visitor = __commonJS((exports) => {
|
|
|
2631
2631
|
}
|
|
2632
2632
|
}
|
|
2633
2633
|
} else {
|
|
2634
|
-
node =
|
|
2634
|
+
node = { ...node };
|
|
2635
2635
|
for (const [editKey, editValue] of edits) {
|
|
2636
2636
|
node[editKey] = editValue;
|
|
2637
2637
|
}
|
|
@@ -7108,7 +7108,7 @@ var require_coerceInputValue = __commonJS((exports) => {
|
|
|
7108
7108
|
return [coerceInputValueImpl(inputValue, itemType, onError, path)];
|
|
7109
7109
|
}
|
|
7110
7110
|
if ((0, _definition.isInputObjectType)(type)) {
|
|
7111
|
-
if (!(0, _isObjectLike.isObjectLike)(inputValue)) {
|
|
7111
|
+
if (!(0, _isObjectLike.isObjectLike)(inputValue) || Array.isArray(inputValue)) {
|
|
7112
7112
|
onError((0, _Path.pathToArray)(path), inputValue, new _GraphQLError.GraphQLError(`Expected type "${type.name}" to be an object.`));
|
|
7113
7113
|
return;
|
|
7114
7114
|
}
|
|
@@ -8246,7 +8246,7 @@ var require_VariablesInAllowedPositionRule = __commonJS((exports) => {
|
|
|
8246
8246
|
},
|
|
8247
8247
|
leave(operation) {
|
|
8248
8248
|
const usages = context.getRecursiveVariableUsages(operation);
|
|
8249
|
-
for (const { node, type, defaultValue } of usages) {
|
|
8249
|
+
for (const { node, type, defaultValue, parentType } of usages) {
|
|
8250
8250
|
const varName = node.name.value;
|
|
8251
8251
|
const varDef = varDefMap[varName];
|
|
8252
8252
|
if (varDef && type) {
|
|
@@ -8259,6 +8259,11 @@ var require_VariablesInAllowedPositionRule = __commonJS((exports) => {
|
|
|
8259
8259
|
nodes: [varDef, node]
|
|
8260
8260
|
}));
|
|
8261
8261
|
}
|
|
8262
|
+
if ((0, _definition.isInputObjectType)(parentType) && parentType.isOneOf && (0, _definition.isNullableType)(varType)) {
|
|
8263
|
+
context.reportError(new _GraphQLError.GraphQLError(`Variable "$${varName}" is of type "${varType}" but must be non-nullable to be used for OneOf Input Object "${parentType}".`, {
|
|
8264
|
+
nodes: [varDef, node]
|
|
8265
|
+
}));
|
|
8266
|
+
}
|
|
8262
8267
|
}
|
|
8263
8268
|
}
|
|
8264
8269
|
}
|
|
@@ -8504,7 +8509,8 @@ var require_ValidationContext = __commonJS((exports) => {
|
|
|
8504
8509
|
newUsages.push({
|
|
8505
8510
|
node: variable,
|
|
8506
8511
|
type: typeInfo.getInputType(),
|
|
8507
|
-
defaultValue: typeInfo.getDefaultValue()
|
|
8512
|
+
defaultValue: typeInfo.getDefaultValue(),
|
|
8513
|
+
parentType: typeInfo.getParentInputType()
|
|
8508
8514
|
});
|
|
8509
8515
|
}
|
|
8510
8516
|
}));
|
|
@@ -8809,7 +8815,7 @@ var require_execute = __commonJS((exports) => {
|
|
|
8809
8815
|
rawVariableValues == null || (0, _isObjectLike.isObjectLike)(rawVariableValues) || (0, _devAssert.devAssert)(false, "Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.");
|
|
8810
8816
|
}
|
|
8811
8817
|
function buildExecutionContext(args) {
|
|
8812
|
-
var _definition$name, _operation$variableDe;
|
|
8818
|
+
var _definition$name, _operation$variableDe, _options$maxCoercionE;
|
|
8813
8819
|
const {
|
|
8814
8820
|
schema,
|
|
8815
8821
|
document,
|
|
@@ -8819,7 +8825,8 @@ var require_execute = __commonJS((exports) => {
|
|
|
8819
8825
|
operationName,
|
|
8820
8826
|
fieldResolver,
|
|
8821
8827
|
typeResolver,
|
|
8822
|
-
subscribeFieldResolver
|
|
8828
|
+
subscribeFieldResolver,
|
|
8829
|
+
options
|
|
8823
8830
|
} = args;
|
|
8824
8831
|
let operation;
|
|
8825
8832
|
const fragments = Object.create(null);
|
|
@@ -8853,7 +8860,7 @@ var require_execute = __commonJS((exports) => {
|
|
|
8853
8860
|
}
|
|
8854
8861
|
const variableDefinitions = (_operation$variableDe = operation.variableDefinitions) !== null && _operation$variableDe !== undefined ? _operation$variableDe : [];
|
|
8855
8862
|
const coercedVariableValues = (0, _values.getVariableValues)(schema, variableDefinitions, rawVariableValues !== null && rawVariableValues !== undefined ? rawVariableValues : {}, {
|
|
8856
|
-
maxErrors: 50
|
|
8863
|
+
maxErrors: (_options$maxCoercionE = options === null || options === undefined ? undefined : options.maxCoercionErrors) !== null && _options$maxCoercionE !== undefined ? _options$maxCoercionE : 50
|
|
8857
8864
|
});
|
|
8858
8865
|
if (coercedVariableValues.errors) {
|
|
8859
8866
|
return coercedVariableValues.errors;
|
|
@@ -28814,21 +28821,54 @@ var require_webcrypto = __commonJS((exports) => {
|
|
|
28814
28821
|
exports.gcm = /* @__PURE__ */ (() => generate(mode.GCM))();
|
|
28815
28822
|
});
|
|
28816
28823
|
|
|
28817
|
-
// ../../node_modules/@noble/hashes/
|
|
28818
|
-
var
|
|
28824
|
+
// ../../node_modules/eciesjs/node_modules/@noble/hashes/cryptoNode.js
|
|
28825
|
+
var require_cryptoNode2 = __commonJS((exports) => {
|
|
28826
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28827
|
+
exports.crypto = undefined;
|
|
28828
|
+
var nc = __require("node:crypto");
|
|
28829
|
+
exports.crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && ("randomBytes" in nc) ? nc : undefined;
|
|
28830
|
+
});
|
|
28831
|
+
|
|
28832
|
+
// ../../node_modules/eciesjs/node_modules/@noble/hashes/utils.js
|
|
28833
|
+
var require_utils7 = __commonJS((exports) => {
|
|
28834
|
+
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
28819
28835
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28836
|
+
exports.wrapXOFConstructorWithOpts = exports.wrapConstructorWithOpts = exports.wrapConstructor = exports.Hash = exports.nextTick = exports.swap32IfBE = exports.byteSwapIfBE = exports.swap8IfBE = exports.isLE = undefined;
|
|
28837
|
+
exports.isBytes = isBytes;
|
|
28820
28838
|
exports.anumber = anumber;
|
|
28821
28839
|
exports.abytes = abytes;
|
|
28822
28840
|
exports.ahash = ahash;
|
|
28823
28841
|
exports.aexists = aexists;
|
|
28824
28842
|
exports.aoutput = aoutput;
|
|
28843
|
+
exports.u8 = u8;
|
|
28844
|
+
exports.u32 = u32;
|
|
28845
|
+
exports.clean = clean;
|
|
28846
|
+
exports.createView = createView;
|
|
28847
|
+
exports.rotr = rotr;
|
|
28848
|
+
exports.rotl = rotl;
|
|
28849
|
+
exports.byteSwap = byteSwap;
|
|
28850
|
+
exports.byteSwap32 = byteSwap32;
|
|
28851
|
+
exports.bytesToHex = bytesToHex;
|
|
28852
|
+
exports.hexToBytes = hexToBytes;
|
|
28853
|
+
exports.asyncLoop = asyncLoop;
|
|
28854
|
+
exports.utf8ToBytes = utf8ToBytes;
|
|
28855
|
+
exports.bytesToUtf8 = bytesToUtf8;
|
|
28856
|
+
exports.toBytes = toBytes;
|
|
28857
|
+
exports.kdfInputToBytes = kdfInputToBytes;
|
|
28858
|
+
exports.concatBytes = concatBytes;
|
|
28859
|
+
exports.checkOpts = checkOpts;
|
|
28860
|
+
exports.createHasher = createHasher;
|
|
28861
|
+
exports.createOptHasher = createOptHasher;
|
|
28862
|
+
exports.createXOFer = createXOFer;
|
|
28863
|
+
exports.randomBytes = randomBytes;
|
|
28864
|
+
var crypto_1 = require_cryptoNode2();
|
|
28865
|
+
function isBytes(a) {
|
|
28866
|
+
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
28867
|
+
}
|
|
28825
28868
|
function anumber(n) {
|
|
28826
28869
|
if (!Number.isSafeInteger(n) || n < 0)
|
|
28827
28870
|
throw new Error("positive integer expected, got " + n);
|
|
28828
28871
|
}
|
|
28829
|
-
function isBytes(a) {
|
|
28830
|
-
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
28831
|
-
}
|
|
28832
28872
|
function abytes(b, ...lengths) {
|
|
28833
28873
|
if (!isBytes(b))
|
|
28834
28874
|
throw new Error("Uint8Array expected");
|
|
@@ -28837,7 +28877,7 @@ var require__assert = __commonJS((exports) => {
|
|
|
28837
28877
|
}
|
|
28838
28878
|
function ahash(h) {
|
|
28839
28879
|
if (typeof h !== "function" || typeof h.create !== "function")
|
|
28840
|
-
throw new Error("Hash should be wrapped by utils.
|
|
28880
|
+
throw new Error("Hash should be wrapped by utils.createHasher");
|
|
28841
28881
|
anumber(h.outputLen);
|
|
28842
28882
|
anumber(h.blockLen);
|
|
28843
28883
|
}
|
|
@@ -28854,51 +28894,17 @@ var require__assert = __commonJS((exports) => {
|
|
|
28854
28894
|
throw new Error("digestInto() expects output buffer of length at least " + min);
|
|
28855
28895
|
}
|
|
28856
28896
|
}
|
|
28857
|
-
});
|
|
28858
|
-
|
|
28859
|
-
// ../../node_modules/@noble/hashes/cryptoNode.js
|
|
28860
|
-
var require_cryptoNode2 = __commonJS((exports) => {
|
|
28861
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28862
|
-
exports.crypto = undefined;
|
|
28863
|
-
var nc = __require("node:crypto");
|
|
28864
|
-
exports.crypto = nc && typeof nc === "object" && "webcrypto" in nc ? nc.webcrypto : nc && typeof nc === "object" && ("randomBytes" in nc) ? nc : undefined;
|
|
28865
|
-
});
|
|
28866
|
-
|
|
28867
|
-
// ../../node_modules/@noble/hashes/utils.js
|
|
28868
|
-
var require_utils7 = __commonJS((exports) => {
|
|
28869
|
-
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
28870
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28871
|
-
exports.Hash = exports.nextTick = exports.byteSwapIfBE = exports.isLE = undefined;
|
|
28872
|
-
exports.isBytes = isBytes;
|
|
28873
|
-
exports.u8 = u8;
|
|
28874
|
-
exports.u32 = u32;
|
|
28875
|
-
exports.createView = createView;
|
|
28876
|
-
exports.rotr = rotr;
|
|
28877
|
-
exports.rotl = rotl;
|
|
28878
|
-
exports.byteSwap = byteSwap;
|
|
28879
|
-
exports.byteSwap32 = byteSwap32;
|
|
28880
|
-
exports.bytesToHex = bytesToHex;
|
|
28881
|
-
exports.hexToBytes = hexToBytes;
|
|
28882
|
-
exports.asyncLoop = asyncLoop;
|
|
28883
|
-
exports.utf8ToBytes = utf8ToBytes;
|
|
28884
|
-
exports.toBytes = toBytes;
|
|
28885
|
-
exports.concatBytes = concatBytes;
|
|
28886
|
-
exports.checkOpts = checkOpts;
|
|
28887
|
-
exports.wrapConstructor = wrapConstructor;
|
|
28888
|
-
exports.wrapConstructorWithOpts = wrapConstructorWithOpts;
|
|
28889
|
-
exports.wrapXOFConstructorWithOpts = wrapXOFConstructorWithOpts;
|
|
28890
|
-
exports.randomBytes = randomBytes;
|
|
28891
|
-
var crypto_1 = require_cryptoNode2();
|
|
28892
|
-
var _assert_ts_1 = require__assert();
|
|
28893
|
-
function isBytes(a) {
|
|
28894
|
-
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
28895
|
-
}
|
|
28896
28897
|
function u8(arr) {
|
|
28897
28898
|
return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
|
|
28898
28899
|
}
|
|
28899
28900
|
function u32(arr) {
|
|
28900
28901
|
return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
|
28901
28902
|
}
|
|
28903
|
+
function clean(...arrays) {
|
|
28904
|
+
for (let i = 0;i < arrays.length; i++) {
|
|
28905
|
+
arrays[i].fill(0);
|
|
28906
|
+
}
|
|
28907
|
+
}
|
|
28902
28908
|
function createView(arr) {
|
|
28903
28909
|
return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
|
|
28904
28910
|
}
|
|
@@ -28912,16 +28918,19 @@ var require_utils7 = __commonJS((exports) => {
|
|
|
28912
28918
|
function byteSwap(word) {
|
|
28913
28919
|
return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;
|
|
28914
28920
|
}
|
|
28915
|
-
exports.
|
|
28921
|
+
exports.swap8IfBE = exports.isLE ? (n) => n : (n) => byteSwap(n);
|
|
28922
|
+
exports.byteSwapIfBE = exports.swap8IfBE;
|
|
28916
28923
|
function byteSwap32(arr) {
|
|
28917
28924
|
for (let i = 0;i < arr.length; i++) {
|
|
28918
28925
|
arr[i] = byteSwap(arr[i]);
|
|
28919
28926
|
}
|
|
28927
|
+
return arr;
|
|
28920
28928
|
}
|
|
28921
|
-
|
|
28929
|
+
exports.swap32IfBE = exports.isLE ? (u) => u : byteSwap32;
|
|
28930
|
+
var hasHexBuiltin = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function")();
|
|
28922
28931
|
var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
|
|
28923
28932
|
function bytesToHex(bytes) {
|
|
28924
|
-
|
|
28933
|
+
abytes(bytes);
|
|
28925
28934
|
if (hasHexBuiltin)
|
|
28926
28935
|
return bytes.toHex();
|
|
28927
28936
|
let hex = "";
|
|
@@ -28976,20 +28985,29 @@ var require_utils7 = __commonJS((exports) => {
|
|
|
28976
28985
|
}
|
|
28977
28986
|
function utf8ToBytes(str) {
|
|
28978
28987
|
if (typeof str !== "string")
|
|
28979
|
-
throw new Error("
|
|
28988
|
+
throw new Error("string expected");
|
|
28980
28989
|
return new Uint8Array(new TextEncoder().encode(str));
|
|
28981
28990
|
}
|
|
28991
|
+
function bytesToUtf8(bytes) {
|
|
28992
|
+
return new TextDecoder().decode(bytes);
|
|
28993
|
+
}
|
|
28982
28994
|
function toBytes(data) {
|
|
28983
28995
|
if (typeof data === "string")
|
|
28984
28996
|
data = utf8ToBytes(data);
|
|
28985
|
-
|
|
28997
|
+
abytes(data);
|
|
28998
|
+
return data;
|
|
28999
|
+
}
|
|
29000
|
+
function kdfInputToBytes(data) {
|
|
29001
|
+
if (typeof data === "string")
|
|
29002
|
+
data = utf8ToBytes(data);
|
|
29003
|
+
abytes(data);
|
|
28986
29004
|
return data;
|
|
28987
29005
|
}
|
|
28988
29006
|
function concatBytes(...arrays) {
|
|
28989
29007
|
let sum = 0;
|
|
28990
29008
|
for (let i = 0;i < arrays.length; i++) {
|
|
28991
29009
|
const a = arrays[i];
|
|
28992
|
-
|
|
29010
|
+
abytes(a);
|
|
28993
29011
|
sum += a.length;
|
|
28994
29012
|
}
|
|
28995
29013
|
const res = new Uint8Array(sum);
|
|
@@ -29000,20 +29018,17 @@ var require_utils7 = __commonJS((exports) => {
|
|
|
29000
29018
|
}
|
|
29001
29019
|
return res;
|
|
29002
29020
|
}
|
|
29003
|
-
|
|
29004
|
-
class Hash {
|
|
29005
|
-
clone() {
|
|
29006
|
-
return this._cloneInto();
|
|
29007
|
-
}
|
|
29008
|
-
}
|
|
29009
|
-
exports.Hash = Hash;
|
|
29010
29021
|
function checkOpts(defaults, opts) {
|
|
29011
29022
|
if (opts !== undefined && {}.toString.call(opts) !== "[object Object]")
|
|
29012
|
-
throw new Error("
|
|
29023
|
+
throw new Error("options should be object or undefined");
|
|
29013
29024
|
const merged = Object.assign(defaults, opts);
|
|
29014
29025
|
return merged;
|
|
29015
29026
|
}
|
|
29016
|
-
|
|
29027
|
+
|
|
29028
|
+
class Hash {
|
|
29029
|
+
}
|
|
29030
|
+
exports.Hash = Hash;
|
|
29031
|
+
function createHasher(hashCons) {
|
|
29017
29032
|
const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
|
|
29018
29033
|
const tmp = hashCons();
|
|
29019
29034
|
hashC.outputLen = tmp.outputLen;
|
|
@@ -29021,7 +29036,7 @@ var require_utils7 = __commonJS((exports) => {
|
|
|
29021
29036
|
hashC.create = () => hashCons();
|
|
29022
29037
|
return hashC;
|
|
29023
29038
|
}
|
|
29024
|
-
function
|
|
29039
|
+
function createOptHasher(hashCons) {
|
|
29025
29040
|
const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
|
|
29026
29041
|
const tmp = hashCons({});
|
|
29027
29042
|
hashC.outputLen = tmp.outputLen;
|
|
@@ -29029,7 +29044,7 @@ var require_utils7 = __commonJS((exports) => {
|
|
|
29029
29044
|
hashC.create = (opts) => hashCons(opts);
|
|
29030
29045
|
return hashC;
|
|
29031
29046
|
}
|
|
29032
|
-
function
|
|
29047
|
+
function createXOFer(hashCons) {
|
|
29033
29048
|
const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
|
|
29034
29049
|
const tmp = hashCons({});
|
|
29035
29050
|
hashC.outputLen = tmp.outputLen;
|
|
@@ -29037,6 +29052,9 @@ var require_utils7 = __commonJS((exports) => {
|
|
|
29037
29052
|
hashC.create = (opts) => hashCons(opts);
|
|
29038
29053
|
return hashC;
|
|
29039
29054
|
}
|
|
29055
|
+
exports.wrapConstructor = createHasher;
|
|
29056
|
+
exports.wrapConstructorWithOpts = createOptHasher;
|
|
29057
|
+
exports.wrapXOFConstructorWithOpts = createXOFer;
|
|
29040
29058
|
function randomBytes(bytesLength = 32) {
|
|
29041
29059
|
if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === "function") {
|
|
29042
29060
|
return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));
|
|
@@ -29048,14 +29066,13 @@ var require_utils7 = __commonJS((exports) => {
|
|
|
29048
29066
|
}
|
|
29049
29067
|
});
|
|
29050
29068
|
|
|
29051
|
-
// ../../node_modules/@noble/hashes/_md.js
|
|
29069
|
+
// ../../node_modules/eciesjs/node_modules/@noble/hashes/_md.js
|
|
29052
29070
|
var require__md = __commonJS((exports) => {
|
|
29053
29071
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29054
|
-
exports.HashMD = undefined;
|
|
29072
|
+
exports.SHA512_IV = exports.SHA384_IV = exports.SHA224_IV = exports.SHA256_IV = exports.HashMD = undefined;
|
|
29055
29073
|
exports.setBigUint64 = setBigUint64;
|
|
29056
29074
|
exports.Chi = Chi;
|
|
29057
29075
|
exports.Maj = Maj;
|
|
29058
|
-
var _assert_ts_1 = require__assert();
|
|
29059
29076
|
var utils_ts_1 = require_utils7();
|
|
29060
29077
|
function setBigUint64(view, byteOffset, value, isLE) {
|
|
29061
29078
|
if (typeof view.setBigUint64 === "function")
|
|
@@ -29091,9 +29108,10 @@ var require__md = __commonJS((exports) => {
|
|
|
29091
29108
|
this.view = (0, utils_ts_1.createView)(this.buffer);
|
|
29092
29109
|
}
|
|
29093
29110
|
update(data) {
|
|
29094
|
-
(0,
|
|
29095
|
-
const { view, buffer, blockLen } = this;
|
|
29111
|
+
(0, utils_ts_1.aexists)(this);
|
|
29096
29112
|
data = (0, utils_ts_1.toBytes)(data);
|
|
29113
|
+
(0, utils_ts_1.abytes)(data);
|
|
29114
|
+
const { view, buffer, blockLen } = this;
|
|
29097
29115
|
const len = data.length;
|
|
29098
29116
|
for (let pos = 0;pos < len; ) {
|
|
29099
29117
|
const take = Math.min(blockLen - this.pos, len - pos);
|
|
@@ -29116,13 +29134,13 @@ var require__md = __commonJS((exports) => {
|
|
|
29116
29134
|
return this;
|
|
29117
29135
|
}
|
|
29118
29136
|
digestInto(out) {
|
|
29119
|
-
(0,
|
|
29120
|
-
(0,
|
|
29137
|
+
(0, utils_ts_1.aexists)(this);
|
|
29138
|
+
(0, utils_ts_1.aoutput)(out, this);
|
|
29121
29139
|
this.finished = true;
|
|
29122
29140
|
const { buffer, view, blockLen, isLE } = this;
|
|
29123
29141
|
let { pos } = this;
|
|
29124
29142
|
buffer[pos++] = 128;
|
|
29125
|
-
this.buffer.subarray(pos)
|
|
29143
|
+
(0, utils_ts_1.clean)(this.buffer.subarray(pos));
|
|
29126
29144
|
if (this.padOffset > blockLen - pos) {
|
|
29127
29145
|
this.process(view, 0);
|
|
29128
29146
|
pos = 0;
|
|
@@ -29153,25 +29171,178 @@ var require__md = __commonJS((exports) => {
|
|
|
29153
29171
|
to || (to = new this.constructor);
|
|
29154
29172
|
to.set(...this.get());
|
|
29155
29173
|
const { blockLen, buffer, length, finished, destroyed, pos } = this;
|
|
29174
|
+
to.destroyed = destroyed;
|
|
29175
|
+
to.finished = finished;
|
|
29156
29176
|
to.length = length;
|
|
29157
29177
|
to.pos = pos;
|
|
29158
|
-
to.finished = finished;
|
|
29159
|
-
to.destroyed = destroyed;
|
|
29160
29178
|
if (length % blockLen)
|
|
29161
29179
|
to.buffer.set(buffer);
|
|
29162
29180
|
return to;
|
|
29163
29181
|
}
|
|
29182
|
+
clone() {
|
|
29183
|
+
return this._cloneInto();
|
|
29184
|
+
}
|
|
29164
29185
|
}
|
|
29165
29186
|
exports.HashMD = HashMD;
|
|
29187
|
+
exports.SHA256_IV = Uint32Array.from([
|
|
29188
|
+
1779033703,
|
|
29189
|
+
3144134277,
|
|
29190
|
+
1013904242,
|
|
29191
|
+
2773480762,
|
|
29192
|
+
1359893119,
|
|
29193
|
+
2600822924,
|
|
29194
|
+
528734635,
|
|
29195
|
+
1541459225
|
|
29196
|
+
]);
|
|
29197
|
+
exports.SHA224_IV = Uint32Array.from([
|
|
29198
|
+
3238371032,
|
|
29199
|
+
914150663,
|
|
29200
|
+
812702999,
|
|
29201
|
+
4144912697,
|
|
29202
|
+
4290775857,
|
|
29203
|
+
1750603025,
|
|
29204
|
+
1694076839,
|
|
29205
|
+
3204075428
|
|
29206
|
+
]);
|
|
29207
|
+
exports.SHA384_IV = Uint32Array.from([
|
|
29208
|
+
3418070365,
|
|
29209
|
+
3238371032,
|
|
29210
|
+
1654270250,
|
|
29211
|
+
914150663,
|
|
29212
|
+
2438529370,
|
|
29213
|
+
812702999,
|
|
29214
|
+
355462360,
|
|
29215
|
+
4144912697,
|
|
29216
|
+
1731405415,
|
|
29217
|
+
4290775857,
|
|
29218
|
+
2394180231,
|
|
29219
|
+
1750603025,
|
|
29220
|
+
3675008525,
|
|
29221
|
+
1694076839,
|
|
29222
|
+
1203062813,
|
|
29223
|
+
3204075428
|
|
29224
|
+
]);
|
|
29225
|
+
exports.SHA512_IV = Uint32Array.from([
|
|
29226
|
+
1779033703,
|
|
29227
|
+
4089235720,
|
|
29228
|
+
3144134277,
|
|
29229
|
+
2227873595,
|
|
29230
|
+
1013904242,
|
|
29231
|
+
4271175723,
|
|
29232
|
+
2773480762,
|
|
29233
|
+
1595750129,
|
|
29234
|
+
1359893119,
|
|
29235
|
+
2917565137,
|
|
29236
|
+
2600822924,
|
|
29237
|
+
725511199,
|
|
29238
|
+
528734635,
|
|
29239
|
+
4215389547,
|
|
29240
|
+
1541459225,
|
|
29241
|
+
327033209
|
|
29242
|
+
]);
|
|
29166
29243
|
});
|
|
29167
29244
|
|
|
29168
|
-
// ../../node_modules/@noble/hashes/
|
|
29169
|
-
var
|
|
29245
|
+
// ../../node_modules/eciesjs/node_modules/@noble/hashes/_u64.js
|
|
29246
|
+
var require__u64 = __commonJS((exports) => {
|
|
29170
29247
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29171
|
-
exports.
|
|
29248
|
+
exports.toBig = exports.shrSL = exports.shrSH = exports.rotrSL = exports.rotrSH = exports.rotrBL = exports.rotrBH = exports.rotr32L = exports.rotr32H = exports.rotlSL = exports.rotlSH = exports.rotlBL = exports.rotlBH = exports.add5L = exports.add5H = exports.add4L = exports.add4H = exports.add3L = exports.add3H = undefined;
|
|
29249
|
+
exports.add = add;
|
|
29250
|
+
exports.fromBig = fromBig;
|
|
29251
|
+
exports.split = split;
|
|
29252
|
+
var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
|
|
29253
|
+
var _32n = /* @__PURE__ */ BigInt(32);
|
|
29254
|
+
function fromBig(n, le = false) {
|
|
29255
|
+
if (le)
|
|
29256
|
+
return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
|
|
29257
|
+
return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
|
29258
|
+
}
|
|
29259
|
+
function split(lst, le = false) {
|
|
29260
|
+
const len = lst.length;
|
|
29261
|
+
let Ah = new Uint32Array(len);
|
|
29262
|
+
let Al = new Uint32Array(len);
|
|
29263
|
+
for (let i = 0;i < len; i++) {
|
|
29264
|
+
const { h, l } = fromBig(lst[i], le);
|
|
29265
|
+
[Ah[i], Al[i]] = [h, l];
|
|
29266
|
+
}
|
|
29267
|
+
return [Ah, Al];
|
|
29268
|
+
}
|
|
29269
|
+
var toBig = (h, l) => BigInt(h >>> 0) << _32n | BigInt(l >>> 0);
|
|
29270
|
+
exports.toBig = toBig;
|
|
29271
|
+
var shrSH = (h, _l, s) => h >>> s;
|
|
29272
|
+
exports.shrSH = shrSH;
|
|
29273
|
+
var shrSL = (h, l, s) => h << 32 - s | l >>> s;
|
|
29274
|
+
exports.shrSL = shrSL;
|
|
29275
|
+
var rotrSH = (h, l, s) => h >>> s | l << 32 - s;
|
|
29276
|
+
exports.rotrSH = rotrSH;
|
|
29277
|
+
var rotrSL = (h, l, s) => h << 32 - s | l >>> s;
|
|
29278
|
+
exports.rotrSL = rotrSL;
|
|
29279
|
+
var rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;
|
|
29280
|
+
exports.rotrBH = rotrBH;
|
|
29281
|
+
var rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;
|
|
29282
|
+
exports.rotrBL = rotrBL;
|
|
29283
|
+
var rotr32H = (_h, l) => l;
|
|
29284
|
+
exports.rotr32H = rotr32H;
|
|
29285
|
+
var rotr32L = (h, _l) => h;
|
|
29286
|
+
exports.rotr32L = rotr32L;
|
|
29287
|
+
var rotlSH = (h, l, s) => h << s | l >>> 32 - s;
|
|
29288
|
+
exports.rotlSH = rotlSH;
|
|
29289
|
+
var rotlSL = (h, l, s) => l << s | h >>> 32 - s;
|
|
29290
|
+
exports.rotlSL = rotlSL;
|
|
29291
|
+
var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
|
|
29292
|
+
exports.rotlBH = rotlBH;
|
|
29293
|
+
var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
|
|
29294
|
+
exports.rotlBL = rotlBL;
|
|
29295
|
+
function add(Ah, Al, Bh, Bl) {
|
|
29296
|
+
const l = (Al >>> 0) + (Bl >>> 0);
|
|
29297
|
+
return { h: Ah + Bh + (l / 2 ** 32 | 0) | 0, l: l | 0 };
|
|
29298
|
+
}
|
|
29299
|
+
var add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
|
|
29300
|
+
exports.add3L = add3L;
|
|
29301
|
+
var add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
|
|
29302
|
+
exports.add3H = add3H;
|
|
29303
|
+
var add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
|
|
29304
|
+
exports.add4L = add4L;
|
|
29305
|
+
var add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
|
|
29306
|
+
exports.add4H = add4H;
|
|
29307
|
+
var add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
|
|
29308
|
+
exports.add5L = add5L;
|
|
29309
|
+
var add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
|
|
29310
|
+
exports.add5H = add5H;
|
|
29311
|
+
var u64 = {
|
|
29312
|
+
fromBig,
|
|
29313
|
+
split,
|
|
29314
|
+
toBig,
|
|
29315
|
+
shrSH,
|
|
29316
|
+
shrSL,
|
|
29317
|
+
rotrSH,
|
|
29318
|
+
rotrSL,
|
|
29319
|
+
rotrBH,
|
|
29320
|
+
rotrBL,
|
|
29321
|
+
rotr32H,
|
|
29322
|
+
rotr32L,
|
|
29323
|
+
rotlSH,
|
|
29324
|
+
rotlSL,
|
|
29325
|
+
rotlBH,
|
|
29326
|
+
rotlBL,
|
|
29327
|
+
add,
|
|
29328
|
+
add3L,
|
|
29329
|
+
add3H,
|
|
29330
|
+
add4L,
|
|
29331
|
+
add4H,
|
|
29332
|
+
add5H,
|
|
29333
|
+
add5L
|
|
29334
|
+
};
|
|
29335
|
+
exports.default = u64;
|
|
29336
|
+
});
|
|
29337
|
+
|
|
29338
|
+
// ../../node_modules/eciesjs/node_modules/@noble/hashes/sha2.js
|
|
29339
|
+
var require_sha2 = __commonJS((exports) => {
|
|
29340
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29341
|
+
exports.sha512_224 = exports.sha512_256 = exports.sha384 = exports.sha512 = exports.sha224 = exports.sha256 = exports.SHA512_256 = exports.SHA512_224 = exports.SHA384 = exports.SHA512 = exports.SHA224 = exports.SHA256 = undefined;
|
|
29172
29342
|
var _md_ts_1 = require__md();
|
|
29343
|
+
var u64 = require__u64();
|
|
29173
29344
|
var utils_ts_1 = require_utils7();
|
|
29174
|
-
var SHA256_K = /* @__PURE__ */
|
|
29345
|
+
var SHA256_K = /* @__PURE__ */ Uint32Array.from([
|
|
29175
29346
|
1116352408,
|
|
29176
29347
|
1899447441,
|
|
29177
29348
|
3049323471,
|
|
@@ -29237,29 +29408,19 @@ var require_sha256 = __commonJS((exports) => {
|
|
|
29237
29408
|
3204031479,
|
|
29238
29409
|
3329325298
|
|
29239
29410
|
]);
|
|
29240
|
-
var SHA256_IV = /* @__PURE__ */ new Uint32Array([
|
|
29241
|
-
1779033703,
|
|
29242
|
-
3144134277,
|
|
29243
|
-
1013904242,
|
|
29244
|
-
2773480762,
|
|
29245
|
-
1359893119,
|
|
29246
|
-
2600822924,
|
|
29247
|
-
528734635,
|
|
29248
|
-
1541459225
|
|
29249
|
-
]);
|
|
29250
29411
|
var SHA256_W = /* @__PURE__ */ new Uint32Array(64);
|
|
29251
29412
|
|
|
29252
29413
|
class SHA256 extends _md_ts_1.HashMD {
|
|
29253
29414
|
constructor(outputLen = 32) {
|
|
29254
29415
|
super(64, outputLen, 8, false);
|
|
29255
|
-
this.A = SHA256_IV[0] | 0;
|
|
29256
|
-
this.B = SHA256_IV[1] | 0;
|
|
29257
|
-
this.C = SHA256_IV[2] | 0;
|
|
29258
|
-
this.D = SHA256_IV[3] | 0;
|
|
29259
|
-
this.E = SHA256_IV[4] | 0;
|
|
29260
|
-
this.F = SHA256_IV[5] | 0;
|
|
29261
|
-
this.G = SHA256_IV[6] | 0;
|
|
29262
|
-
this.H = SHA256_IV[7] | 0;
|
|
29416
|
+
this.A = _md_ts_1.SHA256_IV[0] | 0;
|
|
29417
|
+
this.B = _md_ts_1.SHA256_IV[1] | 0;
|
|
29418
|
+
this.C = _md_ts_1.SHA256_IV[2] | 0;
|
|
29419
|
+
this.D = _md_ts_1.SHA256_IV[3] | 0;
|
|
29420
|
+
this.E = _md_ts_1.SHA256_IV[4] | 0;
|
|
29421
|
+
this.F = _md_ts_1.SHA256_IV[5] | 0;
|
|
29422
|
+
this.G = _md_ts_1.SHA256_IV[6] | 0;
|
|
29423
|
+
this.H = _md_ts_1.SHA256_IV[7] | 0;
|
|
29263
29424
|
}
|
|
29264
29425
|
get() {
|
|
29265
29426
|
const { A, B, C, D, E, F, G, H } = this;
|
|
@@ -29311,11 +29472,11 @@ var require_sha256 = __commonJS((exports) => {
|
|
|
29311
29472
|
this.set(A, B, C, D, E, F, G, H);
|
|
29312
29473
|
}
|
|
29313
29474
|
roundClean() {
|
|
29314
|
-
|
|
29475
|
+
(0, utils_ts_1.clean)(SHA256_W);
|
|
29315
29476
|
}
|
|
29316
29477
|
destroy() {
|
|
29317
29478
|
this.set(0, 0, 0, 0, 0, 0, 0, 0);
|
|
29318
|
-
this.buffer
|
|
29479
|
+
(0, utils_ts_1.clean)(this.buffer);
|
|
29319
29480
|
}
|
|
29320
29481
|
}
|
|
29321
29482
|
exports.SHA256 = SHA256;
|
|
@@ -29323,120 +29484,18 @@ var require_sha256 = __commonJS((exports) => {
|
|
|
29323
29484
|
class SHA224 extends SHA256 {
|
|
29324
29485
|
constructor() {
|
|
29325
29486
|
super(28);
|
|
29326
|
-
this.A =
|
|
29327
|
-
this.B =
|
|
29328
|
-
this.C =
|
|
29329
|
-
this.D =
|
|
29330
|
-
this.E =
|
|
29331
|
-
this.F =
|
|
29332
|
-
this.G =
|
|
29333
|
-
this.H =
|
|
29334
|
-
}
|
|
29335
|
-
}
|
|
29336
|
-
exports.
|
|
29337
|
-
|
|
29338
|
-
});
|
|
29339
|
-
|
|
29340
|
-
// ../../node_modules/@noble/hashes/_u64.js
|
|
29341
|
-
var require__u64 = __commonJS((exports) => {
|
|
29342
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29343
|
-
exports.add5L = exports.add5H = exports.add4H = exports.add4L = exports.add3H = exports.add3L = exports.rotlBL = exports.rotlBH = exports.rotlSL = exports.rotlSH = exports.rotr32L = exports.rotr32H = exports.rotrBL = exports.rotrBH = exports.rotrSL = exports.rotrSH = exports.shrSL = exports.shrSH = exports.toBig = undefined;
|
|
29344
|
-
exports.fromBig = fromBig;
|
|
29345
|
-
exports.split = split;
|
|
29346
|
-
exports.add = add;
|
|
29347
|
-
var U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
|
|
29348
|
-
var _32n = /* @__PURE__ */ BigInt(32);
|
|
29349
|
-
function fromBig(n, le = false) {
|
|
29350
|
-
if (le)
|
|
29351
|
-
return { h: Number(n & U32_MASK64), l: Number(n >> _32n & U32_MASK64) };
|
|
29352
|
-
return { h: Number(n >> _32n & U32_MASK64) | 0, l: Number(n & U32_MASK64) | 0 };
|
|
29353
|
-
}
|
|
29354
|
-
function split(lst, le = false) {
|
|
29355
|
-
let Ah = new Uint32Array(lst.length);
|
|
29356
|
-
let Al = new Uint32Array(lst.length);
|
|
29357
|
-
for (let i = 0;i < lst.length; i++) {
|
|
29358
|
-
const { h, l } = fromBig(lst[i], le);
|
|
29359
|
-
[Ah[i], Al[i]] = [h, l];
|
|
29360
|
-
}
|
|
29361
|
-
return [Ah, Al];
|
|
29362
|
-
}
|
|
29363
|
-
var toBig = (h, l) => BigInt(h >>> 0) << _32n | BigInt(l >>> 0);
|
|
29364
|
-
exports.toBig = toBig;
|
|
29365
|
-
var shrSH = (h, _l, s) => h >>> s;
|
|
29366
|
-
exports.shrSH = shrSH;
|
|
29367
|
-
var shrSL = (h, l, s) => h << 32 - s | l >>> s;
|
|
29368
|
-
exports.shrSL = shrSL;
|
|
29369
|
-
var rotrSH = (h, l, s) => h >>> s | l << 32 - s;
|
|
29370
|
-
exports.rotrSH = rotrSH;
|
|
29371
|
-
var rotrSL = (h, l, s) => h << 32 - s | l >>> s;
|
|
29372
|
-
exports.rotrSL = rotrSL;
|
|
29373
|
-
var rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;
|
|
29374
|
-
exports.rotrBH = rotrBH;
|
|
29375
|
-
var rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;
|
|
29376
|
-
exports.rotrBL = rotrBL;
|
|
29377
|
-
var rotr32H = (_h, l) => l;
|
|
29378
|
-
exports.rotr32H = rotr32H;
|
|
29379
|
-
var rotr32L = (h, _l) => h;
|
|
29380
|
-
exports.rotr32L = rotr32L;
|
|
29381
|
-
var rotlSH = (h, l, s) => h << s | l >>> 32 - s;
|
|
29382
|
-
exports.rotlSH = rotlSH;
|
|
29383
|
-
var rotlSL = (h, l, s) => l << s | h >>> 32 - s;
|
|
29384
|
-
exports.rotlSL = rotlSL;
|
|
29385
|
-
var rotlBH = (h, l, s) => l << s - 32 | h >>> 64 - s;
|
|
29386
|
-
exports.rotlBH = rotlBH;
|
|
29387
|
-
var rotlBL = (h, l, s) => h << s - 32 | l >>> 64 - s;
|
|
29388
|
-
exports.rotlBL = rotlBL;
|
|
29389
|
-
function add(Ah, Al, Bh, Bl) {
|
|
29390
|
-
const l = (Al >>> 0) + (Bl >>> 0);
|
|
29391
|
-
return { h: Ah + Bh + (l / 2 ** 32 | 0) | 0, l: l | 0 };
|
|
29392
|
-
}
|
|
29393
|
-
var add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
|
|
29394
|
-
exports.add3L = add3L;
|
|
29395
|
-
var add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
|
|
29396
|
-
exports.add3H = add3H;
|
|
29397
|
-
var add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
|
|
29398
|
-
exports.add4L = add4L;
|
|
29399
|
-
var add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
|
|
29400
|
-
exports.add4H = add4H;
|
|
29401
|
-
var add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
|
|
29402
|
-
exports.add5L = add5L;
|
|
29403
|
-
var add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
|
|
29404
|
-
exports.add5H = add5H;
|
|
29405
|
-
var u64 = {
|
|
29406
|
-
fromBig,
|
|
29407
|
-
split,
|
|
29408
|
-
toBig,
|
|
29409
|
-
shrSH,
|
|
29410
|
-
shrSL,
|
|
29411
|
-
rotrSH,
|
|
29412
|
-
rotrSL,
|
|
29413
|
-
rotrBH,
|
|
29414
|
-
rotrBL,
|
|
29415
|
-
rotr32H,
|
|
29416
|
-
rotr32L,
|
|
29417
|
-
rotlSH,
|
|
29418
|
-
rotlSL,
|
|
29419
|
-
rotlBH,
|
|
29420
|
-
rotlBL,
|
|
29421
|
-
add,
|
|
29422
|
-
add3L,
|
|
29423
|
-
add3H,
|
|
29424
|
-
add4L,
|
|
29425
|
-
add4H,
|
|
29426
|
-
add5H,
|
|
29427
|
-
add5L
|
|
29428
|
-
};
|
|
29429
|
-
exports.default = u64;
|
|
29430
|
-
});
|
|
29431
|
-
|
|
29432
|
-
// ../../node_modules/@noble/hashes/sha512.js
|
|
29433
|
-
var require_sha512 = __commonJS((exports) => {
|
|
29434
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29435
|
-
exports.sha384 = exports.sha512_256 = exports.sha512_224 = exports.sha512 = exports.SHA384 = exports.SHA512_256 = exports.SHA512_224 = exports.SHA512 = undefined;
|
|
29436
|
-
var _md_ts_1 = require__md();
|
|
29437
|
-
var _u64_ts_1 = require__u64();
|
|
29438
|
-
var utils_ts_1 = require_utils7();
|
|
29439
|
-
var [SHA512_Kh, SHA512_Kl] = /* @__PURE__ */ (() => _u64_ts_1.default.split([
|
|
29487
|
+
this.A = _md_ts_1.SHA224_IV[0] | 0;
|
|
29488
|
+
this.B = _md_ts_1.SHA224_IV[1] | 0;
|
|
29489
|
+
this.C = _md_ts_1.SHA224_IV[2] | 0;
|
|
29490
|
+
this.D = _md_ts_1.SHA224_IV[3] | 0;
|
|
29491
|
+
this.E = _md_ts_1.SHA224_IV[4] | 0;
|
|
29492
|
+
this.F = _md_ts_1.SHA224_IV[5] | 0;
|
|
29493
|
+
this.G = _md_ts_1.SHA224_IV[6] | 0;
|
|
29494
|
+
this.H = _md_ts_1.SHA224_IV[7] | 0;
|
|
29495
|
+
}
|
|
29496
|
+
}
|
|
29497
|
+
exports.SHA224 = SHA224;
|
|
29498
|
+
var K512 = /* @__PURE__ */ (() => u64.split([
|
|
29440
29499
|
"0x428a2f98d728ae22",
|
|
29441
29500
|
"0x7137449123ef65cd",
|
|
29442
29501
|
"0xb5c0fbcfec4d3b2f",
|
|
@@ -29518,28 +29577,30 @@ var require_sha512 = __commonJS((exports) => {
|
|
|
29518
29577
|
"0x5fcb6fab3ad6faec",
|
|
29519
29578
|
"0x6c44198c4a475817"
|
|
29520
29579
|
].map((n) => BigInt(n))))();
|
|
29580
|
+
var SHA512_Kh = /* @__PURE__ */ (() => K512[0])();
|
|
29581
|
+
var SHA512_Kl = /* @__PURE__ */ (() => K512[1])();
|
|
29521
29582
|
var SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);
|
|
29522
29583
|
var SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);
|
|
29523
29584
|
|
|
29524
29585
|
class SHA512 extends _md_ts_1.HashMD {
|
|
29525
29586
|
constructor(outputLen = 64) {
|
|
29526
29587
|
super(128, outputLen, 16, false);
|
|
29527
|
-
this.Ah =
|
|
29528
|
-
this.Al =
|
|
29529
|
-
this.Bh =
|
|
29530
|
-
this.Bl =
|
|
29531
|
-
this.Ch =
|
|
29532
|
-
this.Cl =
|
|
29533
|
-
this.Dh =
|
|
29534
|
-
this.Dl =
|
|
29535
|
-
this.Eh =
|
|
29536
|
-
this.El =
|
|
29537
|
-
this.Fh =
|
|
29538
|
-
this.Fl =
|
|
29539
|
-
this.Gh =
|
|
29540
|
-
this.Gl =
|
|
29541
|
-
this.Hh =
|
|
29542
|
-
this.Hl =
|
|
29588
|
+
this.Ah = _md_ts_1.SHA512_IV[0] | 0;
|
|
29589
|
+
this.Al = _md_ts_1.SHA512_IV[1] | 0;
|
|
29590
|
+
this.Bh = _md_ts_1.SHA512_IV[2] | 0;
|
|
29591
|
+
this.Bl = _md_ts_1.SHA512_IV[3] | 0;
|
|
29592
|
+
this.Ch = _md_ts_1.SHA512_IV[4] | 0;
|
|
29593
|
+
this.Cl = _md_ts_1.SHA512_IV[5] | 0;
|
|
29594
|
+
this.Dh = _md_ts_1.SHA512_IV[6] | 0;
|
|
29595
|
+
this.Dl = _md_ts_1.SHA512_IV[7] | 0;
|
|
29596
|
+
this.Eh = _md_ts_1.SHA512_IV[8] | 0;
|
|
29597
|
+
this.El = _md_ts_1.SHA512_IV[9] | 0;
|
|
29598
|
+
this.Fh = _md_ts_1.SHA512_IV[10] | 0;
|
|
29599
|
+
this.Fl = _md_ts_1.SHA512_IV[11] | 0;
|
|
29600
|
+
this.Gh = _md_ts_1.SHA512_IV[12] | 0;
|
|
29601
|
+
this.Gl = _md_ts_1.SHA512_IV[13] | 0;
|
|
29602
|
+
this.Hh = _md_ts_1.SHA512_IV[14] | 0;
|
|
29603
|
+
this.Hl = _md_ts_1.SHA512_IV[15] | 0;
|
|
29543
29604
|
}
|
|
29544
29605
|
get() {
|
|
29545
29606
|
const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
|
|
@@ -29571,28 +29632,28 @@ var require_sha512 = __commonJS((exports) => {
|
|
|
29571
29632
|
for (let i = 16;i < 80; i++) {
|
|
29572
29633
|
const W15h = SHA512_W_H[i - 15] | 0;
|
|
29573
29634
|
const W15l = SHA512_W_L[i - 15] | 0;
|
|
29574
|
-
const s0h =
|
|
29575
|
-
const s0l =
|
|
29635
|
+
const s0h = u64.rotrSH(W15h, W15l, 1) ^ u64.rotrSH(W15h, W15l, 8) ^ u64.shrSH(W15h, W15l, 7);
|
|
29636
|
+
const s0l = u64.rotrSL(W15h, W15l, 1) ^ u64.rotrSL(W15h, W15l, 8) ^ u64.shrSL(W15h, W15l, 7);
|
|
29576
29637
|
const W2h = SHA512_W_H[i - 2] | 0;
|
|
29577
29638
|
const W2l = SHA512_W_L[i - 2] | 0;
|
|
29578
|
-
const s1h =
|
|
29579
|
-
const s1l =
|
|
29580
|
-
const SUMl =
|
|
29581
|
-
const SUMh =
|
|
29639
|
+
const s1h = u64.rotrSH(W2h, W2l, 19) ^ u64.rotrBH(W2h, W2l, 61) ^ u64.shrSH(W2h, W2l, 6);
|
|
29640
|
+
const s1l = u64.rotrSL(W2h, W2l, 19) ^ u64.rotrBL(W2h, W2l, 61) ^ u64.shrSL(W2h, W2l, 6);
|
|
29641
|
+
const SUMl = u64.add4L(s0l, s1l, SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
|
|
29642
|
+
const SUMh = u64.add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]);
|
|
29582
29643
|
SHA512_W_H[i] = SUMh | 0;
|
|
29583
29644
|
SHA512_W_L[i] = SUMl | 0;
|
|
29584
29645
|
}
|
|
29585
29646
|
let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
|
|
29586
29647
|
for (let i = 0;i < 80; i++) {
|
|
29587
|
-
const sigma1h =
|
|
29588
|
-
const sigma1l =
|
|
29648
|
+
const sigma1h = u64.rotrSH(Eh, El, 14) ^ u64.rotrSH(Eh, El, 18) ^ u64.rotrBH(Eh, El, 41);
|
|
29649
|
+
const sigma1l = u64.rotrSL(Eh, El, 14) ^ u64.rotrSL(Eh, El, 18) ^ u64.rotrBL(Eh, El, 41);
|
|
29589
29650
|
const CHIh = Eh & Fh ^ ~Eh & Gh;
|
|
29590
29651
|
const CHIl = El & Fl ^ ~El & Gl;
|
|
29591
|
-
const T1ll =
|
|
29592
|
-
const T1h =
|
|
29652
|
+
const T1ll = u64.add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);
|
|
29653
|
+
const T1h = u64.add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);
|
|
29593
29654
|
const T1l = T1ll | 0;
|
|
29594
|
-
const sigma0h =
|
|
29595
|
-
const sigma0l =
|
|
29655
|
+
const sigma0h = u64.rotrSH(Ah, Al, 28) ^ u64.rotrBH(Ah, Al, 34) ^ u64.rotrBH(Ah, Al, 39);
|
|
29656
|
+
const sigma0l = u64.rotrSL(Ah, Al, 28) ^ u64.rotrBL(Ah, Al, 34) ^ u64.rotrBL(Ah, Al, 39);
|
|
29596
29657
|
const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;
|
|
29597
29658
|
const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;
|
|
29598
29659
|
Hh = Gh | 0;
|
|
@@ -29601,57 +29662,115 @@ var require_sha512 = __commonJS((exports) => {
|
|
|
29601
29662
|
Gl = Fl | 0;
|
|
29602
29663
|
Fh = Eh | 0;
|
|
29603
29664
|
Fl = El | 0;
|
|
29604
|
-
({ h: Eh, l: El } =
|
|
29665
|
+
({ h: Eh, l: El } = u64.add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
|
|
29605
29666
|
Dh = Ch | 0;
|
|
29606
29667
|
Dl = Cl | 0;
|
|
29607
29668
|
Ch = Bh | 0;
|
|
29608
29669
|
Cl = Bl | 0;
|
|
29609
29670
|
Bh = Ah | 0;
|
|
29610
29671
|
Bl = Al | 0;
|
|
29611
|
-
const All =
|
|
29612
|
-
Ah =
|
|
29672
|
+
const All = u64.add3L(T1l, sigma0l, MAJl);
|
|
29673
|
+
Ah = u64.add3H(All, T1h, sigma0h, MAJh);
|
|
29613
29674
|
Al = All | 0;
|
|
29614
29675
|
}
|
|
29615
|
-
({ h: Ah, l: Al } =
|
|
29616
|
-
({ h: Bh, l: Bl } =
|
|
29617
|
-
({ h: Ch, l: Cl } =
|
|
29618
|
-
({ h: Dh, l: Dl } =
|
|
29619
|
-
({ h: Eh, l: El } =
|
|
29620
|
-
({ h: Fh, l: Fl } =
|
|
29621
|
-
({ h: Gh, l: Gl } =
|
|
29622
|
-
({ h: Hh, l: Hl } =
|
|
29676
|
+
({ h: Ah, l: Al } = u64.add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
|
|
29677
|
+
({ h: Bh, l: Bl } = u64.add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
|
|
29678
|
+
({ h: Ch, l: Cl } = u64.add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
|
|
29679
|
+
({ h: Dh, l: Dl } = u64.add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
|
|
29680
|
+
({ h: Eh, l: El } = u64.add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
|
|
29681
|
+
({ h: Fh, l: Fl } = u64.add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
|
|
29682
|
+
({ h: Gh, l: Gl } = u64.add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
|
|
29683
|
+
({ h: Hh, l: Hl } = u64.add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
|
|
29623
29684
|
this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);
|
|
29624
29685
|
}
|
|
29625
29686
|
roundClean() {
|
|
29626
|
-
|
|
29627
|
-
SHA512_W_L.fill(0);
|
|
29687
|
+
(0, utils_ts_1.clean)(SHA512_W_H, SHA512_W_L);
|
|
29628
29688
|
}
|
|
29629
29689
|
destroy() {
|
|
29630
|
-
this.buffer
|
|
29690
|
+
(0, utils_ts_1.clean)(this.buffer);
|
|
29631
29691
|
this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
29632
29692
|
}
|
|
29633
29693
|
}
|
|
29634
29694
|
exports.SHA512 = SHA512;
|
|
29635
29695
|
|
|
29696
|
+
class SHA384 extends SHA512 {
|
|
29697
|
+
constructor() {
|
|
29698
|
+
super(48);
|
|
29699
|
+
this.Ah = _md_ts_1.SHA384_IV[0] | 0;
|
|
29700
|
+
this.Al = _md_ts_1.SHA384_IV[1] | 0;
|
|
29701
|
+
this.Bh = _md_ts_1.SHA384_IV[2] | 0;
|
|
29702
|
+
this.Bl = _md_ts_1.SHA384_IV[3] | 0;
|
|
29703
|
+
this.Ch = _md_ts_1.SHA384_IV[4] | 0;
|
|
29704
|
+
this.Cl = _md_ts_1.SHA384_IV[5] | 0;
|
|
29705
|
+
this.Dh = _md_ts_1.SHA384_IV[6] | 0;
|
|
29706
|
+
this.Dl = _md_ts_1.SHA384_IV[7] | 0;
|
|
29707
|
+
this.Eh = _md_ts_1.SHA384_IV[8] | 0;
|
|
29708
|
+
this.El = _md_ts_1.SHA384_IV[9] | 0;
|
|
29709
|
+
this.Fh = _md_ts_1.SHA384_IV[10] | 0;
|
|
29710
|
+
this.Fl = _md_ts_1.SHA384_IV[11] | 0;
|
|
29711
|
+
this.Gh = _md_ts_1.SHA384_IV[12] | 0;
|
|
29712
|
+
this.Gl = _md_ts_1.SHA384_IV[13] | 0;
|
|
29713
|
+
this.Hh = _md_ts_1.SHA384_IV[14] | 0;
|
|
29714
|
+
this.Hl = _md_ts_1.SHA384_IV[15] | 0;
|
|
29715
|
+
}
|
|
29716
|
+
}
|
|
29717
|
+
exports.SHA384 = SHA384;
|
|
29718
|
+
var T224_IV = /* @__PURE__ */ Uint32Array.from([
|
|
29719
|
+
2352822216,
|
|
29720
|
+
424955298,
|
|
29721
|
+
1944164710,
|
|
29722
|
+
2312950998,
|
|
29723
|
+
502970286,
|
|
29724
|
+
855612546,
|
|
29725
|
+
1738396948,
|
|
29726
|
+
1479516111,
|
|
29727
|
+
258812777,
|
|
29728
|
+
2077511080,
|
|
29729
|
+
2011393907,
|
|
29730
|
+
79989058,
|
|
29731
|
+
1067287976,
|
|
29732
|
+
1780299464,
|
|
29733
|
+
286451373,
|
|
29734
|
+
2446758561
|
|
29735
|
+
]);
|
|
29736
|
+
var T256_IV = /* @__PURE__ */ Uint32Array.from([
|
|
29737
|
+
573645204,
|
|
29738
|
+
4230739756,
|
|
29739
|
+
2673172387,
|
|
29740
|
+
3360449730,
|
|
29741
|
+
596883563,
|
|
29742
|
+
1867755857,
|
|
29743
|
+
2520282905,
|
|
29744
|
+
1497426621,
|
|
29745
|
+
2519219938,
|
|
29746
|
+
2827943907,
|
|
29747
|
+
3193839141,
|
|
29748
|
+
1401305490,
|
|
29749
|
+
721525244,
|
|
29750
|
+
746961066,
|
|
29751
|
+
246885852,
|
|
29752
|
+
2177182882
|
|
29753
|
+
]);
|
|
29754
|
+
|
|
29636
29755
|
class SHA512_224 extends SHA512 {
|
|
29637
29756
|
constructor() {
|
|
29638
29757
|
super(28);
|
|
29639
|
-
this.Ah =
|
|
29640
|
-
this.Al =
|
|
29641
|
-
this.Bh =
|
|
29642
|
-
this.Bl =
|
|
29643
|
-
this.Ch =
|
|
29644
|
-
this.Cl =
|
|
29645
|
-
this.Dh =
|
|
29646
|
-
this.Dl =
|
|
29647
|
-
this.Eh =
|
|
29648
|
-
this.El =
|
|
29649
|
-
this.Fh =
|
|
29650
|
-
this.Fl =
|
|
29651
|
-
this.Gh =
|
|
29652
|
-
this.Gl =
|
|
29653
|
-
this.Hh =
|
|
29654
|
-
this.Hl =
|
|
29758
|
+
this.Ah = T224_IV[0] | 0;
|
|
29759
|
+
this.Al = T224_IV[1] | 0;
|
|
29760
|
+
this.Bh = T224_IV[2] | 0;
|
|
29761
|
+
this.Bl = T224_IV[3] | 0;
|
|
29762
|
+
this.Ch = T224_IV[4] | 0;
|
|
29763
|
+
this.Cl = T224_IV[5] | 0;
|
|
29764
|
+
this.Dh = T224_IV[6] | 0;
|
|
29765
|
+
this.Dl = T224_IV[7] | 0;
|
|
29766
|
+
this.Eh = T224_IV[8] | 0;
|
|
29767
|
+
this.El = T224_IV[9] | 0;
|
|
29768
|
+
this.Fh = T224_IV[10] | 0;
|
|
29769
|
+
this.Fl = T224_IV[11] | 0;
|
|
29770
|
+
this.Gh = T224_IV[12] | 0;
|
|
29771
|
+
this.Gl = T224_IV[13] | 0;
|
|
29772
|
+
this.Hh = T224_IV[14] | 0;
|
|
29773
|
+
this.Hl = T224_IV[15] | 0;
|
|
29655
29774
|
}
|
|
29656
29775
|
}
|
|
29657
29776
|
exports.SHA512_224 = SHA512_224;
|
|
@@ -29659,81 +29778,34 @@ var require_sha512 = __commonJS((exports) => {
|
|
|
29659
29778
|
class SHA512_256 extends SHA512 {
|
|
29660
29779
|
constructor() {
|
|
29661
29780
|
super(32);
|
|
29662
|
-
this.Ah =
|
|
29663
|
-
this.Al =
|
|
29664
|
-
this.Bh =
|
|
29665
|
-
this.Bl =
|
|
29666
|
-
this.Ch =
|
|
29667
|
-
this.Cl =
|
|
29668
|
-
this.Dh =
|
|
29669
|
-
this.Dl =
|
|
29670
|
-
this.Eh =
|
|
29671
|
-
this.El =
|
|
29672
|
-
this.Fh =
|
|
29673
|
-
this.Fl =
|
|
29674
|
-
this.Gh =
|
|
29675
|
-
this.Gl =
|
|
29676
|
-
this.Hh =
|
|
29677
|
-
this.Hl =
|
|
29781
|
+
this.Ah = T256_IV[0] | 0;
|
|
29782
|
+
this.Al = T256_IV[1] | 0;
|
|
29783
|
+
this.Bh = T256_IV[2] | 0;
|
|
29784
|
+
this.Bl = T256_IV[3] | 0;
|
|
29785
|
+
this.Ch = T256_IV[4] | 0;
|
|
29786
|
+
this.Cl = T256_IV[5] | 0;
|
|
29787
|
+
this.Dh = T256_IV[6] | 0;
|
|
29788
|
+
this.Dl = T256_IV[7] | 0;
|
|
29789
|
+
this.Eh = T256_IV[8] | 0;
|
|
29790
|
+
this.El = T256_IV[9] | 0;
|
|
29791
|
+
this.Fh = T256_IV[10] | 0;
|
|
29792
|
+
this.Fl = T256_IV[11] | 0;
|
|
29793
|
+
this.Gh = T256_IV[12] | 0;
|
|
29794
|
+
this.Gl = T256_IV[13] | 0;
|
|
29795
|
+
this.Hh = T256_IV[14] | 0;
|
|
29796
|
+
this.Hl = T256_IV[15] | 0;
|
|
29678
29797
|
}
|
|
29679
29798
|
}
|
|
29680
29799
|
exports.SHA512_256 = SHA512_256;
|
|
29681
|
-
|
|
29682
|
-
|
|
29683
|
-
|
|
29684
|
-
|
|
29685
|
-
|
|
29686
|
-
|
|
29687
|
-
this.Bh = 1654270250 | 0;
|
|
29688
|
-
this.Bl = 914150663 | 0;
|
|
29689
|
-
this.Ch = 2438529370 | 0;
|
|
29690
|
-
this.Cl = 812702999 | 0;
|
|
29691
|
-
this.Dh = 355462360 | 0;
|
|
29692
|
-
this.Dl = 4144912697 | 0;
|
|
29693
|
-
this.Eh = 1731405415 | 0;
|
|
29694
|
-
this.El = 4290775857 | 0;
|
|
29695
|
-
this.Fh = 2394180231 | 0;
|
|
29696
|
-
this.Fl = 1750603025 | 0;
|
|
29697
|
-
this.Gh = 3675008525 | 0;
|
|
29698
|
-
this.Gl = 1694076839 | 0;
|
|
29699
|
-
this.Hh = 1203062813 | 0;
|
|
29700
|
-
this.Hl = 3204075428 | 0;
|
|
29701
|
-
}
|
|
29702
|
-
}
|
|
29703
|
-
exports.SHA384 = SHA384;
|
|
29704
|
-
exports.sha512 = (0, utils_ts_1.wrapConstructor)(() => new SHA512);
|
|
29705
|
-
exports.sha512_224 = (0, utils_ts_1.wrapConstructor)(() => new SHA512_224);
|
|
29706
|
-
exports.sha512_256 = (0, utils_ts_1.wrapConstructor)(() => new SHA512_256);
|
|
29707
|
-
exports.sha384 = (0, utils_ts_1.wrapConstructor)(() => new SHA384);
|
|
29800
|
+
exports.sha256 = (0, utils_ts_1.createHasher)(() => new SHA256);
|
|
29801
|
+
exports.sha224 = (0, utils_ts_1.createHasher)(() => new SHA224);
|
|
29802
|
+
exports.sha512 = (0, utils_ts_1.createHasher)(() => new SHA512);
|
|
29803
|
+
exports.sha384 = (0, utils_ts_1.createHasher)(() => new SHA384);
|
|
29804
|
+
exports.sha512_256 = (0, utils_ts_1.createHasher)(() => new SHA512_256);
|
|
29805
|
+
exports.sha512_224 = (0, utils_ts_1.createHasher)(() => new SHA512_224);
|
|
29708
29806
|
});
|
|
29709
29807
|
|
|
29710
|
-
// ../../node_modules/@noble/
|
|
29711
|
-
var require_sha2 = __commonJS((exports) => {
|
|
29712
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29713
|
-
exports.sha512_256 = exports.sha512_224 = exports.sha512 = exports.sha384 = exports.sha256 = exports.sha224 = undefined;
|
|
29714
|
-
var sha256_ts_1 = require_sha256();
|
|
29715
|
-
Object.defineProperty(exports, "sha224", { enumerable: true, get: function() {
|
|
29716
|
-
return sha256_ts_1.sha224;
|
|
29717
|
-
} });
|
|
29718
|
-
Object.defineProperty(exports, "sha256", { enumerable: true, get: function() {
|
|
29719
|
-
return sha256_ts_1.sha256;
|
|
29720
|
-
} });
|
|
29721
|
-
var sha512_ts_1 = require_sha512();
|
|
29722
|
-
Object.defineProperty(exports, "sha384", { enumerable: true, get: function() {
|
|
29723
|
-
return sha512_ts_1.sha384;
|
|
29724
|
-
} });
|
|
29725
|
-
Object.defineProperty(exports, "sha512", { enumerable: true, get: function() {
|
|
29726
|
-
return sha512_ts_1.sha512;
|
|
29727
|
-
} });
|
|
29728
|
-
Object.defineProperty(exports, "sha512_224", { enumerable: true, get: function() {
|
|
29729
|
-
return sha512_ts_1.sha512_224;
|
|
29730
|
-
} });
|
|
29731
|
-
Object.defineProperty(exports, "sha512_256", { enumerable: true, get: function() {
|
|
29732
|
-
return sha512_ts_1.sha512_256;
|
|
29733
|
-
} });
|
|
29734
|
-
});
|
|
29735
|
-
|
|
29736
|
-
// ../../node_modules/@noble/curves/abstract/utils.js
|
|
29808
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/utils.js
|
|
29737
29809
|
var require_utils8 = __commonJS((exports) => {
|
|
29738
29810
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
29739
29811
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -30007,7 +30079,7 @@ var require_utils8 = __commonJS((exports) => {
|
|
|
30007
30079
|
}
|
|
30008
30080
|
});
|
|
30009
30081
|
|
|
30010
|
-
// ../../node_modules/@noble/curves/abstract/modular.js
|
|
30082
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/modular.js
|
|
30011
30083
|
var require_modular = __commonJS((exports) => {
|
|
30012
30084
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30013
30085
|
exports.isNegativeLE = undefined;
|
|
@@ -30032,6 +30104,7 @@ var require_modular = __commonJS((exports) => {
|
|
|
30032
30104
|
exports.getMinHashLength = getMinHashLength;
|
|
30033
30105
|
exports.mapHashToField = mapHashToField;
|
|
30034
30106
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
30107
|
+
var utils_1 = require_utils7();
|
|
30035
30108
|
var utils_ts_1 = require_utils8();
|
|
30036
30109
|
var _0n = BigInt(0);
|
|
30037
30110
|
var _1n = BigInt(1);
|
|
@@ -30091,13 +30164,17 @@ var require_modular = __commonJS((exports) => {
|
|
|
30091
30164
|
return mod(x, modulo);
|
|
30092
30165
|
}
|
|
30093
30166
|
function tonelliShanks(P) {
|
|
30094
|
-
|
|
30095
|
-
let
|
|
30096
|
-
|
|
30097
|
-
;
|
|
30098
|
-
|
|
30099
|
-
|
|
30100
|
-
|
|
30167
|
+
let Q = P - _1n;
|
|
30168
|
+
let S = 0;
|
|
30169
|
+
while (Q % _2n === _0n) {
|
|
30170
|
+
Q /= _2n;
|
|
30171
|
+
S++;
|
|
30172
|
+
}
|
|
30173
|
+
let Z = _2n;
|
|
30174
|
+
const _Fp = Field(P);
|
|
30175
|
+
while (Z < P && FpIsSquare(_Fp, Z)) {
|
|
30176
|
+
if (Z++ > 1000)
|
|
30177
|
+
throw new Error("Cannot find square root: probably non-prime P");
|
|
30101
30178
|
}
|
|
30102
30179
|
if (S === 1) {
|
|
30103
30180
|
const p1div4 = (P + _1n) / _4n;
|
|
@@ -30110,7 +30187,7 @@ var require_modular = __commonJS((exports) => {
|
|
|
30110
30187
|
}
|
|
30111
30188
|
const Q1div2 = (Q + _1n) / _2n;
|
|
30112
30189
|
return function tonelliSlow(Fp, n) {
|
|
30113
|
-
if (Fp
|
|
30190
|
+
if (!FpIsSquare(Fp, n))
|
|
30114
30191
|
throw new Error("Cannot find square root");
|
|
30115
30192
|
let r = S;
|
|
30116
30193
|
let g = Fp.pow(Fp.mul(Fp.ONE, Z), Q);
|
|
@@ -30136,8 +30213,8 @@ var require_modular = __commonJS((exports) => {
|
|
|
30136
30213
|
}
|
|
30137
30214
|
function FpSqrt(P) {
|
|
30138
30215
|
if (P % _4n === _3n) {
|
|
30139
|
-
const p1div4 = (P + _1n) / _4n;
|
|
30140
30216
|
return function sqrt3mod4(Fp, n) {
|
|
30217
|
+
const p1div4 = (P + _1n) / _4n;
|
|
30141
30218
|
const root = Fp.pow(n, p1div4);
|
|
30142
30219
|
if (!Fp.eql(Fp.sqr(root), n))
|
|
30143
30220
|
throw new Error("Cannot find square root");
|
|
@@ -30145,9 +30222,9 @@ var require_modular = __commonJS((exports) => {
|
|
|
30145
30222
|
};
|
|
30146
30223
|
}
|
|
30147
30224
|
if (P % _8n === _5n) {
|
|
30148
|
-
const c1 = (P - _5n) / _8n;
|
|
30149
30225
|
return function sqrt5mod8(Fp, n) {
|
|
30150
30226
|
const n2 = Fp.mul(n, _2n);
|
|
30227
|
+
const c1 = (P - _5n) / _8n;
|
|
30151
30228
|
const v = Fp.pow(n2, c1);
|
|
30152
30229
|
const nv = Fp.mul(n, v);
|
|
30153
30230
|
const i = Fp.mul(Fp.mul(nv, _2n), v);
|
|
@@ -30194,55 +30271,60 @@ var require_modular = __commonJS((exports) => {
|
|
|
30194
30271
|
}, initial);
|
|
30195
30272
|
return (0, utils_ts_1.validateObject)(field, opts);
|
|
30196
30273
|
}
|
|
30197
|
-
function FpPow(
|
|
30274
|
+
function FpPow(Fp, num, power) {
|
|
30198
30275
|
if (power < _0n)
|
|
30199
30276
|
throw new Error("invalid exponent, negatives unsupported");
|
|
30200
30277
|
if (power === _0n)
|
|
30201
|
-
return
|
|
30278
|
+
return Fp.ONE;
|
|
30202
30279
|
if (power === _1n)
|
|
30203
30280
|
return num;
|
|
30204
|
-
let p =
|
|
30281
|
+
let p = Fp.ONE;
|
|
30205
30282
|
let d = num;
|
|
30206
30283
|
while (power > _0n) {
|
|
30207
30284
|
if (power & _1n)
|
|
30208
|
-
p =
|
|
30209
|
-
d =
|
|
30285
|
+
p = Fp.mul(p, d);
|
|
30286
|
+
d = Fp.sqr(d);
|
|
30210
30287
|
power >>= _1n;
|
|
30211
30288
|
}
|
|
30212
30289
|
return p;
|
|
30213
30290
|
}
|
|
30214
|
-
function FpInvertBatch(
|
|
30215
|
-
const
|
|
30216
|
-
const
|
|
30217
|
-
if (
|
|
30291
|
+
function FpInvertBatch(Fp, nums, passZero = false) {
|
|
30292
|
+
const inverted = new Array(nums.length).fill(passZero ? Fp.ZERO : undefined);
|
|
30293
|
+
const multipliedAcc = nums.reduce((acc, num, i) => {
|
|
30294
|
+
if (Fp.is0(num))
|
|
30218
30295
|
return acc;
|
|
30219
|
-
|
|
30220
|
-
return
|
|
30221
|
-
},
|
|
30222
|
-
const
|
|
30296
|
+
inverted[i] = acc;
|
|
30297
|
+
return Fp.mul(acc, num);
|
|
30298
|
+
}, Fp.ONE);
|
|
30299
|
+
const invertedAcc = Fp.inv(multipliedAcc);
|
|
30223
30300
|
nums.reduceRight((acc, num, i) => {
|
|
30224
|
-
if (
|
|
30301
|
+
if (Fp.is0(num))
|
|
30225
30302
|
return acc;
|
|
30226
|
-
|
|
30227
|
-
return
|
|
30228
|
-
},
|
|
30229
|
-
return
|
|
30230
|
-
}
|
|
30231
|
-
function FpDiv(
|
|
30232
|
-
return
|
|
30233
|
-
}
|
|
30234
|
-
function FpLegendre(
|
|
30235
|
-
const
|
|
30236
|
-
|
|
30237
|
-
|
|
30238
|
-
|
|
30239
|
-
const
|
|
30240
|
-
|
|
30241
|
-
|
|
30242
|
-
|
|
30243
|
-
|
|
30303
|
+
inverted[i] = Fp.mul(acc, inverted[i]);
|
|
30304
|
+
return Fp.mul(acc, num);
|
|
30305
|
+
}, invertedAcc);
|
|
30306
|
+
return inverted;
|
|
30307
|
+
}
|
|
30308
|
+
function FpDiv(Fp, lhs, rhs) {
|
|
30309
|
+
return Fp.mul(lhs, typeof rhs === "bigint" ? invert(rhs, Fp.ORDER) : Fp.inv(rhs));
|
|
30310
|
+
}
|
|
30311
|
+
function FpLegendre(Fp, n) {
|
|
30312
|
+
const legc = (Fp.ORDER - _1n) / _2n;
|
|
30313
|
+
const powered = Fp.pow(n, legc);
|
|
30314
|
+
const yes = Fp.eql(powered, Fp.ONE);
|
|
30315
|
+
const zero = Fp.eql(powered, Fp.ZERO);
|
|
30316
|
+
const no = Fp.eql(powered, Fp.neg(Fp.ONE));
|
|
30317
|
+
if (!yes && !zero && !no)
|
|
30318
|
+
throw new Error("Cannot find square root: probably non-prime P");
|
|
30319
|
+
return yes ? 1 : zero ? 0 : -1;
|
|
30320
|
+
}
|
|
30321
|
+
function FpIsSquare(Fp, n) {
|
|
30322
|
+
const l = FpLegendre(Fp, n);
|
|
30323
|
+
return l === 0 || l === 1;
|
|
30244
30324
|
}
|
|
30245
30325
|
function nLength(n, nBitLength) {
|
|
30326
|
+
if (nBitLength !== undefined)
|
|
30327
|
+
(0, utils_1.anumber)(nBitLength);
|
|
30246
30328
|
const _nBitLength = nBitLength !== undefined ? nBitLength : n.toString(2).length;
|
|
30247
30329
|
const nByteLength = Math.ceil(_nBitLength / 8);
|
|
30248
30330
|
return { nBitLength: _nBitLength, nByteLength };
|
|
@@ -30288,14 +30370,14 @@ var require_modular = __commonJS((exports) => {
|
|
|
30288
30370
|
sqrtP = FpSqrt(ORDER);
|
|
30289
30371
|
return sqrtP(f, n);
|
|
30290
30372
|
}),
|
|
30291
|
-
invertBatch: (lst) => FpInvertBatch(f, lst),
|
|
30292
|
-
cmov: (a, b, c) => c ? b : a,
|
|
30293
30373
|
toBytes: (num) => isLE ? (0, utils_ts_1.numberToBytesLE)(num, BYTES) : (0, utils_ts_1.numberToBytesBE)(num, BYTES),
|
|
30294
30374
|
fromBytes: (bytes) => {
|
|
30295
30375
|
if (bytes.length !== BYTES)
|
|
30296
30376
|
throw new Error("Field.fromBytes: expected " + BYTES + " bytes, got " + bytes.length);
|
|
30297
30377
|
return isLE ? (0, utils_ts_1.bytesToNumberLE)(bytes) : (0, utils_ts_1.bytesToNumberBE)(bytes);
|
|
30298
|
-
}
|
|
30378
|
+
},
|
|
30379
|
+
invertBatch: (lst) => FpInvertBatch(f, lst),
|
|
30380
|
+
cmov: (a, b, c) => c ? b : a
|
|
30299
30381
|
});
|
|
30300
30382
|
return Object.freeze(f);
|
|
30301
30383
|
}
|
|
@@ -30342,7 +30424,7 @@ var require_modular = __commonJS((exports) => {
|
|
|
30342
30424
|
}
|
|
30343
30425
|
});
|
|
30344
30426
|
|
|
30345
|
-
// ../../node_modules/@noble/curves/abstract/curve.js
|
|
30427
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/curve.js
|
|
30346
30428
|
var require_curve = __commonJS((exports) => {
|
|
30347
30429
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30348
30430
|
exports.wNAF = wNAF;
|
|
@@ -30583,7 +30665,7 @@ var require_curve = __commonJS((exports) => {
|
|
|
30583
30665
|
}
|
|
30584
30666
|
});
|
|
30585
30667
|
|
|
30586
|
-
// ../../node_modules/@noble/curves/abstract/edwards.js
|
|
30668
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/edwards.js
|
|
30587
30669
|
var require_edwards = __commonJS((exports) => {
|
|
30588
30670
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30589
30671
|
exports.twistedEdwards = twistedEdwards;
|
|
@@ -30701,7 +30783,7 @@ var require_edwards = __commonJS((exports) => {
|
|
|
30701
30783
|
return new Point(x, y, _1n, modP(x * y));
|
|
30702
30784
|
}
|
|
30703
30785
|
static normalizeZ(points) {
|
|
30704
|
-
const toInv =
|
|
30786
|
+
const toInv = (0, modular_ts_1.FpInvertBatch)(Fp, points.map((p) => p.ez));
|
|
30705
30787
|
return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);
|
|
30706
30788
|
}
|
|
30707
30789
|
static msm(points, scalars) {
|
|
@@ -30869,7 +30951,7 @@ var require_edwards = __commonJS((exports) => {
|
|
|
30869
30951
|
function getPublicKey(privKey) {
|
|
30870
30952
|
return getExtendedPublicKey(privKey).pointBytes;
|
|
30871
30953
|
}
|
|
30872
|
-
function hashDomainToScalar(context =
|
|
30954
|
+
function hashDomainToScalar(context = Uint8Array.of(), ...msgs) {
|
|
30873
30955
|
const msg = (0, utils_ts_1.concatBytes)(...msgs);
|
|
30874
30956
|
return modN_LE(cHash(domain(msg, (0, utils_ts_1.ensureBytes)("context", context), !!prehash)));
|
|
30875
30957
|
}
|
|
@@ -30933,7 +31015,7 @@ var require_edwards = __commonJS((exports) => {
|
|
|
30933
31015
|
}
|
|
30934
31016
|
});
|
|
30935
31017
|
|
|
30936
|
-
// ../../node_modules/@noble/curves/abstract/hash-to-curve.js
|
|
31018
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/hash-to-curve.js
|
|
30937
31019
|
var require_hash_to_curve = __commonJS((exports) => {
|
|
30938
31020
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30939
31021
|
exports.expand_message_xmd = expand_message_xmd;
|
|
@@ -31040,49 +31122,53 @@ var require_hash_to_curve = __commonJS((exports) => {
|
|
|
31040
31122
|
return u;
|
|
31041
31123
|
}
|
|
31042
31124
|
function isogenyMap(field, map2) {
|
|
31043
|
-
const
|
|
31125
|
+
const coeff = map2.map((i) => Array.from(i).reverse());
|
|
31044
31126
|
return (x, y) => {
|
|
31045
|
-
const [
|
|
31046
|
-
|
|
31047
|
-
|
|
31048
|
-
|
|
31049
|
-
y = field.mul(y, field.div(yNum, yDen));
|
|
31127
|
+
const [xn, xd, yn, yd] = coeff.map((val) => val.reduce((acc, i) => field.add(field.mul(acc, x), i)));
|
|
31128
|
+
const [xd_inv, yd_inv] = (0, modular_ts_1.FpInvertBatch)(field, [xd, yd], true);
|
|
31129
|
+
x = field.mul(xn, xd_inv);
|
|
31130
|
+
y = field.mul(y, field.mul(yn, yd_inv));
|
|
31050
31131
|
return { x, y };
|
|
31051
31132
|
};
|
|
31052
31133
|
}
|
|
31053
|
-
function createHasher(Point, mapToCurve,
|
|
31134
|
+
function createHasher(Point, mapToCurve, defaults) {
|
|
31054
31135
|
if (typeof mapToCurve !== "function")
|
|
31055
31136
|
throw new Error("mapToCurve() must be defined");
|
|
31137
|
+
function map2(num) {
|
|
31138
|
+
return Point.fromAffine(mapToCurve(num));
|
|
31139
|
+
}
|
|
31140
|
+
function clear(initial) {
|
|
31141
|
+
const P = initial.clearCofactor();
|
|
31142
|
+
if (P.equals(Point.ZERO))
|
|
31143
|
+
return Point.ZERO;
|
|
31144
|
+
P.assertValidity();
|
|
31145
|
+
return P;
|
|
31146
|
+
}
|
|
31056
31147
|
return {
|
|
31148
|
+
defaults,
|
|
31057
31149
|
hashToCurve(msg, options) {
|
|
31058
|
-
const u = hash_to_field(msg, 2, { ...
|
|
31059
|
-
const u0 =
|
|
31060
|
-
const u1 =
|
|
31061
|
-
|
|
31062
|
-
P.assertValidity();
|
|
31063
|
-
return P;
|
|
31150
|
+
const u = hash_to_field(msg, 2, { ...defaults, DST: defaults.DST, ...options });
|
|
31151
|
+
const u0 = map2(u[0]);
|
|
31152
|
+
const u1 = map2(u[1]);
|
|
31153
|
+
return clear(u0.add(u1));
|
|
31064
31154
|
},
|
|
31065
31155
|
encodeToCurve(msg, options) {
|
|
31066
|
-
const u = hash_to_field(msg, 1, { ...
|
|
31067
|
-
|
|
31068
|
-
P.assertValidity();
|
|
31069
|
-
return P;
|
|
31156
|
+
const u = hash_to_field(msg, 1, { ...defaults, DST: defaults.encodeDST, ...options });
|
|
31157
|
+
return clear(map2(u[0]));
|
|
31070
31158
|
},
|
|
31071
31159
|
mapToCurve(scalars) {
|
|
31072
31160
|
if (!Array.isArray(scalars))
|
|
31073
|
-
throw new Error("
|
|
31161
|
+
throw new Error("expected array of bigints");
|
|
31074
31162
|
for (const i of scalars)
|
|
31075
31163
|
if (typeof i !== "bigint")
|
|
31076
|
-
throw new Error("
|
|
31077
|
-
|
|
31078
|
-
P.assertValidity();
|
|
31079
|
-
return P;
|
|
31164
|
+
throw new Error("expected array of bigints");
|
|
31165
|
+
return clear(map2(scalars));
|
|
31080
31166
|
}
|
|
31081
31167
|
};
|
|
31082
31168
|
}
|
|
31083
31169
|
});
|
|
31084
31170
|
|
|
31085
|
-
// ../../node_modules/@noble/curves/abstract/montgomery.js
|
|
31171
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/montgomery.js
|
|
31086
31172
|
var require_montgomery = __commonJS((exports) => {
|
|
31087
31173
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31088
31174
|
exports.montgomery = montgomery;
|
|
@@ -31107,12 +31193,13 @@ var require_montgomery = __commonJS((exports) => {
|
|
|
31107
31193
|
function montgomery(curveDef) {
|
|
31108
31194
|
const CURVE = validateOpts(curveDef);
|
|
31109
31195
|
const { P } = CURVE;
|
|
31196
|
+
const Fp = (0, modular_ts_1.Field)(P);
|
|
31110
31197
|
const modP = (n) => (0, modular_ts_1.mod)(n, P);
|
|
31111
31198
|
const montgomeryBits = CURVE.montgomeryBits;
|
|
31112
31199
|
const montgomeryBytes = Math.ceil(montgomeryBits / 8);
|
|
31113
31200
|
const fieldLen = CURVE.nByteLength;
|
|
31114
31201
|
const adjustScalarBytes = CURVE.adjustScalarBytes || ((bytes) => bytes);
|
|
31115
|
-
const powPminus2 = CURVE.powPminus2 || ((x) =>
|
|
31202
|
+
const powPminus2 = CURVE.powPminus2 || ((x) => Fp.pow(x, P - BigInt(2)));
|
|
31116
31203
|
function cswap(swap, x_2, x_3) {
|
|
31117
31204
|
const dummy = modP(swap * (x_2 - x_3));
|
|
31118
31205
|
x_2 = modP(x_2 - dummy);
|
|
@@ -31207,10 +31294,10 @@ var require_montgomery = __commonJS((exports) => {
|
|
|
31207
31294
|
}
|
|
31208
31295
|
});
|
|
31209
31296
|
|
|
31210
|
-
// ../../node_modules/@noble/curves/ed25519.js
|
|
31297
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/ed25519.js
|
|
31211
31298
|
var require_ed25519 = __commonJS((exports) => {
|
|
31212
31299
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31213
|
-
exports.hash_to_ristretto255 = exports.hashToRistretto255 = exports.RistrettoPoint = exports.encodeToCurve = exports.hashToCurve = exports.edwardsToMontgomery = exports.x25519 = exports.ed25519ph = exports.ed25519ctx = exports.ed25519 = exports.ED25519_TORSION_SUBGROUP = undefined;
|
|
31300
|
+
exports.hash_to_ristretto255 = exports.hashToRistretto255 = exports.RistrettoPoint = exports.encodeToCurve = exports.hashToCurve = exports.ed25519_hasher = exports.edwardsToMontgomery = exports.x25519 = exports.ed25519ph = exports.ed25519ctx = exports.ed25519 = exports.ED25519_TORSION_SUBGROUP = undefined;
|
|
31214
31301
|
exports.edwardsToMontgomeryPub = edwardsToMontgomeryPub;
|
|
31215
31302
|
exports.edwardsToMontgomeryPriv = edwardsToMontgomeryPriv;
|
|
31216
31303
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
@@ -31395,10 +31482,10 @@ var require_ed25519 = __commonJS((exports) => {
|
|
|
31395
31482
|
xd = Fp.cmov(xd, Fp.ONE, e3);
|
|
31396
31483
|
yn = Fp.cmov(yn, Fp.ONE, e3);
|
|
31397
31484
|
yd = Fp.cmov(yd, Fp.ONE, e3);
|
|
31398
|
-
const
|
|
31399
|
-
return { x: Fp.mul(xn,
|
|
31485
|
+
const [xd_inv, yd_inv] = (0, modular_ts_1.FpInvertBatch)(Fp, [xd, yd], true);
|
|
31486
|
+
return { x: Fp.mul(xn, xd_inv), y: Fp.mul(yn, yd_inv) };
|
|
31400
31487
|
}
|
|
31401
|
-
|
|
31488
|
+
exports.ed25519_hasher = (() => (0, hash_to_curve_ts_1.createHasher)(exports.ed25519.ExtendedPoint, (scalars) => map_to_curve_elligator2_edwards25519(scalars[0]), {
|
|
31402
31489
|
DST: "edwards25519_XMD:SHA-512_ELL2_RO_",
|
|
31403
31490
|
encodeDST: "edwards25519_XMD:SHA-512_ELL2_NU_",
|
|
31404
31491
|
p: Fp.ORDER,
|
|
@@ -31407,8 +31494,8 @@ var require_ed25519 = __commonJS((exports) => {
|
|
|
31407
31494
|
expand: "xmd",
|
|
31408
31495
|
hash: sha2_1.sha512
|
|
31409
31496
|
}))();
|
|
31410
|
-
exports.hashToCurve = (() =>
|
|
31411
|
-
exports.encodeToCurve = (() =>
|
|
31497
|
+
exports.hashToCurve = (() => exports.ed25519_hasher.hashToCurve)();
|
|
31498
|
+
exports.encodeToCurve = (() => exports.ed25519_hasher.encodeToCurve)();
|
|
31412
31499
|
function aristp(other) {
|
|
31413
31500
|
if (!(other instanceof RistPoint))
|
|
31414
31501
|
throw new Error("RistrettoPoint expected");
|
|
@@ -31574,11 +31661,10 @@ var require_ed25519 = __commonJS((exports) => {
|
|
|
31574
31661
|
exports.hash_to_ristretto255 = exports.hashToRistretto255;
|
|
31575
31662
|
});
|
|
31576
31663
|
|
|
31577
|
-
// ../../node_modules/@noble/hashes/hmac.js
|
|
31664
|
+
// ../../node_modules/eciesjs/node_modules/@noble/hashes/hmac.js
|
|
31578
31665
|
var require_hmac = __commonJS((exports) => {
|
|
31579
31666
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31580
31667
|
exports.hmac = exports.HMAC = undefined;
|
|
31581
|
-
var _assert_ts_1 = require__assert();
|
|
31582
31668
|
var utils_ts_1 = require_utils7();
|
|
31583
31669
|
|
|
31584
31670
|
class HMAC extends utils_ts_1.Hash {
|
|
@@ -31586,7 +31672,7 @@ var require_hmac = __commonJS((exports) => {
|
|
|
31586
31672
|
super();
|
|
31587
31673
|
this.finished = false;
|
|
31588
31674
|
this.destroyed = false;
|
|
31589
|
-
(0,
|
|
31675
|
+
(0, utils_ts_1.ahash)(hash);
|
|
31590
31676
|
const key = (0, utils_ts_1.toBytes)(_key);
|
|
31591
31677
|
this.iHash = hash.create();
|
|
31592
31678
|
if (typeof this.iHash.update !== "function")
|
|
@@ -31603,16 +31689,16 @@ var require_hmac = __commonJS((exports) => {
|
|
|
31603
31689
|
for (let i = 0;i < pad.length; i++)
|
|
31604
31690
|
pad[i] ^= 54 ^ 92;
|
|
31605
31691
|
this.oHash.update(pad);
|
|
31606
|
-
|
|
31692
|
+
(0, utils_ts_1.clean)(pad);
|
|
31607
31693
|
}
|
|
31608
31694
|
update(buf) {
|
|
31609
|
-
(0,
|
|
31695
|
+
(0, utils_ts_1.aexists)(this);
|
|
31610
31696
|
this.iHash.update(buf);
|
|
31611
31697
|
return this;
|
|
31612
31698
|
}
|
|
31613
31699
|
digestInto(out) {
|
|
31614
|
-
(0,
|
|
31615
|
-
(0,
|
|
31700
|
+
(0, utils_ts_1.aexists)(this);
|
|
31701
|
+
(0, utils_ts_1.abytes)(out, this.outputLen);
|
|
31616
31702
|
this.finished = true;
|
|
31617
31703
|
this.iHash.digestInto(out);
|
|
31618
31704
|
this.oHash.update(out);
|
|
@@ -31636,6 +31722,9 @@ var require_hmac = __commonJS((exports) => {
|
|
|
31636
31722
|
to.iHash = iHash._cloneInto(to.iHash);
|
|
31637
31723
|
return to;
|
|
31638
31724
|
}
|
|
31725
|
+
clone() {
|
|
31726
|
+
return this._cloneInto();
|
|
31727
|
+
}
|
|
31639
31728
|
destroy() {
|
|
31640
31729
|
this.destroyed = true;
|
|
31641
31730
|
this.oHash.destroy();
|
|
@@ -31648,7 +31737,7 @@ var require_hmac = __commonJS((exports) => {
|
|
|
31648
31737
|
exports.hmac.create = (hash, key) => new HMAC(hash, key);
|
|
31649
31738
|
});
|
|
31650
31739
|
|
|
31651
|
-
// ../../node_modules/@noble/curves/abstract/weierstrass.js
|
|
31740
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/abstract/weierstrass.js
|
|
31652
31741
|
var require_weierstrass = __commonJS((exports) => {
|
|
31653
31742
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31654
31743
|
exports.DER = exports.DERErr = undefined;
|
|
@@ -31883,7 +31972,7 @@ var require_weierstrass = __commonJS((exports) => {
|
|
|
31883
31972
|
constructor(px, py, pz) {
|
|
31884
31973
|
if (px == null || !Fp.isValid(px))
|
|
31885
31974
|
throw new Error("x required");
|
|
31886
|
-
if (py == null || !Fp.isValid(py))
|
|
31975
|
+
if (py == null || !Fp.isValid(py) || Fp.is0(py))
|
|
31887
31976
|
throw new Error("y required");
|
|
31888
31977
|
if (pz == null || !Fp.isValid(pz))
|
|
31889
31978
|
throw new Error("z required");
|
|
@@ -31910,7 +31999,7 @@ var require_weierstrass = __commonJS((exports) => {
|
|
|
31910
31999
|
return this.toAffine().y;
|
|
31911
32000
|
}
|
|
31912
32001
|
static normalizeZ(points) {
|
|
31913
|
-
const toInv =
|
|
32002
|
+
const toInv = (0, modular_ts_1.FpInvertBatch)(Fp, points.map((p) => p.pz));
|
|
31914
32003
|
return points.map((p, i) => p.toAffine(toInv[i])).map(Point.fromAffine);
|
|
31915
32004
|
}
|
|
31916
32005
|
static fromHex(hex) {
|
|
@@ -32271,7 +32360,7 @@ var require_weierstrass = __commonJS((exports) => {
|
|
|
32271
32360
|
return (0, utils_ts_1.hexToBytes)(this.toDERHex());
|
|
32272
32361
|
}
|
|
32273
32362
|
toDERHex() {
|
|
32274
|
-
return exports.DER.hexFromSig(
|
|
32363
|
+
return exports.DER.hexFromSig(this);
|
|
32275
32364
|
}
|
|
32276
32365
|
toCompactRawBytes() {
|
|
32277
32366
|
return (0, utils_ts_1.hexToBytes)(this.toCompactHex());
|
|
@@ -32546,13 +32635,14 @@ var require_weierstrass = __commonJS((exports) => {
|
|
|
32546
32635
|
y = Fp.cmov(y, value, isValid2);
|
|
32547
32636
|
const e1 = Fp.isOdd(u) === Fp.isOdd(y);
|
|
32548
32637
|
y = Fp.cmov(Fp.neg(y), y, e1);
|
|
32549
|
-
|
|
32638
|
+
const tv4_inv = (0, modular_ts_1.FpInvertBatch)(Fp, [tv4], true)[0];
|
|
32639
|
+
x = Fp.mul(x, tv4_inv);
|
|
32550
32640
|
return { x, y };
|
|
32551
32641
|
};
|
|
32552
32642
|
}
|
|
32553
32643
|
});
|
|
32554
32644
|
|
|
32555
|
-
// ../../node_modules/@noble/curves/_shortw_utils.js
|
|
32645
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/_shortw_utils.js
|
|
32556
32646
|
var require__shortw_utils = __commonJS((exports) => {
|
|
32557
32647
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32558
32648
|
exports.getHash = getHash;
|
|
@@ -32574,10 +32664,10 @@ var require__shortw_utils = __commonJS((exports) => {
|
|
|
32574
32664
|
}
|
|
32575
32665
|
});
|
|
32576
32666
|
|
|
32577
|
-
// ../../node_modules/@noble/curves/secp256k1.js
|
|
32667
|
+
// ../../node_modules/eciesjs/node_modules/@noble/curves/secp256k1.js
|
|
32578
32668
|
var require_secp256k1 = __commonJS((exports) => {
|
|
32579
32669
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32580
|
-
exports.encodeToCurve = exports.hashToCurve = exports.schnorr = exports.secp256k1 = undefined;
|
|
32670
|
+
exports.encodeToCurve = exports.hashToCurve = exports.secp256k1_hasher = exports.schnorr = exports.secp256k1 = undefined;
|
|
32581
32671
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
32582
32672
|
var sha2_1 = require_sha2();
|
|
32583
32673
|
var utils_1 = require_utils7();
|
|
@@ -32773,7 +32863,7 @@ var require_secp256k1 = __commonJS((exports) => {
|
|
|
32773
32863
|
B: BigInt("1771"),
|
|
32774
32864
|
Z: Fpk1.create(BigInt("-11"))
|
|
32775
32865
|
}))();
|
|
32776
|
-
|
|
32866
|
+
exports.secp256k1_hasher = (() => (0, hash_to_curve_ts_1.createHasher)(exports.secp256k1.ProjectivePoint, (scalars) => {
|
|
32777
32867
|
const { x, y } = mapSWU(Fpk1.create(scalars[0]));
|
|
32778
32868
|
return isoMap(x, y);
|
|
32779
32869
|
}, {
|
|
@@ -32785,8 +32875,8 @@ var require_secp256k1 = __commonJS((exports) => {
|
|
|
32785
32875
|
expand: "xmd",
|
|
32786
32876
|
hash: sha2_1.sha256
|
|
32787
32877
|
}))();
|
|
32788
|
-
exports.hashToCurve = (() =>
|
|
32789
|
-
exports.encodeToCurve = (() =>
|
|
32878
|
+
exports.hashToCurve = (() => exports.secp256k1_hasher.hashToCurve)();
|
|
32879
|
+
exports.encodeToCurve = (() => exports.secp256k1_hasher.encodeToCurve)();
|
|
32790
32880
|
});
|
|
32791
32881
|
|
|
32792
32882
|
// ../../node_modules/eciesjs/dist/utils/hex.js
|
|
@@ -32900,51 +32990,61 @@ var require_elliptic = __commonJS((exports) => {
|
|
|
32900
32990
|
};
|
|
32901
32991
|
});
|
|
32902
32992
|
|
|
32903
|
-
// ../../node_modules/@noble/hashes/hkdf.js
|
|
32993
|
+
// ../../node_modules/eciesjs/node_modules/@noble/hashes/hkdf.js
|
|
32904
32994
|
var require_hkdf = __commonJS((exports) => {
|
|
32905
32995
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32906
32996
|
exports.hkdf = undefined;
|
|
32907
32997
|
exports.extract = extract;
|
|
32908
32998
|
exports.expand = expand;
|
|
32909
|
-
var _assert_ts_1 = require__assert();
|
|
32910
32999
|
var hmac_ts_1 = require_hmac();
|
|
32911
33000
|
var utils_ts_1 = require_utils7();
|
|
32912
33001
|
function extract(hash, ikm, salt) {
|
|
32913
|
-
(0,
|
|
33002
|
+
(0, utils_ts_1.ahash)(hash);
|
|
32914
33003
|
if (salt === undefined)
|
|
32915
33004
|
salt = new Uint8Array(hash.outputLen);
|
|
32916
33005
|
return (0, hmac_ts_1.hmac)(hash, (0, utils_ts_1.toBytes)(salt), (0, utils_ts_1.toBytes)(ikm));
|
|
32917
33006
|
}
|
|
32918
|
-
var HKDF_COUNTER = /* @__PURE__ */
|
|
32919
|
-
var EMPTY_BUFFER = /* @__PURE__ */
|
|
33007
|
+
var HKDF_COUNTER = /* @__PURE__ */ Uint8Array.from([0]);
|
|
33008
|
+
var EMPTY_BUFFER = /* @__PURE__ */ Uint8Array.of();
|
|
32920
33009
|
function expand(hash, prk, info, length = 32) {
|
|
32921
|
-
(0,
|
|
32922
|
-
(0,
|
|
32923
|
-
|
|
33010
|
+
(0, utils_ts_1.ahash)(hash);
|
|
33011
|
+
(0, utils_ts_1.anumber)(length);
|
|
33012
|
+
const olen = hash.outputLen;
|
|
33013
|
+
if (length > 255 * olen)
|
|
32924
33014
|
throw new Error("Length should be <= 255*HashLen");
|
|
32925
|
-
const blocks = Math.ceil(length /
|
|
33015
|
+
const blocks = Math.ceil(length / olen);
|
|
32926
33016
|
if (info === undefined)
|
|
32927
33017
|
info = EMPTY_BUFFER;
|
|
32928
|
-
const okm = new Uint8Array(blocks *
|
|
33018
|
+
const okm = new Uint8Array(blocks * olen);
|
|
32929
33019
|
const HMAC = hmac_ts_1.hmac.create(hash, prk);
|
|
32930
33020
|
const HMACTmp = HMAC._cloneInto();
|
|
32931
33021
|
const T = new Uint8Array(HMAC.outputLen);
|
|
32932
33022
|
for (let counter = 0;counter < blocks; counter++) {
|
|
32933
33023
|
HKDF_COUNTER[0] = counter + 1;
|
|
32934
33024
|
HMACTmp.update(counter === 0 ? EMPTY_BUFFER : T).update(info).update(HKDF_COUNTER).digestInto(T);
|
|
32935
|
-
okm.set(T,
|
|
33025
|
+
okm.set(T, olen * counter);
|
|
32936
33026
|
HMAC._cloneInto(HMACTmp);
|
|
32937
33027
|
}
|
|
32938
33028
|
HMAC.destroy();
|
|
32939
33029
|
HMACTmp.destroy();
|
|
32940
|
-
|
|
32941
|
-
HKDF_COUNTER.fill(0);
|
|
33030
|
+
(0, utils_ts_1.clean)(T, HKDF_COUNTER);
|
|
32942
33031
|
return okm.slice(0, length);
|
|
32943
33032
|
}
|
|
32944
33033
|
var hkdf = (hash, ikm, salt, info, length) => expand(hash, extract(hash, ikm, salt), info, length);
|
|
32945
33034
|
exports.hkdf = hkdf;
|
|
32946
33035
|
});
|
|
32947
33036
|
|
|
33037
|
+
// ../../node_modules/eciesjs/node_modules/@noble/hashes/sha256.js
|
|
33038
|
+
var require_sha256 = __commonJS((exports) => {
|
|
33039
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33040
|
+
exports.sha224 = exports.SHA224 = exports.sha256 = exports.SHA256 = undefined;
|
|
33041
|
+
var sha2_ts_1 = require_sha2();
|
|
33042
|
+
exports.SHA256 = sha2_ts_1.SHA256;
|
|
33043
|
+
exports.sha256 = sha2_ts_1.sha256;
|
|
33044
|
+
exports.SHA224 = sha2_ts_1.SHA224;
|
|
33045
|
+
exports.sha224 = sha2_ts_1.sha224;
|
|
33046
|
+
});
|
|
33047
|
+
|
|
32948
33048
|
// ../../node_modules/eciesjs/dist/utils/hash.js
|
|
32949
33049
|
var require_hash = __commonJS((exports) => {
|
|
32950
33050
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -61134,7 +61234,7 @@ var {
|
|
|
61134
61234
|
var package_default = {
|
|
61135
61235
|
name: "@settlemint/sdk-mcp",
|
|
61136
61236
|
description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
61137
|
-
version: "2.2.
|
|
61237
|
+
version: "2.2.1",
|
|
61138
61238
|
type: "module",
|
|
61139
61239
|
private: false,
|
|
61140
61240
|
license: "FSL-1.1-MIT",
|
|
@@ -61176,8 +61276,8 @@ var package_default = {
|
|
|
61176
61276
|
"@graphql-tools/load": "8.1.0",
|
|
61177
61277
|
"@graphql-tools/url-loader": "8.0.31",
|
|
61178
61278
|
"@modelcontextprotocol/sdk": "1.10.2",
|
|
61179
|
-
"@settlemint/sdk-js": "2.2.
|
|
61180
|
-
"@settlemint/sdk-utils": "2.2.
|
|
61279
|
+
"@settlemint/sdk-js": "2.2.1",
|
|
61280
|
+
"@settlemint/sdk-utils": "2.2.1",
|
|
61181
61281
|
"@commander-js/extra-typings": "11.1.0",
|
|
61182
61282
|
commander: "11.1.0",
|
|
61183
61283
|
zod: "3.24.3"
|
|
@@ -64855,6 +64955,14 @@ var PrivateKeyFragment = graphql(`
|
|
|
64855
64955
|
healthStatus
|
|
64856
64956
|
provider
|
|
64857
64957
|
region
|
|
64958
|
+
address
|
|
64959
|
+
blockchainNodes {
|
|
64960
|
+
... on BlockchainNode {
|
|
64961
|
+
id
|
|
64962
|
+
name
|
|
64963
|
+
uniqueName
|
|
64964
|
+
}
|
|
64965
|
+
}
|
|
64858
64966
|
}
|
|
64859
64967
|
`);
|
|
64860
64968
|
var getPrivateKeys = graphql(`
|
|
@@ -66917,4 +67025,4 @@ await main().catch((error2) => {
|
|
|
66917
67025
|
process.exit(1);
|
|
66918
67026
|
});
|
|
66919
67027
|
|
|
66920
|
-
//# debugId=
|
|
67028
|
+
//# debugId=C3C33B27539525B264756E2164756E21
|