@settlemint/sdk-mcp 2.1.4-pr05b60a44 → 2.1.4-pr09bd8ab0

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.
Files changed (3) hide show
  1. package/dist/mcp.js +238 -89
  2. package/dist/mcp.js.map +14 -11
  3. 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/_assert.js
28361
- var require__assert = __commonJS((exports) => {
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.anumber = anumber;
28370
+ exports.aexists = aexists;
28368
28371
  exports.aoutput = aoutput;
28369
- exports.isBytes = isBytes;
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.wrapConstructor");
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 abool(b) {
28403
- if (typeof b !== "boolean")
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
- // ../../node_modules/@noble/ciphers/utils.js
28409
- var require_utils6 = __commonJS((exports) => {
28410
- Object.defineProperty(exports, "__esModule", { value: true });
28411
- exports.wrapCipher = exports.Hash = exports.nextTick = exports.isLE = exports.createView = exports.u32 = exports.u8 = undefined;
28412
- exports.bytesToHex = bytesToHex;
28413
- exports.hexToBytes = hexToBytes;
28414
- exports.hexToNumber = hexToNumber;
28415
- exports.bytesToNumberBE = bytesToNumberBE;
28416
- exports.numberToBytesBE = numberToBytesBE;
28417
- exports.utf8ToBytes = utf8ToBytes;
28418
- exports.bytesToUtf8 = bytesToUtf8;
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
- (0, _assert_js_1.abytes)(bytes);
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 ((0, _assert_js_1.isBytes)(data))
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
- (0, _assert_js_1.abytes)(a);
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
- (0, _assert_js_1.abytes)(key);
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
- (0, _assert_js_1.abytes)(nonce);
28568
+ abytes(nonce);
28559
28569
  else
28560
- (0, _assert_js_1.abytes)(nonce, params.nonceLength);
28570
+ abytes(nonce, params.nonceLength);
28561
28571
  }
28562
28572
  const tagl = params.tagLength;
28563
28573
  if (tagl && args[1] !== undefined) {
28564
- (0, _assert_js_1.abytes)(args[1]);
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
- (0, _assert_js_1.abytes)(output);
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
- (0, _assert_js_1.abytes)(data);
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
- (0, _assert_js_1.abytes)(data);
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(ciphertext, AAD) {
28629
+ function u64Lengths(dataLength, aadLength, isLE) {
28630
+ abool(isLE);
28620
28631
  const num = new Uint8Array(16);
28621
- const view = (0, exports.createView)(num);
28622
- setBigUint64(view, 0, BigInt(AAD ? AAD.length : 0), true);
28623
- setBigUint64(view, 8, BigInt(ciphertext.length), true);
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 _assert_js_1 = require__assert();
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, _assert_js_1.anumber)(nonceLength);
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, utils_js_1.concatBytes)(nonce, ciphertext);
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, _assert_js_1.abytes)(key);
28788
- (0, _assert_js_1.abytes)(nonce);
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, _assert_js_1.abytes)(plaintext);
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, _assert_js_1.abytes)(ciphertext);
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 require__assert2 = __commonJS((exports) => {
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 = require__assert2();
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 = require__assert2();
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 = require__assert2();
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 = require__assert2();
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.1.4-pr05b60a44",
61137
+ version: "2.1.4-pr09bd8ab0",
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.1.4-pr05b60a44",
61175
- "@settlemint/sdk-utils": "2.1.4-pr05b60a44",
61179
+ "@settlemint/sdk-js": "2.1.4-pr09bd8ab0",
61180
+ "@settlemint/sdk-utils": "2.1.4-pr09bd8ab0",
61176
61181
  "@commander-js/extra-typings": "11.1.0",
61177
61182
  commander: "11.1.0",
61178
61183
  zod: "3.24.3"
@@ -61936,6 +61941,7 @@ var registerBlockchainConcepts = (server) => {
61936
61941
  ### Blockchain Networks
61937
61942
  - **Blockchain Network**: A blockchain instance running on the SettleMint platform
61938
61943
  - **Blockchain Node**: Individual node in a blockchain network
61944
+ - **Load Balancer**: Distributes incoming JSON-RPC requests across multiple blockchain nodes
61939
61945
  - **Network Type**: Type of blockchain network (Ethereum, Fabric, etc.)
61940
61946
  - **Consensus Mechanism**: Method used to achieve agreement on the blockchain state
61941
61947
 
@@ -64233,6 +64239,7 @@ var getEnv = (gqlClient) => {
64233
64239
  };
64234
64240
  var LoadBalancerFragment = graphql(`
64235
64241
  fragment LoadBalancer on LoadBalancer {
64242
+ __typename
64236
64243
  id
64237
64244
  uniqueName
64238
64245
  name
@@ -65619,8 +65626,12 @@ var platformInsightsCreate = (server, env3, pat) => {
65619
65626
  provider: z.string().describe("Provider for the insights"),
65620
65627
  region: z.string().describe("Region for the insights"),
65621
65628
  insightsCategory: z.enum(["BLOCKCHAIN_EXPLORER", "HYPERLEDGER_EXPLORER", "OTTERSCAN_BLOCKCHAIN_EXPLORER"]).describe("Category of insights"),
65622
- blockchainNodeUniqueName: z.string().optional().describe("Unique name of the blockchain node to connect to")
65629
+ blockchainNodeUniqueName: z.string().optional().describe("Unique name of the blockchain node to connect to (mutually exclusive with loadBalancerUniqueName)"),
65630
+ loadBalancerUniqueName: z.string().optional().describe("Unique name of the load balancer to connect to (mutually exclusive with blockchainNodeUniqueName), prefer using a load balancer if available")
65623
65631
  }, async (params) => {
65632
+ if (params.blockchainNodeUniqueName && params.loadBalancerUniqueName) {
65633
+ throw new Error("Only one of 'blockchainNodeUniqueName' and 'loadBalancerUniqueName' may be provided");
65634
+ }
65624
65635
  const insights = await client.insights.create({
65625
65636
  applicationUniqueName: params.applicationUniqueName,
65626
65637
  name: params.name,
@@ -65629,7 +65640,8 @@ var platformInsightsCreate = (server, env3, pat) => {
65629
65640
  provider: params.provider,
65630
65641
  region: params.region,
65631
65642
  insightsCategory: params.insightsCategory,
65632
- blockchainNodeUniqueName: params.blockchainNodeUniqueName
65643
+ blockchainNodeUniqueName: params.blockchainNodeUniqueName,
65644
+ loadBalancerUniqueName: params.loadBalancerUniqueName
65633
65645
  });
65634
65646
  return {
65635
65647
  content: [
@@ -65855,6 +65867,134 @@ var platformIntegrationToolRestart = (server, env3, pat) => {
65855
65867
  });
65856
65868
  };
65857
65869
 
65870
+ // src/tools/platform/load-balancer/create.ts
65871
+ var platformLoadBalancerCreate = (server, env3, pat) => {
65872
+ const instance = env3.SETTLEMINT_INSTANCE;
65873
+ if (!instance) {
65874
+ throw new Error("SETTLEMINT_INSTANCE is not set");
65875
+ }
65876
+ const client = createSettleMintClient({
65877
+ accessToken: pat,
65878
+ instance
65879
+ });
65880
+ server.tool("platform-load-balancer-create", {
65881
+ applicationUniqueName: z.string().describe("Unique name of the application to create the load balancer in"),
65882
+ name: z.string().describe("Name of the load balancer"),
65883
+ type: z.enum(["DEDICATED", "SHARED"]).describe("Type of the load balancer (DEDICATED or SHARED)"),
65884
+ size: z.enum(["SMALL", "MEDIUM", "LARGE"]).describe("Size of the load balancer"),
65885
+ provider: z.string().describe("Provider for the load balancer"),
65886
+ region: z.string().describe("Region for the load balancer"),
65887
+ blockchainNetworkUniqueName: z.string().describe("Unique name of the blockchain network for the load balancer"),
65888
+ connectedNodesUniqueNames: z.array(z.string()).describe("Unique names of the nodes to connect to the load balancer")
65889
+ }, async (params) => {
65890
+ const loadBalancer = await client.loadBalancer.create({
65891
+ applicationUniqueName: params.applicationUniqueName,
65892
+ name: params.name,
65893
+ type: params.type,
65894
+ size: params.size,
65895
+ provider: params.provider,
65896
+ region: params.region,
65897
+ blockchainNetworkUniqueName: params.blockchainNetworkUniqueName,
65898
+ connectedNodesUniqueNames: params.connectedNodesUniqueNames
65899
+ });
65900
+ return {
65901
+ content: [
65902
+ {
65903
+ type: "text",
65904
+ name: "Load Balancer Created",
65905
+ description: `Created load balancer: ${params.name} in application: ${params.applicationUniqueName}`,
65906
+ mimeType: "application/json",
65907
+ text: JSON.stringify(loadBalancer, null, 2)
65908
+ }
65909
+ ]
65910
+ };
65911
+ });
65912
+ };
65913
+
65914
+ // src/tools/platform/load-balancer/list.ts
65915
+ var platformLoadBalancerList = (server, env3, pat) => {
65916
+ const instance = env3.SETTLEMINT_INSTANCE;
65917
+ if (!instance) {
65918
+ throw new Error("SETTLEMINT_INSTANCE is not set");
65919
+ }
65920
+ const client = createSettleMintClient({
65921
+ accessToken: pat,
65922
+ instance
65923
+ });
65924
+ server.tool("platform-load-balancer-list", {
65925
+ applicationUniqueName: z.string().describe("Unique name of the application to list load balancers from")
65926
+ }, async (params) => {
65927
+ const loadBalancers = await client.loadBalancer.list(params.applicationUniqueName);
65928
+ return {
65929
+ content: [
65930
+ {
65931
+ type: "text",
65932
+ name: "Load Balancer List",
65933
+ description: `List of load balancers in application: ${params.applicationUniqueName}`,
65934
+ mimeType: "application/json",
65935
+ text: JSON.stringify(loadBalancers, null, 2)
65936
+ }
65937
+ ]
65938
+ };
65939
+ });
65940
+ };
65941
+
65942
+ // src/tools/platform/load-balancer/read.ts
65943
+ var platformLoadBalancerRead = (server, env3, pat) => {
65944
+ const instance = env3.SETTLEMINT_INSTANCE;
65945
+ if (!instance) {
65946
+ throw new Error("SETTLEMINT_INSTANCE is not set");
65947
+ }
65948
+ const client = createSettleMintClient({
65949
+ accessToken: pat,
65950
+ instance
65951
+ });
65952
+ server.tool("platform-load-balancer-read", {
65953
+ loadBalancerUniqueName: z.string().describe("Unique name of the load balancer to read")
65954
+ }, async (params) => {
65955
+ const loadBalancer = await client.loadBalancer.read(params.loadBalancerUniqueName);
65956
+ return {
65957
+ content: [
65958
+ {
65959
+ type: "text",
65960
+ name: "Load Balancer Details",
65961
+ description: `Details for load balancer: ${params.loadBalancerUniqueName}`,
65962
+ mimeType: "application/json",
65963
+ text: JSON.stringify(loadBalancer, null, 2)
65964
+ }
65965
+ ]
65966
+ };
65967
+ });
65968
+ };
65969
+
65970
+ // src/tools/platform/load-balancer/restart.ts
65971
+ var platformLoadBalancerRestart = (server, env3, pat) => {
65972
+ const instance = env3.SETTLEMINT_INSTANCE;
65973
+ if (!instance) {
65974
+ throw new Error("SETTLEMINT_INSTANCE is not set");
65975
+ }
65976
+ const client = createSettleMintClient({
65977
+ accessToken: pat,
65978
+ instance
65979
+ });
65980
+ server.tool("platform-load-balancer-restart", {
65981
+ loadBalancerUniqueName: z.string().describe("Unique name of the load balancer to restart")
65982
+ }, async (params) => {
65983
+ const loadBalancer = await client.loadBalancer.restart(params.loadBalancerUniqueName);
65984
+ return {
65985
+ content: [
65986
+ {
65987
+ type: "text",
65988
+ name: "Load Balancer Restarted",
65989
+ description: `Restarted load balancer: ${params.loadBalancerUniqueName}`,
65990
+ mimeType: "application/json",
65991
+ text: JSON.stringify(loadBalancer, null, 2)
65992
+ }
65993
+ ]
65994
+ };
65995
+ });
65996
+ };
65997
+
65858
65998
  // src/tools/platform/middleware/create.ts
65859
65999
  var platformMiddlewareCreate = (server, env3, pat) => {
65860
66000
  const instance = env3.SETTLEMINT_INSTANCE;
@@ -65873,8 +66013,12 @@ var platformMiddlewareCreate = (server, env3, pat) => {
65873
66013
  provider: z.string().describe("Provider for the middleware"),
65874
66014
  region: z.string().describe("Region for the middleware"),
65875
66015
  interface: z.enum(["ATTESTATION_INDEXER", "BESU", "FIREFLY_FABCONNECT", "GRAPH", "HA_GRAPH", "SMART_CONTRACT_PORTAL"]).describe("Interface type for the middleware"),
65876
- blockchainNodeUniqueName: z.string().optional().describe("Unique name of the blockchain node to connect to")
66016
+ blockchainNodeUniqueName: z.string().optional().describe("Unique name of the blockchain node to connect to (mutually exclusive with loadBalancerUniqueName), preferred option for interface SMART_CONTRACT_PORTAL"),
66017
+ loadBalancerUniqueName: z.string().optional().describe("Unique name of the load balancer to connect to (mutually exclusive with blockchainNodeUniqueName), preferred option for all other interfaces")
65877
66018
  }, async (params) => {
66019
+ if (params.blockchainNodeUniqueName && params.loadBalancerUniqueName) {
66020
+ throw new Error("Only one of 'blockchainNodeUniqueName' and 'loadBalancerUniqueName' may be provided");
66021
+ }
65878
66022
  const middleware = await client.middleware.create({
65879
66023
  applicationUniqueName: params.applicationUniqueName,
65880
66024
  name: params.name,
@@ -65883,7 +66027,8 @@ var platformMiddlewareCreate = (server, env3, pat) => {
65883
66027
  provider: params.provider,
65884
66028
  region: params.region,
65885
66029
  interface: params.interface,
65886
- blockchainNodeUniqueName: params.blockchainNodeUniqueName
66030
+ blockchainNodeUniqueName: params.blockchainNodeUniqueName,
66031
+ loadBalancerUniqueName: params.loadBalancerUniqueName
65887
66032
  });
65888
66033
  return {
65889
66034
  content: [
@@ -66731,6 +66876,10 @@ async function main() {
66731
66876
  platformBlockchainNodeRead(server, env3, pat);
66732
66877
  platformBlockchainNodeCreate(server, env3, pat);
66733
66878
  platformBlockchainNodeRestart(server, env3, pat);
66879
+ platformLoadBalancerList(server, env3, pat);
66880
+ platformLoadBalancerRead(server, env3, pat);
66881
+ platformLoadBalancerCreate(server, env3, pat);
66882
+ platformLoadBalancerRestart(server, env3, pat);
66734
66883
  platformMiddlewareList(server, env3, pat);
66735
66884
  platformMiddlewareRead(server, env3, pat);
66736
66885
  platformMiddlewareCreate(server, env3, pat);
@@ -66768,4 +66917,4 @@ await main().catch((error2) => {
66768
66917
  process.exit(1);
66769
66918
  });
66770
66919
 
66771
- //# debugId=C73C546EEEF58ADC64756E2164756E21
66920
+ //# debugId=F535B59976F70AB664756E2164756E21