@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.
package/src/types.ts CHANGED
@@ -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';
@@ -36,12 +35,23 @@ export interface ResolveCommandOptions {
36
35
  options? : ResolutionOptions;
37
36
  }
38
37
 
38
+ /**
39
+ * The parameters that `update` and `deactivate` hand to the api's `updateDid`
40
+ * and `deactivateDid`. `update` adds `patches`. An absent source pair lets the
41
+ * api resolve the current document with `resolutionOptions` (ADR 098, ADR
42
+ * 101). An absent `verificationMethodId` or `beaconId` lets the api derive it
43
+ * (ADR 104).
44
+ */
39
45
  export interface UpdateCommandOptions {
40
- sourceDocument : Btcr2DidDocument;
41
- patches : PatchOperation[];
42
- sourceVersionId : number;
43
- verificationMethodId : string;
44
- beaconId : string;
46
+ did : string;
47
+ signer : Signer;
48
+ sourceDocument? : Btcr2DidDocument;
49
+ sourceVersionId? : number;
50
+ verificationMethodId? : string;
51
+ beaconId? : string;
52
+ resolutionOptions? : ResolutionOptions;
53
+ publishToCas : PublishToCasMode;
54
+ broadcastOptions? : BroadcastOptions;
45
55
  }
46
56
 
47
57
  export type CommandResult =