@settlemint/sdk-mcp 2.1.5 → 2.2.0
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/mcp.js +90 -85
- package/dist/mcp.js.map +5 -6
- package/package.json +3 -3
package/dist/mcp.js
CHANGED
|
@@ -28357,23 +28357,51 @@ var require_decrypt = __commonJS((exports, module) => {
|
|
|
28357
28357
|
module.exports = decrypt;
|
|
28358
28358
|
});
|
|
28359
28359
|
|
|
28360
|
-
// ../../node_modules/@noble/ciphers/
|
|
28361
|
-
var
|
|
28360
|
+
// ../../node_modules/@noble/ciphers/utils.js
|
|
28361
|
+
var require_utils6 = __commonJS((exports) => {
|
|
28362
|
+
/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */
|
|
28362
28363
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28364
|
+
exports.wrapCipher = exports.Hash = exports.nextTick = exports.isLE = undefined;
|
|
28365
|
+
exports.isBytes = isBytes;
|
|
28363
28366
|
exports.abool = abool;
|
|
28367
|
+
exports.anumber = anumber;
|
|
28364
28368
|
exports.abytes = abytes;
|
|
28365
|
-
exports.aexists = aexists;
|
|
28366
28369
|
exports.ahash = ahash;
|
|
28367
|
-
exports.
|
|
28370
|
+
exports.aexists = aexists;
|
|
28368
28371
|
exports.aoutput = aoutput;
|
|
28369
|
-
exports.
|
|
28372
|
+
exports.u8 = u8;
|
|
28373
|
+
exports.u32 = u32;
|
|
28374
|
+
exports.clean = clean;
|
|
28375
|
+
exports.createView = createView;
|
|
28376
|
+
exports.bytesToHex = bytesToHex;
|
|
28377
|
+
exports.hexToBytes = hexToBytes;
|
|
28378
|
+
exports.hexToNumber = hexToNumber;
|
|
28379
|
+
exports.bytesToNumberBE = bytesToNumberBE;
|
|
28380
|
+
exports.numberToBytesBE = numberToBytesBE;
|
|
28381
|
+
exports.utf8ToBytes = utf8ToBytes;
|
|
28382
|
+
exports.bytesToUtf8 = bytesToUtf8;
|
|
28383
|
+
exports.toBytes = toBytes;
|
|
28384
|
+
exports.overlapBytes = overlapBytes;
|
|
28385
|
+
exports.complexOverlapBytes = complexOverlapBytes;
|
|
28386
|
+
exports.concatBytes = concatBytes;
|
|
28387
|
+
exports.checkOpts = checkOpts;
|
|
28388
|
+
exports.equalBytes = equalBytes;
|
|
28389
|
+
exports.getOutput = getOutput;
|
|
28390
|
+
exports.setBigUint64 = setBigUint64;
|
|
28391
|
+
exports.u64Lengths = u64Lengths;
|
|
28392
|
+
exports.isAligned32 = isAligned32;
|
|
28393
|
+
exports.copyBytes = copyBytes;
|
|
28394
|
+
function isBytes(a) {
|
|
28395
|
+
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
28396
|
+
}
|
|
28397
|
+
function abool(b) {
|
|
28398
|
+
if (typeof b !== "boolean")
|
|
28399
|
+
throw new Error(`boolean expected, not ${b}`);
|
|
28400
|
+
}
|
|
28370
28401
|
function anumber(n) {
|
|
28371
28402
|
if (!Number.isSafeInteger(n) || n < 0)
|
|
28372
28403
|
throw new Error("positive integer expected, got " + n);
|
|
28373
28404
|
}
|
|
28374
|
-
function isBytes(a) {
|
|
28375
|
-
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
28376
|
-
}
|
|
28377
28405
|
function abytes(b, ...lengths) {
|
|
28378
28406
|
if (!isBytes(b))
|
|
28379
28407
|
throw new Error("Uint8Array expected");
|
|
@@ -28382,7 +28410,7 @@ var require__assert = __commonJS((exports) => {
|
|
|
28382
28410
|
}
|
|
28383
28411
|
function ahash(h) {
|
|
28384
28412
|
if (typeof h !== "function" || typeof h.create !== "function")
|
|
28385
|
-
throw new Error("Hash should be wrapped by utils.
|
|
28413
|
+
throw new Error("Hash should be wrapped by utils.createHasher");
|
|
28386
28414
|
anumber(h.outputLen);
|
|
28387
28415
|
anumber(h.blockLen);
|
|
28388
28416
|
}
|
|
@@ -28399,49 +28427,27 @@ var require__assert = __commonJS((exports) => {
|
|
|
28399
28427
|
throw new Error("digestInto() expects output buffer of length at least " + min);
|
|
28400
28428
|
}
|
|
28401
28429
|
}
|
|
28402
|
-
function
|
|
28403
|
-
|
|
28404
|
-
throw new Error(`boolean expected, not ${b}`);
|
|
28430
|
+
function u8(arr) {
|
|
28431
|
+
return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
|
|
28405
28432
|
}
|
|
28406
|
-
|
|
28407
|
-
|
|
28408
|
-
|
|
28409
|
-
|
|
28410
|
-
|
|
28411
|
-
|
|
28412
|
-
|
|
28413
|
-
|
|
28414
|
-
|
|
28415
|
-
|
|
28416
|
-
|
|
28417
|
-
exports.
|
|
28418
|
-
|
|
28419
|
-
exports.toBytes = toBytes;
|
|
28420
|
-
exports.overlapBytes = overlapBytes;
|
|
28421
|
-
exports.complexOverlapBytes = complexOverlapBytes;
|
|
28422
|
-
exports.concatBytes = concatBytes;
|
|
28423
|
-
exports.checkOpts = checkOpts;
|
|
28424
|
-
exports.equalBytes = equalBytes;
|
|
28425
|
-
exports.getOutput = getOutput;
|
|
28426
|
-
exports.setBigUint64 = setBigUint64;
|
|
28427
|
-
exports.u64Lengths = u64Lengths;
|
|
28428
|
-
exports.isAligned32 = isAligned32;
|
|
28429
|
-
exports.copyBytes = copyBytes;
|
|
28430
|
-
exports.clean = clean;
|
|
28431
|
-
/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */
|
|
28432
|
-
var _assert_js_1 = require__assert();
|
|
28433
|
-
var u8 = (arr) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
|
|
28434
|
-
exports.u8 = u8;
|
|
28435
|
-
var u32 = (arr) => new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
|
28436
|
-
exports.u32 = u32;
|
|
28437
|
-
var createView = (arr) => new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
|
|
28438
|
-
exports.createView = createView;
|
|
28439
|
-
exports.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
28440
|
-
if (!exports.isLE)
|
|
28441
|
-
throw new Error("Non little-endian hardware is not supported");
|
|
28433
|
+
function u32(arr) {
|
|
28434
|
+
return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
|
|
28435
|
+
}
|
|
28436
|
+
function clean(...arrays) {
|
|
28437
|
+
for (let i = 0;i < arrays.length; i++) {
|
|
28438
|
+
arrays[i].fill(0);
|
|
28439
|
+
}
|
|
28440
|
+
}
|
|
28441
|
+
function createView(arr) {
|
|
28442
|
+
return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
|
|
28443
|
+
}
|
|
28444
|
+
exports.isLE = (() => new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68)();
|
|
28445
|
+
var hasHexBuiltin = /* @__PURE__ */ (() => typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function")();
|
|
28442
28446
|
var hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
|
|
28443
28447
|
function bytesToHex(bytes) {
|
|
28444
|
-
|
|
28448
|
+
abytes(bytes);
|
|
28449
|
+
if (hasHexBuiltin)
|
|
28450
|
+
return bytes.toHex();
|
|
28445
28451
|
let hex = "";
|
|
28446
28452
|
for (let i = 0;i < bytes.length; i++) {
|
|
28447
28453
|
hex += hexes[bytes[i]];
|
|
@@ -28461,6 +28467,8 @@ var require_utils6 = __commonJS((exports) => {
|
|
|
28461
28467
|
function hexToBytes(hex) {
|
|
28462
28468
|
if (typeof hex !== "string")
|
|
28463
28469
|
throw new Error("hex string expected, got " + typeof hex);
|
|
28470
|
+
if (hasHexBuiltin)
|
|
28471
|
+
return Uint8Array.fromHex(hex);
|
|
28464
28472
|
const hl = hex.length;
|
|
28465
28473
|
const al = hl / 2;
|
|
28466
28474
|
if (hl % 2)
|
|
@@ -28501,7 +28509,7 @@ var require_utils6 = __commonJS((exports) => {
|
|
|
28501
28509
|
function toBytes(data) {
|
|
28502
28510
|
if (typeof data === "string")
|
|
28503
28511
|
data = utf8ToBytes(data);
|
|
28504
|
-
else if (
|
|
28512
|
+
else if (isBytes(data))
|
|
28505
28513
|
data = copyBytes(data);
|
|
28506
28514
|
else
|
|
28507
28515
|
throw new Error("Uint8Array expected, got " + typeof data);
|
|
@@ -28518,7 +28526,7 @@ var require_utils6 = __commonJS((exports) => {
|
|
|
28518
28526
|
let sum = 0;
|
|
28519
28527
|
for (let i = 0;i < arrays.length; i++) {
|
|
28520
28528
|
const a = arrays[i];
|
|
28521
|
-
|
|
28529
|
+
abytes(a);
|
|
28522
28530
|
sum += a.length;
|
|
28523
28531
|
}
|
|
28524
28532
|
const res = new Uint8Array(sum);
|
|
@@ -28549,26 +28557,28 @@ var require_utils6 = __commonJS((exports) => {
|
|
|
28549
28557
|
exports.Hash = Hash;
|
|
28550
28558
|
var wrapCipher = (params, constructor) => {
|
|
28551
28559
|
function wrappedCipher(key, ...args) {
|
|
28552
|
-
|
|
28560
|
+
abytes(key);
|
|
28561
|
+
if (!exports.isLE)
|
|
28562
|
+
throw new Error("Non little-endian hardware is not yet supported");
|
|
28553
28563
|
if (params.nonceLength !== undefined) {
|
|
28554
28564
|
const nonce = args[0];
|
|
28555
28565
|
if (!nonce)
|
|
28556
28566
|
throw new Error("nonce / iv required");
|
|
28557
28567
|
if (params.varSizeNonce)
|
|
28558
|
-
|
|
28568
|
+
abytes(nonce);
|
|
28559
28569
|
else
|
|
28560
|
-
|
|
28570
|
+
abytes(nonce, params.nonceLength);
|
|
28561
28571
|
}
|
|
28562
28572
|
const tagl = params.tagLength;
|
|
28563
28573
|
if (tagl && args[1] !== undefined) {
|
|
28564
|
-
|
|
28574
|
+
abytes(args[1]);
|
|
28565
28575
|
}
|
|
28566
28576
|
const cipher = constructor(key, ...args);
|
|
28567
28577
|
const checkOutput = (fnLength, output) => {
|
|
28568
28578
|
if (output !== undefined) {
|
|
28569
28579
|
if (fnLength !== 2)
|
|
28570
28580
|
throw new Error("cipher output not supported");
|
|
28571
|
-
|
|
28581
|
+
abytes(output);
|
|
28572
28582
|
}
|
|
28573
28583
|
};
|
|
28574
28584
|
let called = false;
|
|
@@ -28577,12 +28587,12 @@ var require_utils6 = __commonJS((exports) => {
|
|
|
28577
28587
|
if (called)
|
|
28578
28588
|
throw new Error("cannot encrypt() twice with same key + nonce");
|
|
28579
28589
|
called = true;
|
|
28580
|
-
|
|
28590
|
+
abytes(data);
|
|
28581
28591
|
checkOutput(cipher.encrypt.length, output);
|
|
28582
28592
|
return cipher.encrypt(data, output);
|
|
28583
28593
|
},
|
|
28584
28594
|
decrypt(data, output) {
|
|
28585
|
-
|
|
28595
|
+
abytes(data);
|
|
28586
28596
|
if (tagl && data.length < tagl)
|
|
28587
28597
|
throw new Error("invalid ciphertext length: smaller than tagLength=" + tagl);
|
|
28588
28598
|
checkOutput(cipher.decrypt.length, output);
|
|
@@ -28616,11 +28626,12 @@ var require_utils6 = __commonJS((exports) => {
|
|
|
28616
28626
|
view.setUint32(byteOffset + h, wh, isLE);
|
|
28617
28627
|
view.setUint32(byteOffset + l, wl, isLE);
|
|
28618
28628
|
}
|
|
28619
|
-
function u64Lengths(
|
|
28629
|
+
function u64Lengths(dataLength, aadLength, isLE) {
|
|
28630
|
+
abool(isLE);
|
|
28620
28631
|
const num = new Uint8Array(16);
|
|
28621
|
-
const view =
|
|
28622
|
-
setBigUint64(view, 0, BigInt(
|
|
28623
|
-
setBigUint64(view, 8, BigInt(
|
|
28632
|
+
const view = createView(num);
|
|
28633
|
+
setBigUint64(view, 0, BigInt(aadLength), isLE);
|
|
28634
|
+
setBigUint64(view, 8, BigInt(dataLength), isLE);
|
|
28624
28635
|
return num;
|
|
28625
28636
|
}
|
|
28626
28637
|
function isAligned32(bytes) {
|
|
@@ -28629,11 +28640,6 @@ var require_utils6 = __commonJS((exports) => {
|
|
|
28629
28640
|
function copyBytes(bytes) {
|
|
28630
28641
|
return Uint8Array.from(bytes);
|
|
28631
28642
|
}
|
|
28632
|
-
function clean(...arrays) {
|
|
28633
|
-
for (let i = 0;i < arrays.length; i++) {
|
|
28634
|
-
arrays[i].fill(0);
|
|
28635
|
-
}
|
|
28636
|
-
}
|
|
28637
28643
|
});
|
|
28638
28644
|
|
|
28639
28645
|
// ../../node_modules/eciesjs/dist/consts.js
|
|
@@ -28716,14 +28722,13 @@ var require_webcrypto = __commonJS((exports) => {
|
|
|
28716
28722
|
exports.getWebcryptoSubtle = getWebcryptoSubtle;
|
|
28717
28723
|
exports.managedNonce = managedNonce;
|
|
28718
28724
|
var crypto_1 = require_cryptoNode();
|
|
28719
|
-
var
|
|
28720
|
-
var utils_js_1 = require_utils6();
|
|
28725
|
+
var utils_ts_1 = require_utils6();
|
|
28721
28726
|
function randomBytes(bytesLength = 32) {
|
|
28722
28727
|
if (crypto_1.crypto && typeof crypto_1.crypto.getRandomValues === "function") {
|
|
28723
28728
|
return crypto_1.crypto.getRandomValues(new Uint8Array(bytesLength));
|
|
28724
28729
|
}
|
|
28725
28730
|
if (crypto_1.crypto && typeof crypto_1.crypto.randomBytes === "function") {
|
|
28726
|
-
return crypto_1.crypto.randomBytes(bytesLength);
|
|
28731
|
+
return Uint8Array.from(crypto_1.crypto.randomBytes(bytesLength));
|
|
28727
28732
|
}
|
|
28728
28733
|
throw new Error("crypto.getRandomValues must be defined");
|
|
28729
28734
|
}
|
|
@@ -28734,12 +28739,12 @@ var require_webcrypto = __commonJS((exports) => {
|
|
|
28734
28739
|
}
|
|
28735
28740
|
function managedNonce(fn) {
|
|
28736
28741
|
const { nonceLength } = fn;
|
|
28737
|
-
(0,
|
|
28742
|
+
(0, utils_ts_1.anumber)(nonceLength);
|
|
28738
28743
|
return (key, ...args) => ({
|
|
28739
28744
|
encrypt(plaintext, ...argsEnc) {
|
|
28740
28745
|
const nonce = randomBytes(nonceLength);
|
|
28741
28746
|
const ciphertext = fn(key, nonce, ...args).encrypt(plaintext, ...argsEnc);
|
|
28742
|
-
const out = (0,
|
|
28747
|
+
const out = (0, utils_ts_1.concatBytes)(nonce, ciphertext);
|
|
28743
28748
|
ciphertext.fill(0);
|
|
28744
28749
|
return out;
|
|
28745
28750
|
},
|
|
@@ -28784,21 +28789,21 @@ var require_webcrypto = __commonJS((exports) => {
|
|
|
28784
28789
|
}
|
|
28785
28790
|
function generate(algo) {
|
|
28786
28791
|
return (key, nonce, AAD) => {
|
|
28787
|
-
(0,
|
|
28788
|
-
(0,
|
|
28792
|
+
(0, utils_ts_1.abytes)(key);
|
|
28793
|
+
(0, utils_ts_1.abytes)(nonce);
|
|
28789
28794
|
const keyParams = { name: algo, length: key.length * 8 };
|
|
28790
28795
|
const cryptParams = getCryptParams(algo, nonce, AAD);
|
|
28791
28796
|
let consumed = false;
|
|
28792
28797
|
return {
|
|
28793
28798
|
encrypt(plaintext) {
|
|
28794
|
-
(0,
|
|
28799
|
+
(0, utils_ts_1.abytes)(plaintext);
|
|
28795
28800
|
if (consumed)
|
|
28796
28801
|
throw new Error("Cannot encrypt() twice with same key / nonce");
|
|
28797
28802
|
consumed = true;
|
|
28798
28803
|
return exports.utils.encrypt(key, keyParams, cryptParams, plaintext);
|
|
28799
28804
|
},
|
|
28800
28805
|
decrypt(ciphertext) {
|
|
28801
|
-
(0,
|
|
28806
|
+
(0, utils_ts_1.abytes)(ciphertext);
|
|
28802
28807
|
return exports.utils.decrypt(key, keyParams, cryptParams, ciphertext);
|
|
28803
28808
|
}
|
|
28804
28809
|
};
|
|
@@ -28810,7 +28815,7 @@ var require_webcrypto = __commonJS((exports) => {
|
|
|
28810
28815
|
});
|
|
28811
28816
|
|
|
28812
28817
|
// ../../node_modules/@noble/hashes/_assert.js
|
|
28813
|
-
var
|
|
28818
|
+
var require__assert = __commonJS((exports) => {
|
|
28814
28819
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28815
28820
|
exports.anumber = anumber;
|
|
28816
28821
|
exports.abytes = abytes;
|
|
@@ -28884,7 +28889,7 @@ var require_utils7 = __commonJS((exports) => {
|
|
|
28884
28889
|
exports.wrapXOFConstructorWithOpts = wrapXOFConstructorWithOpts;
|
|
28885
28890
|
exports.randomBytes = randomBytes;
|
|
28886
28891
|
var crypto_1 = require_cryptoNode2();
|
|
28887
|
-
var _assert_ts_1 =
|
|
28892
|
+
var _assert_ts_1 = require__assert();
|
|
28888
28893
|
function isBytes(a) {
|
|
28889
28894
|
return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
|
|
28890
28895
|
}
|
|
@@ -29050,7 +29055,7 @@ var require__md = __commonJS((exports) => {
|
|
|
29050
29055
|
exports.setBigUint64 = setBigUint64;
|
|
29051
29056
|
exports.Chi = Chi;
|
|
29052
29057
|
exports.Maj = Maj;
|
|
29053
|
-
var _assert_ts_1 =
|
|
29058
|
+
var _assert_ts_1 = require__assert();
|
|
29054
29059
|
var utils_ts_1 = require_utils7();
|
|
29055
29060
|
function setBigUint64(view, byteOffset, value, isLE) {
|
|
29056
29061
|
if (typeof view.setBigUint64 === "function")
|
|
@@ -31573,7 +31578,7 @@ var require_ed25519 = __commonJS((exports) => {
|
|
|
31573
31578
|
var require_hmac = __commonJS((exports) => {
|
|
31574
31579
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31575
31580
|
exports.hmac = exports.HMAC = undefined;
|
|
31576
|
-
var _assert_ts_1 =
|
|
31581
|
+
var _assert_ts_1 = require__assert();
|
|
31577
31582
|
var utils_ts_1 = require_utils7();
|
|
31578
31583
|
|
|
31579
31584
|
class HMAC extends utils_ts_1.Hash {
|
|
@@ -32901,7 +32906,7 @@ var require_hkdf = __commonJS((exports) => {
|
|
|
32901
32906
|
exports.hkdf = undefined;
|
|
32902
32907
|
exports.extract = extract;
|
|
32903
32908
|
exports.expand = expand;
|
|
32904
|
-
var _assert_ts_1 =
|
|
32909
|
+
var _assert_ts_1 = require__assert();
|
|
32905
32910
|
var hmac_ts_1 = require_hmac();
|
|
32906
32911
|
var utils_ts_1 = require_utils7();
|
|
32907
32912
|
function extract(hash, ikm, salt) {
|
|
@@ -61129,7 +61134,7 @@ var {
|
|
|
61129
61134
|
var package_default = {
|
|
61130
61135
|
name: "@settlemint/sdk-mcp",
|
|
61131
61136
|
description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
61132
|
-
version: "2.
|
|
61137
|
+
version: "2.2.0",
|
|
61133
61138
|
type: "module",
|
|
61134
61139
|
private: false,
|
|
61135
61140
|
license: "FSL-1.1-MIT",
|
|
@@ -61171,8 +61176,8 @@ var package_default = {
|
|
|
61171
61176
|
"@graphql-tools/load": "8.1.0",
|
|
61172
61177
|
"@graphql-tools/url-loader": "8.0.31",
|
|
61173
61178
|
"@modelcontextprotocol/sdk": "1.10.2",
|
|
61174
|
-
"@settlemint/sdk-js": "2.
|
|
61175
|
-
"@settlemint/sdk-utils": "2.
|
|
61179
|
+
"@settlemint/sdk-js": "2.2.0",
|
|
61180
|
+
"@settlemint/sdk-utils": "2.2.0",
|
|
61176
61181
|
"@commander-js/extra-typings": "11.1.0",
|
|
61177
61182
|
commander: "11.1.0",
|
|
61178
61183
|
zod: "3.24.3"
|
|
@@ -66912,4 +66917,4 @@ await main().catch((error2) => {
|
|
|
66912
66917
|
process.exit(1);
|
|
66913
66918
|
});
|
|
66914
66919
|
|
|
66915
|
-
//# debugId=
|
|
66920
|
+
//# debugId=0D949F548603A5A864756E2164756E21
|