@settlemint/sdk-cli 2.4.0-pr7c98613c → 2.4.0-pr85903089
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 +59 -87
- package/dist/cli.js.map +16 -22
- package/package.json +8 -8
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-pr85903089",
|
263844
263844
|
type: "module",
|
263845
263845
|
private: false,
|
263846
263846
|
license: "FSL-1.1-MIT",
|
@@ -263887,13 +263887,13 @@ var package_default = {
|
|
263887
263887
|
devDependencies: {
|
263888
263888
|
"@commander-js/extra-typings": "14.0.0",
|
263889
263889
|
commander: "14.0.0",
|
263890
|
-
"@inquirer/confirm": "5.1.
|
263891
|
-
"@inquirer/input": "4.
|
263892
|
-
"@inquirer/password": "4.0.
|
263893
|
-
"@inquirer/select": "4.2.
|
263894
|
-
"@settlemint/sdk-js": "2.4.0-
|
263895
|
-
"@settlemint/sdk-utils": "2.4.0-
|
263896
|
-
"@settlemint/sdk-viem": "2.4.0-
|
263890
|
+
"@inquirer/confirm": "5.1.12",
|
263891
|
+
"@inquirer/input": "4.1.12",
|
263892
|
+
"@inquirer/password": "4.0.15",
|
263893
|
+
"@inquirer/select": "4.2.3",
|
263894
|
+
"@settlemint/sdk-js": "2.4.0-pr85903089",
|
263895
|
+
"@settlemint/sdk-utils": "2.4.0-pr85903089",
|
263896
|
+
"@settlemint/sdk-viem": "2.4.0-pr85903089",
|
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
|
-
|
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
|
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";
|
@@ -303242,7 +303234,7 @@ var inputTheme = {
|
|
303242
303234
|
validationFailureMode: "keep"
|
303243
303235
|
};
|
303244
303236
|
var esm_default2 = createPrompt((config4, done) => {
|
303245
|
-
const { required: required4, validate: validate3 = () => true
|
303237
|
+
const { required: required4, validate: validate3 = () => true } = config4;
|
303246
303238
|
const theme = makeTheme(inputTheme, config4.theme);
|
303247
303239
|
const [status, setStatus] = useState("idle");
|
303248
303240
|
const [defaultValue = "", setDefaultValue] = useState(config4.default);
|
@@ -303282,12 +303274,6 @@ var esm_default2 = createPrompt((config4, done) => {
|
|
303282
303274
|
setError(undefined);
|
303283
303275
|
}
|
303284
303276
|
});
|
303285
|
-
useEffect((rl) => {
|
303286
|
-
if (prefill === "editable" && defaultValue) {
|
303287
|
-
rl.write(defaultValue);
|
303288
|
-
setValue(defaultValue);
|
303289
|
-
}
|
303290
|
-
}, []);
|
303291
303277
|
const message = theme.style.message(config4.message, status);
|
303292
303278
|
let formattedValue = value4;
|
303293
303279
|
if (typeof config4.transformer === "function") {
|
@@ -328322,11 +328308,6 @@ function blockscoutPauseCommand() {
|
|
328322
328308
|
});
|
328323
328309
|
}
|
328324
328310
|
|
328325
|
-
// src/commands/platform/insights/pause.ts
|
328326
|
-
function insightsPauseCommand() {
|
328327
|
-
return new Command("insights").alias("in").description("Pause an insights service in the SettleMint platform").addCommand(blockscoutPauseCommand());
|
328328
|
-
}
|
328329
|
-
|
328330
328311
|
// src/commands/platform/integration-tools/hasura/pause.ts
|
328331
328312
|
function hasuraPauseCommand() {
|
328332
328313
|
return getPauseCommand({
|
@@ -328340,13 +328321,8 @@ function hasuraPauseCommand() {
|
|
328340
328321
|
});
|
328341
328322
|
}
|
328342
328323
|
|
328343
|
-
// src/commands/platform/
|
328344
|
-
function
|
328345
|
-
return new Command("integration-tool").alias("it").description("Pause an integration tool service in the SettleMint platform").addCommand(hasuraPauseCommand());
|
328346
|
-
}
|
328347
|
-
|
328348
|
-
// src/commands/platform/load-balancer/pause.ts
|
328349
|
-
function loadBalancerPauseCommand() {
|
328324
|
+
// src/commands/platform/load-balancer/evm/pause.ts
|
328325
|
+
function evmLoadBalancerPauseCommand() {
|
328350
328326
|
return getPauseCommand({
|
328351
328327
|
name: "evm",
|
328352
328328
|
type: "load balancer",
|
@@ -328384,18 +328360,26 @@ function smartContractPortalMiddlewarePauseCommand() {
|
|
328384
328360
|
});
|
328385
328361
|
}
|
328386
328362
|
|
328387
|
-
// src/commands/platform/
|
328388
|
-
function
|
328389
|
-
return
|
328363
|
+
// src/commands/platform/private-key/accessible-ecdsa-p256/pause.ts
|
328364
|
+
function accessibleEcdsaP256PrivateKeyPauseCommand() {
|
328365
|
+
return getPauseCommand({
|
328366
|
+
name: "accessible-ecdsa-p256",
|
328367
|
+
type: "private key",
|
328368
|
+
alias: "acc",
|
328369
|
+
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328370
|
+
pauseFunction: async (settlemint, id) => {
|
328371
|
+
return settlemint.privateKey.pause(id);
|
328372
|
+
}
|
328373
|
+
});
|
328390
328374
|
}
|
328391
328375
|
|
328392
|
-
// src/commands/platform/private-key/pause.ts
|
328393
|
-
function
|
328376
|
+
// src/commands/platform/private-key/hd-ecdsa-p256/pause.ts
|
328377
|
+
function hdEcdsaP256PrivateKeyPauseCommand() {
|
328394
328378
|
return getPauseCommand({
|
328395
|
-
name: "
|
328379
|
+
name: "hd-ecdsa-p256",
|
328396
328380
|
type: "private key",
|
328397
|
-
alias: "
|
328398
|
-
envKey: "
|
328381
|
+
alias: "hd",
|
328382
|
+
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
328399
328383
|
pauseFunction: async (settlemint, id) => {
|
328400
328384
|
return settlemint.privateKey.pause(id);
|
328401
328385
|
}
|
@@ -328428,14 +328412,9 @@ function minioStoragePauseCommand() {
|
|
328428
328412
|
});
|
328429
328413
|
}
|
328430
328414
|
|
328431
|
-
// src/commands/platform/storage/pause.ts
|
328432
|
-
function storagePauseCommand() {
|
328433
|
-
return new Command("storage").alias("st").description("Pause a storage service in the SettleMint platform").addCommand(ipfsStoragePauseCommand()).addCommand(minioStoragePauseCommand());
|
328434
|
-
}
|
328435
|
-
|
328436
328415
|
// src/commands/platform/pause.ts
|
328437
328416
|
function pauseCommand() {
|
328438
|
-
const cmd2 = new Command("pause").description("Pause a resource in the SettleMint platform").addCommand(blockchainNodePauseCommand()).addCommand(blockchainNetworkPauseCommand()).addCommand(customDeploymentPauseCommand()).addCommand(
|
328417
|
+
const cmd2 = new Command("pause").description("Pause a resource in the SettleMint platform").addCommand(blockchainNodePauseCommand()).addCommand(blockchainNetworkPauseCommand()).addCommand(customDeploymentPauseCommand()).addCommand(blockscoutPauseCommand()).addCommand(hasuraPauseCommand()).addCommand(evmLoadBalancerPauseCommand()).addCommand(graphMiddlewarePauseCommand()).addCommand(smartContractPortalMiddlewarePauseCommand()).addCommand(accessibleEcdsaP256PrivateKeyPauseCommand()).addCommand(hdEcdsaP256PrivateKeyPauseCommand()).addCommand(ipfsStoragePauseCommand()).addCommand(minioStoragePauseCommand());
|
328439
328418
|
return cmd2;
|
328440
328419
|
}
|
328441
328420
|
|
@@ -328770,11 +328749,6 @@ function blockscoutResumeCommand() {
|
|
328770
328749
|
});
|
328771
328750
|
}
|
328772
328751
|
|
328773
|
-
// src/commands/platform/insights/resume.ts
|
328774
|
-
function insightsResumeCommand() {
|
328775
|
-
return new Command("insights").alias("in").description("Resume an insights service in the SettleMint platform").addCommand(blockscoutResumeCommand());
|
328776
|
-
}
|
328777
|
-
|
328778
328752
|
// src/commands/platform/integration-tools/hasura/resume.ts
|
328779
328753
|
function hasuraResumeCommand() {
|
328780
328754
|
return getResumeCommand({
|
@@ -328788,15 +328762,10 @@ function hasuraResumeCommand() {
|
|
328788
328762
|
});
|
328789
328763
|
}
|
328790
328764
|
|
328791
|
-
// src/commands/platform/
|
328792
|
-
function
|
328793
|
-
return new Command("integration-tool").alias("it").description("Resume an integration tool service in the SettleMint platform").addCommand(hasuraResumeCommand());
|
328794
|
-
}
|
328795
|
-
|
328796
|
-
// src/commands/platform/load-balancer/resume.ts
|
328797
|
-
function loadBalancerResumeCommand() {
|
328765
|
+
// src/commands/platform/load-balancer/evm/resume.ts
|
328766
|
+
function evmLoadBalancerResumeCommand() {
|
328798
328767
|
return getResumeCommand({
|
328799
|
-
name: "
|
328768
|
+
name: "evm",
|
328800
328769
|
type: "load balancer",
|
328801
328770
|
alias: "lb",
|
328802
328771
|
envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
|
@@ -328832,18 +328801,26 @@ function smartContractPortalMiddlewareResumeCommand() {
|
|
328832
328801
|
});
|
328833
328802
|
}
|
328834
328803
|
|
328835
|
-
// src/commands/platform/
|
328836
|
-
function
|
328837
|
-
return
|
328804
|
+
// src/commands/platform/private-key/accessible-ecdsa-p256/resume.ts
|
328805
|
+
function accessibleEcdsaP256PrivateKeyResumeCommand() {
|
328806
|
+
return getResumeCommand({
|
328807
|
+
name: "accessible-ecdsa-p256",
|
328808
|
+
type: "private key",
|
328809
|
+
alias: "acc",
|
328810
|
+
envKey: "SETTLEMINT_ACCESSIBLE_PRIVATE_KEY",
|
328811
|
+
resumeFunction: async (settlemint, id) => {
|
328812
|
+
return settlemint.privateKey.resume(id);
|
328813
|
+
}
|
328814
|
+
});
|
328838
328815
|
}
|
328839
328816
|
|
328840
|
-
// src/commands/platform/private-key/resume.ts
|
328841
|
-
function
|
328817
|
+
// src/commands/platform/private-key/hd-ecdsa-p256/resume.ts
|
328818
|
+
function hdEcdsaP256PrivateKeyResumeCommand() {
|
328842
328819
|
return getResumeCommand({
|
328843
|
-
name: "
|
328820
|
+
name: "hd-ecdsa-p256",
|
328844
328821
|
type: "private key",
|
328845
|
-
alias: "
|
328846
|
-
envKey: "
|
328822
|
+
alias: "hd",
|
328823
|
+
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
328847
328824
|
resumeFunction: async (settlemint, id) => {
|
328848
328825
|
return settlemint.privateKey.resume(id);
|
328849
328826
|
}
|
@@ -328876,14 +328853,9 @@ function minioStorageResumeCommand() {
|
|
328876
328853
|
});
|
328877
328854
|
}
|
328878
328855
|
|
328879
|
-
// src/commands/platform/storage/resume.ts
|
328880
|
-
function storageResumeCommand() {
|
328881
|
-
return new Command("storage").alias("st").description("Resume a storage service in the SettleMint platform").addCommand(ipfsStorageResumeCommand()).addCommand(minioStorageResumeCommand());
|
328882
|
-
}
|
328883
|
-
|
328884
328856
|
// src/commands/platform/resume.ts
|
328885
328857
|
function resumeCommand() {
|
328886
|
-
const cmd2 = new Command("resume").description("Resume a resource in the SettleMint platform").addCommand(blockchainNodeResumeCommand()).addCommand(blockchainNetworkResumeCommand()).addCommand(customDeploymentResumeCommand()).addCommand(
|
328858
|
+
const cmd2 = new Command("resume").description("Resume a resource in the SettleMint platform").addCommand(blockchainNodeResumeCommand()).addCommand(blockchainNetworkResumeCommand()).addCommand(customDeploymentResumeCommand()).addCommand(blockscoutResumeCommand()).addCommand(hasuraResumeCommand()).addCommand(evmLoadBalancerResumeCommand()).addCommand(graphMiddlewareResumeCommand()).addCommand(smartContractPortalMiddlewareResumeCommand()).addCommand(accessibleEcdsaP256PrivateKeyResumeCommand()).addCommand(hdEcdsaP256PrivateKeyResumeCommand()).addCommand(ipfsStorageResumeCommand()).addCommand(minioStorageResumeCommand());
|
328887
328859
|
return cmd2;
|
328888
328860
|
}
|
328889
328861
|
|
@@ -330808,4 +330780,4 @@ async function sdkCliCommand(argv = process.argv) {
|
|
330808
330780
|
// src/cli.ts
|
330809
330781
|
sdkCliCommand();
|
330810
330782
|
|
330811
|
-
//# debugId=
|
330783
|
+
//# debugId=B36877A9EE01A29164756E2164756E21
|