@settlemint/sdk-cli 1.0.2 → 1.0.3-maina872577a
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/README.md +1 -1
- package/dist/cli.js +155 -77
- package/dist/cli.js.map +33 -34
- package/package.json +3 -3
package/dist/cli.js
CHANGED
|
@@ -19613,7 +19613,7 @@ var require_lib4 = __commonJS((exports, module) => {
|
|
|
19613
19613
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
19614
19614
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
19615
19615
|
var getPathInfo = (cmd, {
|
|
19616
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
19616
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.yBXJZ6PtVi:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
19617
19617
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
19618
19618
|
delimiter: optDelimiter = delimiter
|
|
19619
19619
|
}) => {
|
|
@@ -19817,7 +19817,7 @@ var require_lib5 = __commonJS((exports, module) => {
|
|
|
19817
19817
|
let pathToInitial;
|
|
19818
19818
|
try {
|
|
19819
19819
|
pathToInitial = which.sync(initialCmd, {
|
|
19820
|
-
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
19820
|
+
path: options.env && findInObject(options.env, "PATH") || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.yBXJZ6PtVi:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
19821
19821
|
pathext: options.env && findInObject(options.env, "PATHEXT") || process.env.PATHEXT
|
|
19822
19822
|
}).toLowerCase();
|
|
19823
19823
|
} catch (err) {
|
|
@@ -20534,7 +20534,7 @@ var require_lib6 = __commonJS((exports, module) => {
|
|
|
20534
20534
|
var rRel = new RegExp(`^\\.${rSlash.source}`);
|
|
20535
20535
|
var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
20536
20536
|
var getPathInfo = (cmd, {
|
|
20537
|
-
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
20537
|
+
path: optPath = "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.yBXJZ6PtVi:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin",
|
|
20538
20538
|
pathExt: optPathExt = process.env.PATHEXT,
|
|
20539
20539
|
delimiter: optDelimiter = delimiter
|
|
20540
20540
|
}) => {
|
|
@@ -223327,7 +223327,7 @@ ${Bt.cyan(Yt)}
|
|
|
223327
223327
|
code: "ENOENT"
|
|
223328
223328
|
}), getPathInfo = (e9, t7) => {
|
|
223329
223329
|
var r6 = t7.colon || or;
|
|
223330
|
-
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
223330
|
+
var i6 = e9.match(/\//) || nr && e9.match(/\\/) ? [""] : [...nr ? [process.cwd()] : [], ...(t7.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.yBXJZ6PtVi:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(r6)];
|
|
223331
223331
|
var n6 = nr ? t7.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
223332
223332
|
var a5 = nr ? n6.split(r6) : [""];
|
|
223333
223333
|
if (nr) {
|
|
@@ -226464,7 +226464,7 @@ ${whileRunning(e9)}`;
|
|
|
226464
226464
|
};
|
|
226465
226465
|
ni = Object.assign(async function _main() {
|
|
226466
226466
|
var e9 = new Cli({
|
|
226467
|
-
binaryVersion: "1.0.
|
|
226467
|
+
binaryVersion: "1.0.3-maina872577a",
|
|
226468
226468
|
binaryLabel: "gql.tada CLI",
|
|
226469
226469
|
binaryName: "gql.tada"
|
|
226470
226470
|
});
|
|
@@ -234964,7 +234964,7 @@ var require_which2 = __commonJS((exports, module) => {
|
|
|
234964
234964
|
const colon = opt2.colon || COLON;
|
|
234965
234965
|
const pathEnv = cmd2.match(/\//) || isWindows2 && cmd2.match(/\\/) ? [""] : [
|
|
234966
234966
|
...isWindows2 ? [process.cwd()] : [],
|
|
234967
|
-
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
234967
|
+
...(opt2.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.yBXJZ6PtVi:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(colon)
|
|
234968
234968
|
];
|
|
234969
234969
|
const pathExtExe = isWindows2 ? opt2.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
234970
234970
|
const pathExt = isWindows2 ? pathExtExe.split(colon) : [""];
|
|
@@ -267198,6 +267198,7 @@ var DotEnvSchema = z.object({
|
|
|
267198
267198
|
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema.optional(),
|
|
267199
267199
|
SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema.optional(),
|
|
267200
267200
|
SETTLEMINT_HD_PRIVATE_KEY: UniqueNameSchema.optional(),
|
|
267201
|
+
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY: UniqueNameSchema.optional(),
|
|
267201
267202
|
SETTLEMINT_MINIO: UniqueNameSchema.optional(),
|
|
267202
267203
|
SETTLEMINT_MINIO_ENDPOINT: UrlSchema.optional(),
|
|
267203
267204
|
SETTLEMINT_MINIO_ACCESS_KEY: z.string().optional(),
|
|
@@ -267467,12 +267468,13 @@ var spinner = async (options) => {
|
|
|
267467
267468
|
}
|
|
267468
267469
|
const spinner2 = yoctoSpinner().start(options.startMessage);
|
|
267469
267470
|
try {
|
|
267470
|
-
const result = await options.task();
|
|
267471
|
+
const result = await options.task(spinner2);
|
|
267471
267472
|
spinner2.success(options.stopMessage);
|
|
267472
267473
|
return result;
|
|
267473
267474
|
} catch (error) {
|
|
267474
267475
|
spinner2.error(redBright(`${options.startMessage} --> Error!`));
|
|
267475
267476
|
note(redBright(`${error.message}
|
|
267477
|
+
|
|
267476
267478
|
${error.stack}`));
|
|
267477
267479
|
process.exit(1);
|
|
267478
267480
|
}
|
|
@@ -267481,7 +267483,7 @@ ${error.stack}`));
|
|
|
267481
267483
|
var package_default = {
|
|
267482
267484
|
name: "@settlemint/sdk-cli",
|
|
267483
267485
|
description: "Command-line interface for SettleMint SDK, providing development tools and project management capabilities",
|
|
267484
|
-
version: "1.0.
|
|
267486
|
+
version: "1.0.3-maina872577a",
|
|
267485
267487
|
type: "module",
|
|
267486
267488
|
private: false,
|
|
267487
267489
|
license: "FSL-1.1-MIT",
|
|
@@ -267534,8 +267536,8 @@ var package_default = {
|
|
|
267534
267536
|
"@inquirer/input": "4.1.3",
|
|
267535
267537
|
"@inquirer/password": "4.0.6",
|
|
267536
267538
|
"@inquirer/select": "4.0.6",
|
|
267537
|
-
"@settlemint/sdk-js": "1.0.
|
|
267538
|
-
"@settlemint/sdk-utils": "1.0.
|
|
267539
|
+
"@settlemint/sdk-js": "1.0.3-maina872577a",
|
|
267540
|
+
"@settlemint/sdk-utils": "1.0.3-maina872577a",
|
|
267539
267541
|
"get-tsconfig": "4.8.1",
|
|
267540
267542
|
giget: "1.2.3"
|
|
267541
267543
|
},
|
|
@@ -267835,7 +267837,7 @@ var et = l((Re, tt) => {
|
|
|
267835
267837
|
var g = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys", Y = h("path"), Bt = g ? ";" : ":", V = U(), J = (t) => Object.assign(new Error(`not found: ${t}`), { code: "ENOENT" }), Q = (t, e) => {
|
|
267836
267838
|
let n = e.colon || Bt, r = t.match(/\//) || g && t.match(/\\/) ? [""] : [
|
|
267837
267839
|
...g ? [process.cwd()] : [],
|
|
267838
|
-
...(e.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.
|
|
267840
|
+
...(e.path || "/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/cli/node_modules/.bin:/home/runner/work/sdk/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/tmp/bunx-1001-turbo@latest/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/sdk/node_modules/.bin:/home/runner/work/sdk/node_modules/.bin:/home/runner/work/node_modules/.bin:/home/runner/node_modules/.bin:/home/node_modules/.bin:/node_modules/.bin:/opt/hostedtoolcache/node/22.12.0/x64/bin:/home/runner/.bun/bin:/tmp/tmp.yBXJZ6PtVi:/nsc/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/snap/bin/:/usr/games:/usr/local/games:/home/linuxbrew/.linuxbrew/bin:/home/runner/.config/composer/vendor/bin:/home/runner/.dotnet/tools:/home/runner/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin").split(n)
|
|
267839
267841
|
], s = g ? e.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "", o = g ? s.split(n) : [""];
|
|
267840
267842
|
return g && t.indexOf(".") !== -1 && o[0] !== "" && o.unshift(""), {
|
|
267841
267843
|
pathEnv: r,
|
|
@@ -268394,6 +268396,7 @@ var DotEnvSchema2 = z.object({
|
|
|
268394
268396
|
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema2.optional(),
|
|
268395
268397
|
SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema2.optional(),
|
|
268396
268398
|
SETTLEMINT_HD_PRIVATE_KEY: UniqueNameSchema2.optional(),
|
|
268399
|
+
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY: UniqueNameSchema2.optional(),
|
|
268397
268400
|
SETTLEMINT_MINIO: UniqueNameSchema2.optional(),
|
|
268398
268401
|
SETTLEMINT_MINIO_ENDPOINT: UrlSchema2.optional(),
|
|
268399
268402
|
SETTLEMINT_MINIO_ACCESS_KEY: z.string().optional(),
|
|
@@ -270847,8 +270850,8 @@ ${page}${helpTipBottom}${choiceDescription}${import_ansi_escapes2.default.cursor
|
|
|
270847
270850
|
|
|
270848
270851
|
// src/commands/codegen/subgraph-name.prompt.ts
|
|
270849
270852
|
var ALL = "All";
|
|
270850
|
-
async function subgraphNamePrompt(env2) {
|
|
270851
|
-
const autoAccept = is_in_ci_default;
|
|
270853
|
+
async function subgraphNamePrompt(env2, accept) {
|
|
270854
|
+
const autoAccept = is_in_ci_default || !!accept;
|
|
270852
270855
|
const subgraphNames = env2.SETTLEMINT_THEGRAPH_SUBGRAPHS_ENDPOINTS?.map((endpoint) => endpoint.split("/").pop()).filter(Boolean) ?? [];
|
|
270853
270856
|
if (autoAccept) {
|
|
270854
270857
|
return subgraphNames;
|
|
@@ -270860,7 +270863,7 @@ async function subgraphNamePrompt(env2) {
|
|
|
270860
270863
|
return subgraphNames;
|
|
270861
270864
|
}
|
|
270862
270865
|
const subgraphName = await esm_default2({
|
|
270863
|
-
message: "Which
|
|
270866
|
+
message: "Which The Graph subgraph do you want to generate types for?",
|
|
270864
270867
|
choices: [ALL, ...subgraphNames].map((name2) => ({
|
|
270865
270868
|
name: name2,
|
|
270866
270869
|
value: name2
|
|
@@ -271115,7 +271118,7 @@ function codegenCommand() {
|
|
|
271115
271118
|
intro("Generating GraphQL types and queries for your dApp");
|
|
271116
271119
|
const env2 = await loadEnv(true, !!prod);
|
|
271117
271120
|
if (!Array.isArray(thegraphSubgraphNames)) {
|
|
271118
|
-
thegraphSubgraphNames = await subgraphNamePrompt(env2);
|
|
271121
|
+
thegraphSubgraphNames = await subgraphNamePrompt(env2, true);
|
|
271119
271122
|
}
|
|
271120
271123
|
const { hasura, portal, thegraph, blockscout } = await spinner({
|
|
271121
271124
|
startMessage: "Testing configured GraphQL schema",
|
|
@@ -271346,6 +271349,7 @@ var DotEnvSchema3 = z.object({
|
|
|
271346
271349
|
SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT: UrlSchema3.optional(),
|
|
271347
271350
|
SETTLEMINT_PORTAL_REST_ENDPOINT: UrlSchema3.optional(),
|
|
271348
271351
|
SETTLEMINT_HD_PRIVATE_KEY: UniqueNameSchema3.optional(),
|
|
271352
|
+
SETTLEMINT_ACCESSIBLE_PRIVATE_KEY: UniqueNameSchema3.optional(),
|
|
271349
271353
|
SETTLEMINT_MINIO: UniqueNameSchema3.optional(),
|
|
271350
271354
|
SETTLEMINT_MINIO_ENDPOINT: UrlSchema3.optional(),
|
|
271351
271355
|
SETTLEMINT_MINIO_ACCESS_KEY: z.string().optional(),
|
|
@@ -273215,10 +273219,17 @@ var privateKeyCreate = (gqlClient) => {
|
|
|
273215
273219
|
const { applicationUniqueName, blockchainNodeUniqueNames, ...otherArgs } = args;
|
|
273216
273220
|
const application = await applicationRead(gqlClient)(applicationUniqueName);
|
|
273217
273221
|
const blockchainNodes = blockchainNodeUniqueNames ? await Promise.all(blockchainNodeUniqueNames.map((uniqueName) => blockchainNodeRead(gqlClient)(uniqueName))) : [];
|
|
273222
|
+
const platformConfig = await getPlatformConfig(gqlClient)();
|
|
273223
|
+
const defaultProvider = platformConfig.deploymentEngineTargets.find((target) => !target.disabled && target.clusters.some((cluster) => !cluster.disabled));
|
|
273224
|
+
const defaultRegion = defaultProvider?.clusters.find((cluster) => !cluster.disabled);
|
|
273218
273225
|
const { createPrivateKey: privateKey } = await gqlClient.request(createPrivateKey, {
|
|
273219
273226
|
...otherArgs,
|
|
273220
273227
|
applicationId: application.id,
|
|
273221
|
-
blockchainNodes: blockchainNodes.map((node) => node?.id)
|
|
273228
|
+
blockchainNodes: blockchainNodes.map((node) => node?.id),
|
|
273229
|
+
provider: defaultProvider?.id ?? "gke",
|
|
273230
|
+
region: defaultRegion?.id?.split("-")[1] ?? "europe",
|
|
273231
|
+
size: "SMALL",
|
|
273232
|
+
type: "SHARED"
|
|
273222
273233
|
});
|
|
273223
273234
|
return privateKey;
|
|
273224
273235
|
};
|
|
@@ -273241,7 +273252,18 @@ function createSettleMintClient(options) {
|
|
|
273241
273252
|
headers: {
|
|
273242
273253
|
"x-auth-token": validatedOptions.accessToken
|
|
273243
273254
|
},
|
|
273244
|
-
fetch:
|
|
273255
|
+
fetch: async (input, init2) => {
|
|
273256
|
+
const response = await fetchWithRetry(input, init2);
|
|
273257
|
+
const contentType = response.headers.get("content-type");
|
|
273258
|
+
if (contentType?.includes("application/json") || contentType?.includes("application/graphql-response+json")) {
|
|
273259
|
+
const data = await response.clone().json();
|
|
273260
|
+
if (data.errors?.length > 0) {
|
|
273261
|
+
const errorMessages = data.errors.map((e10) => e10.message).join(", ");
|
|
273262
|
+
throw new Error(errorMessages);
|
|
273263
|
+
}
|
|
273264
|
+
}
|
|
273265
|
+
return response;
|
|
273266
|
+
}
|
|
273245
273267
|
});
|
|
273246
273268
|
return {
|
|
273247
273269
|
workspace: {
|
|
@@ -273567,13 +273589,13 @@ async function applicationAccessTokenPrompt(env2, application, settlemint, accep
|
|
|
273567
273589
|
}
|
|
273568
273590
|
}
|
|
273569
273591
|
return esm_default5({
|
|
273570
|
-
message: "What is the application access token for your application in SettleMint?",
|
|
273592
|
+
message: "What is the application access token for your application in SettleMint? (format: sm_aat_...)",
|
|
273571
273593
|
validate(value4) {
|
|
273572
273594
|
try {
|
|
273573
273595
|
validate3(ApplicationAccessTokenSchema3, value4);
|
|
273574
273596
|
return true;
|
|
273575
273597
|
} catch (error5) {
|
|
273576
|
-
return "Invalid application access token";
|
|
273598
|
+
return "Invalid application access token, it should start with sm_aat_...";
|
|
273577
273599
|
}
|
|
273578
273600
|
}
|
|
273579
273601
|
});
|
|
@@ -273601,7 +273623,7 @@ async function applicationPrompt(env2, applications, accept) {
|
|
|
273601
273623
|
const application = await esm_default2({
|
|
273602
273624
|
message: "Which application do you want to connect to?",
|
|
273603
273625
|
choices: applications.map((applications2) => ({
|
|
273604
|
-
name: applications2.name
|
|
273626
|
+
name: `${applications2.name} (${applications2.uniqueName})`,
|
|
273605
273627
|
value: applications2
|
|
273606
273628
|
})),
|
|
273607
273629
|
default: defaultApplication
|
|
@@ -273637,7 +273659,7 @@ async function servicePrompt({
|
|
|
273637
273659
|
return services[0];
|
|
273638
273660
|
}
|
|
273639
273661
|
const choices = services.map((service) => ({
|
|
273640
|
-
name: service.name
|
|
273662
|
+
name: `${service.name} (${service.uniqueName})`,
|
|
273641
273663
|
value: service
|
|
273642
273664
|
}));
|
|
273643
273665
|
if (!isRequired) {
|
|
@@ -273972,7 +273994,7 @@ async function workspacePrompt(env2, workspaces, accept) {
|
|
|
273972
273994
|
const workspace = await esm_default2({
|
|
273973
273995
|
message: "Which workspace do you want to connect to?",
|
|
273974
273996
|
choices: workspaces.map((workspace2) => ({
|
|
273975
|
-
name: workspace2.name
|
|
273997
|
+
name: `${workspace2.name} (${workspace2.uniqueName})`,
|
|
273976
273998
|
value: workspace2
|
|
273977
273999
|
})),
|
|
273978
274000
|
default: defaultWorkspace
|
|
@@ -274961,13 +274983,13 @@ async function personalAccessTokenPrompt(env2, instance, accept) {
|
|
|
274961
274983
|
}
|
|
274962
274984
|
}
|
|
274963
274985
|
return esm_default5({
|
|
274964
|
-
message: "What is your personal access token in SettleMint?",
|
|
274986
|
+
message: "What is your personal access token in SettleMint? (format: sm_pat_...)",
|
|
274965
274987
|
validate(value4) {
|
|
274966
274988
|
try {
|
|
274967
274989
|
validate3(PersonalAccessTokenSchema3, value4);
|
|
274968
274990
|
return true;
|
|
274969
274991
|
} catch (error5) {
|
|
274970
|
-
return "Invalid personal access token";
|
|
274992
|
+
return "Invalid personal access token, it should start with sm_pat_...";
|
|
274971
274993
|
}
|
|
274972
274994
|
}
|
|
274973
274995
|
});
|
|
@@ -275066,7 +275088,7 @@ function logoutCommand() {
|
|
|
275066
275088
|
|
|
275067
275089
|
// src/commands/platform/common/cluster-service.args.ts
|
|
275068
275090
|
function addClusterServiceArgs(cmd2) {
|
|
275069
|
-
return cmd2.
|
|
275091
|
+
return cmd2.option("--provider <provider>", "Network provider (run `settlemint platform config` to see available providers)").option("--region <region>", "Deployment region (run `settlemint platform config` to see available regions)").addOption(new Option("--size <size>", "Network size").choices(["CUSTOM", "LARGE", "MEDIUM", "SMALL"]).argParser((value4) => value4).default("SMALL")).addOption(new Option("--type <type>", "Network type").choices(["DEDICATED", "SHARED"]).argParser((value4) => value4).default("SHARED"));
|
|
275070
275092
|
}
|
|
275071
275093
|
|
|
275072
275094
|
// src/utils/parse-number.ts
|
|
@@ -275110,22 +275132,38 @@ async function waitForCompletion({
|
|
|
275110
275132
|
return spinner({
|
|
275111
275133
|
startMessage: `Waiting for ${type4} to be ${getActionLabel(action)}`,
|
|
275112
275134
|
stopMessage: `Waiting for ${type4} to be ${getActionLabel(action)}`,
|
|
275113
|
-
task: async () => {
|
|
275135
|
+
task: async (spinner2) => {
|
|
275114
275136
|
const startTime = Date.now();
|
|
275115
275137
|
while (true) {
|
|
275116
275138
|
try {
|
|
275117
275139
|
const resource = await service.read(uniqueName);
|
|
275118
275140
|
if (resource.status === "COMPLETED") {
|
|
275119
|
-
|
|
275141
|
+
if (spinner2) {
|
|
275142
|
+
spinner2.text = `${capitalizeFirstLetter(type4)} is ${getActionLabel(action)}`;
|
|
275143
|
+
} else {
|
|
275144
|
+
note(`${capitalizeFirstLetter(type4)} is ${getActionLabel(action)}`);
|
|
275145
|
+
}
|
|
275120
275146
|
return true;
|
|
275121
275147
|
}
|
|
275122
275148
|
if (resource.status === "FAILED") {
|
|
275123
|
-
|
|
275149
|
+
if (spinner2) {
|
|
275150
|
+
spinner2.text = `${capitalizeFirstLetter(type4)} failed to ${getActionLabel(action)}`;
|
|
275151
|
+
} else {
|
|
275152
|
+
note(`${capitalizeFirstLetter(type4)} failed to ${getActionLabel(action)}`);
|
|
275153
|
+
}
|
|
275124
275154
|
return true;
|
|
275125
275155
|
}
|
|
275126
|
-
|
|
275156
|
+
if (spinner2) {
|
|
275157
|
+
spinner2.text = `${capitalizeFirstLetter(type4)} is not ready yet (status: ${resource.status})`;
|
|
275158
|
+
} else {
|
|
275159
|
+
note(`${capitalizeFirstLetter(type4)} is not ready yet (status: ${resource.status})`);
|
|
275160
|
+
}
|
|
275127
275161
|
} catch (error5) {
|
|
275128
|
-
|
|
275162
|
+
if (spinner2) {
|
|
275163
|
+
spinner2.text = `${capitalizeFirstLetter(type4)} is not ready yet (status: UNKNOWN)`;
|
|
275164
|
+
} else {
|
|
275165
|
+
note(`${capitalizeFirstLetter(type4)} is not ready yet (status: UNKNOWN)`);
|
|
275166
|
+
}
|
|
275129
275167
|
}
|
|
275130
275168
|
if (Date.now() - startTime > maxTimeout) {
|
|
275131
275169
|
throw new TimeoutError(`Operation timed out after ${maxTimeout / 60000} minutes for ${type4} with unique name ${uniqueName}`);
|
|
@@ -275222,13 +275260,14 @@ async function regionPrompt(provider, argument) {
|
|
|
275222
275260
|
function getCreateCommand({
|
|
275223
275261
|
name: name2,
|
|
275224
275262
|
type: type4,
|
|
275263
|
+
subType,
|
|
275225
275264
|
alias,
|
|
275226
275265
|
examples,
|
|
275227
275266
|
execute: execute2,
|
|
275228
275267
|
usePersonalAccessToken = true,
|
|
275229
275268
|
requiresDeployment = true
|
|
275230
275269
|
}) {
|
|
275231
|
-
const cmd2 = new Command(sanitizeCommandName(name2)).alias(alias).description(`Create a new ${type4} in the SettleMint platform.`).usage(createExamples(examples)).argument("<name>", `The ${type4} name`).option("-a, --accept-defaults", "Accept the default values").option("-d, --default", `Save as default ${type4}`).option("--prod", "Connect to production environment");
|
|
275270
|
+
const cmd2 = new Command(sanitizeCommandName(name2)).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");
|
|
275232
275271
|
if (requiresDeployment) {
|
|
275233
275272
|
cmd2.option("-w, --wait", "Wait until deployed").option("-r, --restart-if-timeout", "Restart if wait time is exceeded");
|
|
275234
275273
|
}
|
|
@@ -275246,7 +275285,7 @@ function getCreateCommand({
|
|
|
275246
275285
|
instance
|
|
275247
275286
|
});
|
|
275248
275287
|
const platformConfig = await settlemint.platform.config();
|
|
275249
|
-
if (
|
|
275288
|
+
if (cmd2.options.some((option) => option.long === "--provider")) {
|
|
275250
275289
|
const selectedProvider = await providerPrompt(platformConfig, provider);
|
|
275251
275290
|
if (!selectedProvider) {
|
|
275252
275291
|
return nothingSelectedError("provider");
|
|
@@ -275306,9 +275345,10 @@ function blockchainNetworkBesuCreateCommand() {
|
|
|
275306
275345
|
return getCreateCommand({
|
|
275307
275346
|
name: "besu",
|
|
275308
275347
|
type: "blockchain network",
|
|
275348
|
+
subType: "Besu",
|
|
275309
275349
|
alias: "b",
|
|
275310
275350
|
execute: (cmd2, baseAction) => {
|
|
275311
|
-
addClusterServiceArgs(cmd2).option("-
|
|
275351
|
+
addClusterServiceArgs(cmd2).option("-app, --application <application>", "The unique name of the application to create the network in (defaults to application from env)").requiredOption("--node-name <name>", "Name of the node").option("--chain-id <chainId>", "The chain ID for the network", parseNumber).option("--contract-size-limit <limit>", "Maximum contract size limit", parseNumber).option("--evm-stack-size <size>", "EVM stack size", parseNumber).option("--gas-limit <limit>", "Block gas limit").option("--gas-price <price>", "Gas price in wei", parseNumber).option("--seconds-per-block <seconds>", "Block time in seconds", parseNumber).action(async (name2, {
|
|
275312
275352
|
application,
|
|
275313
275353
|
chainId,
|
|
275314
275354
|
contractSizeLimit,
|
|
@@ -275536,7 +275576,7 @@ function applicationAccessTokenCreateCommand() {
|
|
|
275536
275576
|
type: "application access token",
|
|
275537
275577
|
alias: "aat",
|
|
275538
275578
|
execute: (cmd2, baseAction) => {
|
|
275539
|
-
cmd2.option("-
|
|
275579
|
+
cmd2.option("-app, --application <application>", "The application unique name to create the application access token for (defaults to application from env)").addOption(new Option("-v, --validity-period <period>", "The validity period for the token").choices(["DAYS_7", "DAYS_30", "DAYS_60", "DAYS_90", "NONE"]).default("DAYS_7")).action(async (name2, { application, validityPeriod, ...defaultArgs }) => {
|
|
275540
275580
|
return baseAction(defaultArgs, async (settlemint, env2) => {
|
|
275541
275581
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
275542
275582
|
if (!applicationUniqueName) {
|
|
@@ -275701,9 +275741,10 @@ function blockchainNodeBesuCreateCommand() {
|
|
|
275701
275741
|
return getCreateCommand({
|
|
275702
275742
|
name: "besu",
|
|
275703
275743
|
type: "blockchain node",
|
|
275744
|
+
subType: "Besu",
|
|
275704
275745
|
alias: "b",
|
|
275705
275746
|
execute: (cmd2, baseAction) => {
|
|
275706
|
-
addClusterServiceArgs(cmd2).option("-
|
|
275747
|
+
addClusterServiceArgs(cmd2).option("-app, --application <application>", "The application unique name to create the node in (defaults to application from env)").option("--blockchain-network <blockchainNetwork>", "Blockchain network unique name to add this node to").option("--node-identity <nodeIdentity>", "EC DSA P256 private key to use as the node identity").addOption(new Option("--node-type <nodeType>", "Type of the node").choices(["VALIDATOR", "NON_VALIDATOR"]).makeOptionMandatory()).action(async (name2, {
|
|
275707
275748
|
application,
|
|
275708
275749
|
provider,
|
|
275709
275750
|
region,
|
|
@@ -275789,6 +275830,7 @@ function blockscoutInsightsCreateCommand() {
|
|
|
275789
275830
|
return getCreateCommand({
|
|
275790
275831
|
name: "blockscout",
|
|
275791
275832
|
type: "insights",
|
|
275833
|
+
subType: "Blockscout",
|
|
275792
275834
|
alias: "bs",
|
|
275793
275835
|
execute: (cmd2, baseAction) => {
|
|
275794
275836
|
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").option("--load-balancer <loadBalancer>", "Load Balancer unique name (mutually exclusive with blockchain-node)").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name (mutually exclusive with load-balancer)").action(async (name2, { application, provider, region, size, type: type4, blockchainNode, loadBalancer, acceptDefaults, ...defaultArgs }) => {
|
|
@@ -275866,6 +275908,7 @@ function hasuraIntegrationCreateCommand() {
|
|
|
275866
275908
|
return getCreateCommand({
|
|
275867
275909
|
name: "hasura",
|
|
275868
275910
|
type: "integration tool",
|
|
275911
|
+
subType: "Hasura",
|
|
275869
275912
|
alias: "ha",
|
|
275870
275913
|
execute: (cmd2, baseAction) => {
|
|
275871
275914
|
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").action(async (name2, { application, provider, region, size, type: type4, ...defaultArgs }) => {
|
|
@@ -275925,6 +275968,7 @@ function graphMiddlewareCreateCommand() {
|
|
|
275925
275968
|
return getCreateCommand({
|
|
275926
275969
|
name: "graph",
|
|
275927
275970
|
type: "middleware",
|
|
275971
|
+
subType: "The Graph",
|
|
275928
275972
|
alias: "gr",
|
|
275929
275973
|
execute: (cmd2, baseAction) => {
|
|
275930
275974
|
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name").action(async (name2, { application, blockchainNode, provider, region, size, type: type4, acceptDefaults, ...defaultArgs }) => {
|
|
@@ -275995,6 +276039,7 @@ function smartContractPortalMiddlewareCreateCommand() {
|
|
|
275995
276039
|
return getCreateCommand({
|
|
275996
276040
|
name: "smart-contract-portal",
|
|
275997
276041
|
type: "middleware",
|
|
276042
|
+
subType: "Smart Contract Portal",
|
|
275998
276043
|
alias: "scp",
|
|
275999
276044
|
execute: (cmd2, baseAction) => {
|
|
276000
276045
|
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").option("--load-balancer <loadBalancer>", "Load Balancer unique name (mutually exclusive with blockchain-node)").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name (mutually exclusive with load-balancer)").option("--abis <abis...>", "Path to abi file(s)").option("--include-predeployed-abis <includePredeployedAbis...>", "Include pre-deployed abis (run `settlemint platform config` to see available pre-deployed abis)").action(async (name2, {
|
|
@@ -276100,19 +276145,78 @@ function middlewareCreateCommand() {
|
|
|
276100
276145
|
return new Command("middleware").alias("mw").description("Create a middleware service in the SettleMint platform").addCommand(graphMiddlewareCreateCommand()).addCommand(smartContractPortalMiddlewareCreateCommand());
|
|
276101
276146
|
}
|
|
276102
276147
|
|
|
276148
|
+
// src/commands/platform/private-key/accessible-ecdsa-p256/create.ts
|
|
276149
|
+
function privateKeyAccessibleCreateCommand() {
|
|
276150
|
+
return getCreateCommand({
|
|
276151
|
+
name: "ACCESSIBLE-ECDSA-P256",
|
|
276152
|
+
type: "private key",
|
|
276153
|
+
subType: "ACCESSIBLE-ECDSA-P256",
|
|
276154
|
+
alias: "acc",
|
|
276155
|
+
execute: (cmd2, baseAction) => {
|
|
276156
|
+
cmd2.option("--application <application>", "Application unique name").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name").action(async (name2, { application, blockchainNode, acceptDefaults, ...defaultArgs }) => {
|
|
276157
|
+
return baseAction({
|
|
276158
|
+
...defaultArgs,
|
|
276159
|
+
acceptDefaults
|
|
276160
|
+
}, async (settlemint, env2) => {
|
|
276161
|
+
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
276162
|
+
if (!applicationUniqueName) {
|
|
276163
|
+
return missingApplication();
|
|
276164
|
+
}
|
|
276165
|
+
let blockchainNodeUniqueName = blockchainNode;
|
|
276166
|
+
if (!blockchainNodeUniqueName) {
|
|
276167
|
+
const blockchainNodes = await settlemint.blockchainNode.list(applicationUniqueName);
|
|
276168
|
+
const node = await blockchainNodePrompt({
|
|
276169
|
+
env: env2,
|
|
276170
|
+
nodes: blockchainNodes,
|
|
276171
|
+
accept: acceptDefaults,
|
|
276172
|
+
isRequired: true
|
|
276173
|
+
});
|
|
276174
|
+
if (!node) {
|
|
276175
|
+
return nothingSelectedError("blockchain node");
|
|
276176
|
+
}
|
|
276177
|
+
blockchainNodeUniqueName = node.uniqueName;
|
|
276178
|
+
}
|
|
276179
|
+
const result = await settlemint.privateKey.create({
|
|
276180
|
+
name: name2,
|
|
276181
|
+
applicationUniqueName,
|
|
276182
|
+
privateKeyType: "ACCESSIBLE_ECDSA_P256",
|
|
276183
|
+
blockchainNodeUniqueNames: blockchainNodeUniqueName ? [blockchainNodeUniqueName] : []
|
|
276184
|
+
});
|
|
276185
|
+
return {
|
|
276186
|
+
result
|
|
276187
|
+
};
|
|
276188
|
+
});
|
|
276189
|
+
});
|
|
276190
|
+
},
|
|
276191
|
+
examples: [
|
|
276192
|
+
{
|
|
276193
|
+
description: "Create a private key and save as default",
|
|
276194
|
+
command: "platform create private-key accessible-ecdsa-p256 my-key --accept-defaults -d"
|
|
276195
|
+
},
|
|
276196
|
+
{
|
|
276197
|
+
description: "Create a private key in a different application",
|
|
276198
|
+
command: "platform create private-key accessible-ecdsa-p256 my-key --application my-app"
|
|
276199
|
+
},
|
|
276200
|
+
{
|
|
276201
|
+
description: "Create a private key linked to a blockchain node",
|
|
276202
|
+
command: "platform create private-key accessible-ecdsa-p256 my-key --blockchain-node node-123"
|
|
276203
|
+
}
|
|
276204
|
+
]
|
|
276205
|
+
});
|
|
276206
|
+
}
|
|
276207
|
+
|
|
276103
276208
|
// src/commands/platform/private-key/hd-ecdsa-p256/create.ts
|
|
276104
276209
|
function privateKeyHdCreateCommand() {
|
|
276105
276210
|
return getCreateCommand({
|
|
276106
276211
|
name: "HD-ECDSA-P256",
|
|
276107
276212
|
type: "private key",
|
|
276213
|
+
subType: "HD-ECDSA-P256",
|
|
276108
276214
|
alias: "hd",
|
|
276109
276215
|
execute: (cmd2, baseAction) => {
|
|
276110
|
-
|
|
276216
|
+
cmd2.option("--application <application>", "Application unique name").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name").action(async (name2, { application, blockchainNode, acceptDefaults, ...defaultArgs }) => {
|
|
276111
276217
|
return baseAction({
|
|
276112
276218
|
...defaultArgs,
|
|
276113
|
-
acceptDefaults
|
|
276114
|
-
provider,
|
|
276115
|
-
region
|
|
276219
|
+
acceptDefaults
|
|
276116
276220
|
}, async (settlemint, env2) => {
|
|
276117
276221
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
276118
276222
|
if (!applicationUniqueName) {
|
|
@@ -276136,11 +276240,7 @@ function privateKeyHdCreateCommand() {
|
|
|
276136
276240
|
name: name2,
|
|
276137
276241
|
applicationUniqueName,
|
|
276138
276242
|
privateKeyType: "HD_ECDSA_P256",
|
|
276139
|
-
blockchainNodeUniqueNames: blockchainNodeUniqueName ? [blockchainNodeUniqueName] : []
|
|
276140
|
-
provider,
|
|
276141
|
-
region,
|
|
276142
|
-
size,
|
|
276143
|
-
type: type4
|
|
276243
|
+
blockchainNodeUniqueNames: blockchainNodeUniqueName ? [blockchainNodeUniqueName] : []
|
|
276144
276244
|
});
|
|
276145
276245
|
return {
|
|
276146
276246
|
result,
|
|
@@ -276176,14 +276276,13 @@ function privateKeyHsmCreateCommand() {
|
|
|
276176
276276
|
return getCreateCommand({
|
|
276177
276277
|
name: "HSM-ECDSA-P256",
|
|
276178
276278
|
type: "private key",
|
|
276179
|
-
|
|
276279
|
+
subType: "HSM-ECDSA-P256",
|
|
276280
|
+
alias: "hsm",
|
|
276180
276281
|
execute: (cmd2, baseAction) => {
|
|
276181
|
-
|
|
276282
|
+
cmd2.option("--application <application>", "Application unique name").option("--blockchain-node <blockchainNode>", "Blockchain Node unique name").action(async (name2, { application, blockchainNode, acceptDefaults, ...defaultArgs }) => {
|
|
276182
276283
|
return baseAction({
|
|
276183
276284
|
...defaultArgs,
|
|
276184
|
-
acceptDefaults
|
|
276185
|
-
provider,
|
|
276186
|
-
region
|
|
276285
|
+
acceptDefaults
|
|
276187
276286
|
}, async (settlemint, env2) => {
|
|
276188
276287
|
const applicationUniqueName = application ?? env2.SETTLEMINT_APPLICATION;
|
|
276189
276288
|
if (!applicationUniqueName) {
|
|
@@ -276207,11 +276306,7 @@ function privateKeyHsmCreateCommand() {
|
|
|
276207
276306
|
name: name2,
|
|
276208
276307
|
applicationUniqueName,
|
|
276209
276308
|
privateKeyType: "HSM_ECDSA_P256",
|
|
276210
|
-
blockchainNodeUniqueNames: blockchainNodeUniqueName ? [blockchainNodeUniqueName] : []
|
|
276211
|
-
provider,
|
|
276212
|
-
region,
|
|
276213
|
-
size,
|
|
276214
|
-
type: type4
|
|
276309
|
+
blockchainNodeUniqueNames: blockchainNodeUniqueName ? [blockchainNodeUniqueName] : []
|
|
276215
276310
|
});
|
|
276216
276311
|
return {
|
|
276217
276312
|
result
|
|
@@ -276238,7 +276333,7 @@ function privateKeyHsmCreateCommand() {
|
|
|
276238
276333
|
|
|
276239
276334
|
// src/commands/platform/private-key/create.ts
|
|
276240
276335
|
function privateKeyCreateCommand() {
|
|
276241
|
-
return new Command("private-key").alias("pk").description("Create a private key in the SettleMint platform").addCommand(privateKeyHdCreateCommand()).addCommand(privateKeyHsmCreateCommand());
|
|
276336
|
+
return new Command("private-key").alias("pk").description("Create a private key in the SettleMint platform").addCommand(privateKeyHdCreateCommand()).addCommand(privateKeyHsmCreateCommand()).addCommand(privateKeyAccessibleCreateCommand());
|
|
276242
276337
|
}
|
|
276243
276338
|
|
|
276244
276339
|
// src/commands/platform/storage/ipfs/create.ts
|
|
@@ -276246,6 +276341,7 @@ function ipfsStorageCreateCommand() {
|
|
|
276246
276341
|
return getCreateCommand({
|
|
276247
276342
|
name: "ipfs",
|
|
276248
276343
|
type: "storage",
|
|
276344
|
+
subType: "IPFS",
|
|
276249
276345
|
alias: "ip",
|
|
276250
276346
|
execute: (cmd2, baseAction) => {
|
|
276251
276347
|
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").action(async (name2, { application, provider, region, size, type: type4, ...defaultArgs }) => {
|
|
@@ -276298,6 +276394,7 @@ function minioStorageCreateCommand() {
|
|
|
276298
276394
|
return getCreateCommand({
|
|
276299
276395
|
name: "minio",
|
|
276300
276396
|
type: "storage",
|
|
276397
|
+
subType: "MinIO",
|
|
276301
276398
|
alias: "m",
|
|
276302
276399
|
execute: (cmd2, baseAction) => {
|
|
276303
276400
|
addClusterServiceArgs(cmd2).option("--application <application>", "Application unique name").action(async (name2, { application, provider, region, size, type: type4, ...defaultArgs }) => {
|
|
@@ -276625,25 +276722,6 @@ function middlewareRestartCommand() {
|
|
|
276625
276722
|
return new Command("middleware").alias("mw").description("Restart a middleware service in the SettleMint platform").addCommand(graphRestartCommand()).addCommand(smartContractPortalRestartCommand());
|
|
276626
276723
|
}
|
|
276627
276724
|
|
|
276628
|
-
// src/commands/platform/private-key/hd-ecdsa-p256/restart.ts
|
|
276629
|
-
function hdEcdsaP256RestartCommand() {
|
|
276630
|
-
return getRestartCommand({
|
|
276631
|
-
name: "hd-ecdsa-p256",
|
|
276632
|
-
type: "private key",
|
|
276633
|
-
subType: "hd-ecdsa-p256",
|
|
276634
|
-
alias: "hd",
|
|
276635
|
-
envKey: "SETTLEMINT_HD_PRIVATE_KEY",
|
|
276636
|
-
restartFunction: async (settlemint, uniqueName) => {
|
|
276637
|
-
return settlemint.privateKey.restart(uniqueName);
|
|
276638
|
-
}
|
|
276639
|
-
});
|
|
276640
|
-
}
|
|
276641
|
-
|
|
276642
|
-
// src/commands/platform/private-key/restart.ts
|
|
276643
|
-
function privateKeyRestartCommand() {
|
|
276644
|
-
return new Command("private-key").alias("pk").description("Restart a private key in the SettleMint platform").addCommand(hdEcdsaP256RestartCommand());
|
|
276645
|
-
}
|
|
276646
|
-
|
|
276647
276725
|
// src/commands/platform/storage/ipfs/restart.ts
|
|
276648
276726
|
function ipfsRestartCommand() {
|
|
276649
276727
|
return getRestartCommand({
|
|
@@ -276677,7 +276755,7 @@ function storageRestartCommand() {
|
|
|
276677
276755
|
|
|
276678
276756
|
// src/commands/platform/restart.ts
|
|
276679
276757
|
function restartCommand() {
|
|
276680
|
-
const cmd2 = new Command("restart").description("Restart a resource in the SettleMint platform").addCommand(blockchainNetworkRestartCommand()).addCommand(customDeploymentRestartCommand()).addCommand(insightsRestartCommand()).addCommand(integrationToolRestartCommand()).addCommand(middlewareRestartCommand()).addCommand(
|
|
276758
|
+
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());
|
|
276681
276759
|
return cmd2;
|
|
276682
276760
|
}
|
|
276683
276761
|
|
|
@@ -277072,7 +277150,7 @@ async function addressPrompt({
|
|
|
277072
277150
|
return defaultAddress;
|
|
277073
277151
|
}
|
|
277074
277152
|
if (possiblePrivateKeys.length === 0) {
|
|
277075
|
-
cancel3("No private key is activated on the node to sign the transaction.");
|
|
277153
|
+
cancel3("No ECDSA P256 or HSM ECDSA P256 private key is activated on the node to sign the transaction.");
|
|
277076
277154
|
}
|
|
277077
277155
|
const address = await esm_default2({
|
|
277078
277156
|
message: "Which private key do you want to deploy from?",
|
|
@@ -277746,4 +277824,4 @@ function sdkCliCommand(exitOverride = undefined) {
|
|
|
277746
277824
|
ascii();
|
|
277747
277825
|
sdkCliCommand();
|
|
277748
277826
|
|
|
277749
|
-
//# debugId=
|
|
277827
|
+
//# debugId=E6D4210F49168FF064756E2164756E21
|