@twin.org/crypto-cli 0.0.3-next.22 → 0.0.3-next.24

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 CHANGED
@@ -1,16 +1,16 @@
1
1
  # TWIN Crypto CLI
2
2
 
3
- A command line interface for interacting with the crypto tools.
3
+ This application is part of the framework workspace and provides command line interface for interacting with the crypto tools to support consistent development workflows across the ecosystem.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  ```shell
8
- npm install @twin.org/crypto-cli
8
+ npm install -D @twin.org/crypto-cli
9
9
  ```
10
10
 
11
- ## Examples
11
+ ## Usage
12
12
 
13
- Usage of the tool is shown in the examples [docs/examples.md](docs/examples.md)
13
+ Usage of the tool is shown in the examples [docs/usage.md](docs/usage.md)
14
14
 
15
15
  ## Reference
16
16
 
package/dist/es/cli.js CHANGED
@@ -21,8 +21,8 @@ export class CLI extends CLIBase {
21
21
  return this.execute({
22
22
  title: "TWIN Crypto",
23
23
  appName: "twin-crypto",
24
- version: "0.0.3-next.22", // x-release-please-version
25
- icon: "🌍",
24
+ version: "0.0.3-next.24", // x-release-please-version
25
+ icon: "🔒",
26
26
  supportsEnvFiles: true,
27
27
  overrideOutputWidth: options?.overrideOutputWidth,
28
28
  showDevToolWarning: true
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;GAEG;AACH,MAAM,OAAO,GAAI,SAAQ,OAAO;IAC/B;;;;;;;OAOG;IACI,KAAK,CAAC,GAAG,CACf,IAAc,EACd,gBAAyB,EACzB,OAA0C;QAE1C,OAAO,IAAI,CAAC,OAAO,CAClB;YACC,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,aAAa;YACtB,OAAO,EAAE,eAAe,EAAE,2BAA2B;YACrD,IAAI,EAAE,IAAI;YACV,gBAAgB,EAAE,IAAI;YACtB,mBAAmB,EAAE,OAAO,EAAE,mBAAmB;YACjD,kBAAkB,EAAE,IAAI;SACxB,EACD,gBAAgB,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,EACzF,IAAI,CACJ,CAAC;IACH,CAAC;IAED;;;;OAIG;IACO,WAAW,CAAC,OAAgB;QACrC,OAAO,CAAC,oBAAoB,EAAE,EAAE,mBAAmB,EAAE,CAAC,CAAC;IACxD,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { CLIBase } from \"@twin.org/cli-core\";\nimport type { Command } from \"commander\";\nimport { buildCommandAddress } from \"./commands/address.js\";\nimport { buildCommandMnemonic } from \"./commands/mnemonic.js\";\n\n/**\n * The main entry point for the CLI.\n */\nexport class CLI extends CLIBase {\n\t/**\n\t * Run the app.\n\t * @param argv The process arguments.\n\t * @param localesDirectory The directory for the locales, default to relative to the script.\n\t * @param options Additional options.\n\t * @param options.overrideOutputWidth Override the output width.\n\t * @returns The exit code.\n\t */\n\tpublic async run(\n\t\targv: string[],\n\t\tlocalesDirectory?: string,\n\t\toptions?: { overrideOutputWidth?: number }\n\t): Promise<number> {\n\t\treturn this.execute(\n\t\t\t{\n\t\t\t\ttitle: \"TWIN Crypto\",\n\t\t\t\tappName: \"twin-crypto\",\n\t\t\t\tversion: \"0.0.3-next.22\", // x-release-please-version\n\t\t\t\ticon: \"🌍\",\n\t\t\t\tsupportsEnvFiles: true,\n\t\t\t\toverrideOutputWidth: options?.overrideOutputWidth,\n\t\t\t\tshowDevToolWarning: true\n\t\t\t},\n\t\t\tlocalesDirectory ?? path.join(path.dirname(fileURLToPath(import.meta.url)), \"../locales\"),\n\t\t\targv\n\t\t);\n\t}\n\n\t/**\n\t * Get the commands for the CLI.\n\t * @param program The main program to add the commands to.\n\t * @internal\n\t */\n\tprotected getCommands(program: Command): Command[] {\n\t\treturn [buildCommandMnemonic(), buildCommandAddress()];\n\t}\n}\n"]}
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../src/cli.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D;;GAEG;AACH,MAAM,OAAO,GAAI,SAAQ,OAAO;IAC/B;;;;;;;OAOG;IACI,KAAK,CAAC,GAAG,CACf,IAAc,EACd,gBAAyB,EACzB,OAA0C;QAE1C,OAAO,IAAI,CAAC,OAAO,CAClB;YACC,KAAK,EAAE,aAAa;YACpB,OAAO,EAAE,aAAa;YACtB,OAAO,EAAE,eAAe,EAAE,2BAA2B;YACrD,IAAI,EAAE,IAAI;YACV,gBAAgB,EAAE,IAAI;YACtB,mBAAmB,EAAE,OAAO,EAAE,mBAAmB;YACjD,kBAAkB,EAAE,IAAI;SACxB,EACD,gBAAgB,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,EACzF,IAAI,CACJ,CAAC;IACH,CAAC;IAED;;;;OAIG;IACO,WAAW,CAAC,OAAgB;QACrC,OAAO,CAAC,oBAAoB,EAAE,EAAE,mBAAmB,EAAE,CAAC,CAAC;IACxD,CAAC;CACD","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { CLIBase } from \"@twin.org/cli-core\";\nimport type { Command } from \"commander\";\nimport { buildCommandAddress } from \"./commands/address.js\";\nimport { buildCommandMnemonic } from \"./commands/mnemonic.js\";\n\n/**\n * The main entry point for the CLI.\n */\nexport class CLI extends CLIBase {\n\t/**\n\t * Run the app.\n\t * @param argv The process arguments.\n\t * @param localesDirectory The directory for the locales, default to relative to the script.\n\t * @param options Additional options.\n\t * @param options.overrideOutputWidth Override the output width.\n\t * @returns The exit code.\n\t */\n\tpublic async run(\n\t\targv: string[],\n\t\tlocalesDirectory?: string,\n\t\toptions?: { overrideOutputWidth?: number }\n\t): Promise<number> {\n\t\treturn this.execute(\n\t\t\t{\n\t\t\t\ttitle: \"TWIN Crypto\",\n\t\t\t\tappName: \"twin-crypto\",\n\t\t\t\tversion: \"0.0.3-next.24\", // x-release-please-version\n\t\t\t\ticon: \"🔒\",\n\t\t\t\tsupportsEnvFiles: true,\n\t\t\t\toverrideOutputWidth: options?.overrideOutputWidth,\n\t\t\t\tshowDevToolWarning: true\n\t\t\t},\n\t\t\tlocalesDirectory ?? path.join(path.dirname(fileURLToPath(import.meta.url)), \"../locales\"),\n\t\t\targv\n\t\t);\n\t}\n\n\t/**\n\t * Get the commands for the CLI.\n\t * @param program The main program to add the commands to.\n\t * @internal\n\t */\n\tprotected getCommands(program: Command): Command[] {\n\t\treturn [buildCommandMnemonic(), buildCommandAddress()];\n\t}\n}\n"]}
package/docs/changelog.md CHANGED
@@ -1,4 +1,48 @@
1
- # @twin.org/crypto-cli - Changelog
1
+ # Changelog
2
+
3
+ ## [0.0.3-next.24](https://github.com/twinfoundation/framework/compare/crypto-cli-v0.0.3-next.23...crypto-cli-v0.0.3-next.24) (2026-03-19)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * ensure __decorate is defined for decorators ([103a563](https://github.com/twinfoundation/framework/commit/103a563ce01ebdef6240d2e590e7b026e8692684))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/cli-core bumped from 0.0.3-next.23 to 0.0.3-next.24
16
+ * @twin.org/core bumped from 0.0.3-next.23 to 0.0.3-next.24
17
+ * @twin.org/crypto bumped from 0.0.3-next.23 to 0.0.3-next.24
18
+ * @twin.org/nameof bumped from 0.0.3-next.23 to 0.0.3-next.24
19
+ * devDependencies
20
+ * @twin.org/merge-locales bumped from 0.0.3-next.23 to 0.0.3-next.24
21
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.23 to 0.0.3-next.24
22
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.23 to 0.0.3-next.24
23
+ * @twin.org/validate-locales bumped from 0.0.3-next.23 to 0.0.3-next.24
24
+
25
+ ## [0.0.3-next.23](https://github.com/twinfoundation/framework/compare/crypto-cli-v0.0.3-next.22...crypto-cli-v0.0.3-next.23) (2026-03-17)
26
+
27
+
28
+ ### Miscellaneous Chores
29
+
30
+ * **crypto-cli:** Synchronize repo versions
31
+
32
+
33
+ ### Dependencies
34
+
35
+ * The following workspace dependencies were updated
36
+ * dependencies
37
+ * @twin.org/cli-core bumped from 0.0.3-next.22 to 0.0.3-next.23
38
+ * @twin.org/core bumped from 0.0.3-next.22 to 0.0.3-next.23
39
+ * @twin.org/crypto bumped from 0.0.3-next.22 to 0.0.3-next.23
40
+ * @twin.org/nameof bumped from 0.0.3-next.22 to 0.0.3-next.23
41
+ * devDependencies
42
+ * @twin.org/merge-locales bumped from 0.0.3-next.22 to 0.0.3-next.23
43
+ * @twin.org/nameof-transformer bumped from 0.0.3-next.22 to 0.0.3-next.23
44
+ * @twin.org/nameof-vitest-plugin bumped from 0.0.3-next.22 to 0.0.3-next.23
45
+ * @twin.org/validate-locales bumped from 0.0.3-next.22 to 0.0.3-next.23
2
46
 
3
47
  ## [0.0.3-next.22](https://github.com/twinfoundation/framework/compare/crypto-cli-v0.0.3-next.21...crypto-cli-v0.0.3-next.22) (2026-02-26)
4
48
 
@@ -22,7 +22,69 @@ The main entry point for the CLI.
22
22
 
23
23
  ## Methods
24
24
 
25
- ### run()
25
+ ### execute() {#execute}
26
+
27
+ > **execute**(`options`, `localesDirectory`, `argv`): `Promise`\<`number`\>
28
+
29
+ Execute the command line processing.
30
+
31
+ #### Parameters
32
+
33
+ ##### options
34
+
35
+ `ICliOptions`
36
+
37
+ The options for the CLI.
38
+
39
+ ##### localesDirectory
40
+
41
+ `string`
42
+
43
+ The path to load the locales from.
44
+
45
+ ##### argv
46
+
47
+ `string`[]
48
+
49
+ The process arguments.
50
+
51
+ #### Returns
52
+
53
+ `Promise`\<`number`\>
54
+
55
+ The exit code.
56
+
57
+ #### Inherited from
58
+
59
+ `CLIBase.execute`
60
+
61
+ ***
62
+
63
+ ### configureRoot() {#configureroot}
64
+
65
+ > `protected` **configureRoot**(`program`): `void`
66
+
67
+ Configure any options or actions at the root program level.
68
+
69
+ #### Parameters
70
+
71
+ ##### program
72
+
73
+ `Command`
74
+
75
+ The root program command.
76
+
77
+ #### Returns
78
+
79
+ `void`
80
+
81
+ #### Inherited from
82
+
83
+ `CLIBase.configureRoot`
84
+
85
+ ***
86
+
87
+ ### run() {#run}
26
88
 
27
89
  > **run**(`argv`, `localesDirectory?`, `options?`): `Promise`\<`number`\>
28
90
 
@@ -1,4 +1,6 @@
1
- # @twin.org/crypto-cli - Examples
1
+ # Crypto CLI Usage
2
+
3
+ Use this guide to run commands, inspect options and check expected terminal output before automation.
2
4
 
3
5
  ## Running
4
6
 
@@ -33,9 +35,7 @@ Commands:
33
35
  help [command] display help for command
34
36
  ```
35
37
 
36
- ## Command
37
-
38
- ### mnemonic
38
+ ## Mnemonic Output
39
39
 
40
40
  The mnemonic command can be used to generate a new mnemonic for use in the other crypto functions.
41
41
 
@@ -78,7 +78,7 @@ Options:
78
78
  -h, --help display help for command
79
79
  ```
80
80
 
81
- #### Example
81
+ ### Example
82
82
 
83
83
  To output generate mnemonic and base64 formatted seed, store them in a JSON and env file but not display them to the console you would enter the following.
84
84
 
@@ -102,7 +102,7 @@ and the JSON file would be:
102
102
  }
103
103
  ```
104
104
 
105
- ### address
105
+ ## Address Output
106
106
 
107
107
  The address command can be used to generate addresses and key pairs based on the specified seed. The seed can be provided from the command line of read from an environment variable or .env file. By default 10 addresses will be generated starting at address index 0, for account 0.
108
108
 
@@ -209,7 +209,7 @@ Options:
209
209
  -h, --help display help for command
210
210
  ```
211
211
 
212
- #### Examples
212
+ ### Examples
213
213
 
214
214
  To read from an env file and load the variable named SEED from the file, and output only 2 addresses, outputting the keys in base64 format.
215
215
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@twin.org/crypto-cli",
3
- "version": "0.0.3-next.22",
4
- "description": "A command line interface for interacting with the crypto tools",
3
+ "version": "0.0.3-next.24",
4
+ "description": "Command line interface for interacting with the crypto tools",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/twinfoundation/framework.git",
@@ -14,11 +14,11 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/cli-core": "0.0.3-next.22",
18
- "@twin.org/core": "0.0.3-next.22",
19
- "@twin.org/crypto": "0.0.3-next.22",
20
- "@twin.org/nameof": "0.0.3-next.22",
21
- "commander": "14.0.2"
17
+ "@twin.org/cli-core": "0.0.3-next.24",
18
+ "@twin.org/core": "0.0.3-next.24",
19
+ "@twin.org/crypto": "0.0.3-next.24",
20
+ "@twin.org/nameof": "0.0.3-next.24",
21
+ "commander": "14.0.3"
22
22
  },
23
23
  "main": "./dist/es/index.js",
24
24
  "types": "./dist/types/index.d.ts",