RouterOptions: {
    getFallbackRelays: () => string[];
    getIndexerRelays?: () => string[];
    getLimit?: () => number;
    getPubkeyRelays?: (pubkey: string, mode?: RelayMode) => string[];
    getRelayQuality?: (url: string) => number;
    getSearchRelays?: () => string[];
    getUserPubkey?: () => string | null;
}

Type declaration

  • getFallbackRelays: () => string[]

    Retrieves fallback relays, for use when no other relays can be selected.

  • OptionalgetIndexerRelays?: () => string[]

    Retrieves relays that index profiles and relay selections.

  • OptionalgetLimit?: () => number

    Retrieves the limit setting, which is the maximum number of relays that should be returned from getUrls and getSelections.

  • OptionalgetPubkeyRelays?: (pubkey: string, mode?: RelayMode) => string[]

    Retrieves relays for the specified public key and mode.

  • OptionalgetRelayQuality?: (url: string) => number

    Retrieves the quality of the specified relay.

  • OptionalgetSearchRelays?: () => string[]

    Retrieves relays likely to support NIP-50 search.

  • OptionalgetUserPubkey?: () => string | null

    Retrieves the user's public key.