@settlemint/sdk-cli 2.4.0-pr5f5458f6 → 2.4.0-pr62aee5c3

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/cli.js CHANGED
@@ -263840,7 +263840,7 @@ function pruneCurrentEnv(currentEnv, env2) {
263840
263840
  var package_default = {
263841
263841
  name: "@settlemint/sdk-cli",
263842
263842
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
263843
- version: "2.4.0-pr5f5458f6",
263843
+ version: "2.4.0-pr62aee5c3",
263844
263844
  type: "module",
263845
263845
  private: false,
263846
263846
  license: "FSL-1.1-MIT",
@@ -263891,9 +263891,9 @@ var package_default = {
263891
263891
  "@inquirer/input": "4.2.0",
263892
263892
  "@inquirer/password": "4.0.16",
263893
263893
  "@inquirer/select": "4.2.4",
263894
- "@settlemint/sdk-js": "2.4.0-pr5f5458f6",
263895
- "@settlemint/sdk-utils": "2.4.0-pr5f5458f6",
263896
- "@settlemint/sdk-viem": "2.4.0-pr5f5458f6",
263894
+ "@settlemint/sdk-js": "2.4.0-pr62aee5c3",
263895
+ "@settlemint/sdk-utils": "2.4.0-pr62aee5c3",
263896
+ "@settlemint/sdk-viem": "2.4.0-pr62aee5c3",
263897
263897
  "@types/node": "24.0.10",
263898
263898
  "@types/semver": "7.7.0",
263899
263899
  "@types/which": "3.0.4",
@@ -287954,9 +287954,8 @@ var workspaceList = (gqlClient) => {
287954
287954
  const { workspaces } = await gqlClient.request(getWorkspacesAndApplications);
287955
287955
  const allWorkspaces = workspaces.reduce((acc, workspace) => {
287956
287956
  acc.push(workspace);
287957
- if (workspace.childWorkspaces) {
287957
+ if (workspace.childWorkspaces)
287958
287958
  acc.push(...workspace.childWorkspaces);
287959
- }
287960
287959
  return acc;
287961
287960
  }, []);
287962
287961
  return allWorkspaces.sort((a3, b) => a3.name.localeCompare(b.name));
@@ -287983,9 +287982,8 @@ var workspaceDelete = (gqlClient) => {
287983
287982
  var workspaceAddCredits = (gqlClient) => {
287984
287983
  return async (workspaceId, amount) => {
287985
287984
  const id = validate2(IdSchema2, workspaceId);
287986
- if (amount <= 0) {
287985
+ if (amount <= 0)
287987
287986
  throw new Error("Credit amount must be a positive number");
287988
- }
287989
287987
  const { addCredits: result } = await gqlClient.request(addCredits, {
287990
287988
  workspaceId: id,
287991
287989
  amount
@@ -288107,9 +288105,8 @@ var applicationAccessTokenCreate = (gqlClient) => {
288107
288105
  ...otherArgs,
288108
288106
  applicationId: application.id
288109
288107
  });
288110
- if (!applicationAccessToken.token) {
288108
+ if (!applicationAccessToken.token)
288111
288109
  throw new Error("Failed to create application access token");
288112
- }
288113
288110
  return applicationAccessToken.token;
288114
288111
  };
288115
288112
  };
@@ -288122,7 +288119,7 @@ function setClusterServiceDefaults(args) {
288122
288119
  }
288123
288120
  function setNetworkDefaults(args) {
288124
288121
  const clusterServiceArgs = setClusterServiceDefaults(args);
288125
- if (args.consensusAlgorithm === "BESU_QBFT") {
288122
+ if (args.consensusAlgorithm === "BESU_QBFT")
288126
288123
  return {
288127
288124
  ...clusterServiceArgs,
288128
288125
  chainId: args.chainId ?? 46040,
@@ -288132,7 +288129,6 @@ function setNetworkDefaults(args) {
288132
288129
  gasPrice: args.gasPrice ?? 0,
288133
288130
  secondsPerBlock: args.secondsPerBlock ?? 2
288134
288131
  };
288135
- }
288136
288132
  return clusterServiceArgs;
288137
288133
  }
288138
288134
  var BlockchainNetworkFragment = graphql(`
@@ -289547,30 +289543,26 @@ async function getPincodeVerificationChallenges({ userWalletAddress, accessToken
289547
289543
  }
289548
289544
  });
289549
289545
  if (!response.ok) {
289550
- if (response.status === 404) {
289546
+ if (response.status === 404)
289551
289547
  throw new Error(`No user wallet found with address '${userWalletAddress}' for node '${nodeId}'`);
289552
- }
289553
289548
  throw new Error("Failed to get verification challenge");
289554
289549
  }
289555
289550
  const verificationChallenges = await response.json();
289556
289551
  return verificationChallenges;
289557
289552
  }
289558
289553
  function getPincodeVerificationChallengeResponse({ verificationChallenge, pincode }) {
289559
- if (!verificationChallenge?.challenge?.secret || !verificationChallenge?.challenge?.salt) {
289554
+ if (!verificationChallenge?.challenge?.secret || !verificationChallenge?.challenge?.salt)
289560
289555
  throw new Error("Could not authenticate pin code, invalid challenge format");
289561
- }
289562
289556
  const { secret, salt } = verificationChallenge.challenge;
289563
289557
  return generateResponse(pincode, salt, secret);
289564
289558
  }
289565
289559
  function createSettleMintClient(options) {
289566
289560
  ensureServer();
289567
- if (options.instance === STANDALONE_INSTANCE2 || options.instance === LOCAL_INSTANCE2) {
289568
- if (options.anonymous) {
289561
+ if (options.instance === STANDALONE_INSTANCE2 || options.instance === LOCAL_INSTANCE2)
289562
+ if (options.anonymous)
289569
289563
  options.instance = "https://console.settlemint.com";
289570
- } else {
289564
+ else
289571
289565
  throw new Error("Standalone and local instances cannot connect to the SettleMint platform");
289572
- }
289573
- }
289574
289566
  const validatedOptions = options.anonymous ? validate2(exports_external.object({
289575
289567
  ...ClientOptionsSchema.shape,
289576
289568
  accessToken: exports_external.literal("")
@@ -301827,7 +301819,7 @@ var getApplicationOrPersonalAccessToken = async ({
301827
301819
  }) => {
301828
301820
  const applicationAccessToken = env2.SETTLEMINT_ACCESS_TOKEN;
301829
301821
  const instanceUrl = sanitizeInstanceUrl(instance);
301830
- const personalAccessToken = (await getInstanceCredentials(instanceUrl, false))?.personalAccessToken;
301822
+ const personalAccessToken = (await getInstanceCredentials(instanceUrl))?.personalAccessToken;
301831
301823
  const preferredToken = prefer === "application" ? applicationAccessToken : personalAccessToken;
301832
301824
  const fallbackToken = prefer === "application" ? personalAccessToken : applicationAccessToken;
301833
301825
  const allowFallback = prefer === "application";
@@ -330808,4 +330800,4 @@ async function sdkCliCommand(argv = process.argv) {
330808
330800
  // src/cli.ts
330809
330801
  sdkCliCommand();
330810
330802
 
330811
- //# debugId=E817550AB01D28A864756E2164756E21
330803
+ //# debugId=EF66D7AC60A94B7964756E2164756E21