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