@did-btcr2/cli 0.19.3 → 0.21.0

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.
@@ -1,94 +1,24 @@
1
- import { KeyManagerSigner } from '@did-btcr2/key-manager';
2
- import { assertKeystoreAllowedForNetwork, deriveNetwork, resolveBroadcastOptions, resolveSigningKeyRef } from '../config.js';
3
- import { CLIError } from '../error.js';
4
1
  import { printWatchHint } from '../hints.js';
5
- import { resolveKeyRef } from '../keystore/resolve-key-ref.js';
6
2
  import { formatResult } from '../output.js';
3
+ import { parseJsonArg, prepareWrite, registerWriteOptions } from './write.js';
7
4
  export function registerUpdateCommand(program, factory, globals) {
8
- program
5
+ const command = program
9
6
  .command('update')
10
7
  .description('Update a did:btcr2 document.')
11
- .requiredOption('-s, --source-document <json>', 'Source DID document as JSON string', parseJsonArg('--source-document'))
12
- .requiredOption('--source-version-id <number>', 'Source version ID as a number')
13
- .requiredOption('-p, --patches <json>', 'JSON Patch operations as a JSON string array', parseJsonArg('--patches'))
14
- .requiredOption('-m, --verification-method-id <id>', 'DID document verification method ID')
15
- .requiredOption('-b, --beacon-id <json>', 'Beacon ID as a JSON string', parseJsonArg('--beacon-id'))
16
- .option('--publish-to-cas <mode>', 'Publish update artifacts to a writable CAS before broadcast: auto|always|never. '
17
- + 'CAS publication is optional; the default distributes the returned artifacts via sidecar.', parsePublishToCasMode, 'never')
18
- .option('--fee-rate <satsPerVByte>', 'Fee rate in sats/vByte for the beacon transaction (default: 5). '
19
- + 'Raise it under congestion so the transaction confirms.')
20
- .option('--change-address <address>', 'Send transaction change to this address instead of the beacon address, '
21
- + 'so a DID\'s announcements are not linked on-chain (ADR 044).')
8
+ .requiredOption('-i, --identifier <identifier>', 'did:btcr2 identifier to update')
9
+ .requiredOption('-p, --patches <json>', 'JSON Patch operations as a JSON string array', parseJsonArg('--patches'));
10
+ registerWriteOptions(command)
22
11
  .action(async (options) => {
23
- if (!/^\d+$/.test(options.sourceVersionId)) {
24
- throw new CLIError('--source-version-id must be a non-negative integer.', 'INVALID_ARGUMENT_ERROR', { value: options.sourceVersionId });
25
- }
26
- const parsed = {
27
- sourceDocument: options.sourceDocument,
28
- patches: options.patches,
29
- sourceVersionId: Number(options.sourceVersionId),
30
- verificationMethodId: options.verificationMethodId,
31
- beaconId: options.beaconId,
32
- };
33
- const did = parsed.sourceDocument?.id;
34
- if (!did) {
35
- throw new CLIError('Source document must contain an "id" field.', 'INVALID_ARGUMENT_ERROR', options);
36
- }
37
- const network = deriveNetwork(did);
38
- // Refuse to sign a mainnet update with an unencrypted dev keystore (ADR 080).
39
- assertKeystoreAllowedForNetwork(network, globals());
40
- const api = factory(network, globals());
41
- const keyId = resolveKeyRef(api.kms.kms, resolveSigningKeyRef(globals()));
42
- const signer = new KeyManagerSigner(api.kms.kms, keyId);
43
- // Resolve fee-rate/change-address through the flag -> env -> profile chain
44
- // into beacon broadcast options. Undefined when neither is set, so the
45
- // SDK defaults (5 sat/vB, change back to the beacon address) still apply.
46
- const broadcastOptions = resolveBroadcastOptions(network, globals(), {
47
- feeRate: options.feeRate,
48
- changeAddress: options.changeAddress,
49
- });
50
- // CAS publication is optional and never required: every beacon update can
51
- // be completed and shared via sidecar alone. It is opt-in and defaults to
52
- // 'never'; pass --publish-to-cas auto|always to publish the signed update
53
- // (and, for CAS beacons, the announcement) to a writable CAS configured
54
- // via --cas-rpc-url. The returned artifacts (txid, announcement, proof)
55
- // are always printed for sidecar distribution regardless.
56
- const data = await api.btcr2.update({
57
- sourceDocument: parsed.sourceDocument,
58
- patches: parsed.patches,
59
- sourceVersionId: parsed.sourceVersionId,
60
- verificationMethodId: parsed.verificationMethodId,
61
- beaconId: parsed.beaconId,
62
- signer,
63
- publishToCas: options.publishToCas,
64
- ...(broadcastOptions ? { broadcastOptions } : {}),
65
- });
66
- console.log(formatResult({ action: 'update', data }, globals()));
67
- printWatchHint(globals(), network, data.txid);
12
+ const g = globals();
13
+ const { network, api, params } = await prepareWrite(options, factory, g);
14
+ // The api resolves the source document if the source pair is absent,
15
+ // derives an omitted verification method and beacon, and publishes to
16
+ // the CAS only under --publish-to-cas auto|always. The returned
17
+ // artifacts (txid, signed update, announcement, proof) are printed for
18
+ // sidecar distribution in every case.
19
+ const data = await api.updateDid({ ...params, patches: options.patches });
20
+ console.log(formatResult({ action: 'update', data }, g));
21
+ printWatchHint(g, network, data.txid);
68
22
  });
69
23
  }
70
- /**
71
- * Commander argParser for `--publish-to-cas`. Validates the value is one of the
72
- * three {@link PublishToCasMode} policies, erroring at parse time otherwise.
73
- */
74
- function parsePublishToCasMode(value) {
75
- if (value !== 'auto' && value !== 'always' && value !== 'never') {
76
- throw new CLIError('--publish-to-cas must be one of "auto", "always", or "never".', 'INVALID_ARGUMENT_ERROR', { value });
77
- }
78
- return value;
79
- }
80
- /**
81
- * Returns a commander argParser that validates JSON.
82
- * Errors at parse time with a clear flag reference.
83
- */
84
- function parseJsonArg(flagName) {
85
- return (value) => {
86
- try {
87
- return JSON.parse(value);
88
- }
89
- catch {
90
- throw new CLIError(`Invalid JSON for ${flagName}. Must be a valid JSON string.`, 'INVALID_ARGUMENT_ERROR', { flagName, value });
91
- }
92
- };
93
- }
94
24
  //# sourceMappingURL=update.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/update.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,+BAA+B,EAAE,aAAa,EAAE,uBAAuB,EAAE,oBAAoB,EAAmB,MAAM,cAAc,CAAC;AAC9I,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAG5C,MAAM,UAAU,qBAAqB,CACnC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CAAC,8BAA8B,CAAC;SAC3C,cAAc,CAAC,+BAA+B,EAAE,gCAAgC,CAAC;SACjF,cAAc,CACb,sBAAsB,EACtB,8CAA8C,EAC9C,YAAY,CAAC,WAAW,CAAC,CAC1B,CAAC;IACJ,oBAAoB,CAAC,OAAO,CAAC;SAC1B,MAAM,CAAC,KAAK,EAAE,OAA0C,EAAE,EAAE;QAC3D,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;QACpB,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,YAAY,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;QACzE,qEAAqE;QACrE,sEAAsE;QACtE,gEAAgE;QAChE,uEAAuE;QACvE,sCAAsC;QACtC,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,OAA2B,EAAE,CAAC,CAAC;QAC9F,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;QACzD,cAAc,CAAC,CAAC,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,119 @@
1
+ import { KeyManagerSigner } from '@did-btcr2/key-manager';
2
+ import { assertKeystoreAllowedForNetwork, deriveNetwork, resolveBroadcastOptions, resolveSigningKeyRef, } from '../config.js';
3
+ import { CLIError } from '../error.js';
4
+ import { resolveKeyRef } from '../keystore/resolve-key-ref.js';
5
+ import { MIN_CONF_HELP, parseMinConf, readResolutionOptions } from '../resolution-options.js';
6
+ /**
7
+ * Registers the flags that `update` and `deactivate` share. Each command
8
+ * registers `-i/--identifier` (and `update` its `-p/--patches`) before it
9
+ * calls this function, so those flags lead the help output.
10
+ */
11
+ export function registerWriteOptions(command) {
12
+ return command
13
+ .option('-s, --source-document <json>', 'Source DID document as a JSON string. Requires --source-version-id. '
14
+ + 'Omit both to resolve the current document first', parseJsonArg('--source-document'))
15
+ .option('--source-version-id <number>', 'Version ID of the source document, a non-negative integer. Requires --source-document', parseSourceVersionId)
16
+ .option('-m, --verification-method-id <id>', 'Verification method that signs the update '
17
+ + '(default: the one method of the document that publishes the signing key)')
18
+ .option('-b, --beacon-id <id>', 'Beacon service that announces the update, as a DID URL '
19
+ + '(default: the only beacon of the document, else the one beacon with a spendable UTXO)')
20
+ .option('-r, --resolution-options <json>', 'Resolution options as a JSON string, for the resolution of the source document')
21
+ .option('--resolution-options-path <path>', 'Path to a JSON file with resolution options, for the resolution of the source document')
22
+ .option('--min-conf <n>', MIN_CONF_HELP, parseMinConf)
23
+ .option('--publish-to-cas <mode>', 'Publish update artifacts to a writable CAS before broadcast: auto|always|never. '
24
+ + 'CAS publication is optional; the default distributes the returned artifacts via sidecar.', parsePublishToCasMode, 'never')
25
+ .option('--fee-rate <satsPerVByte>', 'Fee rate in sats/vByte for the beacon transaction (default: 5). '
26
+ + 'Raise it under congestion so the transaction confirms.')
27
+ .option('--change-address <address>', 'Send transaction change to this address instead of the beacon address, '
28
+ + 'so a DID\'s announcements are not linked on-chain (ADR 044).');
29
+ }
30
+ /**
31
+ * Validates the shared write flags, derives the network from the identifier,
32
+ * applies the mainnet keystore guard, builds the signer, and returns the
33
+ * parameters for `updateDid` and `deactivateDid`.
34
+ *
35
+ * The checks run in this order, before any key material is read:
36
+ * 1. The identifier decodes and names a supported network.
37
+ * 2. `--source-document` and `--source-version-id` come together or not at
38
+ * all (ADR 101). The api refuses a half pair too; the cli names the flags.
39
+ * 3. The resolution flags come only without the source pair. The api ignores
40
+ * `resolutionOptions` when the pair is supplied (ADR 098). A silent ignore
41
+ * of `--min-conf` would mislead.
42
+ * 4. A mainnet write is refused with an unencrypted dev keystore (ADR 080).
43
+ */
44
+ export async function prepareWrite(options, factory, g) {
45
+ const did = options.identifier;
46
+ const network = deriveNetwork(did);
47
+ const hasDocument = options.sourceDocument !== undefined;
48
+ const hasVersion = options.sourceVersionId !== undefined;
49
+ if (hasDocument !== hasVersion) {
50
+ throw new CLIError('Provide both --source-document and --source-version-id, or neither. '
51
+ + 'Omit both to resolve the current document first.', 'INVALID_ARGUMENT_ERROR', { did });
52
+ }
53
+ const hasResolutionFlags = options.resolutionOptions !== undefined
54
+ || options.resolutionOptionsPath !== undefined
55
+ || options.minConf !== undefined;
56
+ if (hasDocument && hasResolutionFlags) {
57
+ throw new CLIError('--resolution-options, --resolution-options-path, and --min-conf apply only when '
58
+ + '--source-document and --source-version-id are omitted. A supplied source pair skips resolution.', 'INVALID_ARGUMENT_ERROR', { did });
59
+ }
60
+ assertKeystoreAllowedForNetwork(network, g);
61
+ const resolutionOptions = await readResolutionOptions(options);
62
+ const api = factory(network, g);
63
+ const keyId = resolveKeyRef(api.kms.kms, resolveSigningKeyRef(g));
64
+ const signer = new KeyManagerSigner(api.kms.kms, keyId);
65
+ // Resolve fee-rate/change-address through the flag, env, and profile layers
66
+ // into beacon broadcast options. Undefined when no layer sets one, so the
67
+ // SDK defaults (5 sat/vB, change back to the beacon address) still apply.
68
+ const broadcastOptions = resolveBroadcastOptions(network, g, {
69
+ feeRate: options.feeRate,
70
+ changeAddress: options.changeAddress,
71
+ });
72
+ return {
73
+ network,
74
+ api,
75
+ params: {
76
+ did,
77
+ signer,
78
+ sourceDocument: options.sourceDocument,
79
+ sourceVersionId: options.sourceVersionId,
80
+ verificationMethodId: options.verificationMethodId,
81
+ beaconId: options.beaconId,
82
+ resolutionOptions,
83
+ publishToCas: options.publishToCas,
84
+ broadcastOptions,
85
+ },
86
+ };
87
+ }
88
+ /** Commander argParser for `--source-version-id`: digits only, a non-negative integer. */
89
+ function parseSourceVersionId(value) {
90
+ if (!/^\d+$/.test(value)) {
91
+ throw new CLIError('--source-version-id must be a non-negative integer.', 'INVALID_ARGUMENT_ERROR', { value });
92
+ }
93
+ return Number(value);
94
+ }
95
+ /**
96
+ * Commander argParser for `--publish-to-cas`. Validates the value is one of the
97
+ * three {@link PublishToCasMode} policies, erroring at parse time otherwise.
98
+ */
99
+ function parsePublishToCasMode(value) {
100
+ if (value !== 'auto' && value !== 'always' && value !== 'never') {
101
+ throw new CLIError('--publish-to-cas must be one of "auto", "always", or "never".', 'INVALID_ARGUMENT_ERROR', { value });
102
+ }
103
+ return value;
104
+ }
105
+ /**
106
+ * Returns a commander argParser that validates JSON.
107
+ * Errors at parse time with a clear flag reference.
108
+ */
109
+ export function parseJsonArg(flagName) {
110
+ return (value) => {
111
+ try {
112
+ return JSON.parse(value);
113
+ }
114
+ catch {
115
+ throw new CLIError(`Invalid JSON for ${flagName}. Must be a valid JSON string.`, 'INVALID_ARGUMENT_ERROR', { flagName, value });
116
+ }
117
+ };
118
+ }
119
+ //# sourceMappingURL=write.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write.js","sourceRoot":"","sources":["../../../../src/commands/write.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EACL,+BAA+B,EAC/B,aAAa,EACb,uBAAuB,EACvB,oBAAoB,GAErB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,qBAAqB,EAA8B,MAAM,0BAA0B,CAAC;AAe1H;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IACnD,OAAO,OAAO;SACX,MAAM,CACL,8BAA8B,EAC9B,sEAAsE;UAClE,iDAAiD,EACrD,YAAY,CAAC,mBAAmB,CAAC,CAClC;SACA,MAAM,CACL,8BAA8B,EAC9B,uFAAuF,EACvF,oBAAoB,CACrB;SACA,MAAM,CACL,mCAAmC,EACnC,4CAA4C;UACxC,0EAA0E,CAC/E;SACA,MAA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MAAM,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;QAChE,MAAM,IAAI,QAAQ,CAChB,+DAA+D,EAC/D,wBAAwB,EACxB,EAAE,KAAK,EAAE,CACV,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB;IAC3C,OAAO,CAAC,KAAa,EAAW,EAAE;QAChC,IAAI,CAAC;YACH,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAC3B,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,QAAQ,CAChB,oBAAoB,QAAQ,gCAAgC,EAC5D,wBAAwB,EACxB,EAAE,QAAQ,EAAE,KAAK,EAAE,CACpB,CAAC;QACJ,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,47 @@
1
+ import { DEFAULT_MIN_CONF } from '@did-btcr2/api';
2
+ import { readFile } from 'node:fs/promises';
3
+ import { CLIError } from './error.js';
4
+ /** The help text of `--min-conf`. `resolve`, `update`, and `deactivate` share it. */
5
+ export const MIN_CONF_HELP = 'Minimum block confirmations a beacon signal needs before resolution applies it '
6
+ + `(positive integer, default: ${DEFAULT_MIN_CONF}). Overrides a minConf inside the JSON resolution options`;
7
+ /**
8
+ * Builds the resolution options from the flags. The inline JSON wins over
9
+ * the file. The `--min-conf` flag wins over a `minConf` inside the JSON.
10
+ * Returns `undefined` if no flag is set.
11
+ */
12
+ export async function readResolutionOptions(flags) {
13
+ let resolutionOptions;
14
+ if (flags.resolutionOptions) {
15
+ try {
16
+ resolutionOptions = JSON.parse(flags.resolutionOptions);
17
+ }
18
+ catch {
19
+ throw new CLIError('Invalid resolution options. Must be a valid JSON string.', 'INVALID_ARGUMENT_ERROR', { resolutionOptions: flags.resolutionOptions });
20
+ }
21
+ }
22
+ else if (flags.resolutionOptionsPath) {
23
+ try {
24
+ const content = await readFile(flags.resolutionOptionsPath, 'utf-8');
25
+ resolutionOptions = JSON.parse(content);
26
+ }
27
+ catch {
28
+ throw new CLIError('Invalid resolution options path. Must be a valid path to a JSON file.', 'INVALID_ARGUMENT_ERROR', { resolutionOptionsPath: flags.resolutionOptionsPath });
29
+ }
30
+ }
31
+ // The flag wins over a minConf inside the JSON options.
32
+ if (flags.minConf !== undefined) {
33
+ resolutionOptions = { ...(resolutionOptions ?? {}), minConf: flags.minConf };
34
+ }
35
+ return resolutionOptions;
36
+ }
37
+ /**
38
+ * Commander argParser for `--min-conf`. Accepts a positive integer (minimum 1),
39
+ * the domain the specification gives `minConf`. Errors at parse time otherwise.
40
+ */
41
+ export function parseMinConf(value) {
42
+ if (!/^[1-9]\d*$/.test(value)) {
43
+ throw new CLIError('--min-conf must be a positive integer (minimum 1).', 'INVALID_ARGUMENT_ERROR', { value });
44
+ }
45
+ return Number(value);
46
+ }
47
+ //# sourceMappingURL=resolution-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolution-options.js","sourceRoot":"","sources":["../../../src/resolution-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAStC,qFAAqF;AACrF,MAAM,CAAC,MAAM,aAAa,GACxB,iFAAiF;MAC/E,+BAA+B,gBAAgB,2DAA2D,CAAC;AAE/G;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,KAA4B;IACtE,IAAI,iBAAgD,CAAC;IACrD,IAAI,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC5B,IAAI,CAAC;YACH,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;QAC1D,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,IAAI,QAAQ,CAChB,0D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AU,YAAY,CAAC,KAAyB;IACpD,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;AACjD,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAiBA,MAAM,CAAC,MAAM,kBAAkB,GAAoB;IACjD,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS;CACpE,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,KAAyB;IACpD,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC1C,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;AACjD,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { Command } from 'commander';
2
- import { type ApiFactory } from '../config.js';
2
+ import type { ApiFactory } from '../config.js';
3
3
  import type { GlobalOptions } from '../types.js';
4
4
  export declare function registerDeactivateCommand(program: Command, factory: ApiFactory, globals: () => GlobalOptions): void;
5
5
  //# sourceMappingURL=deactivate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"deactivate.d.ts","sourceRoot":"","sources":["../../../../src/commands/deactivate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAiG,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAK9I,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,aAAa,CAAC;AAKvE,wBAAgB,yBAAyB,CACvC,OAAO,EAAG,OAAO,EACjB,OAAO,EAAG,UAAU,EACpB,OAAO,EAAG,MAAM,aAAa,GAC5B,IAAI,CAyGN"}
1
+ {"version":3,"file":"deactivate.d.ts","sourceRoot":"","sources":["../../../../src/commands/deactivate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,wBAAgB,yBAAyB,CACvC,OAAO,EAAG,OAAO,EACjB,OAAO,EAAG,UAAU,EACpB,OAAO,EAAG,MAAM,aAAa,GAC5B,IAAI,CAgBN"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../../src/commands/resolve.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAG9D,OAAO,KAAK,EAAE,aAAa,EAAyB,MAAM,aAAa,CAAC;AAExE,wBAAgB,sBAAsB,CACpC,OAAO,EAAG,OAAO,EACjB,OAAO,EAAG,UAAU,EACpB,OAAO,EAAG,MAAM,aAAa,GAC5B,IAAI,CAoBN"}
1
+ {"version":3,"file":"resolve.d.ts","sourceRoot":"","sources":["../../../../src/commands/resolve.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAG9D,OAAO,KAAK,EAAE,aAAa,EAAyB,MAAM,aAAa,CAAC;AAExE,wBAAgB,sBAAsB,CACpC,OAAO,EAAG,OAAO,EACjB,OAAO,EAAG,UAAU,EACpB,OAAO,EAAG,MAAM,aAAa,GAC5B,IAAI,CAiBN"}
@@ -1,5 +1,5 @@
1
1
  import type { Command } from 'commander';
2
- import { type ApiFactory } from '../config.js';
2
+ import type { ApiFactory } from '../config.js';
3
3
  import type { GlobalOptions } from '../types.js';
4
4
  export declare function registerUpdateCommand(program: Command, factory: ApiFactory, globals: () => GlobalOptions): void;
5
5
  //# sourceMappingURL=update.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/commands/update.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAiG,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAK9I,OAAO,KAAK,EAAE,aAAa,EAAwB,MAAM,aAAa,CAAC;AAEvE,wBAAgB,qBAAqB,CACnC,OAAO,EAAG,OAAO,EACjB,OAAO,EAAG,UAAU,EACpB,OAAO,EAAG,MAAM,aAAa,GAC5B,IAAI,CA4GN"}
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../../src/commands/update.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,wBAAgB,qBAAqB,CACnC,OAAO,EAAG,OAAO,EACjB,OAAO,EAAG,UAAU,EACpB,OAAO,EAAG,MAAM,aAAa,GAC5B,IAAI,CAuBN"}
@@ -0,0 +1,47 @@
1
+ import type { DidBtcr2Api, PublishToCasMode } from '@did-btcr2/api';
2
+ import type { Command } from 'commander';
3
+ import { type ApiFactory } from '../config.js';
4
+ import { type ResolutionOptionFlags } from '../resolution-options.js';
5
+ import type { GlobalOptions, NetworkOption, UpdateCommandOptions } from '../types.js';
6
+ /** The parsed flags that `update` and `deactivate` share. */
7
+ export type WriteFlags = ResolutionOptionFlags & {
8
+ identifier: string;
9
+ sourceDocument?: unknown;
10
+ sourceVersionId?: number;
11
+ verificationMethodId?: string;
12
+ beaconId?: string;
13
+ publishToCas: PublishToCasMode;
14
+ feeRate?: string;
15
+ changeAddress?: string;
16
+ };
17
+ /**
18
+ * Registers the flags that `update` and `deactivate` share. Each command
19
+ * registers `-i/--identifier` (and `update` its `-p/--patches`) before it
20
+ * calls this function, so those flags lead the help output.
21
+ */
22
+ export declare function registerWriteOptions(command: Command): Command;
23
+ /**
24
+ * Validates the shared write flags, derives the network from the identifier,
25
+ * applies the mainnet keystore guard, builds the signer, and returns the
26
+ * parameters for `updateDid` and `deactivateDid`.
27
+ *
28
+ * The checks run in this order, before any key material is read:
29
+ * 1. The identifier decodes and names a supported network.
30
+ * 2. `--source-document` and `--source-version-id` come together or not at
31
+ * all (ADR 101). The api refuses a half pair too; the cli names the flags.
32
+ * 3. The resolution flags come only without the source pair. The api ignores
33
+ * `resolutionOptions` when the pair is supplied (ADR 098). A silent ignore
34
+ * of `--min-conf` would mislead.
35
+ * 4. A mainnet write is refused with an unencrypted dev keystore (ADR 080).
36
+ */
37
+ export declare function prepareWrite(options: WriteFlags, factory: ApiFactory, g: GlobalOptions): Promise<{
38
+ network: NetworkOption;
39
+ api: DidBtcr2Api;
40
+ params: UpdateCommandOptions;
41
+ }>;
42
+ /**
43
+ * Returns a commander argParser that validates JSON.
44
+ * Errors at parse time with a clear flag reference.
45
+ */
46
+ export declare function parseJsonArg(flagName: string): (value: string) => unknown;
47
+ //# sourceMappingURL=write.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../../../../src/commands/write.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,WAAW,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEtF,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAKL,KAAK,UAAU,EAChB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAsD,KAAK,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAC1H,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEtF,6DAA6D;AAC7D,MAAM,MAAM,UAAU,GAAG,qBAAqB,GAAG;IAC/C,UAAU,EAAc,MAAM,CAAC;IAC/B,cAAc,CAAC,EAAS,OAAO,CAAC;IAChC,eAAe,CAAC,EAAQ,MAAM,CAAC;IAC/B,oBAAoB,CAAC,EAAG,MAAM,CAAC;IAC/B,QAAQ,CAAC,EAAe,MAAM,CAAC;IAC/B,YAAY,EAAY,gBAAgB,CAAC;IACzC,OAAO,CAAC,EAAgB,MAAM,CAAC;IAC/B,aAAa,CAAC,EAAU,MAAM,CAAC;CAChC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAiD9D;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAG,UAAU,EACpB,OAAO,EAAG,UAAU,EACpB,CAAC,EAAS,aAAa,GACtB,OAAO,CAAC;IAAE,OAAO,EAAE,aAAa,CAAC;IAAC,GAAG,EAAE,WAAW,CAAC;IAAC,MAAM,EAAE,oBAAoB,CAAA;CAAE,CAAC,CAmDrF;AA6BD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAYzE"}
@@ -0,0 +1,21 @@
1
+ import type { ResolutionOptions } from '@did-btcr2/method';
2
+ /** The flags that select the resolution options of a command. */
3
+ export type ResolutionOptionFlags = {
4
+ resolutionOptions?: string;
5
+ resolutionOptionsPath?: string;
6
+ minConf?: number;
7
+ };
8
+ /** The help text of `--min-conf`. `resolve`, `update`, and `deactivate` share it. */
9
+ export declare const MIN_CONF_HELP: string;
10
+ /**
11
+ * 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.
14
+ */
15
+ export declare function readResolutionOptions(flags: ResolutionOptionFlags): Promise<ResolutionOptions | undefined>;
16
+ /**
17
+ * Commander argParser for `--min-conf`. Accepts a positive integer (minimum 1),
18
+ * the domain the specification gives `minConf`. Errors at parse time otherwise.
19
+ */
20
+ export declare function parseMinConf(value: string): number;
21
+ //# sourceMappingURL=resolution-options.d.ts.map
@@ -0,0 +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,5 +1,4 @@
1
- import type { DidUpdateResult } from '@did-btcr2/api';
2
- import type { PatchOperation } from '@did-btcr2/common';
1
+ import type { BroadcastOptions, DidUpdateResult, PublishToCasMode, Signer } from '@did-btcr2/api';
3
2
  import type { Btcr2DidDocument, ResolutionOptions } from '@did-btcr2/method';
4
3
  import type { DidResolutionResult } from '@web5/dids';
5
4
  import type { DoctorReport, EffectiveConfig } from './config.js';
@@ -25,12 +24,23 @@ export interface ResolveCommandOptions {
25
24
  identifier: string;
26
25
  options?: ResolutionOptions;
27
26
  }
27
+ /**
28
+ * The parameters that `update` and `deactivate` hand to the api's `updateDid`
29
+ * and `deactivateDid`. `update` adds `patches`. An absent source pair lets the
30
+ * api resolve the current document with `resolutionOptions` (ADR 098, ADR
31
+ * 101). An absent `verificationMethodId` or `beaconId` lets the api derive it
32
+ * (ADR 104).
33
+ */
28
34
  export interface UpdateCommandOptions {
29
- sourceDocument: Btcr2DidDocument;
30
- patches: PatchOperation[];
31
- sourceVersionId: number;
32
- verificationMethodId: string;
33
- beaconId: string;
35
+ did: string;
36
+ signer: Signer;
37
+ sourceDocument?: Btcr2DidDocument;
38
+ sourceVersionId?: number;
39
+ verificationMethodId?: string;
40
+ beaconId?: string;
41
+ resolutionOptions?: ResolutionOptions;
42
+ publishToCas: PublishToCasMode;
43
+ broadcastOptions?: BroadcastOptions;
34
44
  }
35
45
  export type CommandResult = {
36
46
  action: 'create';
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,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,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;AACrG,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3C;;;;GAIG;AACH,MAAM,MAAM,uBAAuB,GAAG,WAAW,GAAG,KAAK,GAAG,QAAQ,CAAC;AAErE,eAAO,MAAM,kBAAkB,EAAE,aAAa,EAE7C,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,SAA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Aa,CAAC;IAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,GACpD;IAAE,MAAM,EAAE,cAAc,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,GACzC;IAAE,MAAM,EAAE,gBAAgB,CAAC;IAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAC;AAE5D,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAgB,YAAY,CAAC;IACnC,OAAO,EAAe,OAAO,CAAC;IAC9B,KAAK,EAAiB,OAAO,CAAC;IAC9B,IAAI,CAAC,EAAiB,MAAM,CAAC;IAC7B,MAAM,CAAC,EAAe,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAc,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAc,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAY,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAW,MAAM,CAAC;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.19.3",
3
+ "version": "0.21.0",
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",
@@ -61,11 +61,11 @@
61
61
  "@scure/base": "^1.2.6",
62
62
  "@web5/dids": "^1.2.0",
63
63
  "commander": "^13.1.0",
64
- "@did-btcr2/keypair": "^0.13.1",
65
- "@did-btcr2/common": "^9.3.0",
66
- "@did-btcr2/method": "^0.58.0",
64
+ "@did-btcr2/api": "^0.21.0",
65
+ "@did-btcr2/common": "^9.4.0",
67
66
  "@did-btcr2/key-manager": "^0.7.0",
68
- "@did-btcr2/api": "^0.20.0"
67
+ "@did-btcr2/method": "^0.59.0",
68
+ "@did-btcr2/keypair": "^0.13.1"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@eslint/js": "^9.21.0",