Class: CIDAggregateBeacon ​
Defined in: packages/method/src/core/beacon/cid-aggregate.ts:23
Implements 5.2 CIDAggregate Beacon.
A Beacon of the type CIDAggregatoBeacon is a Beacon that publishes Bitcoin transactions containing a Content Identifier (CID) announcing an Aggregated DID Update Bundle. An Aggregated DID Update Bundle is a JSON object that maps did:btcr2 identifiers to CID values for the individual DID Update Payloads. The Aggregated DID Update Bundle CID (bundleCID) SHOULD be resolvable against a Content Addressable Storage (CAS) system such as IPFS, while the CID for the DID Update Payload (payloadCID) MAY be resolvable against a CAS or provided through a Sidecar mechanism. It is RECOMMENDED that this type of Beacon is only included in a DID document if the DID controller is REQUIRED to participate in authorizing Bitcoin transactions from this Beacon. In other words, this Beacon SHOULD identify an n-of-n P2TR Bitcoin address where n is the number of unique DID controllers submitting updates through the Beacon.
CIDAggregateBeacon
Extends ​
Constructors ​
Constructor ​
new CIDAggregateBeacon(
service,sidecar?):CIDAggregateBeacon
Defined in: packages/method/src/core/beacon/cid-aggregate.ts:29
Creates an instance of CIDAggregateBeacon.
Parameters ​
service ​
The service of the Beacon.
sidecar? ​
The sidecar data of the Beacon.
Returns ​
CIDAggregateBeacon
Overrides ​
Properties ​
id ​
id:
string
Defined in: packages/method/src/interfaces/beacon.ts:106
A unique identifier for the Beacon
Inherited from ​
serviceEndpoint ​
serviceEndpoint:
DidServiceEndpoint
Defined in: packages/method/src/interfaces/beacon.ts:108
The service endpoint of the Beacon
Inherited from ​
sidecar? ​
optionalsidecar:SidecarData
Defined in: packages/method/src/interfaces/beacon.ts:109
Inherited from ​
type ​
type:
string
Defined in: packages/method/src/interfaces/beacon.ts:107
The type of the Beacon
Inherited from ​
Accessors ​
service ​
Get Signature ​
get service():
BeaconService
Defined in: packages/method/src/core/beacon/cid-aggregate.ts:32
Returns the Beacon Service object.
Returns ​
Returns the Beacon Service object
Overrides ​
Methods ​
broadcastSignal() ​
broadcastSignal(
didUpdatePayload):Promise<SignalsMetadata>
Defined in: packages/method/src/core/beacon/cid-aggregate.ts:123
TODO: Finish implementation
Implements 5.2.2 Broadcast CIDAggregate Beacon Signal.
The Broadcast CIDAggregate Beacon Signal algorithm involving two roles: a set of cohort participants and a Beacon coordinator. The Beacon coordinator collects individual DID Update Payload Content Identifiers (CIDs) for specific did:btcr2 idntifiers and aggregates them into a DID Update Bundle, which is then published to a Content Addressable Storage (CAS). The CID for the DID Update Bundle is included in a Partially Signed Bitcoin Transaction (PSBT) transaction output spent from the Beacon’s n-of-n address. Each of the n cohort participants in the Beacon MUST sign the transaction before it can be broadcast to the network. It is RECOMMENDED that cohort participants keep a copy of the DID Update Bundle and separately pin it to the CAS.
Parameters ​
didUpdatePayload ​
The verificationMethod object to be used for signing.
Returns ​
Promise<SignalsMetadata>
Successful output of a bitcoin transaction.
Throws ​
if the bitcoin address is invalid or unfunded.
Overrides ​
generateSignal() ​
generateSignal(
didUpdatePayload):BeaconSignal
Defined in: packages/method/src/core/beacon/cid-aggregate.ts:70
TODO: Figure out if this is necessary or not.
Parameters ​
didUpdatePayload ​
string
The DID Update Payload to generate the signal for.
Returns ​
The generated signal.
Throws ​
if the signal is invalid.
Overrides ​
processSignal() ​
processSignal(
signal,signalsMetadata):Promise<DidUpdateInvocation|undefined>
Defined in: packages/method/src/core/beacon/cid-aggregate.ts:102
TODO: Finish implementation
Implements 5.2.3 Process CIDAggregate Beacon Signal.
A Beacon Signal from a CIDAggregate Beacon is a Bitcoin transaction that contains the hashBytes of a DID Update Bundle in its first transaction output. The corresponding DID Update Bundle MUST either be provided through Sidecar Data or by converting hashBytes into a IPFS v1 Content Identifier and attempting to retrieve it from Content Addressable Storage. The DID Update Bundle maps from did:btcr2 identifiers to hashes of DID Update payloads applicable for that identifier. Again this algorithm attempts to retrieve and validate the DID Update Payload identified for the identifier being resolved. If successful, the DID Update Payload is returned.
The Process CIDAggregate Beacon Signal algorithm is called by the Process Beacon Signals algorithm as part of the Read operation.
It takes as inputs a did:btcr2 identifier, Identifier, a Beacon Signal, tx, and a optional object, signalSidecarData, containing any sidecar data provided to the resolver for the Beacon Signal identified by the Bitcoin transaction identifier.
It returns the DID Update payload announced by the Beacon Signal for the did:btcr2 identifier being resolved or throws an error.
Parameters ​
signal ​
Bitcoin transaction representing a Beacon Signal.
signalsMetadata ​
Optional sidecar data for the Beacon Signal.
Returns ​
Promise<DidUpdateInvocation | undefined>
The DID Update payload announced by the Beacon Signal.
Throws ​
if the signalTx is invalid or the signalsMetadata is invalid.
Overrides ​
establish() ​
staticestablish(id,type,serviceEndpoint):CIDAggregateBeacon
Defined in: packages/method/src/core/beacon/cid-aggregate.ts:59
TODO: Finish implementation
Implements 5.2.1 Establish CIDAggregate Beacon.
To establish a CIDAggregatorBeacon, a cohort of cooperating parties SHOULD generate an n-of-n P2TR Bitcoin address where each party contributes a public key. Furthermore, each party SHOULD verify that their key is part of the address and all other keys that are part of the address are keys with controllers able to produce valid signatures. To establish a Beacon there are two roles. One is the cohort participant, they want to join a Beacon cohort and submit a request to do so with a key and proof of control over that key. The other is the Beacon coordinator, they advertise and curate Beacon cohorts by combining Beacon participants into cohorts, verifying proofs of control, and producing Beacon addresses.
Parameters ​
id ​
string
The identifier of the Beacon.
type ​
string
The type of the Beacon.
serviceEndpoint ​
DidServiceEndpoint
The service endpoint of the Beacon.
Returns ​
CIDAggregateBeacon
The established CIDAggregate Beacon.