doesRelayCoverPubkey static method
Implementation
static doesRelayCoverPubkey(
RelayJit relay,
String pubkey,
ReadWriteMarker direction,
) {
for (RelayJitAssignedPubkey assignedPubkey in relay.assignedPubkeys) {
if (assignedPubkey.pubkey == pubkey) {
switch (direction) {
case ReadWriteMarker.readOnly:
return assignedPubkey.direction.isRead;
case ReadWriteMarker.writeOnly:
return assignedPubkey.direction.isWrite;
case ReadWriteMarker.readWrite:
return assignedPubkey.direction == ReadWriteMarker.readWrite;
default:
return false;
}
}
}
return false;
}