Abstract Class: Beacon ​
Defined in: packages/method/src/core/beacon/beacon.ts:23
Abstract base class for all BTCR2 Beacon types. A Beacon is a service listed in a BTCR2 DID document that informs resolvers how to find authentic updates to the DID.
Beacons are lightweight typed wrappers around a BeaconService configuration. Dependencies (signals, sidecar data, bitcoin connection) are passed as method parameters rather than held as instance state.
Use BeaconFactory.establish to create typed instances from service config.
Beacon
Extended by ​
Constructors ​
Constructor ​
new Beacon(
service):Beacon
Defined in: packages/method/src/core/beacon/beacon.ts:29
Parameters ​
service ​
Returns ​
Beacon
Properties ​
service ​
readonlyservice:BeaconService
Defined in: packages/method/src/core/beacon/beacon.ts:27
The Beacon service configuration parsed from the DID Document.
Methods ​
broadcastSignal() ​
abstractbroadcastSignal(signedUpdate,secretKey,bitcoin):Promise<SignedBTCR2Update>
Defined in: packages/method/src/core/beacon/beacon.ts:57
Broadcasts a signed update as a Beacon Signal to the Bitcoin network. Used during the update path.
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.
processSignals() ​
abstractprocessSignals(signals,sidecar):BeaconProcessResult
Defined in: packages/method/src/core/beacon/beacon.ts:44
Processes an array of Beacon Signals to extract BTCR2 Signed Updates. Used during the resolve path.
Returns successfully resolved updates and any data needs that must be satisfied before remaining signals can be processed.
Parameters ​
signals ​
The beacon signals discovered on-chain.
sidecar ​
The processed sidecar data containing update/CAS/SMT maps.
Returns ​
The updates and any data needs.