@settlemint/sdk-cli 2.1.4-pr4c37c925 → 2.1.4-pr4cff9a3b

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
@@ -245278,7 +245278,7 @@ function pruneCurrentEnv(currentEnv, env2) {
245278
245278
  var package_default = {
245279
245279
  name: "@settlemint/sdk-cli",
245280
245280
  description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
245281
- version: "2.1.4-pr4c37c925",
245281
+ version: "2.1.4-pr4cff9a3b",
245282
245282
  type: "module",
245283
245283
  private: false,
245284
245284
  license: "FSL-1.1-MIT",
@@ -245327,8 +245327,8 @@ var package_default = {
245327
245327
  "@inquirer/input": "4.1.9",
245328
245328
  "@inquirer/password": "4.0.12",
245329
245329
  "@inquirer/select": "4.1.1",
245330
- "@settlemint/sdk-js": "2.1.4-pr4c37c925",
245331
- "@settlemint/sdk-utils": "2.1.4-pr4c37c925",
245330
+ "@settlemint/sdk-js": "2.1.4-pr4cff9a3b",
245331
+ "@settlemint/sdk-utils": "2.1.4-pr4cff9a3b",
245332
245332
  "@types/node": "22.14.1",
245333
245333
  "@types/semver": "7.7.0",
245334
245334
  "@types/which": "3.0.4",
@@ -252319,6 +252319,14 @@ async function servicePrompt({
252319
252319
  });
252320
252320
  }
252321
252321
 
252322
+ // src/utils/cluster-service.ts
252323
+ function hasValidPrivateKey(privateKey) {
252324
+ return privateKey.privateKeyType !== "HD_ECDSA_P256";
252325
+ }
252326
+ function isRunning(service) {
252327
+ return service === undefined || service?.status === "COMPLETED";
252328
+ }
252329
+
252322
252330
  // src/prompts/cluster-service/blockchain-node.prompt.ts
252323
252331
  async function blockchainNodePrompt({
252324
252332
  env: env2,
@@ -252338,12 +252346,12 @@ async function blockchainNodePrompt({
252338
252346
  isRequired,
252339
252347
  defaultHandler: async ({ defaultService: defaultNode, choices }) => {
252340
252348
  const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => {
252341
- return Array.isArray(node) ? true : node === undefined || node?.status === "COMPLETED";
252349
+ return Array.isArray(node) ? true : isRunning(node);
252342
252350
  }).map((item) => {
252343
252351
  if (Array.isArray(item.value)) {
252344
252352
  return {
252345
252353
  ...item,
252346
- value: item.value.filter((n6) => n6 === undefined || n6.status === "COMPLETED")
252354
+ value: item.value.filter(isRunning)
252347
252355
  };
252348
252356
  }
252349
252357
  return item;
@@ -252894,7 +252902,7 @@ function connectCommand() {
252894
252902
  env: env2,
252895
252903
  nodes: nodesWithPrivateKey,
252896
252904
  accept: acceptDefaults,
252897
- promptMessage: "Which blockchain node do you want to SEND unsigned transactions from?"
252905
+ promptMessage: "Which blockchain node do you want to use for sending transactions?"
252898
252906
  });
252899
252907
  const nodesWithoutPrivateKey = blockchainNodes.filter((node) => node && ("privateKeys" in node) ? !Array.isArray(node?.privateKeys) || node?.privateKeys?.length === 0 : true);
252900
252908
  const loadBalancerOrBlockchainNode = await blockchainNodeOrLoadBalancerPrompt({
@@ -252902,7 +252910,7 @@ function connectCommand() {
252902
252910
  nodes: nodesWithoutPrivateKey,
252903
252911
  loadBalancers,
252904
252912
  accept: acceptDefaults,
252905
- promptMessage: "Which blockchain node or load balancer do you want to READ/WRITE from/to? Transactions should be signed before sending to this node or load balancer"
252913
+ promptMessage: "Which blockchain node or load balancer do you want to use for read operations?"
252906
252914
  });
252907
252915
  const hasura = await hasuraPrompt({
252908
252916
  env: env2,
@@ -259362,11 +259370,6 @@ function getStatusAction(status) {
259362
259370
  return "Please try again later.";
259363
259371
  }
259364
259372
 
259365
- // src/utils/blockchain-node.ts
259366
- function validPrivateKey(privateKey) {
259367
- return privateKey.privateKeyType !== "HD_ECDSA_P256";
259368
- }
259369
-
259370
259373
  // src/commands/smart-contract-set/hardhat/utils/select-target-node.ts
259371
259374
  async function selectTargetNode({
259372
259375
  env: env2,
@@ -259412,7 +259415,7 @@ function validateNode(node, cancelOnError = true) {
259412
259415
  }
259413
259416
  return false;
259414
259417
  }
259415
- if (node.privateKeys?.filter((privateKey) => validPrivateKey(privateKey)).length === 0) {
259418
+ if (node.privateKeys?.filter(hasValidPrivateKey).length === 0) {
259416
259419
  if (cancelOnError) {
259417
259420
  cancel2(`The specified blockchain node '${node.uniqueName}' does not have an ECDSA P256 or HSM ECDSA P256 private key activated. Please activate an ECDSA P256 or HSM ECDSA P256 private key on your node and try again.`);
259418
259421
  }
@@ -259433,7 +259436,7 @@ async function addressPrompt({
259433
259436
  node,
259434
259437
  hardhatConfig
259435
259438
  }) {
259436
- const possiblePrivateKeys = node.privateKeys?.filter((privateKey) => validPrivateKey(privateKey)) ?? [];
259439
+ const possiblePrivateKeys = node.privateKeys?.filter(hasValidPrivateKey) ?? [];
259437
259440
  const defaultAddress = hardhatConfig.networks?.btp?.from ?? possiblePrivateKeys[0]?.address;
259438
259441
  const defaultPossible = accept && defaultAddress;
259439
259442
  if (defaultPossible) {
@@ -260189,4 +260192,4 @@ async function sdkCliCommand(argv = process.argv) {
260189
260192
  // src/cli.ts
260190
260193
  sdkCliCommand();
260191
260194
 
260192
- //# debugId=5730C44214F60CCB64756E2164756E21
260195
+ //# debugId=33076A9097BEE00964756E2164756E21