@macwlt/cli 0.0.1-alpha → 0.0.3-alpha

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,3 +1,7 @@
1
+ <div>
2
+ <img src="../../assets/macwlt-cli-1200x630.png" />
3
+ </div>
4
+
1
5
  # @macwlt/cli
2
6
 
3
7
  TypeScript CLI for the macwlt native core.
@@ -8,7 +12,7 @@ The npm package currently supports Apple silicon Macs and requires Bun 1.2 or
8
12
  newer:
9
13
 
10
14
  ```shell
11
- pnpm add --global @macwlt/cli
15
+ npm i -g @macwlt/cli
12
16
  macwlt help
13
17
  ```
14
18
 
@@ -16,15 +20,30 @@ The package includes `libmacwlt.dylib`, the signing-service XPC bundle, and the
16
20
  signing service's native dependency. `MACWLT_LIB` can still override the bundled
17
21
  library path for development.
18
22
 
19
- ## Publish
23
+ ## Commands
24
+
25
+ | Command | Usage |
26
+ | --- | --- |
27
+ | `create` | `macwlt create [--reset] [--json]` |
28
+ | `reset` | `macwlt reset --yes [--json]` |
29
+ | `reset-config` | `macwlt reset-config [--json]` |
30
+ | `pubkey` | `macwlt pubkey [path] [--json]` |
31
+ | `address` | `macwlt address [path] --type bitcoin\|bitcoin-testnet\|bitcoin-taproot\|bitcoin-taproot-testnet\|ethereum [--json]` |
32
+ | `balance` | `macwlt balance [--path <derivation-path>] [--json]` |
33
+ | `sign-eth` | `macwlt sign-eth --hex <typed-transaction-preimage-hex> [--json]` |
34
+ | `sign-psbt` | `macwlt sign-psbt --base64 <psbt> [--format base64\|hex] [--json]` |
35
+ | `send` | `macwlt send <amount> <token-address\|ETH> <chain-id> <recipient> [--rpc <url>] [--path <derivation-path>] [--json]` |
36
+ | `help` | `macwlt help` |
37
+ | `version` | `macwlt version` |
38
+
39
+ **IMPORTANT: The first ever run can take up to 1 minute and more.**
20
40
 
21
- Build and sign the native artifacts before publishing:
41
+ ## Tests
42
+
43
+ `pnpm --filter @macwlt/cli test:e2e` leaves the current wallet intact and skips
44
+ the `macwlt reset --yes` case. To run that destructive case, set the opt-in
45
+ before launching the test command:
22
46
 
23
47
  ```shell
24
- make build CODESIGN_IDENTITY="Developer ID Application: Example (TEAMID)"
25
- pnpm --filter @macwlt/cli publish --access public
48
+ MACWLT_RUN_WALLET_RESET_TESTS=1 pnpm --filter @macwlt/cli test:e2e
26
49
  ```
27
-
28
- The `prepack` lifecycle builds the TypeScript entry points and stages the native
29
- artifacts from the repository's `build/` directory. The publish lifecycle also
30
- runs the CLI typecheck and unit tests.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@macwlt/cli",
3
- "version": "0.0.1-alpha",
3
+ "version": "0.0.3-alpha",
4
4
  "description": "TypeScript CLI for the macwlt native core",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -14,7 +14,8 @@
14
14
  "bun": ">=1.2.0"
15
15
  },
16
16
  "bin": {
17
- "macwlt": "./dist/main.js"
17
+ "macwlt": "./dist/main.js",
18
+ "_macwlt-signing-service": "./native/com.macwlt.SigningService.xpc/Contents/MacOS/com.macwlt.SigningService"
18
19
  },
19
20
  "exports": {
20
21
  ".": {
@@ -46,7 +47,7 @@
46
47
  "stage:native": "node scripts/stage-native.mjs",
47
48
  "start": "bun run dist/main.js",
48
49
  "test": "bun test",
49
- "test:e2e": "MACWLT_E2E=1 MACWLT_E2E_RESET=1 bun test e2e",
50
+ "test:e2e": "MACWLT_E2E=1 bun test e2e",
50
51
  "typecheck": "tsc --noEmit"
51
52
  }
52
53
  }