@settlemint/sdk-mcp 2.4.0-pr3f71e882 → 2.4.0-pr3fd1ae9a

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 CHANGED
@@ -62161,7 +62161,8 @@ class McpServer {
62161
62161
  }
62162
62162
  }
62163
62163
  var EMPTY_OBJECT_JSON_SCHEMA = {
62164
- type: "object"
62164
+ type: "object",
62165
+ properties: {}
62165
62166
  };
62166
62167
  function isZodRawShape(obj) {
62167
62168
  if (typeof obj !== "object" || obj === null)
@@ -90399,7 +90400,7 @@ var {
90399
90400
  var package_default = {
90400
90401
  name: "@settlemint/sdk-mcp",
90401
90402
  description: "MCP interface for SettleMint SDK, providing development tools and project management capabilities",
90402
- version: "2.4.0-pr3f71e882",
90403
+ version: "2.4.0-pr3fd1ae9a",
90403
90404
  type: "module",
90404
90405
  private: false,
90405
90406
  license: "FSL-1.1-MIT",
@@ -90442,9 +90443,9 @@ var package_default = {
90442
90443
  dependencies: {
90443
90444
  "@graphql-tools/load": "8.1.0",
90444
90445
  "@graphql-tools/url-loader": "8.0.31",
90445
- "@modelcontextprotocol/sdk": "1.13.2",
90446
- "@settlemint/sdk-js": "2.4.0-pr3f71e882",
90447
- "@settlemint/sdk-utils": "2.4.0-pr3f71e882",
90446
+ "@modelcontextprotocol/sdk": "1.13.3",
90447
+ "@settlemint/sdk-js": "2.4.0-pr3fd1ae9a",
90448
+ "@settlemint/sdk-utils": "2.4.0-pr3fd1ae9a",
90448
90449
  "@commander-js/extra-typings": "14.0.0",
90449
90450
  commander: "14.0.0",
90450
90451
  zod: "^3.25.0"
@@ -103569,8 +103570,9 @@ var workspaceList = (gqlClient) => {
103569
103570
  const { workspaces } = await gqlClient.request(getWorkspacesAndApplications);
103570
103571
  const allWorkspaces = workspaces.reduce((acc, workspace) => {
103571
103572
  acc.push(workspace);
103572
- if (workspace.childWorkspaces)
103573
+ if (workspace.childWorkspaces) {
103573
103574
  acc.push(...workspace.childWorkspaces);
103575
+ }
103574
103576
  return acc;
103575
103577
  }, []);
103576
103578
  return allWorkspaces.sort((a3, b) => a3.name.localeCompare(b.name));
@@ -103597,8 +103599,9 @@ var workspaceDelete = (gqlClient) => {
103597
103599
  var workspaceAddCredits = (gqlClient) => {
103598
103600
  return async (workspaceId, amount) => {
103599
103601
  const id = validate3(IdSchema2, workspaceId);
103600
- if (amount <= 0)
103602
+ if (amount <= 0) {
103601
103603
  throw new Error("Credit amount must be a positive number");
103604
+ }
103602
103605
  const { addCredits: result } = await gqlClient.request(addCredits, {
103603
103606
  workspaceId: id,
103604
103607
  amount
@@ -103720,8 +103723,9 @@ var applicationAccessTokenCreate = (gqlClient) => {
103720
103723
  ...otherArgs,
103721
103724
  applicationId: application.id
103722
103725
  });
103723
- if (!applicationAccessToken.token)
103726
+ if (!applicationAccessToken.token) {
103724
103727
  throw new Error("Failed to create application access token");
103728
+ }
103725
103729
  return applicationAccessToken.token;
103726
103730
  };
103727
103731
  };
@@ -103734,7 +103738,7 @@ function setClusterServiceDefaults(args) {
103734
103738
  }
103735
103739
  function setNetworkDefaults(args) {
103736
103740
  const clusterServiceArgs = setClusterServiceDefaults(args);
103737
- if (args.consensusAlgorithm === "BESU_QBFT")
103741
+ if (args.consensusAlgorithm === "BESU_QBFT") {
103738
103742
  return {
103739
103743
  ...clusterServiceArgs,
103740
103744
  chainId: args.chainId ?? 46040,
@@ -103744,6 +103748,7 @@ function setNetworkDefaults(args) {
103744
103748
  gasPrice: args.gasPrice ?? 0,
103745
103749
  secondsPerBlock: args.secondsPerBlock ?? 2
103746
103750
  };
103751
+ }
103747
103752
  return clusterServiceArgs;
103748
103753
  }
103749
103754
  var BlockchainNetworkFragment = graphql(`
@@ -105158,26 +105163,30 @@ async function getPincodeVerificationChallenges({ userWalletAddress, accessToken
105158
105163
  }
105159
105164
  });
105160
105165
  if (!response.ok) {
105161
- if (response.status === 404)
105166
+ if (response.status === 404) {
105162
105167
  throw new Error(`No user wallet found with address '${userWalletAddress}' for node '${nodeId}'`);
105168
+ }
105163
105169
  throw new Error("Failed to get verification challenge");
105164
105170
  }
105165
105171
  const verificationChallenges = await response.json();
105166
105172
  return verificationChallenges;
105167
105173
  }
105168
105174
  function getPincodeVerificationChallengeResponse({ verificationChallenge, pincode }) {
105169
- if (!verificationChallenge?.challenge?.secret || !verificationChallenge?.challenge?.salt)
105175
+ if (!verificationChallenge?.challenge?.secret || !verificationChallenge?.challenge?.salt) {
105170
105176
  throw new Error("Could not authenticate pin code, invalid challenge format");
105177
+ }
105171
105178
  const { secret, salt } = verificationChallenge.challenge;
105172
105179
  return generateResponse(pincode, salt, secret);
105173
105180
  }
105174
105181
  function createSettleMintClient(options) {
105175
105182
  ensureServer();
105176
- if (options.instance === STANDALONE_INSTANCE2 || options.instance === LOCAL_INSTANCE2)
105177
- if (options.anonymous)
105183
+ if (options.instance === STANDALONE_INSTANCE2 || options.instance === LOCAL_INSTANCE2) {
105184
+ if (options.anonymous) {
105178
105185
  options.instance = "https://console.settlemint.com";
105179
- else
105186
+ } else {
105180
105187
  throw new Error("Standalone and local instances cannot connect to the SettleMint platform");
105188
+ }
105189
+ }
105181
105190
  const validatedOptions = options.anonymous ? validate3(exports_external2.object({
105182
105191
  ...ClientOptionsSchema.shape,
105183
105192
  accessToken: exports_external2.literal("")
@@ -107109,4 +107118,4 @@ await main().catch((error41) => {
107109
107118
  process.exit(1);
107110
107119
  });
107111
107120
 
107112
- //# debugId=D1B72B35F2A20C3F64756E2164756E21
107121
+ //# debugId=DF56A27E10AD35DB64756E2164756E21