#
Relay sets
low level
#
Example
key1.publicKey,
key2.publicKey,
key3.publicKey,
key4.publicKey
],
direction: RelayDirection.outbox,
relayMinCountPerPubKey: 1,
onProgress: (stepName, count, total) {
if (count % 100 == 0 || (total - count) < 10) {
print("[PROGRESS] $stepName: $count/$total");
}
});
print("BEST ${relaySet.relaysMap.length} RELAYS:");
relaySet.relaysMap.forEach((url, pubKeyMappings) {
print(" ${relayNames[url]} => has ${pubKeyMappings.length} follows");
});
#
When to use
Calculates the best relays for a given set of pubkeys. It's used by inbox/outbox.
This allows for granular control in the relaySets engine.
E.g. calculating the best relays for a thread view.