@did-btcr2/method 0.19.0 → 0.22.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 +223 -1
- package/dist/browser.js +3496 -4202
- package/dist/browser.mjs +3496 -4202
- package/dist/cjs/core/beacon/beacon.js +25 -0
- package/dist/cjs/core/beacon/beacon.js.map +1 -0
- package/dist/cjs/core/beacon/cas-beacon.js +20 -36
- package/dist/cjs/core/beacon/cas-beacon.js.map +1 -1
- package/dist/cjs/core/beacon/error.js +4 -4
- package/dist/cjs/core/beacon/error.js.map +1 -1
- package/dist/cjs/core/beacon/factory.js +5 -7
- package/dist/cjs/core/beacon/factory.js.map +1 -1
- package/dist/cjs/core/beacon/interfaces.js +1 -31
- package/dist/cjs/core/beacon/interfaces.js.map +1 -1
- package/dist/cjs/core/beacon/signal-discovery.js +183 -0
- package/dist/cjs/core/beacon/signal-discovery.js.map +1 -0
- package/dist/cjs/core/beacon/singleton.js +56 -86
- package/dist/cjs/core/beacon/singleton.js.map +1 -1
- package/dist/cjs/core/beacon/smt-beacon.js +22 -39
- package/dist/cjs/core/beacon/smt-beacon.js.map +1 -1
- package/dist/cjs/core/beacon/utils.js +4 -9
- package/dist/cjs/core/beacon/utils.js.map +1 -1
- package/dist/cjs/core/resolve.js +121 -307
- package/dist/cjs/core/resolve.js.map +1 -1
- package/dist/cjs/core/update.js +62 -154
- package/dist/cjs/core/update.js.map +1 -1
- package/dist/cjs/did-btcr2.js +100 -91
- package/dist/cjs/did-btcr2.js.map +1 -1
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utils/appendix.js +6 -15
- package/dist/cjs/utils/appendix.js.map +1 -1
- package/dist/cjs/utils/did-document-builder.js +5 -6
- package/dist/cjs/utils/did-document-builder.js.map +1 -1
- package/dist/cjs/utils/did-document.js +42 -38
- package/dist/cjs/utils/did-document.js.map +1 -1
- package/dist/esm/core/beacon/beacon.js +25 -0
- package/dist/esm/core/beacon/beacon.js.map +1 -0
- package/dist/esm/core/beacon/cas-beacon.js +20 -36
- package/dist/esm/core/beacon/cas-beacon.js.map +1 -1
- package/dist/esm/core/beacon/error.js +4 -4
- package/dist/esm/core/beacon/error.js.map +1 -1
- package/dist/esm/core/beacon/factory.js +5 -7
- package/dist/esm/core/beacon/factory.js.map +1 -1
- package/dist/esm/core/beacon/interfaces.js +1 -31
- package/dist/esm/core/beacon/interfaces.js.map +1 -1
- package/dist/esm/core/beacon/signal-discovery.js +183 -0
- package/dist/esm/core/beacon/signal-discovery.js.map +1 -0
- package/dist/esm/core/beacon/singleton.js +56 -86
- package/dist/esm/core/beacon/singleton.js.map +1 -1
- package/dist/esm/core/beacon/smt-beacon.js +22 -39
- package/dist/esm/core/beacon/smt-beacon.js.map +1 -1
- package/dist/esm/core/beacon/utils.js +4 -9
- package/dist/esm/core/beacon/utils.js.map +1 -1
- package/dist/esm/core/resolve.js +121 -307
- package/dist/esm/core/resolve.js.map +1 -1
- package/dist/esm/core/update.js +62 -154
- package/dist/esm/core/update.js.map +1 -1
- package/dist/esm/did-btcr2.js +100 -91
- package/dist/esm/did-btcr2.js.map +1 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/appendix.js +6 -15
- package/dist/esm/utils/appendix.js.map +1 -1
- package/dist/esm/utils/did-document-builder.js +5 -6
- package/dist/esm/utils/did-document-builder.js.map +1 -1
- package/dist/esm/utils/did-document.js +42 -38
- package/dist/esm/utils/did-document.js.map +1 -1
- package/dist/types/core/beacon/beacon.d.ts +44 -0
- package/dist/types/core/beacon/beacon.d.ts.map +1 -0
- package/dist/types/core/beacon/cas-beacon.d.ts +19 -30
- package/dist/types/core/beacon/cas-beacon.d.ts.map +1 -1
- package/dist/types/core/beacon/error.d.ts +2 -2
- package/dist/types/core/beacon/error.d.ts.map +1 -1
- package/dist/types/core/beacon/factory.d.ts +4 -6
- package/dist/types/core/beacon/factory.d.ts.map +1 -1
- package/dist/types/core/beacon/interfaces.d.ts +7 -46
- package/dist/types/core/beacon/interfaces.d.ts.map +1 -1
- package/dist/types/core/beacon/signal-discovery.d.ts +25 -0
- package/dist/types/core/beacon/signal-discovery.d.ts.map +1 -0
- package/dist/types/core/beacon/singleton.d.ts +17 -30
- package/dist/types/core/beacon/singleton.d.ts.map +1 -1
- package/dist/types/core/beacon/smt-beacon.d.ts +21 -33
- package/dist/types/core/beacon/smt-beacon.d.ts.map +1 -1
- package/dist/types/core/beacon/utils.d.ts.map +1 -1
- package/dist/types/core/interfaces.d.ts +1 -8
- package/dist/types/core/interfaces.d.ts.map +1 -1
- package/dist/types/core/resolve.d.ts +34 -47
- package/dist/types/core/resolve.d.ts.map +1 -1
- package/dist/types/core/types.d.ts +21 -8
- package/dist/types/core/types.d.ts.map +1 -1
- package/dist/types/core/update.d.ts +30 -73
- package/dist/types/core/update.d.ts.map +1 -1
- package/dist/types/did-btcr2.d.ts +44 -47
- package/dist/types/did-btcr2.d.ts.map +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/utils/appendix.d.ts.map +1 -1
- package/dist/types/utils/did-document-builder.d.ts +5 -1
- package/dist/types/utils/did-document-builder.d.ts.map +1 -1
- package/dist/types/utils/did-document.d.ts +26 -21
- package/dist/types/utils/did-document.d.ts.map +1 -1
- package/package.json +8 -7
- package/src/core/beacon/beacon.ts +58 -0
- package/src/core/beacon/cas-beacon.ts +30 -44
- package/src/core/beacon/error.ts +5 -6
- package/src/core/beacon/factory.ts +7 -9
- package/src/core/beacon/interfaces.ts +7 -64
- package/src/core/beacon/signal-discovery.ts +237 -0
- package/src/core/beacon/singleton.ts +78 -100
- package/src/core/beacon/smt-beacon.ts +32 -49
- package/src/core/beacon/utils.ts +16 -13
- package/src/core/interfaces.ts +1 -9
- package/src/core/resolve.ts +163 -395
- package/src/core/types.ts +25 -8
- package/src/core/update.ts +91 -236
- package/src/did-btcr2.ts +154 -116
- package/src/index.ts +8 -1
- package/src/utils/appendix.ts +8 -22
- package/src/utils/did-document-builder.ts +5 -7
- package/src/utils/did-document.ts +80 -73
package/dist/cjs/core/resolve.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DateUtils, IdentifierHrp, INVALID_DID, INVALID_DID_DOCUMENT, INVALID_DID_UPDATE, JSONPatch, JSONUtils, LATE_PUBLISHING_ERROR,
|
|
1
|
+
import { getNetwork } from '@did-btcr2/bitcoin';
|
|
2
|
+
import { Canonicalization, DateUtils, IdentifierHrp, INVALID_DID, INVALID_DID_DOCUMENT, INVALID_DID_UPDATE, JSONPatch, JSONUtils, LATE_PUBLISHING_ERROR, MISSING_UPDATE_DATA, ResolveError } from '@did-btcr2/common';
|
|
3
3
|
import { BIP340Cryptosuite, BIP340DataIntegrityProof, SchnorrMultikey } from '@did-btcr2/cryptosuite';
|
|
4
4
|
import { CompressedSecp256k1PublicKey } from '@did-btcr2/keypair';
|
|
5
5
|
import { bytesToHex } from '@noble/hashes/utils';
|
|
6
|
-
import {
|
|
6
|
+
import { DidBtcr2 } from '../did-btcr2.js';
|
|
7
7
|
import { Appendix } from '../utils/appendix.js';
|
|
8
8
|
import { DidDocument, ID_PLACEHOLDER_VALUE } from '../utils/did-document.js';
|
|
9
9
|
import { BeaconFactory } from './beacon/factory.js';
|
|
10
|
+
import { BeaconSignalDiscovery } from './beacon/signal-discovery.js';
|
|
10
11
|
import { BeaconUtils } from './beacon/utils.js';
|
|
11
12
|
import { Identifier } from './identifier.js';
|
|
12
13
|
/**
|
|
@@ -19,62 +20,6 @@ import { Identifier } from './identifier.js';
|
|
|
19
20
|
* @type {Resolve}
|
|
20
21
|
*/
|
|
21
22
|
export class Resolve {
|
|
22
|
-
/**
|
|
23
|
-
* Implements subsection {@link https://dcdpr.github.io/did-btcr2/operations/resolve.html#process-sidecar-data | Process Sidecar Data}
|
|
24
|
-
* @param {Sidecar} sidecar The sidecar data to process.
|
|
25
|
-
* @returns {SidecarData} The processed sidecar data containing maps of updates, CAS announcements, and SMT proofs.
|
|
26
|
-
*/
|
|
27
|
-
static processSidecarData(sidecar = {}) {
|
|
28
|
-
// BTCR2 Signed Updates map
|
|
29
|
-
const updateMap = new Map();
|
|
30
|
-
if (sidecar.updates?.length)
|
|
31
|
-
for (const update of sidecar.updates) {
|
|
32
|
-
updateMap.set(canonicalization.process(update, { encoding: 'hex' }), update);
|
|
33
|
-
}
|
|
34
|
-
// CAS Announcements map
|
|
35
|
-
const casMap = new Map();
|
|
36
|
-
if (sidecar.casUpdates?.length)
|
|
37
|
-
for (const update of sidecar.casUpdates) {
|
|
38
|
-
casMap.set(canonicalization.process(update, { encoding: 'hex' }), update);
|
|
39
|
-
}
|
|
40
|
-
// SMT Proofs map
|
|
41
|
-
const smtMap = new Map();
|
|
42
|
-
if (sidecar.smtProofs?.length)
|
|
43
|
-
for (const proof of sidecar.smtProofs) {
|
|
44
|
-
smtMap.set(proof.id, proof);
|
|
45
|
-
}
|
|
46
|
-
return { updateMap, casMap, smtMap };
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Implements subsection {@link https://dcdpr.github.io/did-btcr2/operations/resolve.html#establish-current-document | 7.2.d Establish current_document}.
|
|
50
|
-
* Resolution begins by creating an Initial Did Document called current_document (Current DID Document).
|
|
51
|
-
* The current_document is iteratively patched with BTCR2 Signed Updates announced by Authorized Beacon Signals.
|
|
52
|
-
* @param {DidComponents} didComponents The decoded components of the did.
|
|
53
|
-
* @param {GenesisDocument} genesisDocument The genesis document for resolving the DID Document.
|
|
54
|
-
* @returns {Promise<DidDocument>} The resolved DID Document object.
|
|
55
|
-
* @throws {DidError} if the DID hrp is invalid, no sidecarData passed and hrp = "x".
|
|
56
|
-
*/
|
|
57
|
-
static async establishCurrentDocument(didComponents, genesisDocument) {
|
|
58
|
-
// Deconstruct the hrp from the components
|
|
59
|
-
const { hrp, genesisBytes } = didComponents;
|
|
60
|
-
// If hrp `x`, perform external resolution
|
|
61
|
-
if (hrp === IdentifierHrp.x) {
|
|
62
|
-
if (!genesisDocument)
|
|
63
|
-
throw new ResolveError('External resolution requires genesisDocument', MISSING_UPDATE_DATA, { didComponents });
|
|
64
|
-
return await this.external(didComponents, genesisDocument);
|
|
65
|
-
}
|
|
66
|
-
// Check for hrp `k`
|
|
67
|
-
if (hrp === IdentifierHrp.k) {
|
|
68
|
-
// Validate genesis bytes as a compressed secp256k1 public key
|
|
69
|
-
if (!CompressedSecp256k1PublicKey.isValid(genesisBytes)) {
|
|
70
|
-
throw new ResolveError('Deterministic resolution requires valid secp256k1 public key', INVALID_DID, { genesisBytes });
|
|
71
|
-
}
|
|
72
|
-
// Perform deterministic resolution
|
|
73
|
-
return this.deterministic(didComponents);
|
|
74
|
-
}
|
|
75
|
-
// Else, throw an error for unsupported hrp
|
|
76
|
-
throw new ResolveError(`Unsupported DID hrp ${hrp}`, INVALID_DID, { hrp });
|
|
77
|
-
}
|
|
78
23
|
/**
|
|
79
24
|
* Implements subsection {@link https://dcdpr.github.io/did-btcr2/operations/resolve.html#if-genesis_bytes-is-a-secp256k1-public-key | 7.2.d.1 if genesis bytes is a secp256k1 Public Key}.
|
|
80
25
|
* @param {DidComponents} didComponents The decoded components of the did.
|
|
@@ -96,7 +41,6 @@ export class Resolve {
|
|
|
96
41
|
});
|
|
97
42
|
return new DidDocument({
|
|
98
43
|
id: did,
|
|
99
|
-
controller: [did],
|
|
100
44
|
verificationMethod: [{
|
|
101
45
|
id: `${did}#initialKey`,
|
|
102
46
|
type: 'Multikey',
|
|
@@ -111,16 +55,16 @@ export class Resolve {
|
|
|
111
55
|
* @param {DidComponents} didComponents BTCR2 DID components used to resolve the DID Document
|
|
112
56
|
* @param {GenesisDocument} genesisDocument The genesis document for resolving the DID Document.
|
|
113
57
|
* @returns {Promise<DidDocument>} The resolved DID Document object
|
|
114
|
-
* @throws {
|
|
58
|
+
* @throws {ResolveError} InvalidDidDocument if not conformant to DID Core v1.1
|
|
115
59
|
*/
|
|
116
60
|
static async external(didComponents, genesisDocument) {
|
|
117
61
|
// Canonicalize and sha256 hash the currentDocument
|
|
118
|
-
const hashBytes =
|
|
62
|
+
const hashBytes = Canonicalization.process(genesisDocument, { encoding: 'hex' });
|
|
119
63
|
// Compare the genesisBytes to the hashBytes
|
|
120
64
|
const genesisBytes = bytesToHex(didComponents.genesisBytes);
|
|
121
65
|
// If the genesisBytes do not match the hashBytes, throw an error
|
|
122
66
|
if (genesisBytes !== hashBytes) {
|
|
123
|
-
throw new
|
|
67
|
+
throw new ResolveError(`Initial document mismatch: genesisBytes ${genesisBytes} !== hashBytes ${hashBytes}`, INVALID_DID_DOCUMENT, { genesisBytes, hashBytes });
|
|
124
68
|
}
|
|
125
69
|
// Encode the did from the didComponents
|
|
126
70
|
const did = Identifier.encode(didComponents);
|
|
@@ -129,42 +73,94 @@ export class Resolve {
|
|
|
129
73
|
// Return a W3C conformant DID Document
|
|
130
74
|
return new DidDocument(currentDocument);
|
|
131
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Implements subsection {@link https://dcdpr.github.io/did-btcr2/operations/resolve.html#process-sidecar-data | Process Sidecar Data}
|
|
78
|
+
* @param {Sidecar} sidecar The sidecar data to process.
|
|
79
|
+
* @returns {ProcessedSidecar} The processed sidecar data containing maps of updates, CAS announcements, and SMT proofs.
|
|
80
|
+
*/
|
|
81
|
+
static sidecarData(sidecar = {}) {
|
|
82
|
+
// BTCR2 Signed Updates map
|
|
83
|
+
const updateMap = new Map();
|
|
84
|
+
if (sidecar.updates?.length)
|
|
85
|
+
for (const update of sidecar.updates) {
|
|
86
|
+
updateMap.set(Canonicalization.process(update, { encoding: 'hex' }), update);
|
|
87
|
+
}
|
|
88
|
+
// CAS Announcements map
|
|
89
|
+
const casMap = new Map();
|
|
90
|
+
if (sidecar.casUpdates?.length)
|
|
91
|
+
for (const update of sidecar.casUpdates) {
|
|
92
|
+
casMap.set(Canonicalization.process(update, { encoding: 'hex' }), update);
|
|
93
|
+
}
|
|
94
|
+
// SMT Proofs map
|
|
95
|
+
const smtMap = new Map();
|
|
96
|
+
if (sidecar.smtProofs?.length)
|
|
97
|
+
for (const proof of sidecar.smtProofs) {
|
|
98
|
+
smtMap.set(proof.id, proof);
|
|
99
|
+
}
|
|
100
|
+
return { updateMap, casMap, smtMap };
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Implements subsection {@link https://dcdpr.github.io/did-btcr2/operations/resolve.html#establish-current-document | 7.2.d Establish current_document}.
|
|
104
|
+
* Resolution begins by creating an Initial Did Document called current_document (Current DID Document).
|
|
105
|
+
* The current_document is iteratively patched with BTCR2 Signed Updates announced by Authorized Beacon Signals.
|
|
106
|
+
* @param {DidComponents} didComponents The decoded components of the did.
|
|
107
|
+
* @param {GenesisDocument} genesisDocument The genesis document for resolving the DID Document.
|
|
108
|
+
* @returns {Promise<DidDocument>} The resolved DID Document object.
|
|
109
|
+
* @throws {ResolveError} if the DID hrp is invalid, no sidecarData passed and hrp = "x".
|
|
110
|
+
*/
|
|
111
|
+
static async currentDocument(didComponents, genesisDocument) {
|
|
112
|
+
// Deconstruct the hrp from the components
|
|
113
|
+
const { hrp, genesisBytes } = didComponents;
|
|
114
|
+
// If hrp `x`, perform external resolution
|
|
115
|
+
if (hrp === IdentifierHrp.x) {
|
|
116
|
+
if (!genesisDocument)
|
|
117
|
+
throw new ResolveError('External resolution requires genesisDocument', MISSING_UPDATE_DATA, { didComponents });
|
|
118
|
+
return await this.external(didComponents, genesisDocument);
|
|
119
|
+
}
|
|
120
|
+
// Check for hrp `k`
|
|
121
|
+
if (hrp === IdentifierHrp.k) {
|
|
122
|
+
// Validate genesis bytes as a compressed secp256k1 public key
|
|
123
|
+
if (!CompressedSecp256k1PublicKey.isValid(genesisBytes)) {
|
|
124
|
+
throw new ResolveError('Deterministic resolution requires valid secp256k1 public key', INVALID_DID, { genesisBytes });
|
|
125
|
+
}
|
|
126
|
+
// Perform deterministic resolution
|
|
127
|
+
return this.deterministic(didComponents);
|
|
128
|
+
}
|
|
129
|
+
// Else, throw an error for unsupported hrp
|
|
130
|
+
throw new ResolveError(`Unsupported DID hrp ${hrp}`, INVALID_DID, { hrp });
|
|
131
|
+
}
|
|
132
132
|
/**
|
|
133
133
|
* Finds uses the beacon services in the currentDocument to scan for onchain Beacon Signals (transactions) containing
|
|
134
134
|
* Signal Bytes (last output in OP_RETURN transaction).
|
|
135
135
|
* @param {Array<BeaconService>} beaconServices The array of BeaconService objects to search for signals.
|
|
136
136
|
* @param {SidecarData} sidecarData The sidecar data containing maps of updates, CAS announcements, and SMT proofs.
|
|
137
137
|
* @param {BitcoinNetworkConnection} bitcoin The bitcoin network connection used to fetch beacon signals
|
|
138
|
-
* @
|
|
139
|
-
* @returns {Promise<Array<[BTCR2SignedUpdate, BlockMetadata]>>} The array of BTCR2 Signed Updates announced by the Beacon Signals.
|
|
138
|
+
* @returns {Promise<Array<[SignedBTCR2Update, BlockMetadata]>>} The array of BTCR2 Signed Updates announced by the Beacon Signals.
|
|
140
139
|
*/
|
|
141
|
-
static async
|
|
142
|
-
//
|
|
143
|
-
const beaconServicesSignals =
|
|
144
|
-
? await
|
|
145
|
-
: await
|
|
146
|
-
//
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
unsortedUpdates.push(...processed);
|
|
156
|
-
}
|
|
157
|
-
return unsortedUpdates;
|
|
140
|
+
static async beaconSignals(beaconServices, sidecarData, bitcoin) {
|
|
141
|
+
// Discover Beacon Signals via indexer server (esplora/electrs) or full node
|
|
142
|
+
const beaconServicesSignals = bitcoin.network.rest
|
|
143
|
+
? await BeaconSignalDiscovery.indexer(beaconServices, bitcoin)
|
|
144
|
+
: await BeaconSignalDiscovery.fullnode(beaconServices, bitcoin);
|
|
145
|
+
// Process each beacon's signals in parallel
|
|
146
|
+
const promises = await Promise.all(Array.from(beaconServicesSignals.entries()).map(async ([service, signals]) => {
|
|
147
|
+
// Skip beacons with no signals
|
|
148
|
+
if (!signals.length)
|
|
149
|
+
return [];
|
|
150
|
+
// Establish a typed beacon and process its signals
|
|
151
|
+
return BeaconFactory.establish(service).processSignals(signals, sidecarData);
|
|
152
|
+
}));
|
|
153
|
+
return promises.flat();
|
|
158
154
|
}
|
|
159
155
|
/**
|
|
160
156
|
* Implements subsection {@link https://dcdpr.github.io/did-btcr2/operations/resolve.html#process-updates | 7.2.f Process updates Array}.
|
|
161
157
|
* @param {DidDocument} currentDocument The current DID Document to apply the updates to.
|
|
162
|
-
* @param {Array<[
|
|
158
|
+
* @param {Array<[SignedBTCR2Update, BlockMetadata]>} unsortedUpdates The unsorted array of BTCR2 Signed Updates and their associated Block Metadata.
|
|
163
159
|
* @param {string} [versionTime] The optional version time to limit updates to.
|
|
164
160
|
* @param {string} [versionId] The optional version id to limit updates to.
|
|
165
161
|
* @returns {Promise<DidResolutionResponse>} The updated DID Document, number of confirmations, and version id.
|
|
166
162
|
*/
|
|
167
|
-
static async
|
|
163
|
+
static async updates(currentDocument, unsortedUpdates, versionTime, versionId) {
|
|
168
164
|
// Start the version number being processed at 1
|
|
169
165
|
let currentVersionId = 1;
|
|
170
166
|
// Initialize an empty array to hold the update hashes
|
|
@@ -173,269 +169,89 @@ export class Resolve {
|
|
|
173
169
|
const updates = unsortedUpdates.sort(([upd0, blk0], [upd1, blk1]) => upd0.targetVersionId - upd1.targetVersionId || blk0.height - blk1.height);
|
|
174
170
|
// Create a default response object
|
|
175
171
|
const response = {
|
|
176
|
-
currentDocument,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
172
|
+
didDocument: currentDocument,
|
|
173
|
+
metadata: {
|
|
174
|
+
versionId: `${currentVersionId}`,
|
|
175
|
+
confirmations: 0,
|
|
176
|
+
updated: '',
|
|
177
|
+
deactivated: currentDocument.deactivated || false
|
|
178
|
+
}
|
|
180
179
|
};
|
|
181
180
|
// Iterate over each (update block) pair
|
|
182
181
|
for (const [update, block] of updates) {
|
|
183
182
|
// Get the hash of the current document
|
|
184
|
-
const currentDocumentHash =
|
|
185
|
-
//
|
|
186
|
-
|
|
187
|
-
// Safely convert versionTime to timestamp
|
|
188
|
-
const vTime = DateUtils.dateStringToTimestamp(versionTime || '');
|
|
189
|
-
// Safely convert block.blocktime to timestamp
|
|
190
|
-
const bTime = DateUtils.blocktimeToTimestamp(block.time);
|
|
183
|
+
const currentDocumentHash = Canonicalization.process(response.didDocument, { encoding: 'base58' });
|
|
184
|
+
// Safely convert block.time to timestamp
|
|
185
|
+
const blocktime = DateUtils.blocktimeToTimestamp(block.time);
|
|
191
186
|
// Set the updated field to the blocktime of the current update
|
|
192
|
-
response.updated = DateUtils.toISOStringNonFractional(
|
|
187
|
+
response.metadata.updated = DateUtils.toISOStringNonFractional(blocktime);
|
|
188
|
+
// Set confirmations to the block confirmations
|
|
189
|
+
response.metadata.confirmations = block.confirmations;
|
|
193
190
|
// if resolutionOptions.versionTime is defined and the blocktime is more recent, return currentDocument
|
|
194
|
-
if (
|
|
195
|
-
|
|
191
|
+
if (versionTime) {
|
|
192
|
+
// Safely convert versionTime to timestamp
|
|
193
|
+
if (blocktime > DateUtils.dateStringToTimestamp(versionTime)) {
|
|
194
|
+
return response;
|
|
195
|
+
}
|
|
196
196
|
}
|
|
197
197
|
// Check update.targetVersionId against currentVersionId
|
|
198
198
|
// If update.targetVersionId <= currentVersionId, confirm duplicate update
|
|
199
199
|
if (update.targetVersionId <= currentVersionId) {
|
|
200
200
|
updateHashHistory.push(currentDocumentHash);
|
|
201
|
-
this.
|
|
201
|
+
this.confirmDuplicate(update, updateHashHistory);
|
|
202
202
|
}
|
|
203
203
|
// If update.targetVersionId == currentVersionId + 1, apply the update
|
|
204
204
|
else if (update.targetVersionId === currentVersionId + 1) {
|
|
205
|
-
// Prepend `z` to the sourceHash if it does not start with it
|
|
206
|
-
const sourceHash = update.sourceHash.startsWith('z') ? update.sourceHash : `z${update.sourceHash}`;
|
|
207
205
|
// Check if update.sourceHash !== currentDocumentHash
|
|
208
|
-
if (sourceHash !== currentDocumentHash) {
|
|
206
|
+
if (update.sourceHash !== currentDocumentHash) {
|
|
209
207
|
// Raise an INVALID_DID_UPDATE error if they do not match
|
|
210
|
-
throw new ResolveError(`Hash mismatch: update.sourceHash !== currentDocumentHash`, INVALID_DID_UPDATE, { sourceHash, currentDocumentHash });
|
|
208
|
+
throw new ResolveError(`Hash mismatch: update.sourceHash !== currentDocumentHash`, INVALID_DID_UPDATE, { sourceHash: update.sourceHash, currentDocumentHash });
|
|
211
209
|
}
|
|
212
210
|
// Apply the update to the currentDocument and set it in the response
|
|
213
|
-
response.
|
|
211
|
+
response.didDocument = await this.applyUpdate(response.didDocument, update);
|
|
214
212
|
// Create unsigned_update by removing the proof property from update.
|
|
215
213
|
const unsignedUpdate = JSONUtils.deleteKeys(update, ['proof']);
|
|
216
214
|
// Push the canonicalized unsigned update hash to the updateHashHistory
|
|
217
|
-
updateHashHistory.push(
|
|
215
|
+
updateHashHistory.push(Canonicalization.process(unsignedUpdate, { encoding: 'base58' }));
|
|
218
216
|
}
|
|
219
217
|
// If update.targetVersionId > currentVersionId + 1, throw LATE_PUBLISHING error
|
|
220
218
|
else if (update.targetVersionId > currentVersionId + 1) {
|
|
221
219
|
throw new ResolveError(`Version Id Mismatch: targetVersionId cannot be > currentVersionId + 1`, 'LATE_PUBLISHING_ERROR', {
|
|
222
220
|
targetVersionId: update.targetVersionId,
|
|
223
|
-
currentVersionId:
|
|
221
|
+
currentVersionId: currentVersionId + 1
|
|
224
222
|
});
|
|
225
223
|
}
|
|
226
224
|
// Increment currentVersionId
|
|
227
225
|
currentVersionId++;
|
|
228
|
-
// Set
|
|
229
|
-
response.versionId = `${currentVersionId}`;
|
|
226
|
+
// Set response.versionId to be the new currentVersionId
|
|
227
|
+
response.metadata.versionId = `${currentVersionId}`;
|
|
230
228
|
// If resolutionOptions.versionId is defined and <= currentVersionId, return currentDocument
|
|
231
229
|
if (currentVersionId >= Number(versionId)) {
|
|
232
230
|
return response;
|
|
233
231
|
}
|
|
234
232
|
// Check if the current document is deactivated before further processing
|
|
235
233
|
if (currentDocument.deactivated) {
|
|
234
|
+
// Set the response deactivated flag to true
|
|
235
|
+
response.metadata.deactivated = currentDocument.deactivated;
|
|
236
|
+
// If deactivated, stop processing further updates and return the response
|
|
236
237
|
return response;
|
|
237
238
|
}
|
|
238
239
|
}
|
|
239
240
|
// Return response data
|
|
240
241
|
return response;
|
|
241
242
|
}
|
|
242
|
-
/**
|
|
243
|
-
* Retrieves the beacon signals for the given array of BeaconService objects
|
|
244
|
-
* using a esplora/electrs REST API connection via a bitcoin I/O driver.
|
|
245
|
-
* @param {Array<BeaconService>} beaconServices Array of BeaconService objects to retrieve signals for
|
|
246
|
-
* @param {BitcoinNetworkConnection} bitcoin Bitcoin network connection to use for REST calls
|
|
247
|
-
* @returns {Promise<Array<BeaconSignal>>} Promise resolving to an array of BeaconSignal objects
|
|
248
|
-
*/
|
|
249
|
-
static async queryBlockchainIndexer(beaconServices, bitcoin) {
|
|
250
|
-
// Empty array of beaconSignals
|
|
251
|
-
const beaconServiceSignals = new Map();
|
|
252
|
-
// Iterate over each beacon
|
|
253
|
-
for (const beaconService of beaconServices) {
|
|
254
|
-
beaconServiceSignals.set(beaconService, []);
|
|
255
|
-
// Get the transactions for the beacon address via REST
|
|
256
|
-
const beaconSignals = await bitcoin.network.rest.address.getTxs(beaconService.serviceEndpoint);
|
|
257
|
-
// If no signals are found, continue
|
|
258
|
-
if (!beaconSignals || !beaconSignals.length) {
|
|
259
|
-
continue;
|
|
260
|
-
}
|
|
261
|
-
// Iterate over each signal
|
|
262
|
-
for (const beaconSignal of beaconSignals) {
|
|
263
|
-
// Get the last vout in the transaction
|
|
264
|
-
const signalVout = beaconSignal.vout.slice(-1)[0];
|
|
265
|
-
/**
|
|
266
|
-
* Look for OP_RETURN in last vout scriptpubkey_asm
|
|
267
|
-
* Vout (rest) format:
|
|
268
|
-
* {
|
|
269
|
-
* scriptpubkey: '6a20570f177c65e64fb5cf61180b664cdddf09ab76153c2b192e22006e5b22a3917a',
|
|
270
|
-
* scriptpubkey_asm: 'OP_RETURN OP_PUSHBYTES_32 570f177c65e64fb5cf61180b664cdddf09ab76153c2b192e22006e5b22a3917a',
|
|
271
|
-
* scriptpubkey_type: 'op_return',
|
|
272
|
-
* value: 0
|
|
273
|
-
* }
|
|
274
|
-
*/
|
|
275
|
-
if (!signalVout || !signalVout.scriptpubkey_asm.includes('OP_RETURN')) {
|
|
276
|
-
// If not found, continue to next signal
|
|
277
|
-
continue;
|
|
278
|
-
}
|
|
279
|
-
// Construct output map for easier access
|
|
280
|
-
const outputMap = new Map(Object.entries(signalVout));
|
|
281
|
-
// Grab the signal vout scriptpubkey
|
|
282
|
-
const signalVoutScriptPubkey = outputMap.get('scriptpubkey_asm');
|
|
283
|
-
// If the signal vout scriptpubkey does not exist, continue to next signal
|
|
284
|
-
if (!signalVoutScriptPubkey) {
|
|
285
|
-
continue;
|
|
286
|
-
}
|
|
287
|
-
// Extract hex string hash of the signal bytes from the scriptpubkey
|
|
288
|
-
const updateHash = signalVoutScriptPubkey.split(' ').slice(-1)[0];
|
|
289
|
-
if (!updateHash) {
|
|
290
|
-
continue;
|
|
291
|
-
}
|
|
292
|
-
const confirmations = await bitcoin.network.rest.block.count() - beaconSignal.status.block_height + 1;
|
|
293
|
-
// Push the beacon signal object to the signals array for the beacon service
|
|
294
|
-
beaconServiceSignals.get(beaconService)?.push({
|
|
295
|
-
tx: beaconSignal,
|
|
296
|
-
signalBytes: updateHash,
|
|
297
|
-
blockMetadata: {
|
|
298
|
-
confirmations,
|
|
299
|
-
height: beaconSignal.status.block_height,
|
|
300
|
-
time: beaconSignal.status.block_time,
|
|
301
|
-
}
|
|
302
|
-
});
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
// Return the beaconSignals
|
|
306
|
-
return beaconServiceSignals;
|
|
307
|
-
}
|
|
308
|
-
/**
|
|
309
|
-
* Traverse the full blockchain from genesis to chain top looking for beacon signals.
|
|
310
|
-
* @param {Array<BeaconService>} beaconServices Array of BeaconService objects to search for signals.
|
|
311
|
-
* @param {BitcoinNetworkConnection} bitcoin Bitcoin network connection to use for RPC calls.
|
|
312
|
-
* @returns {Promise<Array<BeaconSignal>>} Promise resolving to an array of BeaconSignal objects.
|
|
313
|
-
*/
|
|
314
|
-
static async traverseFullBlockchain(beaconServices, bitcoin) {
|
|
315
|
-
const beaconServiceSignals = new Map();
|
|
316
|
-
for (const beaconService of beaconServices) {
|
|
317
|
-
beaconServiceSignals.set(beaconService, []);
|
|
318
|
-
}
|
|
319
|
-
// Get the RPC connection from the bitcoin network
|
|
320
|
-
const rpc = bitcoin.network.rpc;
|
|
321
|
-
// Ensure that the RPC connection is available
|
|
322
|
-
if (!rpc) {
|
|
323
|
-
throw new ResolveError('RPC connection is not available', 'RPC_CONNECTION_ERROR', bitcoin);
|
|
324
|
-
}
|
|
325
|
-
// Get the current block height
|
|
326
|
-
const targetHeight = await rpc.getBlockCount();
|
|
327
|
-
// Set genesis height
|
|
328
|
-
let height = 0;
|
|
329
|
-
// Opt into rpc connection to get the block data at the blockhash
|
|
330
|
-
let block = await bitcoin.network.rpc.getBlock({ height });
|
|
331
|
-
console.info(`Searching for beacon signals, please wait ...`);
|
|
332
|
-
while (block.height <= targetHeight) {
|
|
333
|
-
// Iterate over each transaction in the block
|
|
334
|
-
for (const tx of block.tx) {
|
|
335
|
-
// If the txid is a coinbase, continue ...
|
|
336
|
-
if (tx.txid === GENESIS_TX_ID) {
|
|
337
|
-
continue;
|
|
338
|
-
}
|
|
339
|
-
// Iterate over each input in the transaction
|
|
340
|
-
for (const vin of tx.vin) {
|
|
341
|
-
// If the vin is a coinbase transaction, continue ...
|
|
342
|
-
if (vin.coinbase) {
|
|
343
|
-
continue;
|
|
344
|
-
}
|
|
345
|
-
// If the vin txinwitness contains a coinbase did, continue ...
|
|
346
|
-
if (vin.txinwitness && vin.txinwitness.length === 1 && vin.txinwitness[0] === TXIN_WITNESS_COINBASE) {
|
|
347
|
-
continue;
|
|
348
|
-
}
|
|
349
|
-
// If the txid from the vin is undefined, continue ...
|
|
350
|
-
if (!vin.txid) {
|
|
351
|
-
continue;
|
|
352
|
-
}
|
|
353
|
-
// If the vout from the vin is undefined, continue ...
|
|
354
|
-
if (vin.vout === undefined) {
|
|
355
|
-
continue;
|
|
356
|
-
}
|
|
357
|
-
// Get the previous output transaction data
|
|
358
|
-
const prevout = await rpc.getRawTransaction(vin.txid, 2);
|
|
359
|
-
// If the previous output vout at the vin.vout index is undefined, continue ...
|
|
360
|
-
if (!prevout.vout[vin.vout]) {
|
|
361
|
-
continue;
|
|
362
|
-
}
|
|
363
|
-
// Get the address from the scriptPubKey from the prevvout (previous output's input at the vout index)
|
|
364
|
-
const scriptPubKey = prevout.vout[vin.vout].scriptPubKey;
|
|
365
|
-
// If the scriptPubKey.address is undefined, continue ...
|
|
366
|
-
if (!scriptPubKey.address) {
|
|
367
|
-
continue;
|
|
368
|
-
}
|
|
369
|
-
// If the beaconAddress from prevvout scriptPubKey is not a beacon service endpoint address, continue ...
|
|
370
|
-
const beaconService = BeaconUtils.getBeaconServicesMap(beaconServices).get(scriptPubKey.address);
|
|
371
|
-
if (!beaconService) {
|
|
372
|
-
continue;
|
|
373
|
-
}
|
|
374
|
-
/**
|
|
375
|
-
* Look for 'OP_RETURN' in prevout.vout[vin.vout].scriptPubKey.asm, else continue ...
|
|
376
|
-
*
|
|
377
|
-
* TxOut (rpc) format:
|
|
378
|
-
* {
|
|
379
|
-
* value: 0,
|
|
380
|
-
* n: 1,
|
|
381
|
-
* scriptPubKey: {
|
|
382
|
-
* asm: 'OP_RETURN 570f177c65e64fb5cf61180b664cdddf09ab76153c2b192e22006e5b22a3917a',
|
|
383
|
-
* desc: 'raw(6a20570f177c65e64fb5cf61180b664cdddf09ab76153c2b192e22006e5b22a3917a)#cdgj3pm4',
|
|
384
|
-
* hex: '6a20570f177c65e64fb5cf61180b664cdddf09ab76153c2b192e22006e5b22a3917a',
|
|
385
|
-
* type: 'nulldata'
|
|
386
|
-
* }
|
|
387
|
-
* }
|
|
388
|
-
*/
|
|
389
|
-
const txVoutScriptPubkeyAsm = prevout.vout[vin.vout].scriptPubKey.asm;
|
|
390
|
-
if (!txVoutScriptPubkeyAsm.includes('OP_RETURN')) {
|
|
391
|
-
continue;
|
|
392
|
-
}
|
|
393
|
-
// Log the found txid and beacon
|
|
394
|
-
console.info(`Tx ${tx.txid} contains beacon service address ${scriptPubKey.address} and OP_RETURN!`, tx);
|
|
395
|
-
// Extract hex string hash of the signal bytes from the scriptpubkey
|
|
396
|
-
const updateHash = txVoutScriptPubkeyAsm.split(' ').slice(-1)[0];
|
|
397
|
-
if (!updateHash) {
|
|
398
|
-
continue;
|
|
399
|
-
}
|
|
400
|
-
// Push the beacon signal object to the beacon signals array for that beacon service
|
|
401
|
-
beaconServiceSignals.get(beaconService)?.push({
|
|
402
|
-
tx,
|
|
403
|
-
signalBytes: updateHash,
|
|
404
|
-
blockMetadata: {
|
|
405
|
-
height: block.height,
|
|
406
|
-
time: block.time,
|
|
407
|
-
confirmations: block.confirmations
|
|
408
|
-
}
|
|
409
|
-
});
|
|
410
|
-
}
|
|
411
|
-
;
|
|
412
|
-
}
|
|
413
|
-
// Increment the height
|
|
414
|
-
height += 1;
|
|
415
|
-
// Check if we've reached the chain tip
|
|
416
|
-
const tip = await rpc.getBlockCount();
|
|
417
|
-
if (height > tip) {
|
|
418
|
-
// If so, break the loop
|
|
419
|
-
console.info(`Chain tip reached ${height}, breaking ...`);
|
|
420
|
-
break;
|
|
421
|
-
}
|
|
422
|
-
// Reset the block var to the next block data
|
|
423
|
-
block = await rpc.getBlock({ height });
|
|
424
|
-
}
|
|
425
|
-
return beaconServiceSignals;
|
|
426
|
-
}
|
|
427
243
|
/**
|
|
428
244
|
* Implements subsection {@link https://dcdpr.github.io/did-btcr2/#confirm-duplicate-update | 7.2.f.1 Confirm Duplicate Update}.
|
|
429
245
|
* This step confirms that an update with a lower-than-expected targetVersionId is a true duplicate.
|
|
430
|
-
* @param {
|
|
246
|
+
* @param {SignedBTCR2Update} update The BTCR2 Signed Update to confirm as a duplicate.
|
|
431
247
|
* @returns {void} Does not return a value, but throws an error if the update is not a valid duplicate.
|
|
432
248
|
*/
|
|
433
|
-
static
|
|
249
|
+
static confirmDuplicate(update, updateHashHistory) {
|
|
434
250
|
// Create unsigned_update by removing the proof property from update.
|
|
435
|
-
const unsignedUpdate =
|
|
251
|
+
const { proof: _, ...unsignedUpdate } = update;
|
|
436
252
|
// Hash unsignedUpdate with JSON Document Hashing algorithm
|
|
437
|
-
const unsignedUpdateHash =
|
|
438
|
-
//
|
|
253
|
+
const unsignedUpdateHash = Canonicalization.process(unsignedUpdate);
|
|
254
|
+
// Let historicalUpdateHash equal updateHashHistory[updateHashIndex].
|
|
439
255
|
const historicalUpdateHash = updateHashHistory[update.targetVersionId - 2];
|
|
440
256
|
// Check if the updateHash matches the historical hash
|
|
441
257
|
if (updateHashHistory[update.targetVersionId - 2] !== unsignedUpdateHash) {
|
|
@@ -445,11 +261,11 @@ export class Resolve {
|
|
|
445
261
|
/**
|
|
446
262
|
* Implements subsection {@link https://dcdpr.github.io/did-btcr2/operations/resolve.html#apply-update | 7.2.f.3 Apply Update}.
|
|
447
263
|
* @param {DidDocument} currentDocument The current DID Document to apply the update to.
|
|
448
|
-
* @param {
|
|
264
|
+
* @param {SignedBTCR2Update} update The BTCR2 Signed Update to apply.
|
|
449
265
|
* @returns {Promise<DidDocument>} The updated DID Document after applying the update.
|
|
450
266
|
* @throws {ResolveError} If the update is invalid or cannot be applied.
|
|
451
267
|
*/
|
|
452
|
-
static async
|
|
268
|
+
static async applyUpdate(currentDocument, update) {
|
|
453
269
|
// Get the capability id from the to update proof.
|
|
454
270
|
const capabilityId = update.proof?.capability;
|
|
455
271
|
// Since this field is optional, check that it exists
|
|
@@ -475,34 +291,32 @@ export class Resolve {
|
|
|
475
291
|
}
|
|
476
292
|
// Get the verificationMethod from the DID Document using the verificationMethodId.
|
|
477
293
|
const vm = DidBtcr2.getSigningMethod(currentDocument, verificationMethodId);
|
|
478
|
-
// Split the vmId by the `#` to get the id and controller.
|
|
479
|
-
const [vmController, vmId] = vm.id.split('#');
|
|
480
294
|
// Construct a new SchnorrMultikey.
|
|
481
|
-
const multikey = SchnorrMultikey.
|
|
295
|
+
const multikey = SchnorrMultikey.fromVerificationMethod(vm);
|
|
482
296
|
// Construct a new BIP340Cryptosuite with the SchnorrMultikey.
|
|
483
297
|
const cryptosuite = new BIP340Cryptosuite(multikey);
|
|
484
298
|
// Canonicalize the update
|
|
485
|
-
const canonicalUpdate =
|
|
299
|
+
const canonicalUpdate = Canonicalization.canonicalize(update);
|
|
486
300
|
// Construct a DataIntegrityProof with the cryptosuite
|
|
487
301
|
const diProof = new BIP340DataIntegrityProof(cryptosuite);
|
|
488
302
|
// Call the verifyProof method
|
|
489
303
|
const verificationResult = diProof.verifyProof(canonicalUpdate, 'capabilityInvocation');
|
|
490
304
|
// If the result is not verified, throw INVALID_DID_UPDATE error
|
|
491
305
|
if (!verificationResult.verified) {
|
|
492
|
-
throw new
|
|
306
|
+
throw new ResolveError('Invalid update: proof not verified', INVALID_DID_UPDATE, verificationResult);
|
|
493
307
|
}
|
|
494
308
|
// Apply the update.patch to the currentDocument to get the updatedDocument.
|
|
495
309
|
const updatedDocument = JSONPatch.apply(currentDocument, update.patch);
|
|
496
310
|
// Verify that updatedDocument is conformant to DID Core v1.1.
|
|
497
311
|
DidDocument.validate(updatedDocument);
|
|
498
312
|
// Canonicalize and hash the updatedDocument to get the currentDocumentHash.
|
|
499
|
-
const currentDocumentHash =
|
|
313
|
+
const currentDocumentHash = Canonicalization.process(updatedDocument, { encoding: 'base58' });
|
|
500
314
|
// Prepare the update targetHash for comparison with currentDocumentHash.
|
|
501
315
|
const updateTargetHash = update.targetHash.startsWith('z') ? update.targetHash : `z${update.targetHash}`;
|
|
502
316
|
// Make sure the update.targetHash equals currentDocumentHash.
|
|
503
317
|
if (updateTargetHash !== currentDocumentHash) {
|
|
504
318
|
// If they do not match, throw INVALID_DID_UPDATE error.
|
|
505
|
-
throw new
|
|
319
|
+
throw new ResolveError(`Invalid update: updateTargetHash !== currentDocumentHash`, INVALID_DID_UPDATE, { updateTargetHash, currentDocumentHash });
|
|
506
320
|
}
|
|
507
321
|
// Return final updatedDocument.
|
|
508
322
|
return updatedDocument;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../../src/core/resolve.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,aAAa,EACb,UAAU,EAEV,qBAAqB,EACtB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,SAAS,EACT,aAAa,EACb,WAAW,EACX,oBAAoB,EACpB,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,qBAAqB,EACrB,WAAW,EACX,mBAAmB,EACnB,YAAY,EACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EAGxB,eAAe,EAChB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAiB,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAc5D;;;;;;;;GAQG;AACH,MAAM,OAAO,OAAO;IAClB;;;;OAIG;IACH,MAAM,CAAC,kBAAkB,CAAC,UAAmB,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