@settlemint/sdk-cli 0.6.41 → 0.6.42-main3b09370

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 +315 -390
  2. package/dist/cli.js.map +18 -20
  3. package/package.json +4 -3
package/dist/cli.js CHANGED
@@ -221597,8 +221597,8 @@ var require_posix = __commonJS((exports) => {
221597
221597
  }
221598
221598
  };
221599
221599
  exports.sync = sync3;
221600
- var checkStat = (stat6, options) => stat6.isFile() && checkMode(stat6, options);
221601
- var checkMode = (stat6, options) => {
221600
+ var checkStat = (stat7, options) => stat7.isFile() && checkMode(stat7, options);
221601
+ var checkMode = (stat7, options) => {
221602
221602
  const myUid = options.uid ?? process.getuid?.();
221603
221603
  const myGroups = options.groups ?? process.getgroups?.() ?? [];
221604
221604
  const myGid = options.gid ?? process.getgid?.() ?? myGroups[0];
@@ -221606,9 +221606,9 @@ var require_posix = __commonJS((exports) => {
221606
221606
  throw new Error("cannot get uid or gid");
221607
221607
  }
221608
221608
  const groups = new Set([myGid, ...myGroups]);
221609
- const mod = stat6.mode;
221610
- const uid = stat6.uid;
221611
- const gid = stat6.gid;
221609
+ const mod = stat7.mode;
221610
+ const uid = stat7.uid;
221611
+ const gid = stat7.gid;
221612
221612
  const u6 = parseInt("100", 8);
221613
221613
  const g6 = parseInt("010", 8);
221614
221614
  const o7 = parseInt("001", 8);
@@ -221662,7 +221662,7 @@ var require_win32 = __commonJS((exports) => {
221662
221662
  }
221663
221663
  return false;
221664
221664
  };
221665
- var checkStat = (stat6, path5, options) => stat6.isFile() && checkPathExt(path5, options);
221665
+ var checkStat = (stat7, path5, options) => stat7.isFile() && checkPathExt(path5, options);
221666
221666
  });
221667
221667
 
221668
221668
  // ../../node_modules/isexe/dist/cjs/options.js
@@ -225272,8 +225272,8 @@ var require_clone = __commonJS((exports, module) => {
225272
225272
 
225273
225273
  // ../../node_modules/@npmcli/git/lib/is.js
225274
225274
  var require_is = __commonJS((exports, module) => {
225275
- var { stat: stat6 } = __require("fs/promises");
225276
- module.exports = ({ cwd = process.cwd() } = {}) => stat6(cwd + "/.git").then(() => true, () => false);
225275
+ var { stat: stat7 } = __require("fs/promises");
225276
+ module.exports = ({ cwd = process.cwd() } = {}) => stat7(cwd + "/.git").then(() => true, () => false);
225277
225277
  });
225278
225278
 
225279
225279
  // ../../node_modules/@npmcli/git/lib/find.js
@@ -230270,21 +230270,21 @@ var require_write_entry = __commonJS((exports, module) => {
230270
230270
  return super.emit(ev, ...data);
230271
230271
  }
230272
230272
  [LSTAT]() {
230273
- fs3.lstat(this.absolute, (er2, stat7) => {
230273
+ fs3.lstat(this.absolute, (er2, stat8) => {
230274
230274
  if (er2) {
230275
230275
  return this.emit("error", er2);
230276
230276
  }
230277
- this[ONLSTAT](stat7);
230277
+ this[ONLSTAT](stat8);
230278
230278
  });
230279
230279
  }
230280
- [ONLSTAT](stat7) {
230281
- this.statCache.set(this.absolute, stat7);
230282
- this.stat = stat7;
230283
- if (!stat7.isFile()) {
230284
- stat7.size = 0;
230280
+ [ONLSTAT](stat8) {
230281
+ this.statCache.set(this.absolute, stat8);
230282
+ this.stat = stat8;
230283
+ if (!stat8.isFile()) {
230284
+ stat8.size = 0;
230285
230285
  }
230286
- this.type = getType(stat7);
230287
- this.emit("stat", stat7);
230286
+ this.type = getType(stat8);
230287
+ this.emit("stat", stat8);
230288
230288
  this[PROCESS2]();
230289
230289
  }
230290
230290
  [PROCESS2]() {
@@ -230616,7 +230616,7 @@ var require_write_entry = __commonJS((exports, module) => {
230616
230616
  });
230617
230617
  WriteEntry.Sync = WriteEntrySync;
230618
230618
  WriteEntry.Tar = WriteEntryTar;
230619
- var getType = (stat7) => stat7.isFile() ? "File" : stat7.isDirectory() ? "Directory" : stat7.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
230619
+ var getType = (stat8) => stat8.isFile() ? "File" : stat8.isDirectory() ? "Directory" : stat8.isSymbolicLink() ? "SymbolicLink" : "Unsupported";
230620
230620
  module.exports = WriteEntry;
230621
230621
  });
230622
230622
 
@@ -231148,21 +231148,21 @@ var require_pack = __commonJS((exports, module) => {
231148
231148
  [STAT](job) {
231149
231149
  job.pending = true;
231150
231150
  this[JOBS] += 1;
231151
- const stat7 = this.follow ? "stat" : "lstat";
231152
- fs3[stat7](job.absolute, (er2, stat8) => {
231151
+ const stat8 = this.follow ? "stat" : "lstat";
231152
+ fs3[stat8](job.absolute, (er2, stat9) => {
231153
231153
  job.pending = false;
231154
231154
  this[JOBS] -= 1;
231155
231155
  if (er2) {
231156
231156
  this.emit("error", er2);
231157
231157
  } else {
231158
- this[ONSTAT](job, stat8);
231158
+ this[ONSTAT](job, stat9);
231159
231159
  }
231160
231160
  });
231161
231161
  }
231162
- [ONSTAT](job, stat7) {
231163
- this.statCache.set(job.absolute, stat7);
231164
- job.stat = stat7;
231165
- if (!this.filter(job.path, stat7)) {
231162
+ [ONSTAT](job, stat8) {
231163
+ this.statCache.set(job.absolute, stat8);
231164
+ job.stat = stat8;
231165
+ if (!this.filter(job.path, stat8)) {
231166
231166
  job.ignore = true;
231167
231167
  }
231168
231168
  this[PROCESS2]();
@@ -231330,10 +231330,10 @@ var require_pack = __commonJS((exports, module) => {
231330
231330
  resume() {
231331
231331
  }
231332
231332
  [STAT](job) {
231333
- const stat7 = this.follow ? "statSync" : "lstatSync";
231334
- this[ONSTAT](job, fs3[stat7](job.absolute));
231333
+ const stat8 = this.follow ? "statSync" : "lstatSync";
231334
+ this[ONSTAT](job, fs3[stat8](job.absolute));
231335
231335
  }
231336
- [READDIR](job, stat7) {
231336
+ [READDIR](job, stat8) {
231337
231337
  this[ONREADDIR](job, fs3.readdirSync(job.absolute));
231338
231338
  }
231339
231339
  [PIPE](job) {
@@ -232717,15 +232717,15 @@ var require_list = __commonJS((exports, module) => {
232717
232717
  let threw = true;
232718
232718
  let fd;
232719
232719
  try {
232720
- const stat7 = fs3.statSync(file);
232720
+ const stat8 = fs3.statSync(file);
232721
232721
  const readSize = opt2.maxReadSize || 16 * 1024 * 1024;
232722
- if (stat7.size < readSize) {
232722
+ if (stat8.size < readSize) {
232723
232723
  p5.end(fs3.readFileSync(file));
232724
232724
  } else {
232725
232725
  let pos = 0;
232726
232726
  const buf = Buffer.allocUnsafe(readSize);
232727
232727
  fd = fs3.openSync(file, "r");
232728
- while (pos < stat7.size) {
232728
+ while (pos < stat8.size) {
232729
232729
  const bytesRead = fs3.readSync(fd, buf, 0, readSize, pos);
232730
232730
  pos += bytesRead;
232731
232731
  p5.write(buf.slice(0, bytesRead));
@@ -232749,13 +232749,13 @@ var require_list = __commonJS((exports, module) => {
232749
232749
  const p5 = new Promise((resolve5, reject) => {
232750
232750
  parse5.on("error", reject);
232751
232751
  parse5.on("end", resolve5);
232752
- fs3.stat(file, (er2, stat7) => {
232752
+ fs3.stat(file, (er2, stat8) => {
232753
232753
  if (er2) {
232754
232754
  reject(er2);
232755
232755
  } else {
232756
232756
  const stream2 = new fsm.ReadStream(file, {
232757
232757
  readSize,
232758
- size: stat7.size
232758
+ size: stat8.size
232759
232759
  });
232760
232760
  stream2.on("error", reject);
232761
232761
  stream2.pipe(parse5);
@@ -233082,7 +233082,7 @@ var require_update = __commonJS((exports, module) => {
233082
233082
  if (!opt2.mtimeCache) {
233083
233083
  opt2.mtimeCache = new Map;
233084
233084
  }
233085
- opt2.filter = filter4 ? (path5, stat7) => filter4(path5, stat7) && !(opt2.mtimeCache.get(path5) > stat7.mtime) : (path5, stat7) => !(opt2.mtimeCache.get(path5) > stat7.mtime);
233085
+ opt2.filter = filter4 ? (path5, stat8) => filter4(path5, stat8) && !(opt2.mtimeCache.get(path5) > stat8.mtime) : (path5, stat8) => !(opt2.mtimeCache.get(path5) > stat8.mtime);
233086
233086
  };
233087
233087
  });
233088
233088
 
@@ -234470,11 +234470,11 @@ var require_extract = __commonJS((exports, module) => {
234470
234470
  var extractFileSync = (opt2) => {
234471
234471
  const u6 = new Unpack.Sync(opt2);
234472
234472
  const file = opt2.file;
234473
- const stat7 = fs3.statSync(file);
234473
+ const stat8 = fs3.statSync(file);
234474
234474
  const readSize = opt2.maxReadSize || 16 * 1024 * 1024;
234475
234475
  const stream2 = new fsm.ReadStreamSync(file, {
234476
234476
  readSize,
234477
- size: stat7.size
234477
+ size: stat8.size
234478
234478
  });
234479
234479
  stream2.pipe(u6);
234480
234480
  };
@@ -234485,13 +234485,13 @@ var require_extract = __commonJS((exports, module) => {
234485
234485
  const p5 = new Promise((resolve5, reject) => {
234486
234486
  u6.on("error", reject);
234487
234487
  u6.on("close", resolve5);
234488
- fs3.stat(file, (er2, stat7) => {
234488
+ fs3.stat(file, (er2, stat8) => {
234489
234489
  if (er2) {
234490
234490
  reject(er2);
234491
234491
  } else {
234492
234492
  const stream2 = new fsm.ReadStream(file, {
234493
234493
  readSize,
234494
- size: stat7.size
234494
+ size: stat8.size
234495
234495
  });
234496
234496
  stream2.on("error", reject);
234497
234497
  stream2.pipe(u6);
@@ -234543,15 +234543,15 @@ var require_windows = __commonJS((exports, module) => {
234543
234543
  }
234544
234544
  return false;
234545
234545
  }
234546
- function checkStat(stat7, path6, options) {
234547
- if (!stat7.isSymbolicLink() && !stat7.isFile()) {
234546
+ function checkStat(stat8, path6, options) {
234547
+ if (!stat8.isSymbolicLink() && !stat8.isFile()) {
234548
234548
  return false;
234549
234549
  }
234550
234550
  return checkPathExt(path6, options);
234551
234551
  }
234552
234552
  function isexe(path6, options, cb) {
234553
- fs3.stat(path6, function(er2, stat7) {
234554
- cb(er2, er2 ? false : checkStat(stat7, path6, options));
234553
+ fs3.stat(path6, function(er2, stat8) {
234554
+ cb(er2, er2 ? false : checkStat(stat8, path6, options));
234555
234555
  });
234556
234556
  }
234557
234557
  function sync3(path6, options) {
@@ -234565,20 +234565,20 @@ var require_mode = __commonJS((exports, module) => {
234565
234565
  isexe.sync = sync3;
234566
234566
  var fs3 = __require("fs");
234567
234567
  function isexe(path6, options, cb) {
234568
- fs3.stat(path6, function(er2, stat7) {
234569
- cb(er2, er2 ? false : checkStat(stat7, options));
234568
+ fs3.stat(path6, function(er2, stat8) {
234569
+ cb(er2, er2 ? false : checkStat(stat8, options));
234570
234570
  });
234571
234571
  }
234572
234572
  function sync3(path6, options) {
234573
234573
  return checkStat(fs3.statSync(path6), options);
234574
234574
  }
234575
- function checkStat(stat7, options) {
234576
- return stat7.isFile() && checkMode(stat7, options);
234575
+ function checkStat(stat8, options) {
234576
+ return stat8.isFile() && checkMode(stat8, options);
234577
234577
  }
234578
- function checkMode(stat7, options) {
234579
- var mod = stat7.mode;
234580
- var uid = stat7.uid;
234581
- var gid = stat7.gid;
234578
+ function checkMode(stat8, options) {
234579
+ var mod = stat8.mode;
234580
+ var uid = stat8.uid;
234581
+ var gid = stat8.gid;
234582
234582
  var myUid = options.uid !== undefined ? options.uid : process.getuid && process.getuid();
234583
234583
  var myGid = options.gid !== undefined ? options.gid : process.getgid && process.getgid();
234584
234584
  var u6 = parseInt("100", 8);
@@ -239919,10 +239919,10 @@ Content-Type: ${R6.type || "application/octet-stream"}\r
239919
239919
  }
239920
239920
  var nodeDomexception = globalThis.DOMException;
239921
239921
  var DOMException2 = _commonjsHelpers.getDefaultExportFromCjs(nodeDomexception);
239922
- var { stat: stat7 } = node_fs.promises;
239922
+ var { stat: stat8 } = node_fs.promises;
239923
239923
  var blobFromSync = u6((c3, l4) => fromBlob(node_fs.statSync(c3), c3, l4), "blobFromSync");
239924
- var blobFrom = u6((c3, l4) => stat7(c3).then((d6) => fromBlob(d6, c3, l4)), "blobFrom");
239925
- var fileFrom = u6((c3, l4) => stat7(c3).then((d6) => fromFile(d6, c3, l4)), "fileFrom");
239924
+ var blobFrom = u6((c3, l4) => stat8(c3).then((d6) => fromBlob(d6, c3, l4)), "blobFrom");
239925
+ var fileFrom = u6((c3, l4) => stat8(c3).then((d6) => fromFile(d6, c3, l4)), "fileFrom");
239926
239926
  var fileFromSync = u6((c3, l4) => fromFile(node_fs.statSync(c3), c3, l4), "fileFromSync");
239927
239927
  var fromBlob = u6((c3, l4, d6 = "") => new r$1([new BlobDataItem({ path: l4, size: c3.size, lastModified: c3.mtimeMs, start: 0 })], { type: d6 }), "fromBlob");
239928
239928
  var fromFile = u6((c3, l4, d6 = "") => new File$1([new BlobDataItem({ path: l4, size: c3.size, lastModified: c3.mtimeMs, start: 0 })], node_path.basename(l4), { type: d6, lastModified: c3.mtimeMs }), "fromFile");
@@ -239936,7 +239936,7 @@ Content-Type: ${R6.type || "application/octet-stream"}\r
239936
239936
  return new Xt3({ path: D4(this, Me3), lastModified: this.lastModified, size: d6 - l4, start: D4(this, xe3) + l4 });
239937
239937
  }
239938
239938
  async* stream() {
239939
- const { mtimeMs: l4 } = await stat7(D4(this, Me3));
239939
+ const { mtimeMs: l4 } = await stat8(D4(this, Me3));
239940
239940
  if (l4 > this.lastModified)
239941
239941
  throw new DOMException2("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.", "NotReadableError");
239942
239942
  yield* node_fs.createReadStream(D4(this, Me3), { start: D4(this, xe3), end: D4(this, xe3) + this.size - 1 });
@@ -261807,9 +261807,9 @@ var z4 = /* @__PURE__ */ Object.freeze({
261807
261807
 
261808
261808
  // ../utils/dist/environment.mjs
261809
261809
  var import_dotenvx = __toESM(require_main2(), 1);
261810
- import { existsSync } from "node:fs";
261811
261810
  import { readFile as readFile3, writeFile as writeFile4 } from "node:fs/promises";
261812
261811
  import { dirname as dirname32, join as join3 } from "node:path";
261812
+ import { stat as stat6 } from "node:fs/promises";
261813
261813
  import { dirname as dirname22 } from "node:path";
261814
261814
  var import_dotenvx2 = __toESM(require_main2(), 1);
261815
261815
 
@@ -268061,9 +268061,8 @@ var DotEnvSchema = z4.object({
268061
268061
  SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema.optional(),
268062
268062
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema.optional(),
268063
268063
  SETTLEMINT_NEW_PROJECT_NAME: z4.string().optional(),
268064
- SETTLEMINT_SMART_CONTRACT_SET: IdSchema.optional(),
268065
- SETTLEMINT_SMART_CONTRACT_SET_ADDRESS: z4.string().optional(),
268066
- SETTLEMINT_SMART_CONTRACT_SET_DEPLOYMENT_ID: z4.string().optional()
268064
+ SETTLEMINT_SMART_CONTRACT_ADDRESS: z4.string().optional(),
268065
+ SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z4.string().optional()
268067
268066
  });
268068
268067
  var DotEnvSchemaPartial = DotEnvSchema.partial();
268069
268068
  function validate(schema, value4) {
@@ -268100,6 +268099,14 @@ async function loadEnvironmentEnv(validateEnv, prod) {
268100
268099
  return {};
268101
268100
  }
268102
268101
  }
268102
+ async function exists2(path4) {
268103
+ try {
268104
+ await stat6(path4);
268105
+ return true;
268106
+ } catch {
268107
+ return false;
268108
+ }
268109
+ }
268103
268110
  async function projectRoot2() {
268104
268111
  const packageJsonPath = await findUp("package.json");
268105
268112
  if (!packageJsonPath) {
@@ -268111,7 +268118,7 @@ async function findMonoRepoRoot(startDir) {
268111
268118
  let currentDir = startDir;
268112
268119
  while (currentDir !== "/") {
268113
268120
  const packageJsonPath = join3(currentDir, "package.json");
268114
- if (existsSync(packageJsonPath)) {
268121
+ if (await exists2(packageJsonPath)) {
268115
268122
  try {
268116
268123
  const packageJson = JSON.parse(await readFile3(packageJsonPath, "utf-8"));
268117
268124
  if (packageJson.workspaces && Array.isArray(packageJson.workspaces) && packageJson.workspaces.length > 0) {
@@ -268155,11 +268162,11 @@ async function writeEnv(prod, env2, secrets) {
268155
268162
  const targetDirs = await findMonoRepoPackages(projectDir);
268156
268163
  await Promise.all(targetDirs.map(async (dir) => {
268157
268164
  const envFile = join3(dir, secrets ? `.env${prod ? ".production" : ""}.local` : `.env${prod ? ".production" : ""}`);
268158
- let { parsed: currentEnv } = import_dotenvx2.config({
268165
+ let { parsed: currentEnv } = await exists2(envFile) ? import_dotenvx2.config({
268159
268166
  path: envFile,
268160
268167
  logLevel: "error",
268161
268168
  quiet: true
268162
- });
268169
+ }) : { parsed: {} };
268163
268170
  if (!currentEnv) {
268164
268171
  currentEnv = {};
268165
268172
  }
@@ -268530,9 +268537,8 @@ async function writeEnvSpinner(prod, env2) {
268530
268537
  SETTLEMINT_BLOCKSCOUT: env2.SETTLEMINT_BLOCKSCOUT,
268531
268538
  SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT,
268532
268539
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: env2.SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT,
268533
- SETTLEMINT_SMART_CONTRACT_SET: env2.SETTLEMINT_SMART_CONTRACT_SET,
268534
- SETTLEMINT_SMART_CONTRACT_SET_ADDRESS: env2.SETTLEMINT_SMART_CONTRACT_SET_ADDRESS,
268535
- SETTLEMINT_SMART_CONTRACT_SET_DEPLOYMENT_ID: env2.SETTLEMINT_SMART_CONTRACT_SET_DEPLOYMENT_ID
268540
+ SETTLEMINT_SMART_CONTRACT_ADDRESS: env2.SETTLEMINT_SMART_CONTRACT_ADDRESS,
268541
+ SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: env2.SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID
268536
268542
  }, false);
268537
268543
  await writeEnv(prod, {
268538
268544
  SETTLEMINT_ACCESS_TOKEN: env2.SETTLEMINT_ACCESS_TOKEN,
@@ -268747,9 +268753,8 @@ var DotEnvSchema2 = z4.object({
268747
268753
  SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema2.optional(),
268748
268754
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema2.optional(),
268749
268755
  SETTLEMINT_NEW_PROJECT_NAME: z4.string().optional(),
268750
- SETTLEMINT_SMART_CONTRACT_SET: IdSchema2.optional(),
268751
- SETTLEMINT_SMART_CONTRACT_SET_ADDRESS: z4.string().optional(),
268752
- SETTLEMINT_SMART_CONTRACT_SET_DEPLOYMENT_ID: z4.string().optional()
268756
+ SETTLEMINT_SMART_CONTRACT_ADDRESS: z4.string().optional(),
268757
+ SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z4.string().optional()
268753
268758
  });
268754
268759
  var DotEnvSchemaPartial2 = DotEnvSchema2.partial();
268755
268760
  function validate2(schema, value4) {
@@ -272337,7 +272342,7 @@ function connectCommand() {
272337
272342
  var package_default = {
272338
272343
  name: "@settlemint/sdk-cli",
272339
272344
  description: "SettleMint SDK, integrate SettleMint into your application with ease.",
272340
- version: "0.6.41",
272345
+ version: "0.6.42-main3b09370",
272341
272346
  type: "module",
272342
272347
  private: false,
272343
272348
  license: "FSL-1.1-MIT",
@@ -272368,6 +272373,7 @@ var package_default = {
272368
272373
  },
272369
272374
  scripts: {
272370
272375
  build: "bun run build.ts",
272376
+ dev: "tsup-node --watch",
272371
272377
  test: "bun test",
272372
272378
  "test:coverage": "bun test --coverage",
272373
272379
  typecheck: "tsc --noEmit",
@@ -272387,8 +272393,8 @@ var package_default = {
272387
272393
  "@inquirer/input": "4.1.0",
272388
272394
  "@inquirer/password": "4.0.3",
272389
272395
  "@inquirer/select": "4.0.3",
272390
- "@settlemint/sdk-js": "0.6.41",
272391
- "@settlemint/sdk-utils": "0.6.41",
272396
+ "@settlemint/sdk-js": "0.6.42-main3b09370",
272397
+ "@settlemint/sdk-utils": "0.6.42-main3b09370",
272392
272398
  "get-tsconfig": "4.8.1",
272393
272399
  giget: "1.2.3"
272394
272400
  },
@@ -272451,7 +272457,7 @@ async function templatePrompt(templates, argument) {
272451
272457
  // ../utils/dist/package-manager.mjs
272452
272458
  import { readdir as readdir3, rm as rm2 } from "node:fs/promises";
272453
272459
  import { resolve as resolve4 } from "node:path";
272454
- import { stat as stat6 } from "node:fs/promises";
272460
+ import { stat as stat7 } from "node:fs/promises";
272455
272461
  import { dirname as dirname23 } from "node:path";
272456
272462
 
272457
272463
  // ../../node_modules/package-manager-detector/dist/detect.mjs
@@ -272549,9 +272555,9 @@ async function fileExists(filePath) {
272549
272555
  // ../utils/dist/package-manager.mjs
272550
272556
  var import_package_json = __toESM(require_lib13(), 1);
272551
272557
  var import_package_json2 = __toESM(require_lib13(), 1);
272552
- async function exists2(path5) {
272558
+ async function exists3(path5) {
272553
272559
  try {
272554
- await stat6(path5);
272560
+ await stat7(path5);
272555
272561
  return true;
272556
272562
  } catch {
272557
272563
  return false;
@@ -272575,7 +272581,7 @@ async function isEmpty(path5) {
272575
272581
  return files.length === 0 || files.length === 1 && files[0] === ".git";
272576
272582
  }
272577
272583
  async function emptyDir(dir) {
272578
- if (!await exists2(dir))
272584
+ if (!await exists3(dir))
272579
272585
  return;
272580
272586
  for (const file of await readdir3(dir)) {
272581
272587
  if (file === ".git")
@@ -272597,7 +272603,7 @@ import { mkdir as mkdir5 } from "node:fs/promises";
272597
272603
  // ../../node_modules/giget/dist/index.mjs
272598
272604
  var import_tar = __toESM(require_tar(), 1);
272599
272605
  import { readFile as readFile6, writeFile as writeFile7, mkdir as mkdir4, rm as rm3 } from "node:fs/promises";
272600
- import { existsSync as existsSync3, createWriteStream as createWriteStream2, readdirSync as readdirSync2 } from "node:fs";
272606
+ import { existsSync as existsSync2, createWriteStream as createWriteStream2, readdirSync as readdirSync2 } from "node:fs";
272601
272607
 
272602
272608
  // ../../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
272603
272609
  var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
@@ -272818,7 +272824,7 @@ var defuArrayFn = createDefu((object, key2, currentValue) => {
272818
272824
  });
272819
272825
 
272820
272826
  // ../../node_modules/nypm/dist/index.mjs
272821
- import { existsSync as existsSync2 } from "node:fs";
272827
+ import { existsSync } from "node:fs";
272822
272828
  import { readFile as readFile5 } from "node:fs/promises";
272823
272829
  async function findup(cwd2, match2, options = {}) {
272824
272830
  const segments = normalize3(cwd2).split("/");
@@ -272912,7 +272918,7 @@ async function detectPackageManager(cwd2, options = {}) {
272912
272918
  const detected = await findup(resolve5(cwd2 || "."), async (path8) => {
272913
272919
  if (!options.ignorePackageJSON) {
272914
272920
  const packageJSONPath = join5(path8, "package.json");
272915
- if (existsSync2(packageJSONPath)) {
272921
+ if (existsSync(packageJSONPath)) {
272916
272922
  const packageJSON = JSON.parse(await readFile5(packageJSONPath, "utf8"));
272917
272923
  if (packageJSON?.packageManager) {
272918
272924
  const [name2, version = "0.0.0"] = packageJSON.packageManager.split("@");
@@ -272934,7 +272940,7 @@ async function detectPackageManager(cwd2, options = {}) {
272934
272940
  packageManager.lockFile,
272935
272941
  packageManager.files
272936
272942
  ].flat().filter(Boolean);
272937
- if (detectionsFiles.some((file) => existsSync2(resolve5(path8, file)))) {
272943
+ if (detectionsFiles.some((file) => existsSync(resolve5(path8, file)))) {
272938
272944
  return {
272939
272945
  ...packageManager
272940
272946
  };
@@ -272987,7 +272993,7 @@ async function download(url, filePath, options = {}) {
272987
272993
  return;
272988
272994
  });
272989
272995
  const etag = headResponse?.headers.get("etag");
272990
- if (info.etag === etag && existsSync3(filePath)) {
272996
+ if (info.etag === etag && existsSync2(filePath)) {
272991
272997
  return;
272992
272998
  }
272993
272999
  if (typeof etag === "string") {
@@ -273210,7 +273216,7 @@ async function downloadTemplate(input, options = {}) {
273210
273216
  template.defaultDir = (template.defaultDir || template.name).replace(/[^\da-z-]/gi, "-");
273211
273217
  const temporaryDirectory = resolve5(cacheDirectory(), providerName, template.name);
273212
273218
  const tarPath = resolve5(temporaryDirectory, (template.version || template.name) + ".tar.gz");
273213
- if (options.preferOffline && existsSync3(tarPath)) {
273219
+ if (options.preferOffline && existsSync2(tarPath)) {
273214
273220
  options.offline = true;
273215
273221
  }
273216
273222
  if (!options.offline) {
@@ -273222,7 +273228,7 @@ async function downloadTemplate(input, options = {}) {
273222
273228
  ...normalizeHeaders(template.headers)
273223
273229
  }
273224
273230
  }).catch((error5) => {
273225
- if (!existsSync3(tarPath)) {
273231
+ if (!existsSync2(tarPath)) {
273226
273232
  throw error5;
273227
273233
  }
273228
273234
  debug2("Download error. Using cached version:", error5);
@@ -273230,7 +273236,7 @@ async function downloadTemplate(input, options = {}) {
273230
273236
  });
273231
273237
  debug2(`Downloaded ${template.tar} to ${tarPath} in ${Date.now() - s22}ms`);
273232
273238
  }
273233
- if (!existsSync3(tarPath)) {
273239
+ if (!existsSync2(tarPath)) {
273234
273240
  throw new Error(`Tarball not found: ${tarPath} (offline: ${options.offline})`);
273235
273241
  }
273236
273242
  const cwd2 = resolve5(options.cwd || ".");
@@ -273238,7 +273244,7 @@ async function downloadTemplate(input, options = {}) {
273238
273244
  if (options.forceClean) {
273239
273245
  await rm3(extractPath, { recursive: true, force: true });
273240
273246
  }
273241
- if (!options.force && existsSync3(extractPath) && readdirSync2(extractPath).length > 0) {
273247
+ if (!options.force && existsSync2(extractPath) && readdirSync2(extractPath).length > 0) {
273242
273248
  throw new Error(`Destination ${extractPath} already exists.`);
273243
273249
  }
273244
273250
  await mkdir4(extractPath, { recursive: true });
@@ -273489,7 +273495,7 @@ var SETTLEMINT_CLIENT_MAP = {
273489
273495
  // ../utils/dist/index.mjs
273490
273496
  import { spawn as spawn2 } from "node:child_process";
273491
273497
  var import_dotenvx3 = __toESM(require_main2(), 1);
273492
- import { stat as stat7 } from "node:fs/promises";
273498
+ import { stat as stat8 } from "node:fs/promises";
273493
273499
  var import_dotenvx4 = __toESM(require_main2(), 1);
273494
273500
  var import_package_json3 = __toESM(require_lib13(), 1);
273495
273501
  var import_package_json4 = __toESM(require_lib13(), 1);
@@ -273498,17 +273504,23 @@ function capitalizeFirstLetter(val) {
273498
273504
  }
273499
273505
  async function executeCommand2(command, args, options) {
273500
273506
  const child = spawn2(command, args, { env: { ...process.env, ...options?.env } });
273507
+ process.stdin.pipe(child.stdin);
273508
+ const output = [];
273501
273509
  return new Promise((resolve22, reject) => {
273502
273510
  child.stdout.on("data", (data) => {
273503
- console.log(data.toString());
273511
+ if (!options?.silent) {
273512
+ process.stdout.write(data);
273513
+ }
273514
+ output.push(data.toString());
273504
273515
  });
273505
273516
  child.stderr.on("data", (data) => {
273506
- console.error(data.toString());
273517
+ process.stderr.write(data);
273507
273518
  });
273508
273519
  child.on("error", (err) => reject(err));
273509
273520
  child.on("close", (code2) => {
273510
273521
  if (code2 === 0 || code2 === null || code2 === 143) {
273511
- resolve22();
273522
+ process.stdin.unpipe(child.stdin);
273523
+ resolve22(output);
273512
273524
  return;
273513
273525
  }
273514
273526
  reject(new Error(`Command "${command}" exited with code ${code2}`));
@@ -273566,9 +273578,8 @@ var DotEnvSchema3 = z4.object({
273566
273578
  SETTLEMINT_BLOCKSCOUT_GRAPHQL_ENDPOINT: UrlSchema3.optional(),
273567
273579
  SETTLEMINT_BLOCKSCOUT_UI_ENDPOINT: UrlSchema3.optional(),
273568
273580
  SETTLEMINT_NEW_PROJECT_NAME: z4.string().optional(),
273569
- SETTLEMINT_SMART_CONTRACT_SET: IdSchema3.optional(),
273570
- SETTLEMINT_SMART_CONTRACT_SET_ADDRESS: z4.string().optional(),
273571
- SETTLEMINT_SMART_CONTRACT_SET_DEPLOYMENT_ID: z4.string().optional()
273581
+ SETTLEMINT_SMART_CONTRACT_ADDRESS: z4.string().optional(),
273582
+ SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: z4.string().optional()
273572
273583
  });
273573
273584
  var DotEnvSchemaPartial3 = DotEnvSchema3.partial();
273574
273585
  function validate3(schema, value4) {
@@ -273605,9 +273616,9 @@ async function loadEnvironmentEnv2(validateEnv, prod) {
273605
273616
  return {};
273606
273617
  }
273607
273618
  }
273608
- async function exists3(path8) {
273619
+ async function exists4(path8) {
273609
273620
  try {
273610
- await stat7(path8);
273621
+ await stat8(path8);
273611
273622
  return true;
273612
273623
  } catch {
273613
273624
  return false;
@@ -274217,27 +274228,15 @@ function graphMiddlewareCreateCommand() {
274217
274228
  type: "middleware",
274218
274229
  alias: "gr",
274219
274230
  execute: (cmd2, baseAction) => {
274220
- addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").option("--smart-contract-set-id <smartContractSetId>", "Smart Contract Set ID").option("--storage-id <storageId>", "Storage ID (IFPS)").option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID").action(async (name2, {
274221
- applicationId,
274222
- smartContractSetId,
274223
- storageId,
274224
- blockchainNodeId,
274225
- provider,
274226
- region,
274227
- size,
274228
- type: type4,
274229
- ...defaultArgs
274230
- }) => {
274231
+ addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").option("--storage-id <storageId>", "Storage ID (IFPS)").option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID").action(async (name2, { applicationId, storageId, blockchainNodeId, provider, region, size, type: type4, ...defaultArgs }) => {
274231
274232
  return baseAction(defaultArgs, async (settlemint, env2) => {
274232
274233
  const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
274233
- const smartContractSet = smartContractSetId ?? env2.SETTLEMINT_SMART_CONTRACT_SET;
274234
274234
  const blockchainNode = blockchainNodeId ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
274235
274235
  const storage = storageId ?? env2.SETTLEMINT_IPFS;
274236
274236
  const result = await settlemint.middleware.create({
274237
274237
  name: name2,
274238
274238
  applicationId: application,
274239
274239
  interface: "HA_GRAPH",
274240
- smartContractSetId: smartContractSet,
274241
274240
  storageId: storage,
274242
274241
  blockchainNodeId: blockchainNode,
274243
274242
  provider,
@@ -274266,7 +274265,7 @@ function graphMiddlewareCreateCommand() {
274266
274265
  },
274267
274266
  {
274268
274267
  description: "Create a graph middleware in a different application",
274269
- command: "platform create middleware graph my-graph --application-id 123456789 --smart-contract-set-id scs-123 --blockchain-node-id node-123 --storage-id storage-123"
274268
+ command: "platform create middleware graph my-graph --application-id 123456789 --blockchain-node-id node-123 --storage-id storage-123"
274270
274269
  }
274271
274270
  ]
274272
274271
  });
@@ -274349,7 +274348,7 @@ function smartContractPortalMiddlewareCreateCommand() {
274349
274348
  },
274350
274349
  {
274351
274350
  description: "Create a smart contract portal middleware in a different application",
274352
- command: "platform create middleware smart-contract-portal my-portal --application-id 123456789 --smart-contract-set-id scs-123 --blockchain-node-id node-123"
274351
+ command: "platform create middleware smart-contract-portal my-portal --application-id 123456789 --blockchain-node-id node-123"
274353
274352
  }
274354
274353
  ]
274355
274354
  });
@@ -274457,223 +274456,6 @@ function privateKeyCreateCommand() {
274457
274456
  return new Command2("private-key").alias("pk").description("Create a private key in the SettleMint platform").addCommand(privateKeyHdCreateCommand()).addCommand(privateKeyHsmCreateCommand());
274458
274457
  }
274459
274458
 
274460
- // src/constants/smart-contract-sets.ts
274461
- var SMART_CONTRACT_SET_DETAILS = [
274462
- {
274463
- id: "solidity-empty",
274464
- name: "Empty",
274465
- image: {
274466
- registry: "ghcr.io",
274467
- repository: "settlemint/solidity-empty",
274468
- tag: "7.7.7"
274469
- }
274470
- },
274471
- {
274472
- id: "solidity-token-erc20",
274473
- name: "ERC20 token",
274474
- image: {
274475
- registry: "ghcr.io",
274476
- repository: "settlemint/solidity-token-erc20",
274477
- tag: "7.7.7"
274478
- }
274479
- },
274480
- {
274481
- id: "solidity-token-erc1155",
274482
- name: "ERC1155 token",
274483
- image: {
274484
- registry: "ghcr.io",
274485
- repository: "settlemint/solidity-token-erc1155",
274486
- tag: "7.7.7"
274487
- }
274488
- },
274489
- {
274490
- id: "solidity-token-erc20-metatx",
274491
- name: "ERC20 token with MetaTx",
274492
- image: {
274493
- registry: "ghcr.io",
274494
- repository: "settlemint/solidity-token-erc20-metatx",
274495
- tag: "7.7.7"
274496
- }
274497
- },
274498
- {
274499
- id: "solidity-supplychain",
274500
- name: "Supplychain",
274501
- image: {
274502
- registry: "ghcr.io",
274503
- repository: "settlemint/solidity-supplychain",
274504
- tag: "7.7.7"
274505
- }
274506
- },
274507
- {
274508
- id: "chaincode-ts-empty",
274509
- name: "Empty typescript",
274510
- image: {
274511
- registry: "ghcr.io",
274512
- repository: "settlemint/chaincode-typescript-empty",
274513
- tag: "7.0.13"
274514
- }
274515
- },
274516
- {
274517
- id: "chaincode-ts-empty-pdc",
274518
- name: "Empty typescript with PDC",
274519
- image: {
274520
- registry: "ghcr.io",
274521
- repository: "settlemint/chaincode-typescript-empty-pdc",
274522
- tag: "7.0.1"
274523
- }
274524
- },
274525
- {
274526
- id: "chaincode-go-empty",
274527
- name: "Empty go",
274528
- image: {
274529
- registry: "ghcr.io",
274530
- repository: "settlemint/chaincode-go-empty",
274531
- tag: "7.0.5"
274532
- }
274533
- },
274534
- {
274535
- id: "solidity-statemachine",
274536
- name: "State Machine",
274537
- image: {
274538
- registry: "ghcr.io",
274539
- repository: "settlemint/solidity-statemachine",
274540
- tag: "7.7.7"
274541
- }
274542
- },
274543
- {
274544
- id: "solidity-token-erc20-crowdsale",
274545
- name: "ERC20 token with crowdsale mechanism",
274546
- image: {
274547
- registry: "ghcr.io",
274548
- repository: "settlemint/solidity-token-erc20-crowdsale",
274549
- tag: "7.7.7"
274550
- }
274551
- },
274552
- {
274553
- id: "solidity-token-erc721",
274554
- name: "ERC721",
274555
- image: {
274556
- registry: "ghcr.io",
274557
- repository: "settlemint/solidity-token-erc721",
274558
- tag: "7.7.7"
274559
- }
274560
- },
274561
- {
274562
- id: "solidity-token-erc721a",
274563
- name: "ERC721a",
274564
- image: {
274565
- registry: "ghcr.io",
274566
- repository: "settlemint/solidity-token-erc721a",
274567
- tag: "7.7.7"
274568
- }
274569
- },
274570
- {
274571
- id: "solidity-token-erc721-generative-art",
274572
- name: "ERC721 Generative Art",
274573
- image: {
274574
- registry: "ghcr.io",
274575
- repository: "settlemint/solidity-token-erc721-generative-art",
274576
- tag: "7.7.7"
274577
- }
274578
- },
274579
- {
274580
- id: "solidity-token-soulbound",
274581
- name: "Soulbound Token",
274582
- image: {
274583
- registry: "ghcr.io",
274584
- repository: "settlemint/solidity-token-soulbound",
274585
- tag: "7.7.7"
274586
- }
274587
- },
274588
- {
274589
- id: "solidity-diamond-bond",
274590
- name: "Diamond bond",
274591
- image: {
274592
- registry: "ghcr.io",
274593
- repository: "settlemint/solidity-diamond-bond",
274594
- tag: "7.7.7"
274595
- }
274596
- },
274597
- {
274598
- id: "solidity-attestation-service",
274599
- name: "Attestation Service",
274600
- image: {
274601
- registry: "ghcr.io",
274602
- repository: "settlemint/solidity-attestation-service",
274603
- tag: "7.7.7"
274604
- }
274605
- },
274606
- {
274607
- id: "solidity-zeto",
274608
- name: "Zeto",
274609
- featureflagged: true,
274610
- image: {
274611
- registry: "ghcr.io",
274612
- repository: "settlemint/solidity-zeto",
274613
- tag: "7.7.7"
274614
- }
274615
- },
274616
- {
274617
- id: "solidity-starterkit",
274618
- name: "Starterkit",
274619
- featureflagged: true,
274620
- image: {
274621
- registry: "ghcr.io",
274622
- repository: "settlemint/solidity-predeployed",
274623
- tag: "7.7.7"
274624
- }
274625
- }
274626
- ];
274627
- var SMART_CONTRACT_SETS = SMART_CONTRACT_SET_DETAILS.map((set) => set.id);
274628
-
274629
- // src/commands/platform/smart-contract-set/create.ts
274630
- function smartContractSetCreateCommand() {
274631
- return getCreateCommand({
274632
- name: "smart-contract-set",
274633
- type: "smart contract set",
274634
- alias: "scs",
274635
- execute: (cmd2, baseAction) => {
274636
- addClusterServiceArgs(cmd2).option("--application-id <applicationId>", "Application ID").option("--blockchain-node-id <blockchainNodeId>", "Blockchain Node ID").addOption(new Option("--use-case <useCase>", "Use case for the smart contract set").choices(SMART_CONTRACT_SETS).makeOptionMandatory()).option("--user-id <userId>", "User ID").action(async (name2, { applicationId, blockchainNodeId, provider, region, size, type: type4, useCase, userId, ...defaultArgs }) => {
274637
- return baseAction(defaultArgs, async (settlemint, env2) => {
274638
- const application = applicationId ?? env2.SETTLEMINT_APPLICATION;
274639
- const blockchainNode = blockchainNodeId ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
274640
- const result = await settlemint.smartContractSet.create({
274641
- name: name2,
274642
- applicationId: application,
274643
- blockchainNodeId: blockchainNode,
274644
- provider,
274645
- region,
274646
- size,
274647
- type: type4,
274648
- useCase,
274649
- userId
274650
- });
274651
- return {
274652
- result,
274653
- mapDefaultEnv: () => {
274654
- return {
274655
- SETTLEMINT_APPLICATION: application,
274656
- SETTLEMINT_BLOCKCHAIN_NODE: blockchainNode,
274657
- SETTLEMINT_SMART_CONTRACT_SET: result.id
274658
- };
274659
- }
274660
- };
274661
- });
274662
- });
274663
- },
274664
- examples: [
274665
- {
274666
- description: "Create a smart contract set and save as default",
274667
- command: "platform create smart-contract-set my-contracts --use-case nft --accept-defaults -d"
274668
- },
274669
- {
274670
- description: "Create a smart contract set in a different application",
274671
- command: "platform create smart-contract-set my-contracts --application-id 123456789 --blockchain-node-id node-123 --use-case nft --user-id user-123"
274672
- }
274673
- ]
274674
- });
274675
- }
274676
-
274677
274459
  // src/commands/platform/storage/ipfs/create.ts
274678
274460
  function ipfsStorageCreateCommand() {
274679
274461
  return getCreateCommand({
@@ -274726,7 +274508,7 @@ function storageCreateCommand() {
274726
274508
 
274727
274509
  // src/commands/platform/create.ts
274728
274510
  function createCommand3() {
274729
- return new Command2("create").alias("c").description("Create a resource in the SettleMint platform").addCommand(workspaceCreateCommand()).addCommand(applicationCreateCommand()).addCommand(blockchainNetworkCreateCommand()).addCommand(privateKeyCreateCommand()).addCommand(smartContractSetCreateCommand()).addCommand(middlewareCreateCommand()).addCommand(storageCreateCommand()).addCommand(integrationToolCreateCommand()).addCommand(insightsCreateCommand()).addCommand(applicationAccessTokenCreateCommand());
274511
+ return new Command2("create").alias("c").description("Create a resource in the SettleMint platform").addCommand(workspaceCreateCommand()).addCommand(applicationCreateCommand()).addCommand(blockchainNetworkCreateCommand()).addCommand(privateKeyCreateCommand()).addCommand(middlewareCreateCommand()).addCommand(storageCreateCommand()).addCommand(integrationToolCreateCommand()).addCommand(insightsCreateCommand()).addCommand(applicationAccessTokenCreateCommand());
274730
274512
  }
274731
274513
 
274732
274514
  // src/commands/platform/prompts/delete-confirmation.prompt.ts
@@ -275023,19 +274805,6 @@ function privateKeyRestartCommand() {
275023
274805
  return new Command2("private-key").alias("pk").description("Restart a private key in the SettleMint platform").addCommand(hdEcdsaP256RestartCommand());
275024
274806
  }
275025
274807
 
275026
- // src/commands/platform/smart-contract-set/restart.ts
275027
- function smartContractSetRestartCommand() {
275028
- return getRestartCommand({
275029
- name: "smart-contract-set",
275030
- type: "smart contract set",
275031
- alias: "scs",
275032
- envKey: "SETTLEMINT_SMART_CONTRACT_SET",
275033
- restartFunction: async (settlemint, id) => {
275034
- return settlemint.smartContractSet.restart(id);
275035
- }
275036
- });
275037
- }
275038
-
275039
274808
  // src/commands/platform/storage/ipfs/restart.ts
275040
274809
  function ipfsRestartCommand() {
275041
274810
  return getRestartCommand({
@@ -275056,7 +274825,7 @@ function storageRestartCommand() {
275056
274825
 
275057
274826
  // src/commands/platform/restart.ts
275058
274827
  function restartCommand() {
275059
- const cmd2 = new Command2("restart").description("Restart a resource in the SettleMint platform").addCommand(blockchainNetworkRestartCommand()).addCommand(customDeploymentRestartCommand()).addCommand(insightsRestartCommand()).addCommand(integrationToolRestartCommand()).addCommand(middlewareRestartCommand()).addCommand(privateKeyRestartCommand()).addCommand(smartContractSetRestartCommand()).addCommand(storageRestartCommand());
274828
+ const cmd2 = new Command2("restart").description("Restart a resource in the SettleMint platform").addCommand(blockchainNetworkRestartCommand()).addCommand(customDeploymentRestartCommand()).addCommand(insightsRestartCommand()).addCommand(integrationToolRestartCommand()).addCommand(middlewareRestartCommand()).addCommand(privateKeyRestartCommand()).addCommand(storageRestartCommand());
275060
274829
  return cmd2;
275061
274830
  }
275062
274831
 
@@ -275106,6 +274875,175 @@ function platformCommand() {
275106
274875
  import { rmdir } from "node:fs/promises";
275107
274876
  import { join as join7 } from "node:path";
275108
274877
 
274878
+ // src/constants/smart-contract-sets.ts
274879
+ var SMART_CONTRACT_SET_DETAILS = [
274880
+ {
274881
+ id: "solidity-empty",
274882
+ name: "Empty",
274883
+ image: {
274884
+ registry: "ghcr.io",
274885
+ repository: "settlemint/solidity-empty",
274886
+ tag: "7.7.7"
274887
+ }
274888
+ },
274889
+ {
274890
+ id: "solidity-token-erc20",
274891
+ name: "ERC20 token",
274892
+ image: {
274893
+ registry: "ghcr.io",
274894
+ repository: "settlemint/solidity-token-erc20",
274895
+ tag: "7.7.7"
274896
+ }
274897
+ },
274898
+ {
274899
+ id: "solidity-token-erc1155",
274900
+ name: "ERC1155 token",
274901
+ image: {
274902
+ registry: "ghcr.io",
274903
+ repository: "settlemint/solidity-token-erc1155",
274904
+ tag: "7.7.7"
274905
+ }
274906
+ },
274907
+ {
274908
+ id: "solidity-token-erc20-metatx",
274909
+ name: "ERC20 token with MetaTx",
274910
+ image: {
274911
+ registry: "ghcr.io",
274912
+ repository: "settlemint/solidity-token-erc20-metatx",
274913
+ tag: "7.7.7"
274914
+ }
274915
+ },
274916
+ {
274917
+ id: "solidity-supplychain",
274918
+ name: "Supplychain",
274919
+ image: {
274920
+ registry: "ghcr.io",
274921
+ repository: "settlemint/solidity-supplychain",
274922
+ tag: "7.7.7"
274923
+ }
274924
+ },
274925
+ {
274926
+ id: "chaincode-ts-empty",
274927
+ name: "Empty typescript",
274928
+ image: {
274929
+ registry: "ghcr.io",
274930
+ repository: "settlemint/chaincode-typescript-empty",
274931
+ tag: "7.0.13"
274932
+ }
274933
+ },
274934
+ {
274935
+ id: "chaincode-ts-empty-pdc",
274936
+ name: "Empty typescript with PDC",
274937
+ image: {
274938
+ registry: "ghcr.io",
274939
+ repository: "settlemint/chaincode-typescript-empty-pdc",
274940
+ tag: "7.0.1"
274941
+ }
274942
+ },
274943
+ {
274944
+ id: "chaincode-go-empty",
274945
+ name: "Empty go",
274946
+ image: {
274947
+ registry: "ghcr.io",
274948
+ repository: "settlemint/chaincode-go-empty",
274949
+ tag: "7.0.5"
274950
+ }
274951
+ },
274952
+ {
274953
+ id: "solidity-statemachine",
274954
+ name: "State Machine",
274955
+ image: {
274956
+ registry: "ghcr.io",
274957
+ repository: "settlemint/solidity-statemachine",
274958
+ tag: "7.7.7"
274959
+ }
274960
+ },
274961
+ {
274962
+ id: "solidity-token-erc20-crowdsale",
274963
+ name: "ERC20 token with crowdsale mechanism",
274964
+ image: {
274965
+ registry: "ghcr.io",
274966
+ repository: "settlemint/solidity-token-erc20-crowdsale",
274967
+ tag: "7.7.7"
274968
+ }
274969
+ },
274970
+ {
274971
+ id: "solidity-token-erc721",
274972
+ name: "ERC721",
274973
+ image: {
274974
+ registry: "ghcr.io",
274975
+ repository: "settlemint/solidity-token-erc721",
274976
+ tag: "7.7.7"
274977
+ }
274978
+ },
274979
+ {
274980
+ id: "solidity-token-erc721a",
274981
+ name: "ERC721a",
274982
+ image: {
274983
+ registry: "ghcr.io",
274984
+ repository: "settlemint/solidity-token-erc721a",
274985
+ tag: "7.7.7"
274986
+ }
274987
+ },
274988
+ {
274989
+ id: "solidity-token-erc721-generative-art",
274990
+ name: "ERC721 Generative Art",
274991
+ image: {
274992
+ registry: "ghcr.io",
274993
+ repository: "settlemint/solidity-token-erc721-generative-art",
274994
+ tag: "7.7.7"
274995
+ }
274996
+ },
274997
+ {
274998
+ id: "solidity-token-soulbound",
274999
+ name: "Soulbound Token",
275000
+ image: {
275001
+ registry: "ghcr.io",
275002
+ repository: "settlemint/solidity-token-soulbound",
275003
+ tag: "7.7.7"
275004
+ }
275005
+ },
275006
+ {
275007
+ id: "solidity-diamond-bond",
275008
+ name: "Diamond bond",
275009
+ image: {
275010
+ registry: "ghcr.io",
275011
+ repository: "settlemint/solidity-diamond-bond",
275012
+ tag: "7.7.7"
275013
+ }
275014
+ },
275015
+ {
275016
+ id: "solidity-attestation-service",
275017
+ name: "Attestation Service",
275018
+ image: {
275019
+ registry: "ghcr.io",
275020
+ repository: "settlemint/solidity-attestation-service",
275021
+ tag: "7.7.7"
275022
+ }
275023
+ },
275024
+ {
275025
+ id: "solidity-zeto",
275026
+ name: "Zeto",
275027
+ featureflagged: true,
275028
+ image: {
275029
+ registry: "ghcr.io",
275030
+ repository: "settlemint/solidity-zeto",
275031
+ tag: "7.7.7"
275032
+ }
275033
+ },
275034
+ {
275035
+ id: "solidity-starterkit",
275036
+ name: "Starterkit",
275037
+ featureflagged: true,
275038
+ image: {
275039
+ registry: "ghcr.io",
275040
+ repository: "settlemint/solidity-predeployed",
275041
+ tag: "7.7.7"
275042
+ }
275043
+ }
275044
+ ];
275045
+ var SMART_CONTRACT_SETS = SMART_CONTRACT_SET_DETAILS.map((set) => set.id);
275046
+
275109
275047
  // src/commands/smart-contract-set/prompts/use-case.prompt.ts
275110
275048
  async function useCasePrompt(argument) {
275111
275049
  if (SMART_CONTRACT_SETS.length === 0) {
@@ -275135,7 +275073,7 @@ function createCommand4() {
275135
275073
  const name2 = await namePrompt(env2, projectName);
275136
275074
  const targetDir = formatTargetDir(name2);
275137
275075
  const projectDir = join7(process.cwd(), targetDir);
275138
- if (await exists3(projectDir) && !await isEmpty(projectDir)) {
275076
+ if (await exists4(projectDir) && !await isEmpty(projectDir)) {
275139
275077
  const confirmEmpty = await esm_default2({
275140
275078
  message: `The folder ${projectDir} already exists. Do you want to delete it?`,
275141
275079
  default: false
@@ -275253,7 +275191,7 @@ async function addressPrompt({
275253
275191
  hardhatConfig
275254
275192
  }) {
275255
275193
  const possiblePrivateKeys = node.privateKeys?.filter((privateKey) => privateKey.privateKeyType !== "HD_ECDSA_P256") ?? [];
275256
- const defaultAddress = env2.SETTLEMINT_SMART_CONTRACT_SET_ADDRESS ?? hardhatConfig.networks?.btp?.from ?? possiblePrivateKeys[0]?.address;
275194
+ const defaultAddress = env2.SETTLEMINT_SMART_CONTRACT_ADDRESS ?? hardhatConfig.networks?.btp?.from ?? possiblePrivateKeys[0]?.address;
275257
275195
  const defaultPossible = accept && defaultAddress;
275258
275196
  if (defaultPossible) {
275259
275197
  return defaultAddress;
@@ -275269,10 +275207,10 @@ async function addressPrompt({
275269
275207
  })),
275270
275208
  default: defaultAddress ?? possiblePrivateKeys[0]?.address
275271
275209
  });
275272
- if (address && address !== env2.SETTLEMINT_SMART_CONTRACT_SET_ADDRESS) {
275210
+ if (address && address !== env2.SETTLEMINT_SMART_CONTRACT_ADDRESS) {
275273
275211
  await writeEnvSpinner(!!prod, {
275274
275212
  ...env2,
275275
- SETTLEMINT_SMART_CONTRACT_SET_ADDRESS: address
275213
+ SETTLEMINT_SMART_CONTRACT_ADDRESS: address
275276
275214
  });
275277
275215
  }
275278
275216
  return address;
@@ -275280,7 +275218,7 @@ async function addressPrompt({
275280
275218
 
275281
275219
  // src/commands/smart-contract-set/prompts/deployment-id.prompt.ts
275282
275220
  async function deploymentIdPrompt(env2, accept, prod) {
275283
- const defaultDeploymentId = env2.SETTLEMINT_SMART_CONTRACT_SET_DEPLOYMENT_ID;
275221
+ const defaultDeploymentId = env2.SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID;
275284
275222
  if (accept) {
275285
275223
  return defaultDeploymentId;
275286
275224
  }
@@ -275292,7 +275230,7 @@ async function deploymentIdPrompt(env2, accept, prod) {
275292
275230
  if (deploymentId !== defaultDeploymentId) {
275293
275231
  await writeEnvSpinner(!!prod, {
275294
275232
  ...env2,
275295
- SETTLEMINT_SMART_CONTRACT_SET_DEPLOYMENT_ID: deploymentId
275233
+ SETTLEMINT_SMART_CONTRACT_DEPLOYMENT_ID: deploymentId
275296
275234
  });
275297
275235
  }
275298
275236
  return deploymentId;
@@ -275301,18 +275239,29 @@ async function deploymentIdPrompt(env2, accept, prod) {
275301
275239
  // src/utils/hardhat-config.ts
275302
275240
  async function getHardhatConfigData(envConfig) {
275303
275241
  try {
275304
- process.env = {
275305
- ...process.env,
275306
- ...envConfig
275307
- };
275308
- const hardhatConfigData = await import("hardhat");
275309
- return hardhatConfigData.userConfig;
275242
+ const { command, args } = await getPackageManagerExecutable();
275243
+ const output = await executeCommand2(command, [...args, "ts-node", "-e", `import hardhat from "hardhat";
275244
+ console.log(JSON.stringify(hardhat.userConfig));`], {
275245
+ env: {
275246
+ ...process.env,
275247
+ ...envConfig
275248
+ },
275249
+ silent: true
275250
+ });
275251
+ const config4 = JSON.parse(output.join(" "));
275252
+ if (isHardhatConfig(config4)) {
275253
+ return config4;
275254
+ }
275255
+ throw new Error("Invalid hardhat config");
275310
275256
  } catch (err) {
275311
275257
  const error5 = err;
275312
275258
  note(`Error reading hardhat.config.ts: ${error5.message}`);
275313
275259
  return {};
275314
275260
  }
275315
275261
  }
275262
+ function isHardhatConfig(config4) {
275263
+ return typeof config4 === "object" && config4 !== null && "networks" in config4;
275264
+ }
275316
275265
 
275317
275266
  // src/commands/smart-contract-set/hardhat/deploy/remote.ts
275318
275267
  function hardhatDeployRemoteCommand() {
@@ -275329,17 +275278,9 @@ function hardhatDeployRemoteCommand() {
275329
275278
  accessToken,
275330
275279
  instance
275331
275280
  });
275332
- let nodeId = blockchainNodeId ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
275281
+ let nodeId = blockchainNodeId;
275333
275282
  if (!nodeId) {
275334
- const personalAccessToken = await getInstanceCredentials(instance);
275335
- if (!personalAccessToken) {
275336
- return missingPersonalAccessTokenError();
275337
- }
275338
- const settlemintPat = createSettleMintClient({
275339
- accessToken: personalAccessToken.personalAccessToken,
275340
- instance
275341
- });
275342
- const blockchainNodes = await settlemintPat.blockchainNode.list(env2.SETTLEMINT_APPLICATION);
275283
+ const blockchainNodes = await settlemint.blockchainNode.list(env2.SETTLEMINT_APPLICATION);
275343
275284
  const blockchainNode = await blockchainNodePrompt(env2, blockchainNodes, autoAccept);
275344
275285
  if (!blockchainNode) {
275345
275286
  cancel2("No Blockchain Node selected. Please select one to continue.");
@@ -275418,17 +275359,9 @@ function hardhatScriptRemoteCommand() {
275418
275359
  accessToken,
275419
275360
  instance
275420
275361
  });
275421
- let nodeId = blockchainNodeId ?? env2.SETTLEMINT_BLOCKCHAIN_NODE;
275362
+ let nodeId = blockchainNodeId;
275422
275363
  if (!nodeId) {
275423
- const personalAccessToken = await getInstanceCredentials(instance);
275424
- if (!personalAccessToken) {
275425
- return missingPersonalAccessTokenError();
275426
- }
275427
- const settlemintPat = createSettleMintClient({
275428
- accessToken: personalAccessToken.personalAccessToken,
275429
- instance
275430
- });
275431
- const blockchainNodes = await settlemintPat.blockchainNode.list(env2.SETTLEMINT_APPLICATION);
275364
+ const blockchainNodes = await settlemint.blockchainNode.list(env2.SETTLEMINT_APPLICATION);
275432
275365
  const blockchainNode = await blockchainNodePrompt(env2, blockchainNodes, autoAccept);
275433
275366
  if (!blockchainNode) {
275434
275367
  cancel2("No Blockchain Node selected. Please select one to continue.");
@@ -275462,7 +275395,7 @@ function hardhatTestCommand() {
275462
275395
  }
275463
275396
 
275464
275397
  // src/commands/smart-contract-set/subgraph/utils/is-generated.ts
275465
- var isGenerated = () => exists3("subgraph/subgraph.config.json");
275398
+ var isGenerated = () => exists4("subgraph/subgraph.config.json");
275466
275399
 
275467
275400
  // src/commands/smart-contract-set/subgraph/utils/setup.ts
275468
275401
  import { rm as rm4, writeFile as writeFile9 } from "node:fs/promises";
@@ -275558,16 +275491,16 @@ async function subgraphSetup({ env: env2, instance, accessToken, isGenerated: is
275558
275491
  cancel2("No Graph Middleware selected. Please select one to continue.");
275559
275492
  }
275560
275493
  await executeCommand2("forge", ["build"]);
275561
- if (await exists3("./generated")) {
275494
+ if (await exists4("./generated")) {
275562
275495
  await rm4("./generated", { recursive: true, force: true });
275563
275496
  }
275564
- if (await exists3("./subgraph/generated")) {
275497
+ if (await exists4("./subgraph/generated")) {
275565
275498
  await rm4("./subgraph/generated", { recursive: true, force: true });
275566
275499
  }
275567
- if (await exists3("./build")) {
275500
+ if (await exists4("./build")) {
275568
275501
  await rm4("./build", { recursive: true, force: true });
275569
275502
  }
275570
- if (await exists3("./subgraph/build")) {
275503
+ if (await exists4("./subgraph/build")) {
275571
275504
  await rm4("./subgraph/build", { recursive: true, force: true });
275572
275505
  }
275573
275506
  const isFixedNetwork = (theGraphMiddleware.entityVersion ?? 4) >= 4;
@@ -275614,24 +275547,16 @@ async function getTheGraphMiddleware({
275614
275547
  accessToken,
275615
275548
  autoAccept
275616
275549
  }) {
275550
+ const settlemintClient = createSettleMintClient({
275551
+ accessToken,
275552
+ instance
275553
+ });
275617
275554
  if (autoAccept && env2.SETTLEMINT_THEGRAPH) {
275618
- const settlemintClient2 = createSettleMintClient({
275619
- accessToken,
275620
- instance
275621
- });
275622
- const defaultTheGraphMiddleware = await settlemintClient2.middleware.read(env2.SETTLEMINT_THEGRAPH);
275555
+ const defaultTheGraphMiddleware = await settlemintClient.middleware.read(env2.SETTLEMINT_THEGRAPH);
275623
275556
  if (defaultTheGraphMiddleware && defaultTheGraphMiddleware.__typename === "HAGraphMiddleware") {
275624
275557
  return defaultTheGraphMiddleware;
275625
275558
  }
275626
275559
  }
275627
- const personalAccessToken = await getInstanceCredentials(instance);
275628
- if (!personalAccessToken) {
275629
- return missingPersonalAccessTokenError();
275630
- }
275631
- const settlemintClient = createSettleMintClient({
275632
- accessToken: personalAccessToken.personalAccessToken,
275633
- instance
275634
- });
275635
275560
  const middlewares = await settlemintClient.middleware.list(env2.SETTLEMINT_APPLICATION);
275636
275561
  return theGraphPrompt(env2, middlewares, autoAccept);
275637
275562
  }
@@ -275814,4 +275739,4 @@ sdkcli.parseAsync(process.argv).catch((reason) => {
275814
275739
  cancel2(reason);
275815
275740
  });
275816
275741
 
275817
- //# debugId=876F72BD8E649EF864756E2164756E21
275742
+ //# debugId=B073736222CA1CB764756E2164756E21