Class: SingletonBeacon ​
Defined in: packages/method/src/core/beacon/singleton.ts:20
Implements Singleton Beacon.
SingletonBeacon
Extends ​
Constructors ​
Constructor ​
new SingletonBeacon(
service,signals,sidecar,bitcoin?):SingletonBeacon
Defined in: packages/method/src/core/beacon/singleton.ts:27
Creates an instance of SingletonBeacon.
Parameters ​
service ​
The Beacon service.
signals ​
sidecar ​
The SingletonBeacon sidecar data.
bitcoin? ​
Returns ​
SingletonBeacon
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/singleton.ts:111
Broadcasts a SingletonBeacon signal. TODO: Design and implement a way to construct, sign and send via RPC
Parameters ​
updateHash ​
string
Returns ​
Promise<string>
Successful output of a bitcoin transaction.
Throws ​
if the bitcoin address is invalid or unfunded.
Overrides ​
AggregateBeacon.broadcastSignal
generateSignal() ​
generateSignal(
updateHash):BeaconSignal
Defined in: packages/method/src/core/beacon/singleton.ts:52
Generates a Beacon Signal for a Singleton Beacon Service.
Parameters ​
updateHash ​
string
The update hash to be included in the Beacon Signal.
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/singleton.ts:61
Processes an array of Beacon Signals associated with a Singleton Beacon Service.
Returns ​
Promise<[BTCR2SignedUpdate, BlockMetadata][]>
The DID Update payload announced by the Beacon Signal.
Throws ​
if the signalTx is invalid or the signalSidecarData is invalid.
Overrides ​
AggregateBeacon.processSignals
establish() ​
staticestablish(service,signals,sidecar):SingletonBeacon
Defined in: packages/method/src/core/beacon/singleton.ts:42
Static, convenience method for establishing a CASBeacon object.
Parameters ​
service ​
The Beacon service.
signals ​
sidecar ​
The sidecar data.
Returns ​
SingletonBeacon
The Singleton Beacon.