Remove indexer from hints, add indexBy

This commit is contained in:
Jon Staab
2024-05-30 15:04:23 -07:00
parent a4948fe5dc
commit 35eccf7467
4 changed files with 19 additions and 18 deletions
-9
View File
@@ -45,12 +45,6 @@ export type RouterOptions = {
*/
getFallbackRelays: () => string[]
/**
* Retrieves relays likely to return results for kind 0, 3, and 10002.
* @returns An array of relay URLs as strings.
*/
getIndexerRelays?: () => string[]
/**
* Retrieves relays likely to support NIP-50 search.
* @returns An array of relay URLs as strings.
@@ -263,9 +257,6 @@ export class Router {
Search = (term: string, relays: string[] = []) =>
this.product([term], uniq(relays.concat(this.options.getSearchRelays?.() || [])))
Indexers = (relays: string[] = []) =>
this.fromRelays(uniq(relays.concat(this.options.getIndexerRelays?.() || [])))
// Fallback policies
addNoFallbacks = (count: number, redundancy: number) => 0