Class: CASBeacon ​
Defined in: packages/method/src/core/beacon/cas-beacon.ts:26
Implements CAS Beacon.
A CAS (Content-Addressed Store) Beacon aggregates updates for multiple DIDs into a single CAS Announcement — a mapping of DIDs to their update hashes. The hash of the CAS Announcement is broadcast on-chain via OP_RETURN. During resolution, the CAS Announcement is retrieved from the sidecar (or CAS) and used to look up the individual signed update for the DID being resolved.
CASBeacon
Extends ​
Constructors ​
Constructor ​
new CASBeacon(
service):CASBeacon
Defined in: packages/method/src/core/beacon/cas-beacon.ts:31
Creates an instance of CASBeacon.
Parameters ​
service ​
The service of the Beacon.
Returns ​
CASBeacon
Overrides ​
Properties ​
service ​
readonlyservice:BeaconService
Defined in: packages/method/src/core/beacon/beacon.ts:27
The Beacon service configuration parsed from the DID Document.
Inherited from ​
Methods ​
broadcastSignal() ​
broadcastSignal(
signedUpdate,secretKey,bitcoin):Promise<SignedBTCR2Update>
Defined in: packages/method/src/core/beacon/cas-beacon.ts:115
Broadcasts a CAS Beacon signal to the Bitcoin network.
Creates a CAS Announcement mapping the DID to the update hash, then broadcasts the hash of the announcement via OP_RETURN. The CAS Announcement is distributed to resolvers via sidecar data.
Parameters ​
signedUpdate ​
The signed BTCR2 update to broadcast.
secretKey ​
The secret key for signing the Bitcoin transaction.
bitcoin ​
The Bitcoin network connection.
Returns ​
Promise<SignedBTCR2Update>
The signed update that was broadcast.
Throws ​
if the bitcoin address is invalid or unfunded.
Overrides ​
processSignals() ​
processSignals(
signals,sidecar):BeaconProcessResult
Defined in: packages/method/src/core/beacon/cas-beacon.ts:48
Implements 7.2.e.1 Process CAS Beacon.
For each signal, the signalBytes contain the hex-encoded hash of a CAS Announcement. The CAS Announcement maps DIDs to their base64url-encoded update hashes. This method looks up the CAS Announcement from the sidecar, extracts the update hash for the DID being resolved, and retrieves the corresponding signed update.
Parameters ​
signals ​
The array of Beacon Signals to process.
sidecar ​
The sidecar data associated with the CAS Beacon.
Returns ​
Successfully resolved updates and any data needs.
Throws ​
if hash verification fails (validation errors only).