Class: CASBeacon ​
Defined in: packages/method/src/core/beacon/cas-beacon.ts:14
Implements CAS Beacon.
CASBeacon
Extends ​
Constructors ​
Constructor ​
new CASBeacon(
service,signals,sidecar?,bitcoin?):CASBeacon
Defined in: packages/method/src/core/beacon/cas-beacon.ts:20
Creates an instance of CASBeacon.
Parameters ​
service ​
The service of the Beacon.
signals ​
sidecar? ​
The sidecar data of the Beacon.
bitcoin? ​
Returns ​
CASBeacon
Overrides ​
Properties ​
bitcoin ​
bitcoin:
BitcoinNetworkConnection
Defined in: packages/method/src/core/beacon/interfaces.ts:96
The Bitcoin network connection associated with this Beacon service.
Inherited from ​
service ​
service:
BeaconService
Defined in: packages/method/src/core/beacon/interfaces.ts:80
The Beacon service object parsed from the DID Document.
Inherited from ​
sidecar ​
sidecar:
SidecarData
Defined in: packages/method/src/core/beacon/interfaces.ts:91
The sidecar data associated with this Beacon service. TODO: Make this more specific to Beacon type.
Inherited from ​
signals ​
signals:
BeaconSignal[]
Defined in: packages/method/src/core/beacon/interfaces.ts:85
The array of Beacon Signals associated with this Beacon service.
Inherited from ​
Methods ​
broadcastSignal() ​
broadcastSignal(
updateHash):Promise<string>
Defined in: packages/method/src/core/beacon/cas-beacon.ts:64
TODO: Finish implementation
Parameters ​
updateHash ​
string
The hash of the update to broadcast.
Returns ​
Promise<string>
The result of the broadcast.
Throws ​
if the broadcast fails.
Overrides ​
AggregateBeacon.broadcastSignal
generateSignal() ​
generateSignal(
updateHash):BeaconSignal
Defined in: packages/method/src/core/beacon/cas-beacon.ts:45
TODO: Figure out if this is necessary or not.
Parameters ​
updateHash ​
string
The hash of the update to generate the signal for.
Returns ​
The generated signal.
Throws ​
if the signal is invalid.
Overrides ​
AggregateBeacon.generateSignal
processSignals() ​
processSignals():
Promise<[BTCR2SignedUpdate,BlockMetadata][]>
Defined in: packages/method/src/core/beacon/cas-beacon.ts:54
Implements 7.2.e.1 Process CAS Beacon.
Returns ​
Promise<[BTCR2SignedUpdate, BlockMetadata][]>
The processed signed update or undefined.
Throws ​
if the signal processing fails.
Overrides ​
AggregateBeacon.processSignals
establish() ​
staticestablish(service,signals,sidecar):CASBeacon
Defined in: packages/method/src/core/beacon/cas-beacon.ts:35
Establish a CASBeacon instance based on the provided service and sidecar data.
Parameters ​
service ​
The beacon service configuration.
signals ​
sidecar ​
The sidecar data.
Returns ​
CASBeacon
The established CASBeacon instance.