@did-btcr2/cli 0.22.0 → 0.23.1

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 (74) hide show
  1. package/README.md +36 -396
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/cjs/index.js +404 -83
  4. package/dist/esm/src/cli.js +2 -1
  5. package/dist/esm/src/cli.js.map +1 -1
  6. package/dist/esm/src/commands/completion.js +20 -7
  7. package/dist/esm/src/commands/completion.js.map +1 -1
  8. package/dist/esm/src/commands/create.js +33 -41
  9. package/dist/esm/src/commands/create.js.map +1 -1
  10. package/dist/esm/src/commands/genesis.js +119 -0
  11. package/dist/esm/src/commands/genesis.js.map +1 -0
  12. package/dist/esm/src/commands/identifier.js +3 -17
  13. package/dist/esm/src/commands/identifier.js.map +1 -1
  14. package/dist/esm/src/commands/index.js +1 -0
  15. package/dist/esm/src/commands/index.js.map +1 -1
  16. package/dist/esm/src/commands/resolve.js +15 -1
  17. package/dist/esm/src/commands/resolve.js.map +1 -1
  18. package/dist/esm/src/commands/write.js +10 -7
  19. package/dist/esm/src/commands/write.js.map +1 -1
  20. package/dist/esm/src/genesis-document-file.js +26 -0
  21. package/dist/esm/src/genesis-document-file.js.map +1 -0
  22. package/dist/esm/src/genesis-spec.js +93 -0
  23. package/dist/esm/src/genesis-spec.js.map +1 -0
  24. package/dist/esm/src/genesis-wizard.js +132 -0
  25. package/dist/esm/src/genesis-wizard.js.map +1 -0
  26. package/dist/esm/src/hints.js +14 -3
  27. package/dist/esm/src/hints.js.map +1 -1
  28. package/dist/esm/src/network-option.js +39 -0
  29. package/dist/esm/src/network-option.js.map +1 -0
  30. package/dist/esm/src/resolution-options.js +19 -2
  31. package/dist/esm/src/resolution-options.js.map +1 -1
  32. package/dist/types/src/cli.d.ts.map +1 -1
  33. package/dist/types/src/commands/completion.d.ts.map +1 -1
  34. package/dist/types/src/commands/create.d.ts +5 -4
  35. package/dist/types/src/commands/create.d.ts.map +1 -1
  36. package/dist/types/src/commands/genesis.d.ts +20 -0
  37. package/dist/types/src/commands/genesis.d.ts.map +1 -0
  38. package/dist/types/src/commands/identifier.d.ts.map +1 -1
  39. package/dist/types/src/commands/index.d.ts +1 -0
  40. package/dist/types/src/commands/index.d.ts.map +1 -1
  41. package/dist/types/src/commands/resolve.d.ts +7 -0
  42. package/dist/types/src/commands/resolve.d.ts.map +1 -1
  43. package/dist/types/src/commands/write.d.ts +2 -1
  44. package/dist/types/src/commands/write.d.ts.map +1 -1
  45. package/dist/types/src/genesis-document-file.d.ts +11 -0
  46. package/dist/types/src/genesis-document-file.d.ts.map +1 -0
  47. package/dist/types/src/genesis-spec.d.ts +70 -0
  48. package/dist/types/src/genesis-spec.d.ts.map +1 -0
  49. package/dist/types/src/genesis-wizard.d.ts +30 -0
  50. package/dist/types/src/genesis-wizard.d.ts.map +1 -0
  51. package/dist/types/src/hints.d.ts +7 -0
  52. package/dist/types/src/hints.d.ts.map +1 -1
  53. package/dist/types/src/network-option.d.ts +15 -0
  54. package/dist/types/src/network-option.d.ts.map +1 -0
  55. package/dist/types/src/resolution-options.d.ts +6 -2
  56. package/dist/types/src/resolution-options.d.ts.map +1 -1
  57. package/dist/types/src/types.d.ts +18 -1
  58. package/dist/types/src/types.d.ts.map +1 -1
  59. package/package.json +2 -2
  60. package/src/cli.ts +2 -0
  61. package/src/commands/completion.ts +21 -7
  62. package/src/commands/create.ts +39 -55
  63. package/src/commands/genesis.ts +149 -0
  64. package/src/commands/identifier.ts +3 -25
  65. package/src/commands/index.ts +1 -0
  66. package/src/commands/resolve.ts +20 -1
  67. package/src/commands/write.ts +10 -7
  68. package/src/genesis-document-file.ts +35 -0
  69. package/src/genesis-spec.ts +149 -0
  70. package/src/genesis-wizard.ts +163 -0
  71. package/src/hints.ts +13 -2
  72. package/src/network-option.ts +50 -0
  73. package/src/resolution-options.ts +21 -2
  74. package/src/types.ts +17 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"genesis-spec.d.ts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Aa,EAAE,gBAAgB,EAAE,gBAAgB,GAAG,mBAAmB,CAuBhI;AAED,iFAAiF;AACjF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAMxE"}
@@ -0,0 +1,30 @@
1
+ import type { GenesisSpecFile } from './genesis-spec.js';
2
+ /** Asks one question and returns the answer line. */
3
+ export type Ask = (question: string) => Promise<string>;
4
+ /** One keystore key as the wizard lists it. */
5
+ export interface WizardKey {
6
+ keyId: string;
7
+ fingerprint: string;
8
+ name?: string;
9
+ active: boolean;
10
+ }
11
+ /** What the wizard needs from the command: output, the key list, and key resolution. */
12
+ export interface WizardContext {
13
+ /** Prints one line to the operator. */
14
+ say: (line: string) => void;
15
+ /** The keys of the keystore, for the list and the default. */
16
+ keys: WizardKey[];
17
+ /** Resolves a key reference to its id, or throws with a message. */
18
+ resolveKey: (ref: string) => string;
19
+ }
20
+ /**
21
+ * Collects a genesis spec through questions: the verification methods with
22
+ * their relationships, the beacons, and the other services. The answers are
23
+ * not checked against the network here; the api checks them when it builds
24
+ * the document, and the command reports the failure.
25
+ * @param ask Asks one question.
26
+ * @param ctx The output, the key list, and the key resolver.
27
+ * @returns The spec.
28
+ */
29
+ export declare function collectGenesisSpec(ask: Ask, ctx: WizardContext): Promise<GenesisSpecFile>;
30
+ //# sourceMappingURL=genesis-wizard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"genesis-wizard.d.ts","sourceRoot":"","sources":["../../../src/genesis-wizard.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAqB,eAAe,EAAqD,MAAM,mBAAmB,CAAC;AAE/H,qDAAqD;AACrD,MAAM,MAAM,GAAG,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AAExD,+CAA+C;AAC/C,MAAM,WAAW,SAAS;IACxB,KAAK,EAAS,MAAM,CAAC;IACrB,WAAW,EAAG,MAAM,CAAC;IACrB,IAAI,CAAC,EAAS,MAAM,CAAC;IACrB,MAAM,EAAQ,OAAO,CAAC;CACvB;AAED,wFAAwF;AACxF,MAAM,WAAW,aAAa;IAC5B,uCAAuC;IACvC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5B,8DAA8D;IAC9D,IAAI,EAAE,SAAS,EAAE,CAAC;IAClB,oEAAoE;IACpE,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;CACrC;AAKD;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC,CAK/F"}
@@ -15,6 +15,13 @@ import type { GlobalOptions, NetworkOption } from './types.js';
15
15
  * `#initialP2WPKH` service rather than a divergent re-derivation.
16
16
  */
17
17
  export declare function printCreateFundingHint(g: GlobalOptions, network: NetworkOption, did: string): void;
18
+ /**
19
+ * Prints a funding hint for a beacon address on a network with a public
20
+ * faucet: the address next to the faucet and explorer links. A no-op on a
21
+ * network without a faucet (regtest/mainnet). `create -t x --document` and
22
+ * `genesis build` use it for the first beacon of the genesis document.
23
+ */
24
+ export declare function printBeaconFundingHint(g: GlobalOptions, network: NetworkOption, beaconAddress: string): void;
18
25
  /**
19
26
  * Prints a watch link after an `update`/`deactivate` broadcast: the
20
27
  * block-explorer URL for the signal txid. A no-op on a network without an
@@ -1 +1 @@
1
- {"version":3,"file":"hints.d.ts","sourceRoot":"","sources":["../../../src/hints.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE/D;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAmBlG;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAI3F"}
1
+ {"version":3,"file":"hints.d.ts","sourceRoot":"","sources":["../../../src/hints.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAE/D;;;;;GAKG;AAEH;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAUlG;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAY5G;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAI3F"}
@@ -0,0 +1,15 @@
1
+ import type { ConnectionOverrides } from './config.js';
2
+ import type { GlobalOptions, NetworkOption } from './types.js';
3
+ /** The help text of `-n, --network` on the offline creation commands. */
4
+ export declare const NETWORK_OPTION_HELP: string;
5
+ /** Builds the keystore- and config-resolution overrides from the global flags. */
6
+ export declare function overridesFromGlobals(g: GlobalOptions): ConnectionOverrides;
7
+ /** Validates an explicit `--network`, or resolves the default from configuration. */
8
+ export declare function resolveNetworkOption(explicit: string | undefined, overrides: ConnectionOverrides): NetworkOption;
9
+ /**
10
+ * Warns on stderr, and never blocks, when the network of a new identifier
11
+ * disagrees with the network that the active profile declares. A `production`
12
+ * profile that holds mainnet endpoints must not mint a regtest DID in silence.
13
+ */
14
+ export declare function warnProfileNetworkMismatch(g: GlobalOptions, network: NetworkOption, overrides: ConnectionOverrides): void;
15
+ //# sourceMappingURL=network-option.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"network-option.d.ts","sourceRoot":"","sources":["../../../src/network-option.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGvD,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG/D,yEAAyE;AACzE,eAAO,MAAM,mBAAmB,QAEsB,CAAC;AAEvD,kFAAkF;AAClF,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,aAAa,GAAG,mBAAmB,CAQ1E;AAED,qFAAqF;AACrF,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,EAAE,mBAAmB,GAAG,aAAa,CAUhH;AAED;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,mBAAmB,GAAG,IAAI,CASzH"}
@@ -4,13 +4,17 @@ export type ResolutionOptionFlags = {
4
4
  resolutionOptions?: string;
5
5
  resolutionOptionsPath?: string;
6
6
  minConf?: number;
7
+ genesisDocument?: string;
7
8
  };
9
+ /** Whether any resolution flag is set. */
10
+ export declare function hasResolutionFlags(flags: ResolutionOptionFlags): boolean;
8
11
  /** The help text of `--min-conf`. `resolve`, `update`, and `deactivate` share it. */
9
12
  export declare const MIN_CONF_HELP: string;
10
13
  /**
11
14
  * Builds the resolution options from the flags. The inline JSON wins over
12
- * the file. The `--min-conf` flag wins over a `minConf` inside the JSON.
13
- * Returns `undefined` if no flag is set.
15
+ * the file. The `--min-conf` flag wins over a `minConf` inside the JSON. The
16
+ * `--genesis-document` file wins over a `sidecar.genesisDocument` inside the
17
+ * JSON. Returns `undefined` if no flag is set.
14
18
  */
15
19
  export declare function readResolutionOptions(flags: ResolutionOptionFlags): Promise<ResolutionOptions | undefined>;
16
20
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"resolution-options.d.ts","sourceRoot":"","sources":["../../../src/resolution-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAI3D,iEAAiE;AACjE,MAAM,MAAM,qBAAqB,GAAG;IAClC,iBAAiB,CAAC,EAAO,MAAM,CAAC;IAChC,qBAAqB,CAAC,EAAG,MAAM,CAAC;IAChC,OAAO,CAAC,EAAiB,MAAM,CAAC;CACjC,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,aAAa,QAEoF,CAAC;AAE/G;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CA6BhH;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CASlD"}
1
+ {"version":3,"file":"resolution-options.d.ts","sourceRoot":"","sources":["../../../src/resolution-options.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAK3D,iEAAiE;AACjE,MAAM,MAAM,qBAAqB,GAAG;IAClC,iBAAiB,CAAC,EAAO,MAAM,CAAC;IAChC,qBAAqB,CAAC,EAAG,MAAM,CAAC;IAChC,OAAO,CAAC,EAAiB,MAAM,CAAC;IAChC,eAAe,CAAC,EAAS,MAAM,CAAC;CACjC,CAAC;AAEF,0CAA0C;AAC1C,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAKxE;AAED,qFAAqF;AACrF,eAAO,MAAM,aAAa,QAEoF,CAAC;AAE/G;;;;;GAKG;AACH,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAqChH;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CASlD"}
@@ -1,4 +1,4 @@
1
- import type { BroadcastOptions, DidUpdateResult, IdentifierReport, PublishToCasMode, Signer } from '@did-btcr2/api';
1
+ import type { BeaconInfo, BroadcastOptions, DidUpdateResult, IdentifierReport, PublishToCasMode, Signer } from '@did-btcr2/api';
2
2
  import type { Btcr2DidDocument, ResolutionOptions } from '@did-btcr2/method';
3
3
  import type { DidResolutionResult } from '@web5/dids';
4
4
  import type { DoctorReport, EffectiveConfig } from './config.js';
@@ -56,11 +56,25 @@ export interface IdentifierDecodeData {
56
56
  genesisBytes: string;
57
57
  initialDocument?: Btcr2DidDocument;
58
58
  }
59
+ /**
60
+ * The data that `genesis build` prints: the external identifier, its
61
+ * network, its genesis bytes as hex, the path of the written genesis
62
+ * document, and the beacons of the initial DID document with their
63
+ * addresses to fund.
64
+ */
65
+ export interface GenesisBuildData {
66
+ did: string;
67
+ network: NetworkOption;
68
+ genesisBytes: string;
69
+ path: string;
70
+ beacons: BeaconInfo[];
71
+ }
59
72
  export type CommandResult = {
60
73
  action: 'create';
61
74
  data: string;
62
75
  keyId?: string;
63
76
  publicKey?: string;
77
+ genesisBytes?: string;
64
78
  } | {
65
79
  action: 'resolve';
66
80
  data: DidResolutionResult;
@@ -76,6 +90,9 @@ export type CommandResult = {
76
90
  } | {
77
91
  action: 'identifier-validate';
78
92
  data: IdentifierReport;
93
+ } | {
94
+ action: 'genesis-build';
95
+ data: GenesisBuildData;
79
96
  } | {
80
97
  action: 'key-generate';
81
98
  data: {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACpH,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACjE,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AAC;IAI7B,UAAU,CAAC,EAAW,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAY,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAW,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAW,MAAM,CAAC;IAC7B,aAAa,CAAC,EAAQ,MAAM,EAAE,CAAC;IAC/B,YAAY,CAAC,EAAS,MAAM,CAAC;IAC7B,YAAY,CAAC,EAAS,MAAM,EAAE,CAAC;IAC/B,kBAAkB,CAAC,EAAG,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAa,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAO,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAW,MAAM,CAAC;CAC9B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@did-btcr2/cli",
3
- "version": "0.22.0",
3
+ "version": "0.23.1",
4
4
  "type": "module",
5
5
  "description": "CLI for interacting with did-btcr2-js, the JavaScript/TypeScript reference implementation of the did:btcr2 method. Exposes various parts of multiple packages in the did-btcr2-js monorepo.",
6
6
  "main": "./dist/cjs/index.js",
@@ -62,7 +62,7 @@
62
62
  "@web5/dids": "^1.2.0",
63
63
  "commander": "^13.1.0",
64
64
  "@did-btcr2/key-manager": "^0.7.0",
65
- "@did-btcr2/api": "^0.22.0",
65
+ "@did-btcr2/api": "^0.23.0",
66
66
  "@did-btcr2/common": "^9.4.0",
67
67
  "@did-btcr2/keypair": "^0.13.1",
68
68
  "@did-btcr2/method": "^0.60.0"
package/src/cli.ts CHANGED
@@ -5,6 +5,7 @@ import {
5
5
  registerConfigCommand,
6
6
  registerCreateCommand,
7
7
  registerDeactivateCommand,
8
+ registerGenesisCommand,
8
9
  registerIdentifierCommand,
9
10
  registerInitCommand,
10
11
  registerKeyCommand,
@@ -91,6 +92,7 @@ export class DidBtcr2Cli {
91
92
  registerUpdateCommand(this.program, keystoreFactory, globals);
92
93
  registerDeactivateCommand(this.program, keystoreFactory, globals);
93
94
  registerIdentifierCommand(this.program, factory, globals);
95
+ registerGenesisCommand(this.program, factory, keystoreFactory, globals);
94
96
  registerKeyCommand(this.program, keystoreFactory, globals);
95
97
  registerKeystoreCommand(this.program, globals);
96
98
  registerConfigCommand(this.program, globals);
@@ -2,7 +2,11 @@ import type { Command } from 'commander';
2
2
  import { CLIError } from '../error.js';
3
3
  import type { GlobalOptions } from '../types.js';
4
4
 
5
- const COMMANDS = 'create resolve read update deactivate delete identifier key config profile completion';
5
+ /**
6
+ * The name of the built-in help command of commander. Commander creates that
7
+ * command at parse time, so `program.commands` does not list it.
8
+ */
9
+ const HELP_COMMAND = 'help';
6
10
 
7
11
  /** Registers the `completion` command, which prints a shell completion script to stdout. */
8
12
  export function registerCompletionCommand(program: Command, _globals: () => GlobalOptions): void {
@@ -10,29 +14,39 @@ export function registerCompletionCommand(program: Command, _globals: () => Glob
10
14
  .command('completion [shell]')
11
15
  .description('Print a shell completion script (bash, zsh, or fish) to stdout.')
12
16
  .action((shell = 'bash') => {
13
- console.log(completionScript(shell));
17
+ console.log(completionScript(shell, completionWords(program)));
14
18
  });
15
19
  }
16
20
 
17
- /** Returns a completion script for the given shell. */
18
- function completionScript(shell: string): string {
21
+ /**
22
+ * Returns the completion word list: the name and the aliases of each registered
23
+ * top-level command, in registration order, then the built-in help command.
24
+ */
25
+ function completionWords(program: Command): string[] {
26
+ const words = program.commands.flatMap((command) => [command.name(), ...command.aliases()]);
27
+ return [...words, HELP_COMMAND];
28
+ }
29
+
30
+ /** Returns a completion script for the given shell and word list. */
31
+ function completionScript(shell: string, words: string[]): string {
32
+ const list = words.join(' ');
19
33
  switch (shell) {
20
34
  case 'bash':
21
35
  return [
22
36
  '# btcr2 bash completion. Install with: eval "$(btcr2 completion bash)"',
23
- '_btcr2() { COMPREPLY=( $(compgen -W "' + COMMANDS + '" -- "${COMP_WORDS[COMP_CWORD]}") ); }',
37
+ '_btcr2() { COMPREPLY=( $(compgen -W "' + list + '" -- "${COMP_WORDS[COMP_CWORD]}") ); }',
24
38
  'complete -F _btcr2 btcr2',
25
39
  ].join('\n');
26
40
  case 'zsh':
27
41
  return [
28
42
  '# btcr2 zsh completion. Install with: eval "$(btcr2 completion zsh)"',
29
- '_btcr2() { compadd ' + COMMANDS + ' }',
43
+ '_btcr2() { compadd ' + list + ' }',
30
44
  'compdef _btcr2 btcr2',
31
45
  ].join('\n');
32
46
  case 'fish':
33
47
  return [
34
48
  '# btcr2 fish completion. Save to ~/.config/fish/completions/btcr2.fish',
35
- 'complete -c btcr2 -f -a "' + COMMANDS + '"',
49
+ 'complete -c btcr2 -f -a "' + list + '"',
36
50
  ].join('\n');
37
51
  default:
38
52
  throw new CLIError(`Unsupported shell "${shell}". Use bash, zsh, or fish.`, 'INVALID_ARGUMENT_ERROR', { shell });
@@ -1,13 +1,14 @@
1
1
  import { bytesToHex, hexToBytes } from '@noble/hashes/utils.js';
2
2
  import type { Command } from 'commander';
3
- import type { ApiFactory, ConnectionOverrides } from '../config.js';
4
- import { assertKeystoreAllowedForNetwork, profileNetworkMismatch, resolveDefaultNetwork } from '../config.js';
3
+ import type { ApiFactory } from '../config.js';
4
+ import { assertKeystoreAllowedForNetwork } from '../config.js';
5
5
  import { CLIError } from '../error.js';
6
- import { printCreateFundingHint } from '../hints.js';
6
+ import { readGenesisDocumentFile } from '../genesis-document-file.js';
7
+ import { printBeaconFundingHint, printCreateFundingHint } from '../hints.js';
7
8
  import { resolveKeyRef } from '../keystore/resolve-key-ref.js';
9
+ import { NETWORK_OPTION_HELP, overridesFromGlobals, resolveNetworkOption, warnProfileNetworkMismatch } from '../network-option.js';
8
10
  import { formatResult } from '../output.js';
9
- import type { CommandResult, GlobalOptions, NetworkOption } from '../types.js';
10
- import { SUPPORTED_NETWORKS } from '../types.js';
11
+ import type { CommandResult, GlobalOptions } from '../types.js';
11
12
 
12
13
  /** Expected byte length per identifier type: compressed secp256k1 = 33, SHA-256 hash = 32. */
13
14
  const EXPECTED_BYTES: Record<'k' | 'x', { length: number; label: string }> = {
@@ -27,11 +28,12 @@ const EXPECTED_BYTES: Record<'k' | 'x', { length: number; label: string }> = {
27
28
  * genesis bytes. Reading a public key never decrypts, so this never prompts.
28
29
  * - raw (`--bytes <hex>`): a 33-byte public key as hex. Offline, keystore-free.
29
30
  *
30
- * An external (`-t x`) identifier is raw-bytes-only: a 32-byte genesis-document
31
- * hash via `--bytes`. Generation and `--signing-key` apply only to `-t k`.
31
+ * An external (`-t x`) identifier has two input modes: the genesis document
32
+ * file (`--document <path>`), which the api hashes, or the 32-byte hash as
33
+ * hex (`--bytes`). Generation and `--signing-key` apply only to `-t k`.
32
34
  *
33
- * The keystore-free `factory` serves the raw-bytes path; the keystore-aware
34
- * `keystoreFactory` serves the generate and existing-key paths.
35
+ * The keystore-free `factory` serves the raw-bytes and document paths; the
36
+ * keystore-aware `keystoreFactory` serves the generate and existing-key paths.
35
37
  */
36
38
  export function registerCreateCommand(
37
39
  program : Command,
@@ -43,38 +45,28 @@ export function registerCreateCommand(
43
45
  .command('create')
44
46
  .description('Create an identifier and initial DID document')
45
47
  .option('-t, --type <type>', 'Identifier type <k|x>', 'k')
46
- .option(
47
- '-n, --network <network>',
48
- 'Identifier bitcoin network <bitcoin|testnet3|testnet4|signet|mutinynet|regtest> '
49
- + '(default: config defaults.network, else regtest)'
50
- )
48
+ .option('-n, --network <network>', NETWORK_OPTION_HELP)
51
49
  .option(
52
50
  '-b, --bytes <bytes>',
53
51
  'Genesis bytes as a hex string. '
54
52
  + 'For type=k, a 33-byte secp256k1 public key (omit to generate a key). '
55
53
  + 'For type=x, the 32-byte SHA-256 hash of a genesis document.'
56
54
  )
57
- .action(async (options: { type: string; network?: string; bytes?: string }) => {
55
+ .option(
56
+ '--document <path>',
57
+ 'For type=x, the path of the JSON genesis document to hash (see "btcr2 genesis build"). '
58
+ + 'Exclusive with --bytes.'
59
+ )
60
+ .action(async (options: { type: string; network?: string; bytes?: string; document?: string }) => {
58
61
  const g = globals();
59
62
  if (options.type !== 'k' && options.type !== 'x') {
60
63
  throw new CLIError('Invalid type. Must be "k" or "x".', 'INVALID_ARGUMENT_ERROR', options);
61
64
  }
62
65
 
63
66
  const overrides = overridesFromGlobals(g);
64
- const network = resolveNetwork(options.network, overrides);
67
+ const network = resolveNetworkOption(options.network, overrides);
65
68
  const signingKey = g.signingKey;
66
-
67
- // Warn (never block) when the network being encoded disagrees with the
68
- // active profile's declared network, so a `production` profile holding
69
- // mainnet endpoints cannot silently mint a regtest DID.
70
- const mismatch = profileNetworkMismatch(network, overrides);
71
- if (mismatch && !g.quiet) {
72
- process.stderr.write(
73
- `Warning: creating a "${network}" identifier while the active profile `
74
- + `"${mismatch.profile}" declares network "${mismatch.declared}". The `
75
- + 'identifier\'s network and the profile\'s endpoints may not match.\n'
76
- );
77
- }
69
+ warnProfileNetworkMismatch(g, network, overrides);
78
70
 
79
71
  /** Prints the result, plus a stderr provenance line in text mode. */
80
72
  const print = (result: CommandResult, note?: string): void => {
@@ -82,7 +74,7 @@ export function registerCreateCommand(
82
74
  if (note && g.output !== 'json') process.stderr.write(`${note}\n`);
83
75
  };
84
76
 
85
- // External: raw-bytes only.
77
+ // External: the genesis document file, or its hash as raw bytes.
86
78
  if (options.type === 'x') {
87
79
  if (signingKey) {
88
80
  throw new CLIError(
@@ -90,10 +82,22 @@ export function registerCreateCommand(
90
82
  'INVALID_ARGUMENT_ERROR',
91
83
  );
92
84
  }
85
+ if (options.bytes !== undefined && options.document !== undefined) {
86
+ throw new CLIError('Provide at most one of --bytes or --document.', 'INVALID_ARGUMENT_ERROR');
87
+ }
88
+ if (options.document !== undefined) {
89
+ const genesisDocument = await readGenesisDocumentFile(options.document);
90
+ const api = factory();
91
+ const { did, genesisBytes, didDocument } = api.btcr2.createExternalFromDocument(genesisDocument, { network });
92
+ print({ action: 'create', data: did, genesisBytes: bytesToHex(genesisBytes) });
93
+ const beacons = api.btcr2.getBeacons(didDocument);
94
+ if (beacons.length > 0) printBeaconFundingHint(g, network, beacons[0].address);
95
+ return;
96
+ }
93
97
  if (options.bytes === undefined) {
94
98
  throw new CLIError(
95
- 'External identifiers (-t x) require --bytes <hex>, the 32-byte genesis document hash. '
96
- + 'Key generation is only available for -t k.',
99
+ 'External identifiers (-t x) require --document <path>, the genesis document, '
100
+ + 'or --bytes <hex>, its 32-byte hash. Key generation is only available for -t k.',
97
101
  'INVALID_ARGUMENT_ERROR',
98
102
  );
99
103
  }
@@ -103,6 +107,10 @@ export function registerCreateCommand(
103
107
  return;
104
108
  }
105
109
 
110
+ if (options.document !== undefined) {
111
+ throw new CLIError('--document applies only to external identifiers (-t x).', 'INVALID_ARGUMENT_ERROR');
112
+ }
113
+
106
114
  // Deterministic (KEY): three mutually-exclusive modes.
107
115
  if (options.bytes !== undefined && signingKey) {
108
116
  throw new CLIError(
@@ -148,30 +156,6 @@ export function registerCreateCommand(
148
156
  });
149
157
  }
150
158
 
151
- /** Builds the keystore- and config-resolution overrides from the global flags. */
152
- function overridesFromGlobals(g: GlobalOptions): ConnectionOverrides {
153
- return {
154
- home : g.home,
155
- config : g.config,
156
- profile : g.profile,
157
- keystore : g.keystore,
158
- passphraseFile : g.passphraseFile,
159
- };
160
- }
161
-
162
- /** Validates an explicit `--network`, or resolves the default from configuration. */
163
- function resolveNetwork(explicit: string | undefined, overrides: ConnectionOverrides): NetworkOption {
164
- if (!explicit) return resolveDefaultNetwork(overrides);
165
- if (!SUPPORTED_NETWORKS.includes(explicit as NetworkOption)) {
166
- throw new CLIError(
167
- 'Invalid network. Must be one of "bitcoin", "testnet3", "testnet4", "signet", "mutinynet", or "regtest".',
168
- 'INVALID_ARGUMENT_ERROR',
169
- { network: explicit },
170
- );
171
- }
172
- return explicit as NetworkOption;
173
- }
174
-
175
159
  /** Parses and length-checks hex genesis bytes for the given identifier type. */
176
160
  function parseGenesisBytes(hex: string, type: 'k' | 'x'): Uint8Array {
177
161
  const expected = EXPECTED_BYTES[type];
@@ -0,0 +1,149 @@
1
+ import type { DidBtcr2Api } from '@did-btcr2/api';
2
+ import type { KeyManager } from '@did-btcr2/key-manager';
3
+ import { bytesToHex } from '@noble/hashes/utils.js';
4
+ import type { Command } from 'commander';
5
+ import { existsSync } from 'node:fs';
6
+ import { readFile, writeFile } from 'node:fs/promises';
7
+ import { resolve as resolvePath } from 'node:path';
8
+ import { createInterface } from 'node:readline/promises';
9
+ import type { ApiFactory } from '../config.js';
10
+ import { CLIError } from '../error.js';
11
+ import { parseGenesisSpec, toApiSpec, type GenesisSpecFile } from '../genesis-spec.js';
12
+ import { collectGenesisSpec, type WizardKey } from '../genesis-wizard.js';
13
+ import { printBeaconFundingHint } from '../hints.js';
14
+ import { resolveKeyRef } from '../keystore/resolve-key-ref.js';
15
+ import { NETWORK_OPTION_HELP, overridesFromGlobals, resolveNetworkOption, warnProfileNetworkMismatch } from '../network-option.js';
16
+ import { formatResult } from '../output.js';
17
+ import type { CommandResult, GlobalOptions } from '../types.js';
18
+
19
+ /** The default path of the genesis document that `genesis build` writes. */
20
+ export const DEFAULT_GENESIS_PATH = 'genesis.json';
21
+
22
+ /**
23
+ * Registers the `genesis` command group. `genesis build` builds the genesis
24
+ * document of an external (`x`) identifier, writes it to a file, and prints
25
+ * the identifier. On a terminal the command asks for the keys, the beacons,
26
+ * and the services. With `--spec <path>` it reads them from a JSON file and
27
+ * asks nothing. The command is offline: it derives the beacon addresses from
28
+ * the keys and opens no Bitcoin connection.
29
+ *
30
+ * The keystore-free `factory` builds the document; the keystore-aware
31
+ * `keystoreFactory` resolves key references and lists the keys for the
32
+ * wizard. Reading a public key never decrypts, so the command never prompts
33
+ * for the passphrase.
34
+ */
35
+ export function registerGenesisCommand(
36
+ program : Command,
37
+ factory : ApiFactory,
38
+ keystoreFactory : ApiFactory,
39
+ globals : () => GlobalOptions,
40
+ ): void {
41
+ const genesis = program
42
+ .command('genesis')
43
+ .description('Build the genesis document of an external identifier (offline).');
44
+ const print = (result: CommandResult): void => console.log(formatResult(result, globals()));
45
+
46
+ genesis
47
+ .command('build')
48
+ .description('Build a genesis document, write it to a file, and print the external identifier.')
49
+ .option('-n, --network <network>', NETWORK_OPTION_HELP)
50
+ .option('--spec <path>', 'Path to a JSON spec file with the keys, beacons, and services. Runs without prompts.')
51
+ .option('--out <path>', 'Path of the genesis document to write.', DEFAULT_GENESIS_PATH)
52
+ .option('--force', 'Overwrite an existing --out file.', false)
53
+ .action(async (options: { network?: string; spec?: string; out: string; force: boolean }) => {
54
+ const g = globals();
55
+ const overrides = overridesFromGlobals(g);
56
+ const network = resolveNetworkOption(options.network, overrides);
57
+ warnProfileNetworkMismatch(g, network, overrides);
58
+
59
+ // Refuse to overwrite before any question is asked.
60
+ const outPath = resolvePath(options.out);
61
+ if (!options.force && existsSync(outPath)) {
62
+ throw new CLIError(
63
+ `The file ${outPath} exists. Pass --force to overwrite it, or --out <path> for another file.`,
64
+ 'INVALID_ARGUMENT_ERROR',
65
+ { out: outPath },
66
+ );
67
+ }
68
+
69
+ // The keystore opens only when a key reference or the wizard needs it.
70
+ let keystoreApi: DidBtcr2Api | undefined;
71
+ const kms = (): KeyManager => (keystoreApi ??= keystoreFactory(undefined, overrides)).kms.kms;
72
+ const resolvePublicKey = (ref: string): Uint8Array => kms().getPublicKey(resolveKeyRef(kms(), ref));
73
+
74
+ const spec = options.spec !== undefined
75
+ ? await readSpecFile(options.spec)
76
+ : await runWizard(kms);
77
+
78
+ const api = factory();
79
+ const document = api.btcr2.buildGenesisDocument(toApiSpec(spec, network, resolvePublicKey));
80
+ // Hash exactly the bytes that the file carries: the parsed form of the
81
+ // pretty-printed JSON, not the document instance.
82
+ const json = `${JSON.stringify(document, null, 2)}\n`;
83
+ const { did, genesisBytes, didDocument } = api.btcr2.createExternalFromDocument(JSON.parse(json), { network });
84
+ await writeFile(outPath, json, { encoding: 'utf-8', flag: options.force ? 'w' : 'wx' });
85
+ const beacons = api.btcr2.getBeacons(didDocument);
86
+
87
+ print({
88
+ action : 'genesis-build',
89
+ data : { did, network, genesisBytes: bytesToHex(genesisBytes), path: outPath, beacons },
90
+ });
91
+ if (!g.quiet && g.output !== 'json') {
92
+ process.stderr.write(
93
+ `Wrote the genesis document to ${outPath}. Keep it: the identifier resolves only with it. `
94
+ + 'Pass --genesis-document <path> to resolve, update, and deactivate, or publish it to a CAS.\n',
95
+ );
96
+ if (beacons.length > 0) printBeaconFundingHint(g, network, beacons[0].address);
97
+ }
98
+ });
99
+ }
100
+
101
+ /** Reads and checks the spec file. */
102
+ async function readSpecFile(path: string): Promise<GenesisSpecFile> {
103
+ let parsed: unknown;
104
+ try {
105
+ parsed = JSON.parse(await readFile(path, 'utf-8'));
106
+ } catch {
107
+ throw new CLIError(
108
+ 'Invalid genesis spec path. Must be a valid path to a JSON file.',
109
+ 'INVALID_ARGUMENT_ERROR',
110
+ { spec: path },
111
+ );
112
+ }
113
+ return parseGenesisSpec(parsed, path);
114
+ }
115
+
116
+ /** Runs the wizard on the terminal. Refuses without one. */
117
+ async function runWizard(kms: () => KeyManager): Promise<GenesisSpecFile> {
118
+ if (!process.stdin.isTTY) {
119
+ throw new CLIError(
120
+ 'No terminal is attached. Pass --spec <path> to build the genesis document without prompts.',
121
+ 'INVALID_ARGUMENT_ERROR',
122
+ );
123
+ }
124
+ const store = kms();
125
+ const rl = createInterface({ input: process.stdin, output: process.stderr });
126
+ try {
127
+ return await collectGenesisSpec((question) => rl.question(question), {
128
+ say : (line) => process.stderr.write(`${line}\n`),
129
+ keys : listKeys(store),
130
+ resolveKey : (ref) => resolveKeyRef(store, ref),
131
+ });
132
+ } finally {
133
+ rl.close();
134
+ }
135
+ }
136
+
137
+ /** The keys of the keystore in the shape that `key list` prints. */
138
+ function listKeys(kms: KeyManager): WizardKey[] {
139
+ const active = kms.activeKeyId;
140
+ return kms.listKeys().map(id => {
141
+ const entry = kms.getEntry(id);
142
+ return {
143
+ keyId : id,
144
+ fingerprint : id.split(':').pop() ?? id,
145
+ ...(entry.tags?.name && { name: entry.tags.name }),
146
+ active : id === active,
147
+ };
148
+ });
149
+ }
@@ -2,9 +2,9 @@ import type { IdentifierReport } from '@did-btcr2/api';
2
2
  import { Identifier } from '@did-btcr2/api';
3
3
  import { bytesToHex, hexToBytes } from '@noble/hashes/utils.js';
4
4
  import type { Command } from 'commander';
5
- import { readFile } from 'node:fs/promises';
6
5
  import type { ApiFactory } from '../config.js';
7
6
  import { CLIError } from '../error.js';
7
+ import { readGenesisDocumentFile } from '../genesis-document-file.js';
8
8
  import { formatResult } from '../output.js';
9
9
  import type { CommandResult, GlobalOptions, IdentifierDecodeData } from '../types.js';
10
10
 
@@ -69,7 +69,7 @@ export function registerIdentifierCommand(
69
69
  }
70
70
  const genesisDocument = options.genesisDocument === undefined
71
71
  ? undefined
72
- : await readGenesisDocument(options.genesisDocument);
72
+ : await readGenesisDocumentFile(options.genesisDocument);
73
73
  data.initialDocument = api.btcr2.getInitialDocument(did, genesisDocument);
74
74
  }
75
75
  print({ action: 'identifier-decode', data });
@@ -100,7 +100,7 @@ export function registerIdentifierCommand(
100
100
  { did },
101
101
  );
102
102
  }
103
- genesisDocument = await readGenesisDocument(options.genesisDocument);
103
+ genesisDocument = await readGenesisDocumentFile(options.genesisDocument);
104
104
  }
105
105
  const report: IdentifierReport = factory().did.validate(did, { genesisBytes, genesisDocument });
106
106
  print({ action: 'identifier-validate', data: report });
@@ -132,25 +132,3 @@ function parseHexBytes(value: string): Uint8Array {
132
132
  throw new CLIError('Invalid bytes: not valid hex.', 'INVALID_ARGUMENT_ERROR', { bytes: value });
133
133
  }
134
134
  }
135
-
136
- /** Reads and parses the genesis document file. The content must be a JSON object. */
137
- async function readGenesisDocument(path: string): Promise<object> {
138
- let parsed: unknown;
139
- try {
140
- parsed = JSON.parse(await readFile(path, 'utf-8'));
141
- } catch {
142
- throw new CLIError(
143
- 'Invalid genesis document path. Must be a valid path to a JSON file.',
144
- 'INVALID_ARGUMENT_ERROR',
145
- { genesisDocument: path },
146
- );
147
- }
148
- if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) {
149
- throw new CLIError(
150
- 'Invalid genesis document. The file must contain a JSON object.',
151
- 'INVALID_ARGUMENT_ERROR',
152
- { genesisDocument: path },
153
- );
154
- }
155
- return parsed;
156
- }
@@ -5,6 +5,7 @@ export { registerResolveCommand } from './resolve.js';
5
5
  export { registerUpdateCommand } from './update.js';
6
6
  export { registerDeactivateCommand } from './deactivate.js';
7
7
  export { registerIdentifierCommand } from './identifier.js';
8
+ export { registerGenesisCommand } from './genesis.js';
8
9
  export { registerKeyCommand } from './key.js';
9
10
  export { registerKeystoreCommand } from './keystore.js';
10
11
  export { registerConfigCommand } from './config.js';