@did-btcr2/api 0.2.1 → 0.3.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/README.md +1 -1
- package/dist/browser.js +149910 -127351
- package/dist/browser.mjs +149186 -126627
- package/dist/cjs/api.js +210 -150
- package/dist/cjs/api.js.map +1 -1
- package/dist/cjs/bitcoin.js +110 -0
- package/dist/cjs/bitcoin.js.map +1 -0
- package/dist/cjs/cas.js +90 -0
- package/dist/cjs/cas.js.map +1 -0
- package/dist/cjs/crypto.js +425 -0
- package/dist/cjs/crypto.js.map +1 -0
- package/dist/cjs/did.js +70 -0
- package/dist/cjs/did.js.map +1 -0
- package/dist/cjs/helpers.js +28 -0
- package/dist/cjs/helpers.js.map +1 -0
- package/dist/cjs/index.js +12 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/kms.js +73 -0
- package/dist/cjs/kms.js.map +1 -0
- package/dist/cjs/method.js +262 -0
- package/dist/cjs/method.js.map +1 -0
- package/dist/cjs/types.js +2 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/esm/api.js +210 -150
- package/dist/esm/api.js.map +1 -1
- package/dist/esm/bitcoin.js +110 -0
- package/dist/esm/bitcoin.js.map +1 -0
- package/dist/esm/cas.js +90 -0
- package/dist/esm/cas.js.map +1 -0
- package/dist/esm/crypto.js +425 -0
- package/dist/esm/crypto.js.map +1 -0
- package/dist/esm/did.js +70 -0
- package/dist/esm/did.js.map +1 -0
- package/dist/esm/helpers.js +28 -0
- package/dist/esm/helpers.js.map +1 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/kms.js +73 -0
- package/dist/esm/kms.js.map +1 -0
- package/dist/esm/method.js +262 -0
- package/dist/esm/method.js.map +1 -0
- package/dist/esm/types.js +2 -0
- package/dist/esm/types.js.map +1 -0
- package/dist/types/api.d.ts +107 -97
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/bitcoin.d.ts +64 -0
- package/dist/types/bitcoin.d.ts.map +1 -0
- package/dist/types/cas.d.ts +70 -0
- package/dist/types/cas.d.ts.map +1 -0
- package/dist/types/crypto.d.ts +310 -0
- package/dist/types/crypto.d.ts.map +1 -0
- package/dist/types/did.d.ts +51 -0
- package/dist/types/did.d.ts.map +1 -0
- package/dist/types/helpers.d.ts +10 -0
- package/dist/types/helpers.d.ts.map +1 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/kms.d.ts +49 -0
- package/dist/types/kms.d.ts.map +1 -0
- package/dist/types/method.d.ts +117 -0
- package/dist/types/method.d.ts.map +1 -0
- package/dist/types/types.d.ts +128 -0
- package/dist/types/types.d.ts.map +1 -0
- package/package.json +7 -6
- package/src/api.ts +246 -262
- package/src/bitcoin.ts +129 -0
- package/src/cas.ts +121 -0
- package/src/crypto.ts +525 -0
- package/src/did.ts +75 -0
- package/src/helpers.ts +35 -0
- package/src/index.ts +37 -1
- package/src/kms.ts +95 -0
- package/src/method.ts +331 -0
- package/src/types.ts +122 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import { IdentifierTypes, NotImplementedError } from '@did-btcr2/common';
|
|
2
|
+
import { BeaconSignalDiscovery, DidBtcr2 } from '@did-btcr2/method';
|
|
3
|
+
import { assertBytes, assertCompressedPubkey, assertString, NOOP_LOGGER } from './helpers.js';
|
|
4
|
+
/**
|
|
5
|
+
* DID method operations sub-facade: create, resolve, update, deactivate.
|
|
6
|
+
*
|
|
7
|
+
* Lazily initialized by {@link DidBtcr2Api} because it depends on
|
|
8
|
+
* {@link BitcoinApi} which requires network configuration.
|
|
9
|
+
* @public
|
|
10
|
+
*/
|
|
11
|
+
export class DidMethodApi {
|
|
12
|
+
#btc;
|
|
13
|
+
#cas;
|
|
14
|
+
#log;
|
|
15
|
+
constructor(btc, cas, logger) {
|
|
16
|
+
this.#btc = btc;
|
|
17
|
+
this.#cas = cas;
|
|
18
|
+
this.#log = logger ?? NOOP_LOGGER;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Create a deterministic (k1) DID from a public key.
|
|
22
|
+
* Sets idType to KEY automatically.
|
|
23
|
+
* @param genesisBytes The compressed public key bytes (33 bytes).
|
|
24
|
+
* @param options Creation options (idType is set for you).
|
|
25
|
+
* @returns The created DID identifier string.
|
|
26
|
+
*/
|
|
27
|
+
createDeterministic(genesisBytes, options = {}) {
|
|
28
|
+
assertCompressedPubkey(genesisBytes, 'genesisBytes');
|
|
29
|
+
return DidBtcr2.create(genesisBytes, { ...options, idType: IdentifierTypes.KEY });
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Create a non-deterministic (x1) DID from external genesis document bytes.
|
|
33
|
+
* Sets idType to EXTERNAL automatically.
|
|
34
|
+
* @param genesisBytes The genesis document bytes.
|
|
35
|
+
* @param options Creation options (idType is set for you).
|
|
36
|
+
* @returns The created DID identifier string.
|
|
37
|
+
*/
|
|
38
|
+
createExternal(genesisBytes, options = {}) {
|
|
39
|
+
assertBytes(genesisBytes, 'genesisBytes');
|
|
40
|
+
return DidBtcr2.create(genesisBytes, { ...options, idType: IdentifierTypes.EXTERNAL });
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Resolve a DID by driving the sans-I/O {@link Resolver} state machine.
|
|
44
|
+
* If a Bitcoin connection is configured on the API, it is used automatically
|
|
45
|
+
* to fetch beacon signals. Sidecar data flows through `options.sidecar`.
|
|
46
|
+
* @param did The DID to resolve.
|
|
47
|
+
* @param options Resolution options.
|
|
48
|
+
* @returns The resolution result.
|
|
49
|
+
*/
|
|
50
|
+
async resolve(did, options) {
|
|
51
|
+
assertString(did, 'did');
|
|
52
|
+
this.#log.debug('Resolving DID', did);
|
|
53
|
+
try {
|
|
54
|
+
const resolver = DidBtcr2.resolve(did, options);
|
|
55
|
+
let state = resolver.resolve();
|
|
56
|
+
while (state.status === 'action-required') {
|
|
57
|
+
for (const need of state.needs) {
|
|
58
|
+
switch (need.kind) {
|
|
59
|
+
case 'NeedBeaconSignals': {
|
|
60
|
+
if (!this.#btc) {
|
|
61
|
+
throw new Error('Bitcoin connection required to fetch beacon signals. '
|
|
62
|
+
+ 'Configure a BitcoinApi on the DidBtcr2Api instance.');
|
|
63
|
+
}
|
|
64
|
+
this.#log.debug('Fetching beacon signals for %d service(s)', need.beaconServices.length);
|
|
65
|
+
const signals = await BeaconSignalDiscovery.indexer([...need.beaconServices], this.#btc.connection);
|
|
66
|
+
resolver.provide(need, signals);
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
case 'NeedGenesisDocument': {
|
|
70
|
+
if (!this.#cas) {
|
|
71
|
+
throw new Error(`Genesis document required but not in sidecar (hash: ${need.genesisHash}), `
|
|
72
|
+
+ 'and no CAS driver configured. Either provide the genesis document via '
|
|
73
|
+
+ 'options.sidecar.genesisDocument or configure a CAS driver.');
|
|
74
|
+
}
|
|
75
|
+
this.#log.debug('Fetching genesis document from CAS: %s', need.genesisHash);
|
|
76
|
+
const doc = await this.#cas.retrieve(need.genesisHash);
|
|
77
|
+
if (!doc) {
|
|
78
|
+
throw new Error(`Genesis document not found in CAS (hash: ${need.genesisHash}).`);
|
|
79
|
+
}
|
|
80
|
+
resolver.provide(need, doc);
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
case 'NeedCASAnnouncement': {
|
|
84
|
+
if (!this.#cas) {
|
|
85
|
+
throw new Error(`CAS announcement required but not in sidecar (hash: ${need.announcementHash}), `
|
|
86
|
+
+ 'and no CAS driver configured. Either provide it via '
|
|
87
|
+
+ 'options.sidecar.casUpdates or configure a CAS driver.');
|
|
88
|
+
}
|
|
89
|
+
this.#log.debug('Fetching CAS announcement from CAS: %s', need.announcementHash);
|
|
90
|
+
const announcement = await this.#cas.retrieve(need.announcementHash);
|
|
91
|
+
if (!announcement) {
|
|
92
|
+
throw new Error(`CAS announcement not found in CAS (hash: ${need.announcementHash}).`);
|
|
93
|
+
}
|
|
94
|
+
resolver.provide(need, announcement);
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
case 'NeedSignedUpdate': {
|
|
98
|
+
if (!this.#cas) {
|
|
99
|
+
throw new Error(`Signed update required but not in sidecar (hash: ${need.updateHash}), `
|
|
100
|
+
+ 'and no CAS driver configured. Either provide it via '
|
|
101
|
+
+ 'options.sidecar.updates or configure a CAS driver.');
|
|
102
|
+
}
|
|
103
|
+
this.#log.debug('Fetching signed update from CAS: %s', need.updateHash);
|
|
104
|
+
const update = await this.#cas.retrieve(need.updateHash);
|
|
105
|
+
if (!update) {
|
|
106
|
+
throw new Error(`Signed update not found in CAS (hash: ${need.updateHash}).`);
|
|
107
|
+
}
|
|
108
|
+
resolver.provide(need, update);
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
state = resolver.resolve();
|
|
114
|
+
}
|
|
115
|
+
this.#log.debug('DID resolved successfully', did, state.result.metadata);
|
|
116
|
+
return {
|
|
117
|
+
didResolutionMetadata: {},
|
|
118
|
+
didDocument: state.result.didDocument,
|
|
119
|
+
didDocumentMetadata: state.result.metadata,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
catch (err) {
|
|
123
|
+
this.#log.error('DID resolution failed', did, err);
|
|
124
|
+
throw new Error(`Failed to resolve DID: ${did}`, { cause: err });
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Update an existing DID document. If a Bitcoin connection is configured on
|
|
129
|
+
* the API, it is injected automatically.
|
|
130
|
+
* @param params The update parameters.
|
|
131
|
+
* @returns The signed update.
|
|
132
|
+
*/
|
|
133
|
+
async update({ sourceDocument, patches, sourceVersionId, verificationMethodId, beaconId, signingMaterial, bitcoin, }) {
|
|
134
|
+
const btcConnection = bitcoin ?? this.#btc?.connection ?? undefined;
|
|
135
|
+
return await DidBtcr2.update({
|
|
136
|
+
sourceDocument,
|
|
137
|
+
patches,
|
|
138
|
+
sourceVersionId,
|
|
139
|
+
verificationMethodId,
|
|
140
|
+
beaconId,
|
|
141
|
+
signingMaterial,
|
|
142
|
+
bitcoin: btcConnection,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Get the signing method from a DID document by method ID.
|
|
147
|
+
* @param didDocument The DID document.
|
|
148
|
+
* @param methodId The method ID (if omitted, the first signing method is returned).
|
|
149
|
+
* @returns The found signing method.
|
|
150
|
+
*/
|
|
151
|
+
getSigningMethod(didDocument, methodId) {
|
|
152
|
+
return DidBtcr2.getSigningMethod(didDocument, methodId);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Create a fluent builder for a DID update operation.
|
|
156
|
+
* @param sourceDocument The current DID document to update.
|
|
157
|
+
* @returns An {@link UpdateBuilder} for chaining update parameters.
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* ```ts
|
|
161
|
+
* const signed = await api.btcr2
|
|
162
|
+
* .buildUpdate(currentDoc)
|
|
163
|
+
* .patch({ op: 'add', path: '/service/1', value: newService })
|
|
164
|
+
* .version(2)
|
|
165
|
+
* .signer('#initialKey')
|
|
166
|
+
* .beacon('#beacon-0')
|
|
167
|
+
* .execute();
|
|
168
|
+
* ```
|
|
169
|
+
*/
|
|
170
|
+
buildUpdate(sourceDocument) {
|
|
171
|
+
return new UpdateBuilder(this, sourceDocument);
|
|
172
|
+
}
|
|
173
|
+
/** Deactivate a DID (not yet implemented in the core method). */
|
|
174
|
+
async deactivate() {
|
|
175
|
+
throw new NotImplementedError('DidMethodApi.deactivate is not implemented yet.', {
|
|
176
|
+
type: 'DID_API_METHOD_NOT_IMPLEMENTED',
|
|
177
|
+
name: 'NOT_IMPLEMENTED_ERROR'
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Fluent builder for DID update operations. Reduces the cognitive load of
|
|
183
|
+
* the 7-parameter `update()` call by letting callers chain named steps.
|
|
184
|
+
*
|
|
185
|
+
* Created via {@link DidMethodApi.buildUpdate}.
|
|
186
|
+
* @public
|
|
187
|
+
*/
|
|
188
|
+
export class UpdateBuilder {
|
|
189
|
+
#methodApi;
|
|
190
|
+
#sourceDocument;
|
|
191
|
+
#patches = [];
|
|
192
|
+
#sourceVersionId;
|
|
193
|
+
#verificationMethodId;
|
|
194
|
+
#beaconId;
|
|
195
|
+
#signingMaterial;
|
|
196
|
+
#bitcoin;
|
|
197
|
+
/** @internal */
|
|
198
|
+
constructor(methodApi, sourceDocument) {
|
|
199
|
+
this.#methodApi = methodApi;
|
|
200
|
+
this.#sourceDocument = sourceDocument;
|
|
201
|
+
}
|
|
202
|
+
/** Add a single JSON Patch operation. Can be called multiple times. */
|
|
203
|
+
patch(op) {
|
|
204
|
+
this.#patches.push(op);
|
|
205
|
+
return this;
|
|
206
|
+
}
|
|
207
|
+
/** Set all patches at once (replaces any previously added). */
|
|
208
|
+
patches(ops) {
|
|
209
|
+
this.#patches = [...ops];
|
|
210
|
+
return this;
|
|
211
|
+
}
|
|
212
|
+
/** Set the source version ID. */
|
|
213
|
+
version(id) {
|
|
214
|
+
this.#sourceVersionId = id;
|
|
215
|
+
return this;
|
|
216
|
+
}
|
|
217
|
+
/** Set the verification method ID used for signing. */
|
|
218
|
+
signer(methodId) {
|
|
219
|
+
this.#verificationMethodId = methodId;
|
|
220
|
+
return this;
|
|
221
|
+
}
|
|
222
|
+
/** Set the beacon ID for the update announcement. */
|
|
223
|
+
beacon(beaconId) {
|
|
224
|
+
this.#beaconId = beaconId;
|
|
225
|
+
return this;
|
|
226
|
+
}
|
|
227
|
+
/** Set the signing material (secret key bytes or hex). */
|
|
228
|
+
signingMaterial(material) {
|
|
229
|
+
this.#signingMaterial = material;
|
|
230
|
+
return this;
|
|
231
|
+
}
|
|
232
|
+
/** Override the Bitcoin connection for this update. */
|
|
233
|
+
withBitcoin(connection) {
|
|
234
|
+
this.#bitcoin = connection;
|
|
235
|
+
return this;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Execute the update.
|
|
239
|
+
* @throws {Error} If required fields (version, signer, beacon) are missing.
|
|
240
|
+
*/
|
|
241
|
+
async execute() {
|
|
242
|
+
if (this.#sourceVersionId === undefined) {
|
|
243
|
+
throw new Error('UpdateBuilder: sourceVersionId is required. Call .version(id) before .execute().');
|
|
244
|
+
}
|
|
245
|
+
if (!this.#verificationMethodId) {
|
|
246
|
+
throw new Error('UpdateBuilder: verificationMethodId is required. Call .signer(id) before .execute().');
|
|
247
|
+
}
|
|
248
|
+
if (!this.#beaconId) {
|
|
249
|
+
throw new Error('UpdateBuilder: beaconId is required. Call .beacon(id) before .execute().');
|
|
250
|
+
}
|
|
251
|
+
return this.#methodApi.update({
|
|
252
|
+
sourceDocument: this.#sourceDocument,
|
|
253
|
+
patches: this.#patches,
|
|
254
|
+
sourceVersionId: this.#sourceVersionId,
|
|
255
|
+
verificationMethodId: this.#verificationMethodId,
|
|
256
|
+
beaconId: this.#beaconId,
|
|
257
|
+
signingMaterial: this.#signingMaterial,
|
|
258
|
+
bitcoin: this.#bitcoin,
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
//# sourceMappingURL=method.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"method.js","sourceRoot":"","sources":["../../src/method.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAGzE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAIpE,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAG9F;;;;;;GAMG;AACH,MAAM,OAAO,YAAY;IACvB,IAAI,CAAc;IAClB,IAAI,CAAU;IACd,IAAI,CAAS;IAEb,YAAY,GAAgB,EAAE,GAAY,EAAE,MAAe;QACzD,IAAI,CAAC,IAAI,GAAG,GAA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