@orangecheck/lock-device / authorizedDevices
Function: authorizedDevices()
function authorizedDevices(records: readonly ParsedDeviceEvent[]): ParsedDeviceEvent[];
Defined in: authorize.ts:14
Select the device records whose nostrPubkey may act for their address.
records MUST already be BIP-322-verified, non-revoked bind records for one
address. A v3 record signs its Nostr pubkey, so it is always authorized. A v2
record does not, so its pubkey is only the event author's claim: it is
authorized only while its device_id has no v3 record and appears under
exactly one Nostr pubkey. Two pubkeys carrying one v2 device authorize neither.
Parameters
| Parameter | Type |
|---|---|
records | readonly ParsedDeviceEvent[] |