@did-btcr2/method 0.36.0 → 0.36.1
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/.tsbuildinfo +1 -1
- package/dist/browser.js +316 -169
- package/dist/browser.mjs +316 -169
- package/dist/cjs/index.js +317 -170
- package/dist/esm/core/aggregation/participant.js +11 -0
- package/dist/esm/core/aggregation/participant.js.map +1 -1
- package/dist/esm/core/aggregation/runner/participant-runner.js +37 -2
- package/dist/esm/core/aggregation/runner/participant-runner.js.map +1 -1
- package/dist/esm/core/aggregation/runner/service-runner.js +318 -192
- package/dist/esm/core/aggregation/runner/service-runner.js.map +1 -1
- package/dist/types/core/aggregation/participant.d.ts +9 -0
- package/dist/types/core/aggregation/participant.d.ts.map +1 -1
- package/dist/types/core/aggregation/runner/events.d.ts +22 -11
- package/dist/types/core/aggregation/runner/events.d.ts.map +1 -1
- package/dist/types/core/aggregation/runner/participant-runner.d.ts +21 -12
- package/dist/types/core/aggregation/runner/participant-runner.d.ts.map +1 -1
- package/dist/types/core/aggregation/runner/service-runner.d.ts +76 -22
- package/dist/types/core/aggregation/runner/service-runner.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/core/aggregation/participant.ts +12 -0
- package/src/core/aggregation/runner/events.ts +23 -14
- package/src/core/aggregation/runner/participant-runner.ts +43 -13
- package/src/core/aggregation/runner/service-runner.ts +370 -199
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-runner.js","sourceRoot":"","sources":["../../../../../src/core/aggregation/runner/service-runner.ts"],"names":[],"mappings":";AAEA,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,EACb,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAMlD,OAAO,EACL,kBAAkB,EACnB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB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I,CAAC,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;gBACtC,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,CAAC,CAAC;YAC7B,CAAC;QACH,CAAC;QAAC,OAAM,GAAG,EAAE,CAAC;YACZ,IAAI,CAAC,KAAK,CAAC,GAAY,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,QAAQ,CAAC,IAAmB;QAChC,KAAI,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC;YACpB,MAAM,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QACxD,CAAC;IACH,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,GAAU;QACd,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,IAAI,CAAC,YAAY,EAAE,CAAC;QACpB,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAC3B,IAAG,IAAI,CAAC,SAAS;YAAE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7D,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;QACxB,IAAI,CAAC,UAAU,EAAE,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC"}
|
|
1
|
+
{"version":3,"file":"service-runner.js","sourceRoot":"","sources":["../../../../../src/core/aggregation/runner/service-runner.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,uBAAuB,EACvB,aAAa,EACb,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAMlD,OAAO,EACL,kBAAkB,EACnB,MAAM,eAAe,CAAC;AAGvB,OAAO,EAAE,iBAAiB,EAAE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88
88
|
/** Aggregated data awaiting user validation. */
|
|
89
89
|
get pendingValidations(): ReadonlyMap<string, PendingValidation>;
|
|
90
|
+
/**
|
|
91
|
+
* The validated aggregated data retained for a cohort, regardless of phase.
|
|
92
|
+
* Unlike {@link pendingValidations} (which lists only cohorts still awaiting
|
|
93
|
+
* the validate decision), this returns the stored validation — including the
|
|
94
|
+
* participant's sidecar (the CAS Announcement map or its SMT inclusion proof)
|
|
95
|
+
* — so it is still readable once the cohort reaches Complete. Returns
|
|
96
|
+
* undefined before aggregated data has been received.
|
|
97
|
+
*/
|
|
98
|
+
getValidation(cohortId: string): PendingValidation | undefined;
|
|
90
99
|
/**
|
|
91
100
|
* User action: approve aggregated data and send validation ack.
|
|
92
101
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"participant.d.ts","sourceRoot":"","sources":["../../../../src/core/aggregation/participant.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAC,MAAM,gBAAgB,CAAC;AAKxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAkBtD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAE9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGrD;;;;GAIG;AACH,MAAM,WAAW,YAAa,SAAQ,gBAAgB;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,sBAAsB,EAAE,UAAU,CAAC;CACpC;AAED,oEAAoE;AACpE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CA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,EAAE;IAkBxD,+CAA+C;IAC/C,IAAW,sBAAsB,IAAI,WAAW,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAQ9E;IAyBD;;OAEG;IACI,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,EAAE;IA+DpD;;;;OAIG;IACI,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,EAAE;IA+BzD,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,0BAA0B,GAAG,SAAS;IAI/E;;;;;OAKG;IACI,YAAY,IAAI,IAAI;CAK5B"}
|
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import type { SerializedSMTProof } from '@did-btcr2/smt';
|
|
2
2
|
import type { CohortAdvert, PendingSigningRequest, PendingValidation } from '../participant.js';
|
|
3
3
|
import type { AggregationResult, PendingOptIn, Rejection } from '../service.js';
|
|
4
|
+
/**
|
|
5
|
+
* Sidecar data a participant keeps when a cohort completes from its
|
|
6
|
+
* perspective: the cohort's beacon coordinates plus the off-chain artifact it
|
|
7
|
+
* needs for future DID resolution (the CAS Announcement map for CAS beacons, or
|
|
8
|
+
* the SMT inclusion proof for SMT beacons). Emitted via `cohort-complete` and
|
|
9
|
+
* returned by the participant runner's join helpers.
|
|
10
|
+
*/
|
|
11
|
+
export interface CohortCompleteInfo {
|
|
12
|
+
cohortId: string;
|
|
13
|
+
beaconAddress: string;
|
|
14
|
+
beaconType: string;
|
|
15
|
+
/** DID → base64url update hash. Populated only for CAS beacons. */
|
|
16
|
+
casAnnouncement?: Record<string, string>;
|
|
17
|
+
/** Merkle inclusion proof for this participant's slot. Populated only for SMT beacons. */
|
|
18
|
+
smtProof?: SerializedSMTProof;
|
|
19
|
+
}
|
|
4
20
|
/**
|
|
5
21
|
* AggregationServiceRunner events are emitted by the AggregationServiceRunner to signal important
|
|
6
22
|
* milestones and actions during the aggregation process. They can be listened to by external code
|
|
@@ -15,6 +31,7 @@ export type AggregationServiceEvents = {
|
|
|
15
31
|
'opt-in-received': [PendingOptIn];
|
|
16
32
|
/** A participant has been accepted into the cohort. */
|
|
17
33
|
'participant-accepted': [{
|
|
34
|
+
cohortId: string;
|
|
18
35
|
participantDid: string;
|
|
19
36
|
}];
|
|
20
37
|
/** Keygen has been finalized — beacon address is now available. */
|
|
@@ -24,6 +41,7 @@ export type AggregationServiceEvents = {
|
|
|
24
41
|
}];
|
|
25
42
|
/** A participant has submitted a signed update. */
|
|
26
43
|
'update-received': [{
|
|
44
|
+
cohortId: string;
|
|
27
45
|
participantDid: string;
|
|
28
46
|
}];
|
|
29
47
|
/**
|
|
@@ -40,15 +58,18 @@ export type AggregationServiceEvents = {
|
|
|
40
58
|
}];
|
|
41
59
|
/** A participant has acknowledged validation (approved or rejected). */
|
|
42
60
|
'validation-received': [{
|
|
61
|
+
cohortId: string;
|
|
43
62
|
participantDid: string;
|
|
44
63
|
approved: boolean;
|
|
45
64
|
}];
|
|
46
65
|
/** Signing has started — auth requests sent to participants. */
|
|
47
66
|
'signing-started': [{
|
|
67
|
+
cohortId: string;
|
|
48
68
|
sessionId: string;
|
|
49
69
|
}];
|
|
50
70
|
/** A participant has contributed their MuSig2 nonce. */
|
|
51
71
|
'nonce-received': [{
|
|
72
|
+
cohortId: string;
|
|
52
73
|
participantDid: string;
|
|
53
74
|
}];
|
|
54
75
|
/** Signing complete — final aggregated signature is ready to broadcast. */
|
|
@@ -93,17 +114,7 @@ export type AggregationParticipantEvents = {
|
|
|
93
114
|
* future DID resolution: the CAS Announcement map (for CAS beacons) or the
|
|
94
115
|
* SMT inclusion proof (for SMT beacons).
|
|
95
116
|
*/
|
|
96
|
-
'cohort-complete': [
|
|
97
|
-
{
|
|
98
|
-
cohortId: string;
|
|
99
|
-
beaconAddress: string;
|
|
100
|
-
beaconType: string;
|
|
101
|
-
/** DID → base64url update hash. Populated only for CAS beacons. */
|
|
102
|
-
casAnnouncement?: Record<string, string>;
|
|
103
|
-
/** Merkle inclusion proof for this participant's slot. Populated only for SMT beacons. */
|
|
104
|
-
smtProof?: SerializedSMTProof;
|
|
105
|
-
}
|
|
106
|
-
];
|
|
117
|
+
'cohort-complete': [CohortCompleteInfo];
|
|
107
118
|
/** Cohort failed (rejected validation, signing error, etc.). */
|
|
108
119
|
'cohort-failed': [{
|
|
109
120
|
cohortId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../../src/core/aggregation/runner/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAChG,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAEhF;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,kEAAkE;IAClE,mBAAmB,EAAE,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAE5C,6EAA6E;IAC7E,iBAAiB,EAAE,CAAC,YAAY,CAAC,CAAC;IAElC,uDAAuD;IACvD,sBAAsB,EAAE,CAAC;QAAE,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../../../src/core/aggregation/runner/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAChG,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAEhF;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB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'@did-btcr2/keypair';
|
|
3
|
-
import type { SerializedSMTProof } from '@did-btcr2/smt';
|
|
4
3
|
import type { CohortAdvert, PendingSigningRequest, PendingValidation } from '../participant.js';
|
|
5
4
|
import { AggregationParticipant } from '../participant.js';
|
|
6
5
|
import type { Transport } from '../transport/transport.js';
|
|
7
|
-
import type { AggregationParticipantEvents } from './events.js';
|
|
6
|
+
import type { AggregationParticipantEvents, CohortCompleteInfo } from './events.js';
|
|
8
7
|
import { TypedEventEmitter } from './typed-emitter.js';
|
|
9
8
|
/** Decision callback: filter discovered cohorts. Default rejects all. */
|
|
10
9
|
export type ShouldJoin = (advert: CohortAdvert) => Promise<boolean>;
|
|
@@ -98,16 +97,26 @@ export declare class AggregationParticipantRunner extends TypedEventEmitter<Aggr
|
|
|
98
97
|
stop(): void;
|
|
99
98
|
/**
|
|
100
99
|
* Single-shot helper: start, join the first cohort that passes `shouldJoin`,
|
|
101
|
-
* drive it to completion, and resolve. Convenient for tests and demos.
|
|
100
|
+
* drive it to completion, and resolve. Convenient for tests and demos. The
|
|
101
|
+
* single-cohort special case of {@link joinMatching} (count = 1).
|
|
102
102
|
*/
|
|
103
|
-
static joinFirst(options: AggregationParticipantRunnerOptions): Promise<
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
103
|
+
static joinFirst(options: AggregationParticipantRunnerOptions): Promise<CohortCompleteInfo>;
|
|
104
|
+
/**
|
|
105
|
+
* Multi-cohort helper: start, join EVERY cohort whose advert passes
|
|
106
|
+
* `shouldJoin`, drive each to completion in parallel, and resolve once
|
|
107
|
+
* `count` cohorts have completed (the runner stops at that point). The
|
|
108
|
+
* N-cohort generalization of {@link joinFirst}, for a participant that joins
|
|
109
|
+
* several cohorts advertised by one service.
|
|
110
|
+
*
|
|
111
|
+
* For an open-ended, long-lived subscriber (no fixed count), construct an
|
|
112
|
+
* {@link AggregationParticipantRunner} directly, set `shouldJoin`, call
|
|
113
|
+
* `start()`, and listen for `cohort-complete` — the runner already drives
|
|
114
|
+
* any number of cohorts concurrently.
|
|
115
|
+
*
|
|
116
|
+
* @param options Participant runner options (set `shouldJoin` to select cohorts).
|
|
117
|
+
* @param count Number of completed cohorts to collect before resolving.
|
|
118
|
+
* @returns The {@link CohortCompleteInfo} for each completed cohort, in completion order.
|
|
119
|
+
*/
|
|
120
|
+
static joinMatching(options: AggregationParticipantRunnerOptions, count: number): Promise<CohortCompleteInfo[]>;
|
|
112
121
|
}
|
|
113
122
|
//# sourceMappingURL=participant-runner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"participant-runner.d.ts","sourceRoot":"","sources":["../../../../../src/core/aggregation/runner/participant-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"participant-runner.d.ts","sourceRoot":"","sources":["../../../../../src/core/aggregation/runner/participant-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAUzD,OAAO,KAAK,EACV,YAAY,EACZ,qBAAqB,EACrB,iBAAiB,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EACL,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,yEAAyE;AACzE,MAAM,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,YAAY,KAAK,OAAO,CA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;;;;;OAeG;WACU,YAAY,CACvB,OAAO,EAAE,mCAAmC,EAC5C,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,kBAAkB,EAAE,CAAC;CA+NjC"}
|
|
@@ -27,8 +27,13 @@ export interface AggregationServiceRunnerOptions {
|
|
|
27
27
|
/** This service's identity. */
|
|
28
28
|
did: string;
|
|
29
29
|
keys: SchnorrKeyPair;
|
|
30
|
-
/**
|
|
31
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Default cohort configuration for the {@link AggregationServiceRunner.run}
|
|
32
|
+
* convenience path. Optional: omit it when driving the runner with
|
|
33
|
+
* {@link AggregationServiceRunner.advertiseCohort}, which takes a per-cohort
|
|
34
|
+
* config and can be called many times on one runner.
|
|
35
|
+
*/
|
|
36
|
+
config?: CohortConfig;
|
|
32
37
|
/**
|
|
33
38
|
* Decide whether to accept a participant's opt-in.
|
|
34
39
|
* Default: auto-accept all opt-ins.
|
|
@@ -52,24 +57,26 @@ export interface AggregationServiceRunnerOptions {
|
|
|
52
57
|
*/
|
|
53
58
|
maxUpdateSizeBytes?: number;
|
|
54
59
|
/**
|
|
55
|
-
* Overall wall-clock budget for
|
|
56
|
-
* On expiry the cohort is dropped, `cohort-failed` is
|
|
57
|
-
* rejects with a timeout error.
|
|
60
|
+
* Overall wall-clock budget for each cohort, from advertise to
|
|
61
|
+
* signing-complete. On expiry the cohort is dropped, `cohort-failed` is
|
|
62
|
+
* emitted, and that cohort's completion rejects with a timeout error. Other
|
|
63
|
+
* cohorts on the same runner are unaffected. Leave undefined to disable.
|
|
58
64
|
*/
|
|
59
65
|
cohortTtlMs?: number;
|
|
60
66
|
/**
|
|
61
|
-
* Maximum time allowed between phase transitions. Protects
|
|
62
|
-
* cohorts (e.g. a participant vanishing mid-protocol). Reset
|
|
63
|
-
* on every observed phase change.
|
|
67
|
+
* Maximum time allowed between phase transitions for a cohort. Protects
|
|
68
|
+
* against stalled cohorts (e.g. a participant vanishing mid-protocol). Reset
|
|
69
|
+
* automatically on every observed phase change. Applied per cohort. Leave
|
|
70
|
+
* undefined to disable.
|
|
64
71
|
*/
|
|
65
72
|
phaseTimeoutMs?: number;
|
|
66
73
|
/**
|
|
67
|
-
* Re-publish COHORT_ADVERT on this interval until keygen is
|
|
68
|
-
* Works around relays that don't backfill historical events to
|
|
69
|
-
* subscribers — a republish gives late joiners a window to discover the
|
|
74
|
+
* Re-publish COHORT_ADVERT on this interval until a cohort's keygen is
|
|
75
|
+
* finalized. Works around relays that don't backfill historical events to
|
|
76
|
+
* late subscribers — a republish gives late joiners a window to discover the
|
|
70
77
|
* advert without protocol changes. The first publish is immediate;
|
|
71
|
-
* subsequent publishes fire every `advertRepeatIntervalMs` until
|
|
72
|
-
* keygen
|
|
78
|
+
* subsequent publishes fire every `advertRepeatIntervalMs` until that
|
|
79
|
+
* cohort's keygen completes, fails, or is stopped. Defaults to
|
|
73
80
|
* {@link DEFAULT_ADVERT_REPEAT_INTERVAL_MS} (60 s). Set to 0 to publish
|
|
74
81
|
* once and never retry.
|
|
75
82
|
*/
|
|
@@ -84,6 +91,14 @@ export declare const DEFAULT_ADVERT_REPEAT_INTERVAL_MS = 60000;
|
|
|
84
91
|
* encapsulating message handler registration, outgoing message dispatch,
|
|
85
92
|
* and decision callback orchestration.
|
|
86
93
|
*
|
|
94
|
+
* A single runner is a long-lived multiplexer: it advertises and drives many
|
|
95
|
+
* cohorts concurrently over one transport. Each advertised cohort owns an
|
|
96
|
+
* independent completion promise and fails in isolation — a stalled or failed
|
|
97
|
+
* cohort never settles its siblings (see ADR 040). Use
|
|
98
|
+
* {@link AggregationServiceRunner.advertiseCohort} for the multi-cohort path;
|
|
99
|
+
* {@link AggregationServiceRunner.run} is a thin single-cohort convenience over
|
|
100
|
+
* it.
|
|
101
|
+
*
|
|
87
102
|
* @example
|
|
88
103
|
* ```typescript
|
|
89
104
|
* const transport = new NostrTransport({ relays: [RELAY] });
|
|
@@ -93,16 +108,21 @@ export declare const DEFAULT_ADVERT_REPEAT_INTERVAL_MS = 60000;
|
|
|
93
108
|
* transport,
|
|
94
109
|
* did: serviceDid,
|
|
95
110
|
* keys: serviceKeys,
|
|
96
|
-
*
|
|
97
|
-
* onProvideTxData: async ({ beaconAddress, signalBytes }) => {
|
|
111
|
+
* onProvideTxData: async ({ cohortId, beaconAddress, signalBytes }) => {
|
|
98
112
|
* return await buildBeaconTransaction(beaconAddress, signalBytes, bitcoin);
|
|
99
113
|
* },
|
|
100
114
|
* });
|
|
101
115
|
*
|
|
102
|
-
* runner.on('keygen-complete', ({ beaconAddress }) => console.log(beaconAddress));
|
|
103
|
-
* runner.on('signing-complete', ({ signature }) => console.log('done'));
|
|
116
|
+
* runner.on('keygen-complete', ({ cohortId, beaconAddress }) => console.log(beaconAddress));
|
|
117
|
+
* runner.on('signing-complete', ({ cohortId, signature }) => console.log('done', cohortId));
|
|
104
118
|
*
|
|
105
|
-
*
|
|
119
|
+
* // Multi-cohort: advertise several cohorts; each completion resolves independently.
|
|
120
|
+
* const a = runner.advertiseCohort({ minParticipants: 2, network: 'mutinynet', beaconType: 'CASBeacon' });
|
|
121
|
+
* const b = runner.advertiseCohort({ minParticipants: 3, network: 'mutinynet', beaconType: 'SMTBeacon' });
|
|
122
|
+
* const [ra, rb] = await Promise.all([a.completion, b.completion]);
|
|
123
|
+
*
|
|
124
|
+
* // Single-cohort convenience (requires `config` in the options):
|
|
125
|
+
* // const result = await runner.run();
|
|
106
126
|
* ```
|
|
107
127
|
*
|
|
108
128
|
* For full manual control, drop down to the underlying state machine via
|
|
@@ -117,15 +137,49 @@ export declare class AggregationServiceRunner extends TypedEventEmitter<Aggregat
|
|
|
117
137
|
readonly session: AggregationService;
|
|
118
138
|
constructor(options: AggregationServiceRunnerOptions);
|
|
119
139
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
140
|
+
* Advertise a new cohort and begin driving it to completion. Callable many
|
|
141
|
+
* times on one runner; each cohort runs concurrently and independently.
|
|
142
|
+
*
|
|
143
|
+
* @param config Per-cohort conditions + network (see {@link CohortConfig}).
|
|
144
|
+
* @returns The new cohort's id and a `completion` promise that resolves with
|
|
145
|
+
* that cohort's {@link AggregationResult} (or rejects if it fails/stalls).
|
|
146
|
+
* @throws If the runner has been stopped, or the config is invalid
|
|
147
|
+
* (fail-fast via `createCohort`).
|
|
148
|
+
*/
|
|
149
|
+
advertiseCohort(config: CohortConfig): {
|
|
150
|
+
cohortId: string;
|
|
151
|
+
completion: Promise<AggregationResult>;
|
|
152
|
+
};
|
|
153
|
+
/**
|
|
154
|
+
* Run a single cohort to completion using the `config` supplied in the
|
|
155
|
+
* runner options. Thin convenience over {@link advertiseCohort} for the
|
|
156
|
+
* single-cohort case (and the path {@link AggregationRunner.solo} rides).
|
|
122
157
|
*
|
|
123
158
|
* @returns {Promise<AggregationResult>} The final result with signature and signed tx.
|
|
124
159
|
*/
|
|
125
160
|
run(): Promise<AggregationResult>;
|
|
126
161
|
/**
|
|
127
|
-
*
|
|
128
|
-
*
|
|
162
|
+
* Wait for every currently-outstanding cohort to settle and return the
|
|
163
|
+
* successful results. Dynamic drain: cohorts advertised while this is pending
|
|
164
|
+
* are included, and it resolves only once no cohorts remain. Failed cohorts
|
|
165
|
+
* are surfaced via `error` / `cohort-failed` events and their rejected
|
|
166
|
+
* `completion` promises; they are omitted from the returned array (this
|
|
167
|
+
* method does not throw). Bound long-running cohorts with `cohortTtlMs` /
|
|
168
|
+
* `phaseTimeoutMs` or this may never resolve.
|
|
169
|
+
*
|
|
170
|
+
* @returns {Promise<AggregationResult[]>} Results of the cohorts that completed.
|
|
171
|
+
*/
|
|
172
|
+
runAll(): Promise<AggregationResult[]>;
|
|
173
|
+
/**
|
|
174
|
+
* Stop a single cohort early without affecting the rest of the runner. Drops
|
|
175
|
+
* the cohort's state machine state; its `completion` promise rejects with a
|
|
176
|
+
* stopped error.
|
|
177
|
+
*/
|
|
178
|
+
stopCohort(cohortId: string): void;
|
|
179
|
+
/**
|
|
180
|
+
* Stop the whole runner. Fails every outstanding cohort, then detaches the
|
|
181
|
+
* shared transport handlers so a restart or a new runner doesn't inherit
|
|
182
|
+
* stale dispatch. Safe to call repeatedly.
|
|
129
183
|
*/
|
|
130
184
|
stop(): void;
|
|
131
185
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-runner.d.ts","sourceRoot":"","sources":["../../../../../src/core/aggregation/runner/service-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"service-runner.d.ts","sourceRoot":"","sources":["../../../../../src/core/aggregation/runner/service-runner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAWzD,OAAO,KAAK,EACV,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EAAC,MAAM,eAAe,CAAC;AACtC,OAAO,EACL,kBAAkB,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,kEAAkE;AAClE,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,YAAY,KAAK,OAAO,CAAC;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAEtF,6EAA6E;AAC7E,MAAM,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE;IACrC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACrB,KAAK,OAAO,CAAC;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAC,CAAC;AAErC,mEAAmE;AACnE,MAAM,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAA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IACH,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IASlC;;;;OAIG;IACH,IAAI,IAAI,IAAI;CAyQb"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@did-btcr2/method",
|
|
3
|
-
"version": "0.36.
|
|
3
|
+
"version": "0.36.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Reference implementation for the did:btcr2 DID method written in TypeScript and JavaScript. did:btcr2 is a censorship resistant DID Method using the Bitcoin blockchain as a Verifiable Data Registry to announce changes to the DID document. This is the core method implementation for the did-btcr2-js monorepo.",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -80,11 +80,11 @@
|
|
|
80
80
|
"helia": "^5.5.1",
|
|
81
81
|
"multiformats": "^13.4.2",
|
|
82
82
|
"nostr-tools": "^2.23.3",
|
|
83
|
+
"@did-btcr2/bitcoin": "^0.6.0",
|
|
84
|
+
"@did-btcr2/keypair": "^0.13.1",
|
|
83
85
|
"@did-btcr2/smt": "^0.3.0",
|
|
84
86
|
"@did-btcr2/common": "^9.1.0",
|
|
85
|
-
"@did-btcr2/
|
|
86
|
-
"@did-btcr2/cryptosuite": "^8.0.0",
|
|
87
|
-
"@did-btcr2/bitcoin": "^0.6.0"
|
|
87
|
+
"@did-btcr2/cryptosuite": "^8.0.0"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@eslint/js": "^9.39.4",
|
|
@@ -307,6 +307,18 @@ export class AggregationParticipant {
|
|
|
307
307
|
return map;
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
+
/**
|
|
311
|
+
* The validated aggregated data retained for a cohort, regardless of phase.
|
|
312
|
+
* Unlike {@link pendingValidations} (which lists only cohorts still awaiting
|
|
313
|
+
* the validate decision), this returns the stored validation — including the
|
|
314
|
+
* participant's sidecar (the CAS Announcement map or its SMT inclusion proof)
|
|
315
|
+
* — so it is still readable once the cohort reaches Complete. Returns
|
|
316
|
+
* undefined before aggregated data has been received.
|
|
317
|
+
*/
|
|
318
|
+
public getValidation(cohortId: string): PendingValidation | undefined {
|
|
319
|
+
return this.#cohortStates.get(cohortId)?.validation;
|
|
320
|
+
}
|
|
321
|
+
|
|
310
322
|
#handleDistributeAggregatedData(message: BaseMessage): void {
|
|
311
323
|
const cohortId = message.body?.cohortId;
|
|
312
324
|
if(!cohortId) return;
|
|
@@ -2,6 +2,23 @@ import type { SerializedSMTProof } from '@did-btcr2/smt';
|
|
|
2
2
|
import type { CohortAdvert, PendingSigningRequest, PendingValidation } from '../participant.js';
|
|
3
3
|
import type { AggregationResult, PendingOptIn, Rejection } from '../service.js';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Sidecar data a participant keeps when a cohort completes from its
|
|
7
|
+
* perspective: the cohort's beacon coordinates plus the off-chain artifact it
|
|
8
|
+
* needs for future DID resolution (the CAS Announcement map for CAS beacons, or
|
|
9
|
+
* the SMT inclusion proof for SMT beacons). Emitted via `cohort-complete` and
|
|
10
|
+
* returned by the participant runner's join helpers.
|
|
11
|
+
*/
|
|
12
|
+
export interface CohortCompleteInfo {
|
|
13
|
+
cohortId: string;
|
|
14
|
+
beaconAddress: string;
|
|
15
|
+
beaconType: string;
|
|
16
|
+
/** DID → base64url update hash. Populated only for CAS beacons. */
|
|
17
|
+
casAnnouncement?: Record<string, string>;
|
|
18
|
+
/** Merkle inclusion proof for this participant's slot. Populated only for SMT beacons. */
|
|
19
|
+
smtProof?: SerializedSMTProof;
|
|
20
|
+
}
|
|
21
|
+
|
|
5
22
|
/**
|
|
6
23
|
* AggregationServiceRunner events are emitted by the AggregationServiceRunner to signal important
|
|
7
24
|
* milestones and actions during the aggregation process. They can be listened to by external code
|
|
@@ -15,13 +32,13 @@ export type AggregationServiceEvents = {
|
|
|
15
32
|
'opt-in-received': [PendingOptIn];
|
|
16
33
|
|
|
17
34
|
/** A participant has been accepted into the cohort. */
|
|
18
|
-
'participant-accepted': [{ participantDid: string }];
|
|
35
|
+
'participant-accepted': [{ cohortId: string; participantDid: string }];
|
|
19
36
|
|
|
20
37
|
/** Keygen has been finalized — beacon address is now available. */
|
|
21
38
|
'keygen-complete': [{ cohortId: string; beaconAddress: string }];
|
|
22
39
|
|
|
23
40
|
/** A participant has submitted a signed update. */
|
|
24
|
-
'update-received': [{ participantDid: string }];
|
|
41
|
+
'update-received': [{ cohortId: string; participantDid: string }];
|
|
25
42
|
|
|
26
43
|
/**
|
|
27
44
|
* An inbound message was silently dropped by the state machine (bad proof,
|
|
@@ -34,13 +51,13 @@ export type AggregationServiceEvents = {
|
|
|
34
51
|
'data-distributed': [{ cohortId: string }];
|
|
35
52
|
|
|
36
53
|
/** A participant has acknowledged validation (approved or rejected). */
|
|
37
|
-
'validation-received': [{ participantDid: string; approved: boolean }];
|
|
54
|
+
'validation-received': [{ cohortId: string; participantDid: string; approved: boolean }];
|
|
38
55
|
|
|
39
56
|
/** Signing has started — auth requests sent to participants. */
|
|
40
|
-
'signing-started': [{ sessionId: string }];
|
|
57
|
+
'signing-started': [{ cohortId: string; sessionId: string }];
|
|
41
58
|
|
|
42
59
|
/** A participant has contributed their MuSig2 nonce. */
|
|
43
|
-
'nonce-received': [{ participantDid: string }];
|
|
60
|
+
'nonce-received': [{ cohortId: string; participantDid: string }];
|
|
44
61
|
|
|
45
62
|
/** Signing complete — final aggregated signature is ready to broadcast. */
|
|
46
63
|
'signing-complete': [AggregationResult];
|
|
@@ -83,15 +100,7 @@ export type AggregationParticipantEvents = {
|
|
|
83
100
|
* future DID resolution: the CAS Announcement map (for CAS beacons) or the
|
|
84
101
|
* SMT inclusion proof (for SMT beacons).
|
|
85
102
|
*/
|
|
86
|
-
'cohort-complete': [
|
|
87
|
-
cohortId: string;
|
|
88
|
-
beaconAddress: string;
|
|
89
|
-
beaconType: string;
|
|
90
|
-
/** DID → base64url update hash. Populated only for CAS beacons. */
|
|
91
|
-
casAnnouncement?: Record<string, string>;
|
|
92
|
-
/** Merkle inclusion proof for this participant's slot. Populated only for SMT beacons. */
|
|
93
|
-
smtProof?: SerializedSMTProof;
|
|
94
|
-
}];
|
|
103
|
+
'cohort-complete': [CohortCompleteInfo];
|
|
95
104
|
|
|
96
105
|
/** Cohort failed (rejected validation, signing error, etc.). */
|
|
97
106
|
'cohort-failed': [{ cohortId: string; reason: string }];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { SignedBTCR2Update } from '@did-btcr2/cryptosuite';
|
|
2
2
|
import type { SchnorrKeyPair } from '@did-btcr2/keypair';
|
|
3
|
-
import type { SerializedSMTProof } from '@did-btcr2/smt';
|
|
4
3
|
import type { BaseMessage } from '../messages/base.js';
|
|
5
4
|
import {
|
|
6
5
|
AGGREGATED_NONCE,
|
|
@@ -20,7 +19,7 @@ import {
|
|
|
20
19
|
import { ParticipantCohortPhase } from '../phases.js';
|
|
21
20
|
import { KeyPairAggregationSigner } from '../signer.js';
|
|
22
21
|
import type { Transport } from '../transport/transport.js';
|
|
23
|
-
import type { AggregationParticipantEvents } from './events.js';
|
|
22
|
+
import type { AggregationParticipantEvents, CohortCompleteInfo } from './events.js';
|
|
24
23
|
import { TypedEventEmitter } from './typed-emitter.js';
|
|
25
24
|
|
|
26
25
|
/** Decision callback: filter discovered cohorts. Default rejects all. */
|
|
@@ -175,19 +174,12 @@ export class AggregationParticipantRunner extends TypedEventEmitter<AggregationP
|
|
|
175
174
|
|
|
176
175
|
/**
|
|
177
176
|
* Single-shot helper: start, join the first cohort that passes `shouldJoin`,
|
|
178
|
-
* drive it to completion, and resolve. Convenient for tests and demos.
|
|
177
|
+
* drive it to completion, and resolve. Convenient for tests and demos. The
|
|
178
|
+
* single-cohort special case of {@link joinMatching} (count = 1).
|
|
179
179
|
*/
|
|
180
180
|
static async joinFirst(
|
|
181
181
|
options: AggregationParticipantRunnerOptions
|
|
182
|
-
): Promise<{
|
|
183
|
-
cohortId: string;
|
|
184
|
-
beaconAddress: string;
|
|
185
|
-
beaconType: string;
|
|
186
|
-
/** DID → base64url update hash. Populated only for CAS beacons. */
|
|
187
|
-
casAnnouncement?: Record<string, string>;
|
|
188
|
-
/** Merkle inclusion proof for this participant's slot. Populated only for SMT beacons. */
|
|
189
|
-
smtProof?: SerializedSMTProof;
|
|
190
|
-
}> {
|
|
182
|
+
): Promise<CohortCompleteInfo> {
|
|
191
183
|
return new Promise((resolve, reject) => {
|
|
192
184
|
const runner = new AggregationParticipantRunner(options);
|
|
193
185
|
runner.once('cohort-complete', (info) => {
|
|
@@ -199,6 +191,41 @@ export class AggregationParticipantRunner extends TypedEventEmitter<AggregationP
|
|
|
199
191
|
});
|
|
200
192
|
}
|
|
201
193
|
|
|
194
|
+
/**
|
|
195
|
+
* Multi-cohort helper: start, join EVERY cohort whose advert passes
|
|
196
|
+
* `shouldJoin`, drive each to completion in parallel, and resolve once
|
|
197
|
+
* `count` cohorts have completed (the runner stops at that point). The
|
|
198
|
+
* N-cohort generalization of {@link joinFirst}, for a participant that joins
|
|
199
|
+
* several cohorts advertised by one service.
|
|
200
|
+
*
|
|
201
|
+
* For an open-ended, long-lived subscriber (no fixed count), construct an
|
|
202
|
+
* {@link AggregationParticipantRunner} directly, set `shouldJoin`, call
|
|
203
|
+
* `start()`, and listen for `cohort-complete` — the runner already drives
|
|
204
|
+
* any number of cohorts concurrently.
|
|
205
|
+
*
|
|
206
|
+
* @param options Participant runner options (set `shouldJoin` to select cohorts).
|
|
207
|
+
* @param count Number of completed cohorts to collect before resolving.
|
|
208
|
+
* @returns The {@link CohortCompleteInfo} for each completed cohort, in completion order.
|
|
209
|
+
*/
|
|
210
|
+
static async joinMatching(
|
|
211
|
+
options: AggregationParticipantRunnerOptions,
|
|
212
|
+
count: number,
|
|
213
|
+
): Promise<CohortCompleteInfo[]> {
|
|
214
|
+
return new Promise((resolve, reject) => {
|
|
215
|
+
const runner = new AggregationParticipantRunner(options);
|
|
216
|
+
const completed: CohortCompleteInfo[] = [];
|
|
217
|
+
runner.on('cohort-complete', (info) => {
|
|
218
|
+
completed.push(info);
|
|
219
|
+
if(completed.length >= count) {
|
|
220
|
+
runner.stop();
|
|
221
|
+
resolve(completed);
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
runner.on('error', reject);
|
|
225
|
+
runner.start().catch(reject);
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
|
|
202
229
|
/**
|
|
203
230
|
* Internal: handler registration with the transport. Idempotent and safe to call multiple times,
|
|
204
231
|
* but only registers handlers once.
|
|
@@ -376,7 +403,10 @@ export class AggregationParticipantRunner extends TypedEventEmitter<AggregationP
|
|
|
376
403
|
if (info) {
|
|
377
404
|
// Surface the sidecar data the participant will need for future resolutions:
|
|
378
405
|
// the CAS Announcement map (CAS beacons) or their SMT inclusion proof.
|
|
379
|
-
|
|
406
|
+
// Read via getValidation (not pendingValidations, which lists only the
|
|
407
|
+
// AwaitingValidation phase) so the sidecar is still available now that
|
|
408
|
+
// the cohort has reached Complete.
|
|
409
|
+
const validation = this.session.getValidation(cohortId);
|
|
380
410
|
this.emit('cohort-complete', {
|
|
381
411
|
cohortId,
|
|
382
412
|
beaconAddress : info.beaconAddress,
|