@settlemint/sdk-cli 2.1.4-pr3b65e859 → 2.1.4-pr4492e2b4

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.
Files changed (3) hide show
  1. package/dist/cli.js +244 -46
  2. package/dist/cli.js.map +31 -28
  3. package/package.json +3 -3
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-pr3b65e859",
245281
+ version: "2.1.4-pr4492e2b4",
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-pr3b65e859",
245331
- "@settlemint/sdk-utils": "2.1.4-pr3b65e859",
245330
+ "@settlemint/sdk-js": "2.1.4-pr4492e2b4",
245331
+ "@settlemint/sdk-utils": "2.1.4-pr4492e2b4",
245332
245332
  "@types/node": "22.14.1",
245333
245333
  "@types/semver": "7.7.0",
245334
245334
  "@types/which": "3.0.4",
@@ -248068,6 +248068,38 @@ var getLoadBalancers = graphql(`
248068
248068
  }
248069
248069
  }
248070
248070
  `, [LoadBalancerFragment]);
248071
+ var createLoadBalancer = graphql(`
248072
+ mutation createLoadBalancer(
248073
+ $applicationId: ID!
248074
+ $blockchainNetworkId: ID!
248075
+ $name: String!
248076
+ $provider: String!
248077
+ $region: String!
248078
+ $size: ClusterServiceSize
248079
+ $type: ClusterServiceType
248080
+ $connectedNodes: [ID!]!
248081
+ ) {
248082
+ createLoadBalancer(
248083
+ applicationId: $applicationId
248084
+ blockchainNetworkId: $blockchainNetworkId
248085
+ name: $name
248086
+ provider: $provider
248087
+ region: $region
248088
+ size: $size
248089
+ type: $type
248090
+ connectedNodes: $connectedNodes
248091
+ ) {
248092
+ ...LoadBalancer
248093
+ }
248094
+ }
248095
+ `, [LoadBalancerFragment]);
248096
+ var restartLoadBalancer = graphql(`
248097
+ mutation RestartLoadBalancer($uniqueName: String!) {
248098
+ restartLoadBalancerByUniqueName(uniqueName: $uniqueName) {
248099
+ ...LoadBalancer
248100
+ }
248101
+ }
248102
+ `, [LoadBalancerFragment]);
248071
248103
  var loadBalancerRead = (gqlClient) => {
248072
248104
  return async (loadBalancerUniqueName) => {
248073
248105
  const { loadBalancerByUniqueName: loadBalancer } = await gqlClient.request(getLoadBalancer, {
@@ -248084,6 +248116,29 @@ var loadBalancerList = (gqlClient) => {
248084
248116
  return items;
248085
248117
  };
248086
248118
  };
248119
+ var loadBalancerCreate = (gqlClient) => {
248120
+ return async (args) => {
248121
+ const { applicationUniqueName, blockchainNetworkUniqueName, connectedNodesUniqueNames, ...otherArgs } = args;
248122
+ const [application, blockchainNetwork, connectedNodes] = await Promise.all([
248123
+ applicationRead(gqlClient)(applicationUniqueName),
248124
+ blockchainNetworkRead(gqlClient)(blockchainNetworkUniqueName),
248125
+ Promise.all(connectedNodesUniqueNames.map((uniqueName) => blockchainNodeRead(gqlClient)(uniqueName)))
248126
+ ]);
248127
+ const { createLoadBalancer: loadBalancer } = await gqlClient.request(createLoadBalancer, {
248128
+ ...otherArgs,
248129
+ applicationId: application.id,
248130
+ blockchainNetworkId: blockchainNetwork.id,
248131
+ connectedNodes: connectedNodes.map((node) => node.id)
248132
+ });
248133
+ return loadBalancer;
248134
+ };
248135
+ };
248136
+ var loadBalancerRestart = (gqlClient) => async (loadBalancerUniqueName) => {
248137
+ const { restartLoadBalancerByUniqueName: loadBalancer } = await gqlClient.request(restartLoadBalancer, {
248138
+ uniqueName: loadBalancerUniqueName
248139
+ });
248140
+ return loadBalancer;
248141
+ };
248087
248142
  var InsightsFragment = graphql(`
248088
248143
  fragment Insights on Insights {
248089
248144
  __typename
@@ -248786,7 +248841,9 @@ function createSettleMintClient(options) {
248786
248841
  },
248787
248842
  loadBalancer: {
248788
248843
  list: loadBalancerList(gqlClient),
248789
- read: loadBalancerRead(gqlClient)
248844
+ read: loadBalancerRead(gqlClient),
248845
+ create: loadBalancerCreate(gqlClient),
248846
+ restart: loadBalancerRestart(gqlClient)
248790
248847
  },
248791
248848
  middleware: {
248792
248849
  list: middlewareList(gqlClient),
@@ -251719,6 +251776,7 @@ async function codegenBlockscout(env2) {
251719
251776
  __schema {
251720
251777
  queryType { name }
251721
251778
  mutationType { name }
251779
+ subscriptionType { name }
251722
251780
  types {
251723
251781
  ...FullType
251724
251782
  }
@@ -251800,10 +251858,6 @@ async function codegenBlockscout(env2) {
251800
251858
  ofType {
251801
251859
  kind
251802
251860
  name
251803
- ofType {
251804
- kind
251805
- name
251806
- }
251807
251861
  }
251808
251862
  }
251809
251863
  }
@@ -252211,6 +252265,7 @@ async function applicationPrompt(env2, applications, accept) {
252211
252265
  }
252212
252266
 
252213
252267
  // src/prompts/cluster-service/service.prompt.ts
252268
+ var ALL2 = "All";
252214
252269
  async function servicePrompt({
252215
252270
  env: env2,
252216
252271
  services,
@@ -252219,13 +252274,17 @@ async function servicePrompt({
252219
252274
  defaultHandler,
252220
252275
  isRequired = false,
252221
252276
  isCi = is_in_ci_default,
252222
- singleOptionMessage
252277
+ singleOptionMessage,
252278
+ allowAll = false
252223
252279
  }) {
252224
252280
  if (services.length === 0) {
252225
252281
  return;
252226
252282
  }
252227
- const selectedService = services.find((service) => service.uniqueName === env2[envKey]);
252283
+ const selectedService = services.find((service) => Array.isArray(service) ? false : service.uniqueName === env2[envKey]);
252228
252284
  const autoAccept = isCi || accept;
252285
+ if (autoAccept && allowAll) {
252286
+ return services;
252287
+ }
252229
252288
  if (autoAccept && selectedService) {
252230
252289
  return selectedService;
252231
252290
  }
@@ -252233,7 +252292,7 @@ async function servicePrompt({
252233
252292
  return;
252234
252293
  }
252235
252294
  if (isRequired && services.length === 1) {
252236
- if (singleOptionMessage) {
252295
+ if (singleOptionMessage && !Array.isArray(services[0])) {
252237
252296
  note(singleOptionMessage(services[0].uniqueName));
252238
252297
  }
252239
252298
  return services[0];
@@ -252242,13 +252301,33 @@ async function servicePrompt({
252242
252301
  name: `${service.name} (${service.uniqueName})`,
252243
252302
  value: service
252244
252303
  }));
252304
+ if (allowAll) {
252305
+ choices.unshift({
252306
+ name: ALL2,
252307
+ value: services
252308
+ });
252309
+ }
252245
252310
  if (!isRequired) {
252246
252311
  choices.push({
252247
252312
  name: "None",
252248
252313
  value: undefined
252249
252314
  });
252250
252315
  }
252251
- return defaultHandler({ defaultService: selectedService, choices });
252316
+ return defaultHandler({
252317
+ defaultService: selectedService,
252318
+ choices
252319
+ });
252320
+ }
252321
+
252322
+ // src/utils/cluster-service.ts
252323
+ function isValidPrivateKey(privateKey) {
252324
+ return privateKey.privateKeyType !== "HD_ECDSA_P256";
252325
+ }
252326
+ function hasValidPrivateKey(service) {
252327
+ return (service.privateKeys ?? []).some(isValidPrivateKey);
252328
+ }
252329
+ function isRunning(service) {
252330
+ return service === undefined || service?.status === "COMPLETED";
252252
252331
  }
252253
252332
 
252254
252333
  // src/prompts/cluster-service/blockchain-node.prompt.ts
@@ -252259,7 +252338,8 @@ async function blockchainNodePrompt({
252259
252338
  singleOptionMessage,
252260
252339
  promptMessage,
252261
252340
  filterRunningOnly = false,
252262
- isRequired = false
252341
+ isRequired = false,
252342
+ allowAll = false
252263
252343
  }) {
252264
252344
  return servicePrompt({
252265
252345
  env: env2,
@@ -252268,14 +252348,25 @@ async function blockchainNodePrompt({
252268
252348
  envKey: "SETTLEMINT_BLOCKCHAIN_NODE",
252269
252349
  isRequired,
252270
252350
  defaultHandler: async ({ defaultService: defaultNode, choices }) => {
252271
- const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => node === undefined || node?.status === "COMPLETED") : choices;
252351
+ const filteredChoices = filterRunningOnly ? choices.filter(({ value: node }) => {
252352
+ return Array.isArray(node) ? true : isRunning(node);
252353
+ }).map((item) => {
252354
+ if (Array.isArray(item.value)) {
252355
+ return {
252356
+ ...item,
252357
+ value: item.value.filter(isRunning)
252358
+ };
252359
+ }
252360
+ return item;
252361
+ }) : choices;
252272
252362
  return esm_default3({
252273
252363
  message: promptMessage ?? "Which blockchain node do you want to connect to?",
252274
252364
  choices: filteredChoices,
252275
252365
  default: defaultNode
252276
252366
  });
252277
252367
  },
252278
- singleOptionMessage
252368
+ singleOptionMessage,
252369
+ allowAll
252279
252370
  });
252280
252371
  }
252281
252372
 
@@ -252764,7 +252855,7 @@ async function blockchainNodeOrLoadBalancerPrompt({
252764
252855
  }) {
252765
252856
  return servicePrompt({
252766
252857
  env: env2,
252767
- services: [...nodes, ...loadBalancers],
252858
+ services: [...loadBalancers, ...nodes],
252768
252859
  accept,
252769
252860
  envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
252770
252861
  isRequired,
@@ -252809,19 +252900,20 @@ function connectCommand() {
252809
252900
  blockchainNodes,
252810
252901
  loadBalancers
252811
252902
  } = await servicesSpinner(settlemint, application.uniqueName);
252903
+ const nodesWithPrivateKey = blockchainNodes.filter((node) => node && ("privateKeys" in node) ? Array.isArray(node?.privateKeys) && node?.privateKeys?.length > 0 : false);
252812
252904
  const blockchainNode = await blockchainNodePrompt({
252813
252905
  env: env2,
252814
- nodes: blockchainNodes,
252906
+ nodes: nodesWithPrivateKey,
252815
252907
  accept: acceptDefaults,
252816
- promptMessage: "Which blockchain node do you want to SEND unsigned transactions from?"
252908
+ promptMessage: "Which blockchain node do you want to use for sending transactions?"
252817
252909
  });
252818
- const nodesWithNoSigning = blockchainNodes.filter((node) => node && ("privateKeys" in node) ? !Array.isArray(node?.privateKeys) || node?.privateKeys?.length === 0 : true);
252910
+ const nodesWithoutPrivateKey = blockchainNodes.filter((node) => node && ("privateKeys" in node) ? !Array.isArray(node?.privateKeys) || node?.privateKeys?.length === 0 : true);
252819
252911
  const loadBalancerOrBlockchainNode = await blockchainNodeOrLoadBalancerPrompt({
252820
252912
  env: env2,
252821
- nodes: nodesWithNoSigning,
252913
+ nodes: nodesWithoutPrivateKey,
252822
252914
  loadBalancers,
252823
252915
  accept: acceptDefaults,
252824
- 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"
252916
+ promptMessage: "Which load balancer or blockchain node do you want to use for read operations?"
252825
252917
  });
252826
252918
  const hasura = await hasuraPrompt({
252827
252919
  env: env2,
@@ -252887,12 +252979,12 @@ function connectCommand() {
252887
252979
  uniqueName: blockchainNode.blockchainNetwork?.uniqueName
252888
252980
  },
252889
252981
  blockchainNode && {
252890
- type: "Blockchain Node",
252982
+ type: "Blockchain Node (use for sending transactions)",
252891
252983
  name: blockchainNode.name,
252892
252984
  uniqueName: blockchainNode.uniqueName
252893
252985
  },
252894
252986
  loadBalancerOrBlockchainNode && {
252895
- type: "Blockchain Node or Load Balancer (signed transactions only)",
252987
+ type: "Load Balancer or Blockchain Node (use for read operations)",
252896
252988
  name: loadBalancerOrBlockchainNode.name,
252897
252989
  uniqueName: loadBalancerOrBlockchainNode.uniqueName
252898
252990
  },
@@ -256813,7 +256905,10 @@ function getCreateCommand({
256813
256905
  usePersonalAccessToken = true,
256814
256906
  requiresDeployment = true
256815
256907
  }) {
256816
- const cmd2 = new Command(sanitizeCommandName(name3)).alias(alias).description(`Create a new ${subType ? `${subType} ${type4}` : type4} in the SettleMint platform.`).usage(createExamples(examples)).argument("<name>", `The ${subType ? `${subType} ${type4}` : type4} name`).option("-a, --accept-defaults", "Accept the default values").option("-d, --default", `Save as default ${type4}`).option("--prod", "Connect to production environment");
256908
+ const cmd2 = new Command(sanitizeCommandName(name3)).description(`Create a new ${subType ? `${subType} ${type4}` : type4} in the SettleMint platform.`).usage(createExamples(examples)).argument("<name>", `The ${subType ? `${subType} ${type4}` : type4} name`).option("-a, --accept-defaults", "Accept the default values").option("-d, --default", `Save as default ${type4}`).option("--prod", "Connect to production environment");
256909
+ if (alias) {
256910
+ cmd2.alias(alias);
256911
+ }
256817
256912
  if (requiresDeployment) {
256818
256913
  cmd2.option("-w, --wait", "Wait until deployed").option("-r, --restart-if-timeout", "Restart if wait time is exceeded");
256819
256914
  }
@@ -257521,6 +257616,107 @@ function integrationToolCreateCommand() {
257521
257616
  return cmd2;
257522
257617
  }
257523
257618
 
257619
+ // src/commands/platform/load-balancer/evm/create.ts
257620
+ function loadBalancerEvmCreateCommand() {
257621
+ return getCreateCommand({
257622
+ name: "evm",
257623
+ type: "load balancer",
257624
+ subType: "EVM",
257625
+ execute: (cmd2, baseAction) => {
257626
+ addClusterServiceArgs(cmd2).option("--app, --application <application>", "The application unique name to create the load balancer in (defaults to application from env)").option("--blockchain-nodes <blockchainNodes...>", "Blockchain node unique names where the load balancer connects to (must be from the same network)").action(async (name3, { application, provider, region, size, type: type4, blockchainNodes, acceptDefaults, ...defaultArgs }) => {
257627
+ return baseAction({
257628
+ ...defaultArgs,
257629
+ acceptDefaults,
257630
+ provider,
257631
+ region
257632
+ }, async ({ settlemint, env: env2, showSpinner, provider: provider2, region: region2 }) => {
257633
+ const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
257634
+ if (!applicationUniqueName) {
257635
+ return missingApplication();
257636
+ }
257637
+ let networkUniqueName;
257638
+ let connectedNodesUniqueNames = blockchainNodes;
257639
+ if (!connectedNodesUniqueNames) {
257640
+ const networks = await serviceSpinner("blockchain network", () => settlemint.blockchainNetwork.list(applicationUniqueName));
257641
+ const network = await blockchainNetworkPrompt({
257642
+ env: env2,
257643
+ networks,
257644
+ accept: acceptDefaults,
257645
+ isRequired: true
257646
+ });
257647
+ if (!network) {
257648
+ return nothingSelectedError("blockchain network");
257649
+ }
257650
+ networkUniqueName = network.uniqueName;
257651
+ const blockchainNodes2 = await serviceSpinner("blockchain node", () => settlemint.blockchainNode.list(applicationUniqueName));
257652
+ const connectedNodes = await blockchainNodePrompt({
257653
+ env: env2,
257654
+ nodes: blockchainNodes2.filter((node) => node.blockchainNetwork?.uniqueName === network.uniqueName),
257655
+ accept: acceptDefaults,
257656
+ promptMessage: "Which blockchain node do you want to connect the load balancer to?",
257657
+ allowAll: true
257658
+ });
257659
+ connectedNodesUniqueNames = Array.isArray(connectedNodes) ? blockchainNodes2.map((node) => node.uniqueName) : connectedNodes ? [connectedNodes.uniqueName] : [];
257660
+ }
257661
+ if (connectedNodesUniqueNames.length === 0) {
257662
+ return cancel2("A load balancer must connect to at least one blockchain node");
257663
+ }
257664
+ if (!networkUniqueName) {
257665
+ const applicationBlockchainNodes = await serviceSpinner("blockchain node", () => settlemint.blockchainNode.list(applicationUniqueName));
257666
+ const selectedBlockchainNodes = applicationBlockchainNodes.filter((node) => connectedNodesUniqueNames.includes(node.uniqueName));
257667
+ if (selectedBlockchainNodes.length === 0) {
257668
+ return cancel2(`Blockchain node(s) '${connectedNodesUniqueNames.join(", ")}' are not part of the application '${applicationUniqueName}'`);
257669
+ }
257670
+ const onTheSameNetwork = selectedBlockchainNodes.every((node) => node.blockchainNetwork?.uniqueName === selectedBlockchainNodes[0].blockchainNetwork?.uniqueName);
257671
+ if (!onTheSameNetwork) {
257672
+ return cancel2("Blockchain nodes must be on the same network");
257673
+ }
257674
+ networkUniqueName = selectedBlockchainNodes[0].blockchainNetwork?.uniqueName;
257675
+ }
257676
+ const result = await showSpinner(() => settlemint.loadBalancer.create({
257677
+ applicationUniqueName,
257678
+ name: name3,
257679
+ blockchainNetworkUniqueName: networkUniqueName,
257680
+ provider: provider2,
257681
+ region: region2,
257682
+ size,
257683
+ type: type4,
257684
+ connectedNodesUniqueNames
257685
+ }));
257686
+ return {
257687
+ result,
257688
+ mapDefaultEnv: () => {
257689
+ return {
257690
+ SETTLEMINT_APPLICATION: applicationUniqueName,
257691
+ SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER: result.uniqueName
257692
+ };
257693
+ }
257694
+ };
257695
+ });
257696
+ });
257697
+ },
257698
+ examples: [
257699
+ {
257700
+ description: "Create an EVM load balancer and save as default",
257701
+ command: "platform create load-balancer evm my-lb --accept-defaults -d"
257702
+ },
257703
+ {
257704
+ description: "Create an EVM load balancer and connect to specific blockchain nodes",
257705
+ command: "platform create load-balancer evm my-lb --blockchain-network my-network --accept-defaults"
257706
+ },
257707
+ {
257708
+ description: "Create an EVM load balancer in a different application",
257709
+ command: "platform create load-balancer evm my-lb --application my-app --accept-defaults"
257710
+ }
257711
+ ]
257712
+ });
257713
+ }
257714
+
257715
+ // src/commands/platform/load-balancer/create.ts
257716
+ function loadBalancerCreateCommand() {
257717
+ return new Command("load-balancer").alias("lb").description("Create a load balancer in the SettleMint platform").addCommand(loadBalancerEvmCreateCommand());
257718
+ }
257719
+
257524
257720
  // src/commands/platform/middleware/graph/create.ts
257525
257721
  function graphMiddlewareCreateCommand() {
257526
257722
  return getCreateCommand({
@@ -257632,25 +257828,19 @@ function smartContractPortalMiddlewareCreateCommand() {
257632
257828
  return missingApplication();
257633
257829
  }
257634
257830
  let blockchainNodeUniqueName = loadBalancer ? undefined : blockchainNode ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
257635
- let loadBalancerUniqueName = blockchainNodeUniqueName ? undefined : loadBalancer ?? env2.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER;
257831
+ const loadBalancerUniqueName = blockchainNodeUniqueName ? undefined : loadBalancer ?? env2.SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER;
257636
257832
  if (!blockchainNodeUniqueName && !loadBalancerUniqueName) {
257637
257833
  const blockchainNodes = await serviceSpinner("blockchain node", () => settlemint.blockchainNode.list(applicationUniqueName));
257638
- const loadBalancers = await serviceSpinner("load balancer", () => settlemint.loadBalancer.list(applicationUniqueName));
257639
- const nodeOrLoadbalancer = await blockchainNodeOrLoadBalancerPrompt({
257834
+ const node = await blockchainNodePrompt({
257640
257835
  env: env2,
257641
- nodes: blockchainNodes,
257642
- loadBalancers,
257836
+ nodes: blockchainNodes.filter(hasValidPrivateKey),
257643
257837
  accept: acceptDefaults,
257644
257838
  isRequired: true
257645
257839
  });
257646
- if (!nodeOrLoadbalancer) {
257647
- return nothingSelectedError("blockchain node or load balancer");
257648
- }
257649
- if (nodeOrLoadbalancer.__typename?.endsWith("LoadBalancer")) {
257650
- loadBalancerUniqueName = nodeOrLoadbalancer.uniqueName;
257651
- } else {
257652
- blockchainNodeUniqueName = nodeOrLoadbalancer.uniqueName;
257840
+ if (!node) {
257841
+ return nothingSelectedError("blockchain node");
257653
257842
  }
257843
+ blockchainNodeUniqueName = node.uniqueName;
257654
257844
  }
257655
257845
  const parsedAbis = [];
257656
257846
  if (abis && abis.length > 0) {
@@ -258021,7 +258211,7 @@ function storageCreateCommand() {
258021
258211
 
258022
258212
  // src/commands/platform/create.ts
258023
258213
  function createCommand3() {
258024
- return new Command("create").alias("c").description("Create a resource in the SettleMint platform").addCommand(workspaceCreateCommand()).addCommand(applicationCreateCommand()).addCommand(blockchainNetworkCreateCommand()).addCommand(blockchainNodeCreateCommand()).addCommand(privateKeyCreateCommand()).addCommand(middlewareCreateCommand()).addCommand(storageCreateCommand()).addCommand(integrationToolCreateCommand()).addCommand(insightsCreateCommand()).addCommand(applicationAccessTokenCreateCommand());
258214
+ return new Command("create").alias("c").description("Create a resource in the SettleMint platform").addCommand(workspaceCreateCommand()).addCommand(applicationCreateCommand()).addCommand(blockchainNetworkCreateCommand()).addCommand(blockchainNodeCreateCommand()).addCommand(privateKeyCreateCommand()).addCommand(middlewareCreateCommand()).addCommand(storageCreateCommand()).addCommand(integrationToolCreateCommand()).addCommand(insightsCreateCommand()).addCommand(applicationAccessTokenCreateCommand()).addCommand(loadBalancerCreateCommand());
258025
258215
  }
258026
258216
 
258027
258217
  // src/prompts/delete-confirmation.prompt.ts
@@ -258261,6 +258451,19 @@ function integrationToolRestartCommand() {
258261
258451
  return new Command("integration-tool").alias("it").description("Restart an integration tool service in the SettleMint platform").addCommand(hasuraRestartCommand());
258262
258452
  }
258263
258453
 
258454
+ // src/commands/platform/load-balancer/restart.ts
258455
+ function loadBalancerRestartCommand() {
258456
+ return getRestartCommand({
258457
+ name: "load-balancer",
258458
+ type: "load balancer",
258459
+ alias: "lb",
258460
+ envKey: "SETTLEMINT_BLOCKCHAIN_NODE_OR_LOAD_BALANCER",
258461
+ restartFunction: async (settlemint, id) => {
258462
+ return settlemint.loadBalancer.restart(id);
258463
+ }
258464
+ });
258465
+ }
258466
+
258264
258467
  // src/commands/platform/middleware/graph/restart.ts
258265
258468
  function graphRestartCommand() {
258266
258469
  return getRestartCommand({
@@ -258327,7 +258530,7 @@ function storageRestartCommand() {
258327
258530
 
258328
258531
  // src/commands/platform/restart.ts
258329
258532
  function restartCommand() {
258330
- const cmd2 = new Command("restart").description("Restart a resource in the SettleMint platform").addCommand(blockchainNetworkRestartCommand()).addCommand(customDeploymentRestartCommand()).addCommand(insightsRestartCommand()).addCommand(integrationToolRestartCommand()).addCommand(middlewareRestartCommand()).addCommand(storageRestartCommand());
258533
+ const cmd2 = new Command("restart").description("Restart a resource in the SettleMint platform").addCommand(blockchainNetworkRestartCommand()).addCommand(customDeploymentRestartCommand()).addCommand(insightsRestartCommand()).addCommand(integrationToolRestartCommand()).addCommand(middlewareRestartCommand()).addCommand(storageRestartCommand()).addCommand(loadBalancerRestartCommand());
258331
258534
  return cmd2;
258332
258535
  }
258333
258536
 
@@ -259170,11 +259373,6 @@ function getStatusAction(status) {
259170
259373
  return "Please try again later.";
259171
259374
  }
259172
259375
 
259173
- // src/utils/blockchain-node.ts
259174
- function validPrivateKey(privateKey) {
259175
- return privateKey.privateKeyType !== "HD_ECDSA_P256";
259176
- }
259177
-
259178
259376
  // src/commands/smart-contract-set/hardhat/utils/select-target-node.ts
259179
259377
  async function selectTargetNode({
259180
259378
  env: env2,
@@ -259220,7 +259418,7 @@ function validateNode(node, cancelOnError = true) {
259220
259418
  }
259221
259419
  return false;
259222
259420
  }
259223
- if (node.privateKeys?.filter((privateKey) => validPrivateKey(privateKey)).length === 0) {
259421
+ if (!hasValidPrivateKey(node)) {
259224
259422
  if (cancelOnError) {
259225
259423
  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.`);
259226
259424
  }
@@ -259241,7 +259439,7 @@ async function addressPrompt({
259241
259439
  node,
259242
259440
  hardhatConfig
259243
259441
  }) {
259244
- const possiblePrivateKeys = node.privateKeys?.filter((privateKey) => validPrivateKey(privateKey)) ?? [];
259442
+ const possiblePrivateKeys = node.privateKeys?.filter(isValidPrivateKey) ?? [];
259245
259443
  const defaultAddress = hardhatConfig.networks?.btp?.from ?? possiblePrivateKeys[0]?.address;
259246
259444
  const defaultPossible = accept && defaultAddress;
259247
259445
  if (defaultPossible) {
@@ -259997,4 +260195,4 @@ async function sdkCliCommand(argv = process.argv) {
259997
260195
  // src/cli.ts
259998
260196
  sdkCliCommand();
259999
260197
 
260000
- //# debugId=5250BB52C7AD397564756E2164756E21
260198
+ //# debugId=E9D8627ECFBED53C64756E2164756E21