@did-btcr2/method 0.22.0 → 0.24.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/README.md +96 -50
- package/dist/browser.js +35708 -37764
- package/dist/browser.mjs +35707 -37763
- package/dist/cjs/core/beacon/aggregation/cohort/index.js +13 -2
- package/dist/cjs/core/beacon/aggregation/cohort/index.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/cohort/messages/base.js +7 -2
- package/dist/cjs/core/beacon/aggregation/cohort/messages/base.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/communication/adapter/did-comm.js +6 -11
- package/dist/cjs/core/beacon/aggregation/communication/adapter/did-comm.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/communication/adapter/nostr.js +5 -8
- package/dist/cjs/core/beacon/aggregation/communication/adapter/nostr.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/coordinator.js +40 -44
- package/dist/cjs/core/beacon/aggregation/coordinator.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/participant.js +35 -38
- package/dist/cjs/core/beacon/aggregation/participant.js.map +1 -1
- package/dist/cjs/core/beacon/aggregation/session/index.js +18 -7
- package/dist/cjs/core/beacon/aggregation/session/index.js.map +1 -1
- package/dist/cjs/core/beacon/cas-beacon.js +1 -1
- package/dist/cjs/core/beacon/cas-beacon.js.map +1 -1
- package/dist/cjs/core/beacon/signal-discovery.js +6 -6
- package/dist/cjs/core/beacon/signal-discovery.js.map +1 -1
- package/dist/cjs/core/beacon/singleton.js +18 -17
- package/dist/cjs/core/beacon/singleton.js.map +1 -1
- package/dist/cjs/core/beacon/smt-beacon.js +1 -1
- package/dist/cjs/core/beacon/smt-beacon.js.map +1 -1
- package/dist/cjs/core/identifier.js +11 -13
- package/dist/cjs/core/identifier.js.map +1 -1
- package/dist/cjs/core/resolve.js +25 -22
- package/dist/cjs/core/resolve.js.map +1 -1
- package/dist/cjs/core/update.js +4 -4
- package/dist/cjs/core/update.js.map +1 -1
- package/dist/cjs/did-btcr2.js +11 -16
- package/dist/cjs/did-btcr2.js.map +1 -1
- package/dist/cjs/index.js +0 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/utils/did-document.js +22 -21
- package/dist/cjs/utils/did-document.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/cohort/index.js +13 -2
- package/dist/esm/core/beacon/aggregation/cohort/index.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/cohort/messages/base.js +7 -2
- package/dist/esm/core/beacon/aggregation/cohort/messages/base.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/communication/adapter/did-comm.js +6 -11
- package/dist/esm/core/beacon/aggregation/communication/adapter/did-comm.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/communication/adapter/nostr.js +5 -8
- package/dist/esm/core/beacon/aggregation/communication/adapter/nostr.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/coordinator.js +40 -44
- package/dist/esm/core/beacon/aggregation/coordinator.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/participant.js +35 -38
- package/dist/esm/core/beacon/aggregation/participant.js.map +1 -1
- package/dist/esm/core/beacon/aggregation/session/index.js +18 -7
- package/dist/esm/core/beacon/aggregation/session/index.js.map +1 -1
- package/dist/esm/core/beacon/cas-beacon.js +1 -1
- package/dist/esm/core/beacon/cas-beacon.js.map +1 -1
- package/dist/esm/core/beacon/signal-discovery.js +6 -6
- package/dist/esm/core/beacon/signal-discovery.js.map +1 -1
- package/dist/esm/core/beacon/singleton.js +18 -17
- package/dist/esm/core/beacon/singleton.js.map +1 -1
- package/dist/esm/core/beacon/smt-beacon.js +1 -1
- package/dist/esm/core/beacon/smt-beacon.js.map +1 -1
- package/dist/esm/core/identifier.js +11 -13
- package/dist/esm/core/identifier.js.map +1 -1
- package/dist/esm/core/resolve.js +25 -22
- package/dist/esm/core/resolve.js.map +1 -1
- package/dist/esm/core/update.js +4 -4
- package/dist/esm/core/update.js.map +1 -1
- package/dist/esm/did-btcr2.js +11 -16
- package/dist/esm/did-btcr2.js.map +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/utils/did-document.js +22 -21
- package/dist/esm/utils/did-document.js.map +1 -1
- package/dist/types/core/beacon/aggregation/cohort/index.d.ts +2 -1
- package/dist/types/core/beacon/aggregation/cohort/index.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/cohort/messages/base.d.ts +2 -1
- package/dist/types/core/beacon/aggregation/cohort/messages/base.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/cohort/messages/constants.d.ts +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/index.d.ts +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/cohort-advert.d.ts +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.d.ts +2 -2
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/opt-in-accept.d.ts +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/opt-in.d.ts +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/keygen/subscribe.d.ts +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/aggregated-nonce.d.ts +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/authorization-request.d.ts +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/nonce-contribution.d.ts +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/request-signature.d.ts +1 -0
- package/dist/types/core/beacon/aggregation/cohort/messages/sign/signature-authorization.d.ts +1 -0
- package/dist/types/core/beacon/aggregation/cohort/status.d.ts +1 -0
- package/dist/types/core/beacon/aggregation/communication/adapter/did-comm.d.ts +4 -3
- package/dist/types/core/beacon/aggregation/communication/adapter/did-comm.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/communication/adapter/nostr.d.ts +5 -3
- package/dist/types/core/beacon/aggregation/communication/adapter/nostr.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/communication/error.d.ts +1 -0
- package/dist/types/core/beacon/aggregation/communication/factory.d.ts +1 -0
- package/dist/types/core/beacon/aggregation/communication/service.d.ts +3 -2
- package/dist/types/core/beacon/aggregation/communication/service.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/coordinator.d.ts +1 -0
- package/dist/types/core/beacon/aggregation/coordinator.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/participant.d.ts +1 -0
- package/dist/types/core/beacon/aggregation/participant.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/session/index.d.ts +2 -1
- package/dist/types/core/beacon/aggregation/session/index.d.ts.map +1 -1
- package/dist/types/core/beacon/aggregation/session/status.d.ts +1 -0
- package/dist/types/core/beacon/beacon.d.ts +4 -3
- package/dist/types/core/beacon/beacon.d.ts.map +1 -1
- package/dist/types/core/beacon/cas-beacon.d.ts +4 -3
- package/dist/types/core/beacon/cas-beacon.d.ts.map +1 -1
- package/dist/types/core/beacon/error.d.ts +1 -0
- package/dist/types/core/beacon/factory.d.ts +1 -0
- package/dist/types/core/beacon/interfaces.d.ts +1 -0
- package/dist/types/core/beacon/signal-discovery.d.ts +6 -5
- package/dist/types/core/beacon/signal-discovery.d.ts.map +1 -1
- package/dist/types/core/beacon/singleton.d.ts +4 -4
- package/dist/types/core/beacon/singleton.d.ts.map +1 -1
- 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/beacon/utils.d.ts +1 -0
- package/dist/types/core/identifier.d.ts +18 -21
- package/dist/types/core/identifier.d.ts.map +1 -1
- package/dist/types/core/interfaces.d.ts +3 -2
- package/dist/types/core/interfaces.d.ts.map +1 -1
- package/dist/types/core/resolve.d.ts +4 -3
- package/dist/types/core/resolve.d.ts.map +1 -1
- package/dist/types/core/types.d.ts +1 -0
- package/dist/types/core/update.d.ts +3 -2
- package/dist/types/core/update.d.ts.map +1 -1
- package/dist/types/did-btcr2.d.ts +5 -4
- package/dist/types/did-btcr2.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/utils/appendix.d.ts +1 -0
- package/dist/types/utils/did-document-builder.d.ts +1 -0
- package/dist/types/utils/did-document.d.ts +5 -7
- package/dist/types/utils/did-document.d.ts.map +1 -1
- package/package.json +5 -6
- package/src/core/beacon/aggregation/cohort/index.ts +13 -2
- package/src/core/beacon/aggregation/cohort/messages/base.ts +7 -2
- package/src/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.ts +1 -1
- package/src/core/beacon/aggregation/communication/adapter/did-comm.ts +9 -15
- package/src/core/beacon/aggregation/communication/adapter/nostr.ts +9 -11
- package/src/core/beacon/aggregation/communication/service.ts +2 -2
- package/src/core/beacon/aggregation/coordinator.ts +40 -44
- package/src/core/beacon/aggregation/participant.ts +38 -40
- package/src/core/beacon/aggregation/session/index.ts +18 -7
- package/src/core/beacon/beacon.ts +3 -3
- package/src/core/beacon/cas-beacon.ts +3 -3
- package/src/core/beacon/signal-discovery.ts +9 -9
- package/src/core/beacon/singleton.ts +20 -20
- package/src/core/beacon/smt-beacon.ts +3 -3
- package/src/core/identifier.ts +31 -28
- package/src/core/interfaces.ts +2 -2
- package/src/core/resolve.ts +32 -26
- package/src/core/update.ts +6 -6
- package/src/did-btcr2.ts +21 -21
- package/src/index.ts +0 -1
- package/src/utils/did-document.ts +24 -20
- package/dist/cjs/utils/general.js +0 -195
- package/dist/cjs/utils/general.js.map +0 -1
- package/dist/esm/utils/general.js +0 -195
- package/dist/esm/utils/general.js.map +0 -1
- package/dist/types/utils/general.d.ts +0 -85
- package/dist/types/utils/general.d.ts.map +0 -1
- package/src/utils/general.ts +0 -204
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/beacon/aggregation/cohort/messages/base.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,yBAAyB,CAAC;AAErD,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB,CAAC;AAEF,qBAAa,WAAW;IACf,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,CAAC;gBAEX,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,IAAI;IAO1C;;;OAGG;IACI,
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/beacon/aggregation/cohort/messages/base.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,yBAAyB,CAAC;AAErD,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,UAAU,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,iBAAiB,CAAC,EAAE,UAAU,CAAC;IAC/B,gBAAgB,CAAC,EAAE,UAAU,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB,CAAC;AAEF,qBAAa,WAAW;IACf,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,QAAQ,CAAC;gBAEX,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,IAAI;IAO1C;;;OAGG;IACI,MAAM,IAAI,IAAI;CAQtB"}
|
|
@@ -8,3 +8,4 @@ export declare const BEACON_COHORT_AUTHORIZATION_REQUEST = "https://btcr2.dev/mu
|
|
|
8
8
|
export declare const BEACON_COHORT_NONCE_CONTRIBUTION = "https://btcr2.dev/musig2/sign/beacon/cohort_nonce_contribution";
|
|
9
9
|
export declare const BEACON_COHORT_AGGREGATED_NONCE = "https://btcr2.dev/musig2/sign/beacon/cohort_aggregated_nonce";
|
|
10
10
|
export declare const BEACON_COHORT_SIGNATURE_AUTHORIZATION = "https://btcr2.dev/musig2/sign/beacon/cohort_signature_authorization";
|
|
11
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Maybe } from '@did-btcr2/common';
|
|
2
2
|
import { BaseMessage } from '../base.js';
|
|
3
|
-
import { BEACON_COHORT_READY } from '../constants.js';
|
|
4
3
|
export interface CohortReadyMessage {
|
|
5
|
-
type?:
|
|
4
|
+
type?: string;
|
|
6
5
|
to: string;
|
|
7
6
|
from: string;
|
|
8
7
|
cohortId: string;
|
|
@@ -24,3 +23,4 @@ export declare class BeaconCohortReadyMessage extends BaseMessage {
|
|
|
24
23
|
*/
|
|
25
24
|
static fromJSON(data: Maybe<CohortReadyMessage>): BeaconCohortReadyMessage;
|
|
26
25
|
}
|
|
26
|
+
//# sourceMappingURL=cohort-ready.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cohort-ready.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"cohort-ready.d.ts","sourceRoot":"","sources":["../../../../../../../../src/core/beacon/aggregation/cohort/messages/keygen/cohort-ready.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGzC,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;CAC/B;AAED;;;;;GAKG;AACH,qBAAa,wBAAyB,SAAQ,WAAW;gBAC3C,EAAE,IAAI,EAAE,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,EAAE,kBAAkB;IAMjF;;;;OAIG;WACW,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC,kBAAkB,CAAC,GAAG,wBAAwB;CAOlF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Maybe } from '@did-btcr2/common';
|
|
2
1
|
import { RawSchnorrKeyPair } from '@did-btcr2/keypair';
|
|
3
2
|
import { AggregateBeaconMessageType } from '../../cohort/messages/index.js';
|
|
3
|
+
import { BaseMessage } from '../../cohort/messages/base.js';
|
|
4
4
|
import { CommunicationService, MessageHandler, ServiceAdapterConfig, ServiceAdapterIdentity } from '../service.js';
|
|
5
5
|
/**
|
|
6
6
|
* DidCommAdapterConfig is a configuration class for the DidCommAdapter.
|
|
@@ -73,12 +73,12 @@ export declare class DidCommAdapter implements CommunicationService {
|
|
|
73
73
|
/**
|
|
74
74
|
* Sends a message to a recipient using the Nostr protocol.
|
|
75
75
|
* This method is a placeholder and should be implemented with actual Nostr message sending logic.
|
|
76
|
-
* @param {
|
|
76
|
+
* @param {AggregateBeaconMessageType} _message The message to send, typically containing the content and metadata.
|
|
77
77
|
* @param {string} _recipient The public key or identifier of the recipient.
|
|
78
78
|
* @param {string} _sender The public key or identifier of the sender.
|
|
79
79
|
* @returns {Promise<void>} A promise that resolves when the message is sent.
|
|
80
80
|
*/
|
|
81
|
-
sendMessage(_message:
|
|
81
|
+
sendMessage(_message: AggregateBeaconMessageType | BaseMessage, _recipient: string, _sender: string): Promise<void | Promise<string>[]>;
|
|
82
82
|
/**
|
|
83
83
|
* Generates a DidComm identity.
|
|
84
84
|
* @param {RawKeyPair} [keys] Optional keys to use for identity generation.
|
|
@@ -86,3 +86,4 @@ export declare class DidCommAdapter implements CommunicationService {
|
|
|
86
86
|
*/
|
|
87
87
|
generateIdentity(keys?: RawSchnorrKeyPair): ServiceAdapterConfig;
|
|
88
88
|
}
|
|
89
|
+
//# sourceMappingURL=did-comm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"did-comm.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/beacon/aggregation/communication/adapter/did-comm.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"did-comm.d.ts","sourceRoot":"","sources":["../../../../../../../src/core/beacon/aggregation/communication/adapter/did-comm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAsC,MAAM,oBAAoB,CAAC;AAE3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEnH;;;;;;GAMG;AACH,qBAAa,oBAAqB,YAAW,oBAAoB;IACxD,IAAI,EAAE,iBAAiB,CAAC;IACxB,UAAU,EAAE;QACjB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACK,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,MAAM,EAAE,CAAC;IAEjC;;;;;OAKG;gBACS,MAAM,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC;CAUnD;AAED;;;;;;GAMG;AACH,qBAAa,cAAe,YAAW,oBAAoB;IACzD;;;OAGG;IACI,IAAI,EAAE,MAAM,CAAa;IAEhC;;;OAGG;IACI,MAAM,EAAE,oBAAoB,CAAC;IAEpC;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAA0C;IAE1D;;;OAGG;gBACS,MAAM,GAAE,oBAAiD;IAIrE;;;OAGG;IACI,KAAK,IAAI,IAAI;IAIpB;;;OAGG;IACI,OAAO,CAAC,IAAI,EAAE,sBAAsB,CAAC,iBAAiB,CAAC,GAAG,IAAI;IAIrE;;;;OAIG;IACI,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;IAIjF;;;;;;;OAOG;IACU,WAAW,CACtB,QAAQ,EAAE,0BAA0B,GAAG,WAAW,EAClD,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;IAIpC;;;;OAIG;IACI,gBAAgB,CAAC,IAAI,CAAC,EAAE,iBAAiB,GAAG,oBAAoB;CAwBxE"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Did
|
|
1
|
+
import { Did } from '@did-btcr2/common';
|
|
2
2
|
import { RawSchnorrKeyPair } from '@did-btcr2/keypair';
|
|
3
3
|
import { SimplePool } from 'nostr-tools/pool';
|
|
4
4
|
import { AggregateBeaconMessageType } from '../../cohort/messages/index.js';
|
|
5
|
+
import { BaseMessage } from '../../cohort/messages/base.js';
|
|
5
6
|
import { CommunicationService, MessageHandler, ServiceAdapter, ServiceAdapterConfig, ServiceAdapterIdentity } from '../service.js';
|
|
6
7
|
/**
|
|
7
8
|
* TODO: Determine set of default Nostr relays to use.
|
|
@@ -85,12 +86,12 @@ export declare class NostrAdapter implements CommunicationService {
|
|
|
85
86
|
* TODO: Clean up and complete this method.
|
|
86
87
|
* Sends a message to a recipient using the Nostr protocol.
|
|
87
88
|
* This method is a placeholder and should be implemented with actual Nostr message sending logic.
|
|
88
|
-
* @param {
|
|
89
|
+
* @param {AggregateBeaconMessageType} message The message to send, typically containing the content and metadata.
|
|
89
90
|
* @param {Did} from The identifier of the sender.
|
|
90
91
|
* @param {Did} [to] The identifier of the recipient.
|
|
91
92
|
* @returns {Promise<void>} A promise that resolves when the message is sent.
|
|
92
93
|
*/
|
|
93
|
-
sendMessage(message:
|
|
94
|
+
sendMessage(message: AggregateBeaconMessageType | BaseMessage, from: Did, to?: Did): Promise<void | Promise<string>[]>;
|
|
94
95
|
/**
|
|
95
96
|
* TODO: Determine if this method is needed.
|
|
96
97
|
* Generates a Nostr identity using the Secp256k1SecretKey and Identifier classes.
|
|
@@ -99,3 +100,4 @@ export declare class NostrAdapter implements CommunicationService {
|
|
|
99
100
|
*/
|
|
100
101
|
generateIdentity(keys?: RawSchnorrKeyPair): ServiceAdapterConfig;
|
|
101
102
|
}
|
|
103
|
+
//# sourceMappingURL=nostr.d.ts.map
|
|
@@ -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,
|
|
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;AAGzH,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,5 +1,5 @@
|
|
|
1
|
-
import { Maybe } from '@did-btcr2/common';
|
|
2
1
|
import { AggregateBeaconMessageType } from '../cohort/messages/index.js';
|
|
2
|
+
import { BaseMessage } from '../cohort/messages/base.js';
|
|
3
3
|
import { RawSchnorrKeyPair } from '@did-btcr2/keypair';
|
|
4
4
|
/**
|
|
5
5
|
* ServiceAdapterConfig defines the configuration structure for the Nostr communication service.
|
|
@@ -30,6 +30,7 @@ export interface CommunicationService {
|
|
|
30
30
|
start(): void;
|
|
31
31
|
setKeys(keys: ServiceAdapterIdentity<RawSchnorrKeyPair>): void;
|
|
32
32
|
registerMessageHandler(messageType: string, handler: MessageHandler): void;
|
|
33
|
-
sendMessage(message:
|
|
33
|
+
sendMessage(message: AggregateBeaconMessageType | BaseMessage, sender: string, recipient?: string): Promise<void | Promise<string>[]>;
|
|
34
34
|
generateIdentity(keys?: RawSchnorrKeyPair): ServiceAdapterConfigType<ServiceAdapterConfig>;
|
|
35
35
|
}
|
|
36
|
+
//# sourceMappingURL=service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../../src/core/beacon/aggregation/communication/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../../src/core/beacon/aggregation/communication/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;;;;;GAMG;AACH,MAAM,WAAW,oBAAqB,SAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAC/D,IAAI,EAAE,sBAAsB,CAAC,GAAG,CAAC,CAAC;IAClC,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,CAAC;AACpD,MAAM,MAAM,mBAAmB,GAAG,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9D,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG,mBAAmB,CAAC;AAEtE,MAAM,MAAM,wBAAwB,GAAG,OAAO,GAAG,SAAS,CAAC;AAC3D,MAAM,MAAM,wBAAwB,CAAC,CAAC,SAAS,oBAAoB,IAAI,CAAC,CAAC;AACzE,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,wBAAwB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IG;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,
|
|
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;AACpD,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,CAAC;AAEhE,KAAK,IAAI,GAAG,QAAQ,CAAC;AACrB,KAAK,QAAQ,GAAG,MAAM,CAAC;AAEvB,KAAK,SAAS,GAAG,MAAM,CAAC;AACxB,KAAK,qBAAqB,GAAG,GAAG,CAAC,SAAS,EAAE,0BAA0B,CAAC,CAAC;AAExE,KAAK,QAAQ,GAAG,MAAM,CAAC;AACvB,KAAK,QAAQ,GAAG,MAAM,CAAC;AACvB,KAAK,cAAc,GAAG,GAAG,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAE9C,KAAK,uBAAuB,GAAG;IAC7B,GAAG,EAAE,IAAI,GAAG,QAAQ,CAAC;IACrB,QAAQ,CAAC,EAAE,oBA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AG,OAAO,CAAC,IAAI,CAAC;IA2B1G;;;;OAIG;IACU,sBAAsB,CAAC,OAAO,EAAE,KAAK,CAAC,4BAA4B,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IA2BhG;;;;OAIG;IACU,sBAAsB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IASzE;;;;;OAKG;IACU,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBhF;;;;;OAKG;IACU,sBAAsB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAoBrF;;;;;OAKG;IACI,yBAAyB,CAAC,MAAM,EAAE,qBAAqB,EAAE,OAAO,EAAE,0BAA0B,GAAG,UAAU;IAmBhH;;;;;OAKG;IACU,qBAAqB,CAChC,MAAM,EAAE,qBAAqB,EAC7B,iBAAiB,EAAE,UAAU,EAC7B,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,IAAI,CAAC;IAYhB;;;;;OAKG;IACU,oBAAoB,CAAC,OAAO,EAAE,0BAA0B,EAAE,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAY7G;;;;;;;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"}
|
|
@@ -140,7 +140,7 @@ export declare class BeaconCohortSigningSession implements SigningSession {
|
|
|
140
140
|
* Converts the signing session instance to a JSON object representation.
|
|
141
141
|
* @returns {BeaconCohortSigningSession} The JSON object representation of the signing session.
|
|
142
142
|
*/
|
|
143
|
-
|
|
143
|
+
toJSON(): Partial<BeaconCohortSigningSession>;
|
|
144
144
|
/**
|
|
145
145
|
* Checks if the signing session is a completed state.
|
|
146
146
|
* @returns {boolean} True if the session is complete, false otherwise.
|
|
@@ -153,3 +153,4 @@ export declare class BeaconCohortSigningSession implements SigningSession {
|
|
|
153
153
|
isFailed(): boolean;
|
|
154
154
|
}
|
|
155
155
|
export {};
|
|
156
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/core/beacon/aggregation/session/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/core/beacon/aggregation/session/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,uCAAuC,EAAE,MAAM,kDAAkD,CAAC;AAC3G,OAAO,EAA0B,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAElF;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,CAExD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAQxE;AAED,KAAK,YAAY,GAAG,MAAM,CAAC;AAC3B,KAAK,KAAK,GAAG,UAAU,CAAC;AACxB,KAAK,kBAAkB,GAAG,GAAG,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;AACnD,KAAK,iBAAiB,GAAG,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AACjD,KAAK,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEhD,MAAM,WAAW,cAAc;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,qBAAqB,CAAC;IAC9B,SAAS,EAAE,WAAW,CAAC;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AoB9E;;;;OAIG;IACI,uBAAuB,IAAI,UAAU;IAkB5C;;;;OAIG;IACI,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,UAAU,GAAG,IAAI;IAY5E;;;OAGG;IACU,sBAAsB,IAAI,OAAO,CAAC,UAAU,CAAC;IA0B1D;;;;OAIG;IACI,wBAAwB,CAAC,aAAa,EAAE,UAAU,GAAG,UAAU;IAYtE;;;OAGG;IACI,MAAM,IAAI,OAAO,CAAC,0BAA0B,CAAC;IAgBpD;;;OAGG;IACI,UAAU,IAAI,OAAO;IAI5B;;;OAGG;IACI,QAAQ,IAAI,OAAO;CAG3B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KeyBytes } from '@did-btcr2/common';
|
|
2
|
-
import {
|
|
2
|
+
import { BitcoinConnection } from '@did-btcr2/bitcoin';
|
|
3
3
|
import { SignedBTCR2Update } from '../../../../cryptosuite/dist/types/data-integrity-proof/interface.js';
|
|
4
4
|
import { SidecarData } from '../types.js';
|
|
5
5
|
import { BeaconService, BeaconSignal, BlockMetadata } from './interfaces.js';
|
|
@@ -37,8 +37,9 @@ export declare abstract class Beacon {
|
|
|
37
37
|
* Used during the update path.
|
|
38
38
|
* @param {SignedBTCR2Update} signedUpdate The signed BTCR2 update to broadcast.
|
|
39
39
|
* @param {KeyBytes} secretKey The secret key for signing the Bitcoin transaction.
|
|
40
|
-
* @param {
|
|
40
|
+
* @param {BitcoinConnection} bitcoin The Bitcoin network connection.
|
|
41
41
|
* @returns {Promise<SignedBTCR2Update>} The signed update that was broadcast.
|
|
42
42
|
*/
|
|
43
|
-
abstract broadcastSignal(signedUpdate: SignedBTCR2Update, secretKey: KeyBytes, bitcoin:
|
|
43
|
+
abstract broadcastSignal(signedUpdate: SignedBTCR2Update, secretKey: KeyBytes, bitcoin: BitcoinConnection): Promise<SignedBTCR2Update>;
|
|
44
44
|
}
|
|
45
|
+
//# sourceMappingURL=beacon.d.ts.map
|
|
@@ -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,
|
|
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,sEAAsE,CAAC;AACzG,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE7E;;;;;;;;;;;;;;GAcG;AACH,8BAAsB,MAAM;IAC1B;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC;gBAEpB,OAAO,EAAE,aAAa;IAIlC;;;;;;OAMG;IACH,QAAQ,CAAC,cAAc,CACrB,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,EAC5B,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,KAAK,CAAC,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC,CAAC;IAGrD;;;;;;;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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BitcoinConnection } from '@did-btcr2/bitcoin';
|
|
2
2
|
import { KeyBytes } from '@did-btcr2/common';
|
|
3
3
|
import { SignedBTCR2Update } from '@did-btcr2/cryptosuite';
|
|
4
4
|
import { SidecarData } from '../types.js';
|
|
@@ -28,9 +28,10 @@ export declare class CASBeacon extends Beacon {
|
|
|
28
28
|
* Broadcast CAS Beacon signal to the Bitcoin network.
|
|
29
29
|
* @param {SignedBTCR2Update} signedUpdate The signed BTCR2 update to broadcast.
|
|
30
30
|
* @param {KeyBytes} secretKey The secret key for signing the Bitcoin transaction.
|
|
31
|
-
* @param {
|
|
31
|
+
* @param {BitcoinConnection} bitcoin The Bitcoin network connection.
|
|
32
32
|
* @return {Promise<SignedBTCR2Update>} The signed update that was broadcasted.
|
|
33
33
|
* @throws {CASBeaconError} if broadcasting fails.
|
|
34
34
|
*/
|
|
35
|
-
broadcastSignal(signedUpdate: SignedBTCR2Update, secretKey: KeyBytes, bitcoin:
|
|
35
|
+
broadcastSignal(signedUpdate: SignedBTCR2Update, secretKey: KeyBytes, bitcoin: BitcoinConnection): Promise<SignedBTCR2Update>;
|
|
36
36
|
}
|
|
37
|
+
//# sourceMappingURL=cas-beacon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cas-beacon.d.ts","sourceRoot":"","sources":["../../../../src/core/beacon/cas-beacon.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
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;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,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE7E;;;;;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,OAAO,CAAC,KAAK,CAAC,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC,CAAC;IAIrD;;;;;;;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,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BitcoinConnection } from '@did-btcr2/bitcoin';
|
|
2
2
|
import { BeaconService, BeaconSignal } from './interfaces.js';
|
|
3
3
|
/**
|
|
4
4
|
* Static utility class for discovering Beacon Signals on the Bitcoin blockchain.
|
|
@@ -11,15 +11,16 @@ export declare class BeaconSignalDiscovery {
|
|
|
11
11
|
* Retrieves the beacon signals for the given array of BeaconService objects
|
|
12
12
|
* using an esplora/electrs REST API connection via a bitcoin I/O driver.
|
|
13
13
|
* @param {Array<BeaconService>} beaconServices Array of BeaconService objects to retrieve signals for
|
|
14
|
-
* @param {
|
|
14
|
+
* @param {BitcoinConnection} bitcoin Bitcoin network connection to use for REST calls
|
|
15
15
|
* @returns {Promise<Map<BeaconService, Array<BeaconSignal>>>} Map of beacon service to its discovered signals
|
|
16
16
|
*/
|
|
17
|
-
static indexer(beaconServices: Array<BeaconService>, bitcoin:
|
|
17
|
+
static indexer(beaconServices: Array<BeaconService>, bitcoin: BitcoinConnection): Promise<Map<BeaconService, Array<BeaconSignal>>>;
|
|
18
18
|
/**
|
|
19
19
|
* Traverse the full blockchain from genesis to chain top looking for beacon signals.
|
|
20
20
|
* @param {Array<BeaconService>} beaconServices Array of BeaconService objects to search for signals.
|
|
21
|
-
* @param {
|
|
21
|
+
* @param {BitcoinConnection} bitcoin Bitcoin network connection to use for RPC calls.
|
|
22
22
|
* @returns {Promise<Map<BeaconService, Array<BeaconSignal>>>} Map of beacon service to its discovered signals.
|
|
23
23
|
*/
|
|
24
|
-
static fullnode(beaconServices: Array<BeaconService>, bitcoin:
|
|
24
|
+
static fullnode(beaconServices: Array<BeaconService>, bitcoin: BitcoinConnection): Promise<Map<BeaconService, Array<BeaconSignal>>>;
|
|
25
25
|
}
|
|
26
|
+
//# sourceMappingURL=signal-discovery.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signal-discovery.d.ts","sourceRoot":"","sources":["../../../../src/core/beacon/signal-discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,
|
|
1
|
+
{"version":3,"file":"signal-discovery.d.ts","sourceRoot":"","sources":["../../../../src/core/beacon/signal-discovery.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAKlB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG9D;;;;;GAKG;AACH,qBAAa,qBAAqB;IAEhC;;;;;;OAMG;WACU,OAAO,CAClB,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC,EACpC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IA0EnD;;;;;OAKG;WACU,QAAQ,CACnB,cAAc,EAAE,KAAK,CAAC,aAAa,CAAC,EACpC,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;CA4HpD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BitcoinConnection } from '@did-btcr2/bitcoin';
|
|
2
2
|
import { KeyBytes } from '@did-btcr2/common';
|
|
3
3
|
import { SignedBTCR2Update } from '@did-btcr2/cryptosuite';
|
|
4
4
|
import { SidecarData } from '../types.js';
|
|
@@ -14,7 +14,6 @@ export declare class SingletonBeacon extends Beacon {
|
|
|
14
14
|
/**
|
|
15
15
|
* Creates an instance of SingletonBeacon.
|
|
16
16
|
* @param {BeaconService} service The BeaconService object representing the funded beacon to announce the update to.
|
|
17
|
-
*
|
|
18
17
|
*/
|
|
19
18
|
constructor(service: BeaconService);
|
|
20
19
|
/**
|
|
@@ -27,9 +26,10 @@ export declare class SingletonBeacon extends Beacon {
|
|
|
27
26
|
* Broadcasts a SingletonBeacon signal to the Bitcoin network.
|
|
28
27
|
* @param {SignedBTCR2Update} signedUpdate The signed BTCR2 update to broadcast.
|
|
29
28
|
* @param {KeyBytes} secretKey The secret key for signing the Bitcoin transaction.
|
|
30
|
-
* @param {
|
|
29
|
+
* @param {BitcoinConnection} bitcoin The Bitcoin network connection.
|
|
31
30
|
* @returns {Promise<SignedBTCR2Update>} The signed update that was broadcast.
|
|
32
31
|
* @throws {SingletonBeaconError} if the bitcoin address is invalid or unfunded.
|
|
33
32
|
*/
|
|
34
|
-
broadcastSignal(signedUpdate: SignedBTCR2Update, secretKey: KeyBytes, bitcoin:
|
|
33
|
+
broadcastSignal(signedUpdate: SignedBTCR2Update, secretKey: KeyBytes, bitcoin: BitcoinConnection): Promise<SignedBTCR2Update>;
|
|
35
34
|
}
|
|
35
|
+
//# sourceMappingURL=singleton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"singleton.d.ts","sourceRoot":"","sources":["../../../../src/core/beacon/singleton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,
|
|
1
|
+
{"version":3,"file":"singleton.d.ts","sourceRoot":"","sources":["../../../../src/core/beacon/singleton.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,EAA2D,QAAQ,EAAuB,MAAM,mBAAmB,CAAC;AAC3H,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAI3D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE7E;;;;;GAKG;AACH,qBAAa,eAAgB,SAAQ,MAAM;IAEzC;;;OAGG;gBACS,OAAO,EAAE,aAAa;IAIlC;;;;OAIG;IACG,cAAc,CAClB,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,EAC5B,OAAO,EAAE,WAAW,GACnB,OAAO,CAAC,KAAK,CAAC,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC,CAAC;IA2CrD;;;;;;;OAOG;IACG,eAAe,CACnB,YAAY,EAAE,iBAAiB,EAC/B,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,iBAAiB,CAAC;CAsE9B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BitcoinConnection } from '@did-btcr2/bitcoin';
|
|
2
2
|
import { KeyBytes } from '@did-btcr2/common';
|
|
3
3
|
import { SignedBTCR2Update } from '@did-btcr2/cryptosuite';
|
|
4
4
|
import { SidecarData } from '../types.js';
|
|
@@ -28,9 +28,10 @@ export declare class SMTBeacon extends Beacon {
|
|
|
28
28
|
* Broadcast CAS Beacon signal to the Bitcoin network.
|
|
29
29
|
* @param {SignedBTCR2Update} signedUpdate The signed BTCR2 update to broadcast.
|
|
30
30
|
* @param {KeyBytes} secretKey The secret key for signing the Bitcoin transaction.
|
|
31
|
-
* @param {
|
|
31
|
+
* @param {BitcoinConnection} bitcoin The Bitcoin network connection.
|
|
32
32
|
* @return {Promise<SignedBTCR2Update>} The signed update that was broadcasted.
|
|
33
33
|
* @throws {SMTBeaconError} if broadcasting fails.
|
|
34
34
|
*/
|
|
35
|
-
broadcastSignal(signedUpdate: SignedBTCR2Update, secretKey: KeyBytes, bitcoin:
|
|
35
|
+
broadcastSignal(signedUpdate: SignedBTCR2Update, secretKey: KeyBytes, bitcoin: BitcoinConnection): Promise<SignedBTCR2Update>;
|
|
36
36
|
}
|
|
37
|
+
//# sourceMappingURL=smt-beacon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smt-beacon.d.ts","sourceRoot":"","sources":["../../../../src/core/beacon/smt-beacon.ts"],"names":[],"mappings":"AAAA,OAAO,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,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAE7E;;;;;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,OAAO,CAAC,KAAK,CAAC,CAAC,iBAAiB,EAAE,aAAa,CAAC,CAAC,CAAC;IAIrD;;;;;;;OAOG;IACG,eAAe,CACnB,YAAY,EAAE,iBAAiB,EAC/B,SAAS,EAAE,QAAQ,EACnB,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,iBAAiB,CAAC;CAG9B"}
|
|
@@ -1,16 +1,23 @@
|
|
|
1
|
-
import { Bytes } from '@did-btcr2/common';
|
|
2
|
-
import {
|
|
1
|
+
import { Bytes, DocumentBytes, KeyBytes, SchnorrKeyPairObject } from '@did-btcr2/common';
|
|
2
|
+
import { DidCreateOptions } from '../did-btcr2.js';
|
|
3
3
|
/**
|
|
4
4
|
* Components of a did:btcr2 identifier.
|
|
5
5
|
* @interface DidComponents
|
|
6
|
+
* @extends {IdentifierComponents}
|
|
6
7
|
* @property {string} hrp The human-readable part of the Bech32m encoding.
|
|
8
|
+
*/
|
|
9
|
+
export interface DidComponents extends IdentifierComponents {
|
|
10
|
+
hrp: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Components of a did:btcr2 identifier.
|
|
14
|
+
* @interface IdentifierComponents
|
|
7
15
|
* @property {string} idType Identifier type (key or external).
|
|
8
16
|
* @property {number} version Identifier version.
|
|
9
|
-
* @property {string
|
|
17
|
+
* @property {string} network Bitcoin network name or number.
|
|
10
18
|
* @property {Bytes} genesisBytes Public key or an intermediate document bytes.
|
|
11
19
|
*/
|
|
12
|
-
export interface
|
|
13
|
-
hrp: string;
|
|
20
|
+
export interface IdentifierComponents {
|
|
14
21
|
idType: string;
|
|
15
22
|
version: number;
|
|
16
23
|
network: string;
|
|
@@ -38,19 +45,11 @@ export declare class Identifier {
|
|
|
38
45
|
* - a key-value representing a secp256k1 public key; or
|
|
39
46
|
* - a hash-value representing the hash of an initiating external DID document.
|
|
40
47
|
*
|
|
41
|
-
* @param {
|
|
42
|
-
* @param {
|
|
43
|
-
* @param {string} params.network Bitcoin network name.
|
|
44
|
-
* @param {number} params.version Identifier version.
|
|
45
|
-
* @param {KeyBytes | DocumentBytes} params.genesisBytes Public key or an intermediate document bytes.
|
|
48
|
+
* @param {KeyBytes | DocumentBytes} genesisBytes The genesis bytes (public key or document bytes).
|
|
49
|
+
* @param {DidCreateOptions} options The DID creation options.
|
|
46
50
|
* @returns {string} The new did:btcr2 identifier.
|
|
47
51
|
*/
|
|
48
|
-
static encode(
|
|
49
|
-
idType: string;
|
|
50
|
-
version: number;
|
|
51
|
-
network: string;
|
|
52
|
-
genesisBytes: Bytes;
|
|
53
|
-
}): string;
|
|
52
|
+
static encode(genesisBytes: KeyBytes | DocumentBytes, options: DidCreateOptions): string;
|
|
54
53
|
/**
|
|
55
54
|
* Implements {@link https://dcdpr.github.io/did-btcr2/#didbtcr2-identifier-decoding | 3.3 did:btcr2 Identifier Decoding}.
|
|
56
55
|
* @param {string} identifier The BTCR2 DID to be parsed
|
|
@@ -65,11 +64,8 @@ export declare class Identifier {
|
|
|
65
64
|
* @returns {string} The new did:btcr2 identifier.
|
|
66
65
|
*/
|
|
67
66
|
static generate(): {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
controller: string;
|
|
71
|
-
id: string;
|
|
72
|
-
};
|
|
67
|
+
keyPair: SchnorrKeyPairObject;
|
|
68
|
+
did: string;
|
|
73
69
|
};
|
|
74
70
|
/**
|
|
75
71
|
* Validates a did:btcr2 identifier.
|
|
@@ -78,3 +74,4 @@ export declare class Identifier {
|
|
|
78
74
|
*/
|
|
79
75
|
static isValid(identifier: string): boolean;
|
|
80
76
|
}
|
|
77
|
+
//# sourceMappingURL=identifier.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identifier.d.ts","sourceRoot":"","sources":["../../../src/core/identifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,
|
|
1
|
+
{"version":3,"file":"identifier.d.ts","sourceRoot":"","sources":["../../../src/core/identifier.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,EAAE,aAAa,EAAiD,QAAQ,EAAwB,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAGnL,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;;;;GAKG;AACH,MAAM,WAAW,aAAc,SAAQ,oBAAoB;IACvD,GAAG,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,KAAK,CAAC;CACvB;AACD;;;;;;;;;;GAUG;AACH,qBAAa,UAAU;IACrB;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,QAAQ,GAAG,aAAa,EAAE,OAAO,EAAE,gBAAgB,GAAG,MAAM;IAuFxF;;;;;;;OAOG;IACH,MAAM,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa;IA8HhD;;;OAGG;IACH,MAAM,CAAC,QAAQ,IAAI;QAAE,OAAO,EAAE,oBAAoB,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;IAYjE;;;;OAIG;IACH,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;CAQ5C"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BitcoinConnection } from '@did-btcr2/bitcoin';
|
|
2
2
|
import { DidResolutionOptions } from '@web5/dids';
|
|
3
3
|
import { Sidecar } from './types.js';
|
|
4
4
|
export interface RootCapability {
|
|
@@ -39,7 +39,7 @@ export interface ResolutionOptions extends ResolutionOptionsCore {
|
|
|
39
39
|
* Drivers for interacting with external systems, such as the Bitcoin network.
|
|
40
40
|
*/
|
|
41
41
|
drivers?: {
|
|
42
|
-
bitcoin?:
|
|
42
|
+
bitcoin?: BitcoinConnection;
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
@@ -85,3 +85,4 @@ export interface SMTProof {
|
|
|
85
85
|
*/
|
|
86
86
|
hashes: string[];
|
|
87
87
|
}
|
|
88
|
+
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -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,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,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;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB;IACjE;;;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;;;;GAIG;AACH,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D;;OAEG;IACH,OAAO,CAAC,EAAE;QACR,OAAO,CAAC,EAAE,iBAAiB,CAAC;KAC7B,CAAC;CACH;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"}
|