@did-btcr2/method 0.24.1 → 0.25.2
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/dist/browser.js +1541 -26561
- package/dist/browser.mjs +1541 -26561
- package/dist/cjs/core/beacon/aggregation/cohort/index.js +2 -1
- package/dist/cjs/core/beacon/aggregation/cohort/index.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/communication/adapter/nostr.js +3 -2
- package/dist/cjs/core/beacon/aggregation/communication/adapter/nostr.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/coordinator.js +2 -1
- package/dist/cjs/core/beacon/aggregation/coordinator.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/participant.js +3 -2
- package/dist/cjs/core/beacon/aggregation/participant.js.map +1 -1
- package/dist/cjs/core/beacon/beacon.js.map +1 -1
- package/dist/cjs/core/beacon/cas-beacon.js +120 -7
- package/dist/cjs/core/beacon/cas-beacon.js.map +1 -1
- package/dist/cjs/core/beacon/factory.js +1 -1
- package/dist/cjs/core/beacon/factory.js.map +1 -1
- package/dist/cjs/core/beacon/signal-discovery.js +1 -1
- package/dist/cjs/core/beacon/signal-discovery.js.map +1 -1
- package/dist/cjs/core/beacon/{singleton.js → singleton-beacon.js} +20 -27
- package/dist/cjs/core/beacon/singleton-beacon.js.map +1 -0
- package/dist/cjs/core/beacon/smt-beacon.js +1 -1
- package/dist/cjs/core/beacon/smt-beacon.js.map +1 -1
- package/dist/{esm/core/resolve.js → cjs/core/resolver.js} +241 -93
- package/dist/cjs/core/resolver.js.map +1 -0
- package/dist/cjs/core/update.js +5 -5
- package/dist/cjs/core/update.js.map +1 -1
- package/dist/cjs/did-btcr2.js +39 -96
- package/dist/cjs/did-btcr2.js.map +1 -1
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/cohort/index.js +2 -1
- package/dist/esm/core/beacon/aggregation/cohort/index.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/communication/adapter/nostr.js +3 -2
- package/dist/esm/core/beacon/aggregation/communication/adapter/nostr.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/coordinator.js +2 -1
- package/dist/esm/core/beacon/aggregation/coordinator.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/participant.js +3 -2
- package/dist/esm/core/beacon/aggregation/participant.js.map +1 -1
- package/dist/esm/core/beacon/beacon.js.map +1 -1
- package/dist/esm/core/beacon/cas-beacon.js +120 -7
- package/dist/esm/core/beacon/cas-beacon.js.map +1 -1
- package/dist/esm/core/beacon/factory.js +1 -1
- package/dist/esm/core/beacon/factory.js.map +1 -1
- package/dist/esm/core/beacon/signal-discovery.js +1 -1
- package/dist/esm/core/beacon/signal-discovery.js.map +1 -1
- package/dist/esm/core/beacon/{singleton.js → singleton-beacon.js} +20 -27
- package/dist/esm/core/beacon/singleton-beacon.js.map +1 -0
- package/dist/esm/core/beacon/smt-beacon.js +1 -1
- package/dist/esm/core/beacon/smt-beacon.js.map +1 -1
- package/dist/{cjs/core/resolve.js → esm/core/resolver.js} +241 -93
- package/dist/esm/core/resolver.js.map +1 -0
- package/dist/esm/core/update.js +5 -5
- package/dist/esm/core/update.js.map +1 -1
- package/dist/esm/did-btcr2.js +39 -96
- package/dist/esm/did-btcr2.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/types/core/beacon/aggregation/cohort/index.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/communication/adapter/nostr.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/coordinator.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/participant.d.ts.map +1 -1
- package/dist/types/core/beacon/beacon.d.ts +9 -4
- package/dist/types/core/beacon/beacon.d.ts.map +1 -1
- package/dist/types/core/beacon/cas-beacon.d.ts +26 -7
- package/dist/types/core/beacon/cas-beacon.d.ts.map +1 -1
- package/dist/types/core/beacon/{singleton.d.ts → singleton-beacon.d.ts} +7 -5
- package/dist/types/core/beacon/singleton-beacon.d.ts.map +1 -0
- package/dist/types/core/beacon/smt-beacon.d.ts +4 -3
- package/dist/types/core/beacon/smt-beacon.d.ts.map +1 -1
- package/dist/types/core/interfaces.d.ts +5 -15
- package/dist/types/core/interfaces.d.ts.map +1 -1
- package/dist/types/core/resolver.d.ts +167 -0
- package/dist/types/core/resolver.d.ts.map +1 -0
- package/dist/types/core/update.d.ts +3 -3
- package/dist/types/core/update.d.ts.map +1 -1
- package/dist/types/did-btcr2.d.ts +16 -16
- package/dist/types/did-btcr2.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +5 -6
- package/src/core/beacon/aggregation/cohort/index.ts +2 -1
- package/src/core/beacon/aggregation/communication/adapter/nostr.ts +3 -2
- package/src/core/beacon/aggregation/coordinator.ts +2 -1
- package/src/core/beacon/aggregation/participant.ts +3 -2
- package/src/core/beacon/beacon.ts +9 -5
- package/src/core/beacon/cas-beacon.ts +157 -10
- package/src/core/beacon/factory.ts +1 -1
- package/src/core/beacon/signal-discovery.ts +1 -1
- package/src/core/beacon/{singleton.ts → singleton-beacon.ts} +21 -36
- package/src/core/beacon/smt-beacon.ts +4 -3
- package/src/core/interfaces.ts +5 -16
- package/src/core/{resolve.ts → resolver.ts} +355 -130
- package/src/core/update.ts +7 -7
- package/src/did-btcr2.ts +42 -132
- package/src/index.ts +2 -2
- package/dist/cjs/core/beacon/singleton.js.map +0 -1
- package/dist/cjs/core/resolve.js.map +0 -1
- package/dist/esm/core/beacon/singleton.js.map +0 -1
- package/dist/esm/core/resolve.js.map +0 -1
- package/dist/types/core/beacon/singleton.d.ts.map +0 -1
- package/dist/types/core/resolve.d.ts +0 -93
- package/dist/types/core/resolve.d.ts.map +0 -1
package/dist/esm/did-btcr2.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { IdentifierHrp, INVALID_DID_DOCUMENT, INVALID_DID_UPDATE, METHOD_NOT_SUPPORTED, MethodError,
|
|
2
|
-
import { Did, DidError, DidErrorCode,
|
|
1
|
+
import { IdentifierHrp, INVALID_DID_DOCUMENT, INVALID_DID_UPDATE, METHOD_NOT_SUPPORTED, MethodError, UpdateError } from '@did-btcr2/common';
|
|
2
|
+
import { Did, DidError, DidErrorCode, } from '@web5/dids';
|
|
3
|
+
import * as ecc from '@bitcoinerlab/secp256k1';
|
|
4
|
+
import { hexToBytes } from '@noble/hashes/utils';
|
|
3
5
|
import { initEccLib } from 'bitcoinjs-lib';
|
|
4
|
-
import * as tinysecp from 'tiny-secp256k1';
|
|
5
|
-
import { BeaconUtils } from './core/beacon/utils.js';
|
|
6
6
|
import { Identifier } from './core/identifier.js';
|
|
7
|
-
import {
|
|
7
|
+
import { Resolver } from './core/resolver.js';
|
|
8
8
|
import { Update } from './core/update.js';
|
|
9
9
|
import { Appendix } from './utils/appendix.js';
|
|
10
|
-
/** Initialize
|
|
11
|
-
initEccLib(
|
|
10
|
+
/** Initialize secp256k1 ECC library */
|
|
11
|
+
initEccLib(ecc);
|
|
12
12
|
/**
|
|
13
13
|
* Implements {@link https://dcdpr.github.io/did-btcr2 | did:btcr2 DID Method Specification}.
|
|
14
14
|
* did:btcr2 is a censorship-resistant Decentralized Identifier (DID) method using
|
|
@@ -35,7 +35,7 @@ export class DidBtcr2 {
|
|
|
35
35
|
* @param {string} options.idType The type of identifier to create, either 'KEY' or 'EXTERNAL'. Defaults to 'KEY'.
|
|
36
36
|
* @param {number} options.version The version number of the did:btcr2 specification to use for creating the identifier. Defaults to 1.
|
|
37
37
|
* @param {string} options.network The Bitcoin network to use for the identifier, e.g. 'bitcoin', 'testnet', etc. Defaults to 'bitcoin'.
|
|
38
|
-
* @returns {Promise<
|
|
38
|
+
* @returns {Promise<string>} Promise resolving to an identifier string.
|
|
39
39
|
* @throws {MethodError} if any of the checks fail
|
|
40
40
|
* @example
|
|
41
41
|
* ```ts
|
|
@@ -54,99 +54,42 @@ export class DidBtcr2 {
|
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
56
|
* Entry point for section {@link https://dcdpr.github.io/did-btcr2/operations/resolve.html | 7.2 Resolve}.
|
|
57
|
-
* See specification for the {@link https://dcdpr.github.io/did-btcr2/operations/resolve.html#process | Resolve Process}.
|
|
58
|
-
* See {@link Resolve | Resolve (class)} for class implementation.
|
|
59
57
|
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* deterministically created from the DID or provided by Sidecar Data.
|
|
58
|
+
* Factory method that performs pure setup and returns a {@link Resolver} state machine.
|
|
59
|
+
* The caller drives resolution by calling `resolver.resolve()` and `resolver.provide()`.
|
|
60
|
+
* Analogous to Rust's `Document::read()`.
|
|
64
61
|
*
|
|
65
62
|
* @param {string} did The did:btcr2 identifier to be resolved.
|
|
66
63
|
* @param {ResolutionOptions} resolutionOptions Options used during the resolution process.
|
|
67
|
-
* @returns {
|
|
68
|
-
* @throws {ResolveError} If the resolution process fails at any step.
|
|
64
|
+
* @returns {Resolver} A sans-I/O state machine the caller drives to completion.
|
|
69
65
|
* @example
|
|
70
66
|
* ```ts
|
|
71
|
-
* const
|
|
72
|
-
*
|
|
73
|
-
* )
|
|
67
|
+
* const resolver = DidBtcr2.resolve(did, { sidecar });
|
|
68
|
+
* let state = resolver.resolve();
|
|
69
|
+
* while (state.status === 'action-required') {
|
|
70
|
+
* for (const need of state.needs) { ... provide data ... }
|
|
71
|
+
* state = resolver.resolve();
|
|
72
|
+
* }
|
|
73
|
+
* const { didDocument, metadata } = state.result;
|
|
74
74
|
* ```
|
|
75
75
|
*/
|
|
76
|
-
static
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const didComponents = Identifier.decode(did);
|
|
94
|
-
// Process sidecar if provided
|
|
95
|
-
const sidecarData = Resolve.sidecarData(resolutionOptions.sidecar);
|
|
96
|
-
// Parse the genesis document from the resolution options if provided
|
|
97
|
-
const genesisDocument = resolutionOptions.sidecar?.genesisDocument;
|
|
98
|
-
// Since genesisDocument is optional, check if it exists
|
|
99
|
-
if (!genesisDocument) {
|
|
100
|
-
// If no genesisDocument and x HRP, throw MISSING_UPDATE_DATA error
|
|
101
|
-
if (didComponents.hrp === IdentifierHrp.x)
|
|
102
|
-
throw new ResolveError('External resolution requires genesisDocument', MISSING_UPDATE_DATA, resolutionOptions);
|
|
103
|
-
}
|
|
104
|
-
// Establish the current document
|
|
105
|
-
const currentDocument = await Resolve.currentDocument(didComponents, genesisDocument);
|
|
106
|
-
// Extract all Beacon services from the current DID Document
|
|
107
|
-
const beaconServices = currentDocument.service
|
|
108
|
-
.filter(BeaconUtils.isBeaconService)
|
|
109
|
-
.map(BeaconUtils.parseBeaconServiceEndpoint);
|
|
110
|
-
// Check if bitcoin driver provided
|
|
111
|
-
if (!resolutionOptions?.drivers?.bitcoin) {
|
|
112
|
-
throw new ResolveError('Bitcoin connection required for resolve. Pass a configured driver via '
|
|
113
|
-
+ 'resolutionOptions.drivers.bitcoin or use DidBtcr2Api which injects it automatically.', MISSING_RESOLUTION_OPTIONS, resolutionOptions);
|
|
114
|
-
}
|
|
115
|
-
// Get the bitcoin driver from the resolution options
|
|
116
|
-
const bitcoin = resolutionOptions.drivers.bitcoin;
|
|
117
|
-
// Process the Beacon Signals to get the required updates
|
|
118
|
-
const unsortedUpdates = await Resolve.beaconSignals(beaconServices, sidecarData, bitcoin);
|
|
119
|
-
// If no updates found, return the current document
|
|
120
|
-
if (!unsortedUpdates.length) {
|
|
121
|
-
// Set the didDocument in didResolutionResult based on currentDocument
|
|
122
|
-
didResolutionResult.didDocument = currentDocument;
|
|
123
|
-
// Set other required fields in the didResolutionResult
|
|
124
|
-
didResolutionResult.didDocumentMetadata.deactivated = !!currentDocument.deactivated;
|
|
125
|
-
didResolutionResult.didDocumentMetadata.versionId = versionId ?? '1';
|
|
126
|
-
// Return the didResolutionResult early
|
|
127
|
-
return didResolutionResult;
|
|
128
|
-
}
|
|
129
|
-
// Process the updates to apply updates to bring the current DID Document to its more current state
|
|
130
|
-
const result = await Resolve.updates(currentDocument, unsortedUpdates, resolutionOptions.versionTime, versionId);
|
|
131
|
-
// Set all of the required fields in the didResolutionResult
|
|
132
|
-
didResolutionResult.didDocument = result.didDocument;
|
|
133
|
-
didResolutionResult.didDocumentMetadata = result.metadata;
|
|
134
|
-
// Return didResolutionResult;
|
|
135
|
-
return didResolutionResult;
|
|
136
|
-
}
|
|
137
|
-
catch (error) {
|
|
138
|
-
// Rethrow any unexpected errors that are not a `ResolveError`.
|
|
139
|
-
if (!(error instanceof ResolveError))
|
|
140
|
-
throw new Error(error.message ?? error, { cause: error });
|
|
141
|
-
// Return a DID Resolution Result with the appropriate error code.
|
|
142
|
-
return {
|
|
143
|
-
...EMPTY_DID_RESOLUTION_RESULT,
|
|
144
|
-
didResolutionMetadata: {
|
|
145
|
-
error: error.type,
|
|
146
|
-
...error.message && { errorMessage: error.message }
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
}
|
|
76
|
+
static resolve(did, resolutionOptions = {}) {
|
|
77
|
+
// Decode the did to be resolved
|
|
78
|
+
const didComponents = Identifier.decode(did);
|
|
79
|
+
// Process sidecar if provided
|
|
80
|
+
const sidecarData = Resolver.sidecarData(resolutionOptions.sidecar);
|
|
81
|
+
// Establish the current document for KEY identifiers (pure, synchronous).
|
|
82
|
+
// For EXTERNAL identifiers, defer to the Resolver's GenesisDocument phase
|
|
83
|
+
// since validation (Resolve.external) is async.
|
|
84
|
+
const currentDocument = didComponents.hrp === IdentifierHrp.k
|
|
85
|
+
? Resolver.deterministic(didComponents)
|
|
86
|
+
: null;
|
|
87
|
+
// Return the sans-I/O state machine
|
|
88
|
+
return new Resolver(didComponents, sidecarData, currentDocument, {
|
|
89
|
+
versionId: resolutionOptions.versionId,
|
|
90
|
+
versionTime: resolutionOptions.versionTime,
|
|
91
|
+
genesisDocument: resolutionOptions.sidecar?.genesisDocument
|
|
92
|
+
});
|
|
150
93
|
}
|
|
151
94
|
/**
|
|
152
95
|
* Entry point for section {@link https://dcdpr.github.io/did-btcr2/#read | 7.3 Update}.
|
|
@@ -175,7 +118,7 @@ export class DidBtcr2 {
|
|
|
175
118
|
}
|
|
176
119
|
// Convert signingMaterial to bytes if it's a hex string
|
|
177
120
|
const secretKey = typeof signingMaterial === 'string'
|
|
178
|
-
?
|
|
121
|
+
? hexToBytes(signingMaterial)
|
|
179
122
|
: signingMaterial;
|
|
180
123
|
// Validate that the verificationMethodId is authorized for capabilityInvocation
|
|
181
124
|
if (!sourceDocument.capabilityInvocation?.some(vr => vr === verificationMethodId)) {
|
|
@@ -196,9 +139,9 @@ export class DidBtcr2 {
|
|
|
196
139
|
throw new UpdateError('Invalid verificationMethodId: publicKeyMultibase prefix must start with "zQ3s"', INVALID_DID_DOCUMENT, verificationMethod);
|
|
197
140
|
}
|
|
198
141
|
// Construct an unsigned update following the BTCR2 Update construction algorithm
|
|
199
|
-
const update =
|
|
142
|
+
const update = Update.construct(sourceDocument, patches, sourceVersionId);
|
|
200
143
|
// Sign the unsigned update using the specified verification method
|
|
201
|
-
const signed =
|
|
144
|
+
const signed = Update.sign(sourceDocument.id, update, verificationMethod, secretKey);
|
|
202
145
|
// Filter sourceDocument services to get beaconServices matching beaconIds
|
|
203
146
|
const beaconService = sourceDocument.service
|
|
204
147
|
.filter((service) => service.id === beaconId)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"did-btcr2.js","sourceRoot":"","sources":["../../src/did-btcr2.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAElB,oBAAoB,EACpB,WAAW,
|
|
1
|
+
{"version":3,"file":"did-btcr2.js","sourceRoot":"","sources":["../../src/did-btcr2.ts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,CAAC;QAEF,qDAAqD;QACrD,IAAI,CAAC,CAAC,kBAAkB,IAAI,kBAAkB,CAAC,kBAAkB,CAAC,EAAE,CAAC;YACnE,MAAM,IAAI,QAAQ,CAChB,YAAY,CAAC,aAAa,EAC1B,0FAA0F,CAC3F,CAAC;QACJ,CAAC;QACD,OAAO,kBAA2C,CAAC;IACrD,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -28,12 +28,12 @@ export * from './core/beacon/error.js';
|
|
|
28
28
|
export * from './core/beacon/factory.js';
|
|
29
29
|
export * from './core/beacon/interfaces.js';
|
|
30
30
|
export * from './core/beacon/signal-discovery.js';
|
|
31
|
-
export * from './core/beacon/singleton.js';
|
|
31
|
+
export * from './core/beacon/singleton-beacon.js';
|
|
32
32
|
export * from './core/beacon/smt-beacon.js';
|
|
33
33
|
export * from './core/beacon/utils.js';
|
|
34
34
|
export * from './core/identifier.js';
|
|
35
35
|
export * from './core/interfaces.js';
|
|
36
|
-
export * from './core/
|
|
36
|
+
export * from './core/resolver.js';
|
|
37
37
|
export * from './core/types.js';
|
|
38
38
|
export * from './core/update.js';
|
|
39
39
|
export * from './utils/appendix.js';
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2CAA2C,CAAC;AAC1D,cAAc,4CAA4C,CAAC;AAE3D,cAAc,mDAAmD,CAAC;AAClE,cAAc,wDAAwD,CAAC;AACvE,cAAc,oDAAoD,CAAC;AACnE,cAAc,gEAAgE,CAAC;AAC/E,cAAc,mEAAmE,CAAC;AAClF,cAAc,kEAAkE,CAAC;AACjF,cAAc,mEAAmE,CAAC;AAClF,cAAc,4DAA4D,CAAC;AAC3E,cAAc,oEAAoE,CAAC;AACnF,cAAc,yEAAyE,CAAC;AACxF,cAAc,sEAAsE,CAAC;AACrF,cAAc,qEAAqE,CAAC;AACpF,cAAc,2EAA2E,C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c,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,wBAAwB,CAAC;AAEvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AAEjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AAExC,cAAc,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/core/beacon/aggregation/cohort/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/core/beacon/aggregation/cohort/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,mCAAmC,EAAE,MAAM,sCAAsC,CAAC;AAC3F,OAAO,EAAiB,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEhE,MAAM,MAAM,kBAAkB,GAAG;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB,CAAA;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,kBAAkB,C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AQ,IAAI,IAAI;IAgBvB;;;;OAIG;IACI,qBAAqB,IAAI,MAAM;IA8BtC;;;;;OAKG;IACI,qBAAqB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,wBAAwB;IAahF;;;;OAIG;IACI,mBAAmB,CAAC,OAAO,EAAE,mCAAmC,GAAG,IAAI;IAY9E;;;;OAIG;IACI,wBAAwB,CAAC,OAAO,EAAE,mCAAmC,GAAG,OAAO;IAetF;;;OAGG;IACI,mBAAmB,IAAI,0BAA0B;IAcxD;;;OAGG;IACI,MAAM,IAAI,YAAY;CAc9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nostr.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/beacon/aggregation/communication/adapter/nostr.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAgC,iBAAiB,EAAsC,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"nostr.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/beacon/aggregation/communication/adapter/nostr.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAgC,iBAAiB,EAAsC,MAAM,oBAAoB,CAAC;AAIzH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAa9C,OAAO,EAA0B,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACpG,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,cAAc,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEnI;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,UAKhC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,iBAAiB,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,EAAE;QACV,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED;;;;;;GAMG;AACH,qBAAa,YAAa,YAAW,oBAAoB;;IACvD;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAW;IAEvB;;;OAGG;IACH,MAAM,EAAE,kBAAkB,CAAC;IAQ3B;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAElB;;;;;OAKG;gBACS,MAAM,GAAE,kBAAoG;IAUxH;;;OAGG;IACI,OAAO,CAAC,IAAI,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAKrE;;;;OAIG;IACI,KAAK,IAAI,cAAc,CAAC,YAAY,CAAC;IAkB5C;;;;OAIG;YACW,OAAO;IAuCrB;;;;OAIG;IACI,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;IAKjF;;;;;;;;OAQG;IACU,WAAW,CAAC,OAAO,EAAE,0BAA0B,GAAG,WAAW,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;IA2FnI;;;;;OAKG;IACI,gBAAgB,CAAC,IAAI,CAAC,EAAE,iBAAiB,GAAG,oBAAoB;CAwBxE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coordinator.d.ts","sourceRoot":"","sources":["../../../../../src/core/beacon/aggregation/coordinator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"coordinator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,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC;IAmB7E;;;;;;OAMG;IACG,eAAe,CACnB,eAAe,EAAE,MAAM,EACvB,OAAO,GAAE,MAAoB,EAC7B,UAAU,GAAE,MAAoB,GAC/B,OAAO,CAAC,qBAAqB,CAAC;IAkBjC;;;;OAIG;IACG,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IA0B3E;;;;;OAKG;IACG,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAsBhF;;;;OAIG;IACH,MAAM,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,iBAAiB;CAUvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"participant.d.ts","sourceRoot":"","sources":["../../../../../src/core/beacon/aggregation/participant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"participant.d.ts","sourceRoot":"","sources":["../../../../../src/core/beacon/aggregation/participant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAKrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAQ1D,OAAO,EAA6B,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAC3G,OAAO,EAA4B,kBAAkB,EAAE,MAAM,0CAA0C,CAAC;AAIxG,OAAO,EAAsC,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAC9H,OAAO,EAA2C,iCAAiC,EAAE,MAAM,iDAAiD,CAAC;AAM7I,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CA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;;;;;OAOG;WACW,UAAU,CAAC,GAAG,EAAE,IAAI,GAAG,QAAQ,EAAE,QAAQ,EAAE,oBAAoB,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,iBAAiB;CAG9H"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { KeyBytes } from '@did-btcr2/common';
|
|
2
2
|
import { BitcoinConnection } from '@did-btcr2/bitcoin';
|
|
3
|
-
import { SignedBTCR2Update } from '
|
|
3
|
+
import { SignedBTCR2Update } from '@did-btcr2/cryptosuite';
|
|
4
|
+
import type { BeaconProcessResult } from '../resolver.js';
|
|
4
5
|
import { SidecarData } from '../types.js';
|
|
5
|
-
import { BeaconService, BeaconSignal
|
|
6
|
+
import { BeaconService, BeaconSignal } from './interfaces.js';
|
|
6
7
|
/**
|
|
7
8
|
* Abstract base class for all BTCR2 Beacon types.
|
|
8
9
|
* A Beacon is a service listed in a BTCR2 DID document that informs resolvers
|
|
@@ -27,11 +28,15 @@ export declare abstract class Beacon {
|
|
|
27
28
|
/**
|
|
28
29
|
* Processes an array of Beacon Signals to extract BTCR2 Signed Updates.
|
|
29
30
|
* Used during the resolve path.
|
|
31
|
+
*
|
|
32
|
+
* Returns successfully resolved updates and any data needs that must be
|
|
33
|
+
* satisfied before remaining signals can be processed.
|
|
34
|
+
*
|
|
30
35
|
* @param {Array<BeaconSignal>} signals The beacon signals discovered on-chain.
|
|
31
36
|
* @param {SidecarData} sidecar The processed sidecar data containing update/CAS/SMT maps.
|
|
32
|
-
* @returns {
|
|
37
|
+
* @returns {BeaconProcessResult} The updates and any data needs.
|
|
33
38
|
*/
|
|
34
|
-
abstract processSignals(signals: Array<BeaconSignal>, sidecar: SidecarData):
|
|
39
|
+
abstract processSignals(signals: Array<BeaconSignal>, sidecar: SidecarData): BeaconProcessResult;
|
|
35
40
|
/**
|
|
36
41
|
* Broadcasts a signed update as a Beacon Signal to the Bitcoin network.
|
|
37
42
|
* Used during the update path.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beacon.d.ts","sourceRoot":"","sources":["../../../../src/core/beacon/beacon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"beacon.d.ts","sourceRoot":"","sources":["../../../../src/core/beacon/beacon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE9D;;;;;;;;;;;;;;GAcG;AACH,8BAAsB,MAAM;IAC1B;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;gBAEpB,OAAO,EAAE,aAAa;IAIlC;;;;;;;;;;OAUG;IACH,QAAQ,CAAC,cAAc,CACrB,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,EAC5B,OAAO,EAAE,WAAW,GACnB,mBAAmB;IAEtB;;;;;;;OAOG;IACH,QAAQ,CAAC,eAAe,CACtB,YAAY,EAAE,iBAAiB,EAC/B,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,iBAAiB,CAAC;CAC9B"}
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import { BitcoinConnection } from '@did-btcr2/bitcoin';
|
|
2
2
|
import { KeyBytes } from '@did-btcr2/common';
|
|
3
3
|
import { SignedBTCR2Update } from '@did-btcr2/cryptosuite';
|
|
4
|
+
import type { BeaconProcessResult } from '../resolver.js';
|
|
4
5
|
import { SidecarData } from '../types.js';
|
|
5
6
|
import { Beacon } from './beacon.js';
|
|
6
|
-
import { BeaconService, BeaconSignal
|
|
7
|
+
import { BeaconService, BeaconSignal } from './interfaces.js';
|
|
7
8
|
/**
|
|
8
9
|
* Implements {@link https://dcdpr.github.io/did-btcr2/terminology.html#cas-beacon | CAS Beacon}.
|
|
10
|
+
*
|
|
11
|
+
* A CAS (Content-Addressed Store) Beacon aggregates updates for multiple DIDs
|
|
12
|
+
* into a single CAS Announcement — a mapping of DIDs to their update hashes.
|
|
13
|
+
* The hash of the CAS Announcement is broadcast on-chain via OP_RETURN.
|
|
14
|
+
* During resolution, the CAS Announcement is retrieved from the sidecar (or CAS)
|
|
15
|
+
* and used to look up the individual signed update for the DID being resolved.
|
|
16
|
+
*
|
|
9
17
|
* @class CASBeacon
|
|
10
18
|
* @type {CASBeacon}
|
|
11
19
|
* @extends {Beacon}
|
|
@@ -18,19 +26,30 @@ export declare class CASBeacon extends Beacon {
|
|
|
18
26
|
constructor(service: BeaconService);
|
|
19
27
|
/**
|
|
20
28
|
* Implements {@link https://dcdpr.github.io/did-btcr2/operations/resolve.html#process-cas-beacon | 7.2.e.1 Process CAS Beacon}.
|
|
29
|
+
*
|
|
30
|
+
* For each signal, the signalBytes contain the hex-encoded hash of a CAS Announcement.
|
|
31
|
+
* The CAS Announcement maps DIDs to their base64url-encoded update hashes.
|
|
32
|
+
* This method looks up the CAS Announcement from the sidecar, extracts the update
|
|
33
|
+
* hash for the DID being resolved, and retrieves the corresponding signed update.
|
|
34
|
+
*
|
|
21
35
|
* @param {Array<BeaconSignal>} signals The array of Beacon Signals to process.
|
|
22
36
|
* @param {SidecarData} sidecar The sidecar data associated with the CAS Beacon.
|
|
23
|
-
* @returns {
|
|
24
|
-
* @throws {CASBeaconError} if
|
|
37
|
+
* @returns {BeaconProcessResult} Successfully resolved updates and any data needs.
|
|
38
|
+
* @throws {CASBeaconError} if hash verification fails (validation errors only).
|
|
25
39
|
*/
|
|
26
|
-
processSignals(signals: Array<BeaconSignal>, sidecar: SidecarData):
|
|
40
|
+
processSignals(signals: Array<BeaconSignal>, sidecar: SidecarData): BeaconProcessResult;
|
|
27
41
|
/**
|
|
28
|
-
*
|
|
42
|
+
* Broadcasts a CAS Beacon signal to the Bitcoin network.
|
|
43
|
+
*
|
|
44
|
+
* Creates a CAS Announcement mapping the DID to the update hash, then broadcasts
|
|
45
|
+
* the hash of the announcement via OP_RETURN. The CAS Announcement is distributed
|
|
46
|
+
* to resolvers via sidecar data.
|
|
47
|
+
*
|
|
29
48
|
* @param {SignedBTCR2Update} signedUpdate The signed BTCR2 update to broadcast.
|
|
30
49
|
* @param {KeyBytes} secretKey The secret key for signing the Bitcoin transaction.
|
|
31
50
|
* @param {BitcoinConnection} bitcoin The Bitcoin network connection.
|
|
32
|
-
* @
|
|
33
|
-
* @throws {CASBeaconError} if
|
|
51
|
+
* @returns {Promise<SignedBTCR2Update>} The signed update that was broadcast.
|
|
52
|
+
* @throws {CASBeaconError} if the bitcoin address is invalid or unfunded.
|
|
34
53
|
*/
|
|
35
54
|
broadcastSignal(signedUpdate: SignedBTCR2Update, secretKey: KeyBytes, bitcoin: BitcoinConnection): Promise<SignedBTCR2Update>;
|
|
36
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cas-beacon.d.ts","sourceRoot":"","sources":["../../../../src/core/beacon/cas-beacon.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"cas-beacon.d.ts","sourceRoot":"","sources":["../../../../src/core/beacon/cas-beacon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAqD,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAChG,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAI3D,OAAO,KAAK,EAAE,mBAAmB,EAAY,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAiB,MAAM,iBAAiB,CAAC;AAE7E;;;;;;;;;;;;GAYG;AACH,qBAAa,SAAU,SAAQ,MAAM;IACnC;;;OAGG;gBACS,OAAO,EAAE,aAAa;IAIlC;;;;;;;;;;;;OAYG;IACH,cAAc,CACZ,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,EAC5B,OAAO,EAAE,WAAW,GACnB,mBAAmB;IAmDtB;;;;;;;;;;;;OAYG;IACG,eAAe,CACnB,YAAY,EAAE,iBAAiB,EAC/B,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,iBAAiB,CAAC;CAiF9B"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BitcoinConnection } from '@did-btcr2/bitcoin';
|
|
2
2
|
import { KeyBytes } from '@did-btcr2/common';
|
|
3
3
|
import { SignedBTCR2Update } from '@did-btcr2/cryptosuite';
|
|
4
|
+
import type { BeaconProcessResult } from '../resolver.js';
|
|
4
5
|
import { SidecarData } from '../types.js';
|
|
5
6
|
import { Beacon } from './beacon.js';
|
|
6
|
-
import { BeaconService, BeaconSignal
|
|
7
|
+
import { BeaconService, BeaconSignal } from './interfaces.js';
|
|
7
8
|
/**
|
|
8
9
|
* Implements {@link https://dcdpr.github.io/did-btcr2/terminology.html#singleton-beacon | Singleton Beacon}.
|
|
9
10
|
* @class SingletonBeacon
|
|
@@ -18,10 +19,11 @@ export declare class SingletonBeacon extends Beacon {
|
|
|
18
19
|
constructor(service: BeaconService);
|
|
19
20
|
/**
|
|
20
21
|
* Processes an array of Beacon Signals associated with a Singleton Beacon Service.
|
|
21
|
-
* @
|
|
22
|
-
* @
|
|
22
|
+
* @param {Array<BeaconSignal>} signals The beacon signals discovered on-chain.
|
|
23
|
+
* @param {SidecarData} sidecar The processed sidecar data.
|
|
24
|
+
* @returns {BeaconProcessResult} Successfully resolved updates and any data needs.
|
|
23
25
|
*/
|
|
24
|
-
processSignals(signals: Array<BeaconSignal>, sidecar: SidecarData):
|
|
26
|
+
processSignals(signals: Array<BeaconSignal>, sidecar: SidecarData): BeaconProcessResult;
|
|
25
27
|
/**
|
|
26
28
|
* Broadcasts a SingletonBeacon signal to the Bitcoin network.
|
|
27
29
|
* @param {SignedBTCR2Update} signedUpdate The signed BTCR2 update to broadcast.
|
|
@@ -32,4 +34,4 @@ export declare class SingletonBeacon extends Beacon {
|
|
|
32
34
|
*/
|
|
33
35
|
broadcastSignal(signedUpdate: SignedBTCR2Update, secretKey: KeyBytes, bitcoin: BitcoinConnection): Promise<SignedBTCR2Update>;
|
|
34
36
|
}
|
|
35
|
-
//# sourceMappingURL=singleton.d.ts.map
|
|
37
|
+
//# sourceMappingURL=singleton-beacon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"singleton-beacon.d.ts","sourceRoot":"","sources":["../../../../src/core/beacon/singleton-beacon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAAsC,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACjF,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAI3D,OAAO,KAAK,EAAE,mBAAmB,EAAY,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAiB,MAAM,iBAAiB,CAAC;AAE7E;;;;;GAKG;AACH,qBAAa,eAAgB,SAAQ,MAAM;IAEzC;;;OAGG;gBACS,OAAO,EAAE,aAAa;IAIlC;;;;;OAKG;IACH,cAAc,CACZ,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,EAC5B,OAAO,EAAE,WAAW,GACnB,mBAAmB;IA0BtB;;;;;;;OAOG;IACG,eAAe,CACnB,YAAY,EAAE,iBAAiB,EAC/B,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,iBAAiB,CAAC;CAsE9B"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { BitcoinConnection } from '@did-btcr2/bitcoin';
|
|
2
2
|
import { KeyBytes } from '@did-btcr2/common';
|
|
3
3
|
import { SignedBTCR2Update } from '@did-btcr2/cryptosuite';
|
|
4
|
+
import type { BeaconProcessResult } from '../resolver.js';
|
|
4
5
|
import { SidecarData } from '../types.js';
|
|
5
6
|
import { Beacon } from './beacon.js';
|
|
6
|
-
import { BeaconService, BeaconSignal
|
|
7
|
+
import { BeaconService, BeaconSignal } from './interfaces.js';
|
|
7
8
|
/**
|
|
8
9
|
* Implements {@link https://dcdpr.github.io/did-btcr2/terminology.html#smt-beacon | SMTBeacon}.
|
|
9
10
|
* @class SMTBeacon
|
|
@@ -20,10 +21,10 @@ export declare class SMTBeacon extends Beacon {
|
|
|
20
21
|
* Implements {@link https://dcdpr.github.io/did-btcr2/operations/resolve.html#process-smt-beacon | 7.2.e.1 Process SMT Beacon}.
|
|
21
22
|
* @param {Array<BeaconSignal>} signals The array of Beacon Signals to process.
|
|
22
23
|
* @param {SidecarData} sidecar The sidecar data associated with the SMT Beacon.
|
|
23
|
-
* @returns {
|
|
24
|
+
* @returns {BeaconProcessResult} The processed signals.
|
|
24
25
|
* @throws {SMTBeaconError} if processing fails.
|
|
25
26
|
*/
|
|
26
|
-
processSignals(signals: Array<BeaconSignal>, sidecar: SidecarData):
|
|
27
|
+
processSignals(signals: Array<BeaconSignal>, sidecar: SidecarData): BeaconProcessResult;
|
|
27
28
|
/**
|
|
28
29
|
* Broadcast CAS Beacon signal to the Bitcoin network.
|
|
29
30
|
* @param {SignedBTCR2Update} signedUpdate The signed BTCR2 update to broadcast.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smt-beacon.d.ts","sourceRoot":"","sources":["../../../../src/core/beacon/smt-beacon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"smt-beacon.d.ts","sourceRoot":"","sources":["../../../../src/core/beacon/smt-beacon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE9D;;;;;GAKG;AACH,qBAAa,SAAU,SAAQ,MAAM;IACnC;;;OAGG;gBACS,OAAO,EAAE,aAAa;IAIlC;;;;;;OAMG;IACH,cAAc,CACZ,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,EAC5B,OAAO,EAAE,WAAW,GACnB,mBAAmB;IAItB;;;;;;;OAOG;IACG,eAAe,CACnB,YAAY,EAAE,iBAAiB,EAC/B,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,iBAAiB,CAAC;CAG9B"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { BitcoinConnection } from '@did-btcr2/bitcoin';
|
|
2
1
|
import { DidResolutionOptions } from '@web5/dids';
|
|
3
2
|
import { Sidecar } from './types.js';
|
|
4
3
|
export interface RootCapability {
|
|
@@ -10,8 +9,12 @@ export interface RootCapability {
|
|
|
10
9
|
/**
|
|
11
10
|
* See {@link https://dcdpr.github.io/did-btcr2/data-structures.html#resolution-options-example-panel-show | Resolution Options}
|
|
12
11
|
* for data structure details.
|
|
12
|
+
*
|
|
13
|
+
* Resolution is now fully sans-I/O via the {@link Resolver} state machine.
|
|
14
|
+
* External data (Bitcoin signals, CAS data) is provided through the
|
|
15
|
+
* `resolver.resolve()` / `resolver.provide()` protocol.
|
|
13
16
|
*/
|
|
14
|
-
export interface
|
|
17
|
+
export interface ResolutionOptions extends DidResolutionOptions {
|
|
15
18
|
/**
|
|
16
19
|
* Optional ASCII string representation of the specific version of a DID document
|
|
17
20
|
* to be resolved.
|
|
@@ -29,19 +32,6 @@ export interface ResolutionOptionsCore extends DidResolutionOptions {
|
|
|
29
32
|
*/
|
|
30
33
|
sidecar?: Sidecar;
|
|
31
34
|
}
|
|
32
|
-
/**
|
|
33
|
-
* Full set of resolution options for the did:btcr2 method. See {@link ResolutionOptionsCore}
|
|
34
|
-
* for the resolution options defined by the specification.
|
|
35
|
-
* @extends ResolutionOptionsCore
|
|
36
|
-
*/
|
|
37
|
-
export interface ResolutionOptions extends ResolutionOptionsCore {
|
|
38
|
-
/**
|
|
39
|
-
* Drivers for interacting with external systems, such as the Bitcoin network.
|
|
40
|
-
*/
|
|
41
|
-
drivers?: {
|
|
42
|
-
bitcoin?: BitcoinConnection;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
35
|
/**
|
|
46
36
|
* {@link https://dcdpr.github.io/did-btcr2/terminology.html#smt-proof | SMT Proof}
|
|
47
37
|
* a set of SHA-256 hashes for nodes in a Sparse Merkle Tree that together form
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/core/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/core/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,WAAW,cAAc;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAkB,SAAQ,oBAAoB;IAC7D;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB"}
|