Welshman Docs / @welshman/app / RouterOptions
Type Alias: RouterOptions ​
RouterOptions:
object
Defined in: packages/app/src/router.ts:59
Type declaration ​
getFallbackRelays() ​
getFallbackRelays: () =>
string
[]
Retrieves fallback relays, for use when no other relays can be selected.
Returns ​
string
[]
An array of relay URLs as strings.
getIndexerRelays()? ​
optional
getIndexerRelays: () =>string
[]
Retrieves relays that index profiles and relay selections.
Returns ​
string
[]
An array of relay URLs as strings.
getLimit()? ​
optional
getLimit: () =>number
Retrieves the limit setting, which is the maximum number of relays that should be returned from getUrls and getSelections.
Returns ​
number
The limit setting as a number.
getPubkeyRelays()? ​
optional
getPubkeyRelays: (pubkey
,mode
?) =>string
[]
Retrieves relays for the specified public key and mode.
Parameters ​
pubkey ​
string
The public key to retrieve relays for.
mode? ​
The relay mode (optional). May be "read", "write", or "inbox".
Returns ​
string
[]
An array of relay URLs as strings.
getRelayQuality()? ​
optional
getRelayQuality: (url
) =>number
Retrieves the quality of the specified relay.
Parameters ​
url ​
string
The URL of the relay to retrieve quality for.
Returns ​
number
The quality of the relay as a number between 0 and 1 inclusive.
getSearchRelays()? ​
optional
getSearchRelays: () =>string
[]
Retrieves relays likely to support NIP-50 search.
Returns ​
string
[]
An array of relay URLs as strings.
getUserPubkey()? ​
optional
getUserPubkey: () =>string
|null
Retrieves the user's public key.
Returns ​
string
| null
The user's public key as a string, or null if not available.