Skip to content

Welshman Docs / @welshman/domain / Relay

Class: Relay ​

Defined in: domain/src/other/Relay.ts:51

Constructors ​

Constructor ​

new Relay(url, json?): Relay

Defined in: domain/src/other/Relay.ts:75

Parameters ​

url ​

string

json? ​

RelayInfo = {}

Returns ​

Relay

Properties ​

optional banner?: string

Defined in: domain/src/other/Relay.ts:54


contact? ​

optional contact?: string

Defined in: domain/src/other/Relay.ts:58


description? ​

optional description?: string

Defined in: domain/src/other/Relay.ts:62


fees? ​

optional fees?: RelayFees

Defined in: domain/src/other/Relay.ts:67


icon? ​

optional icon?: string

Defined in: domain/src/other/Relay.ts:53


limitation? ​

optional limitation?: object

Defined in: domain/src/other/Relay.ts:68

auth_required? ​

optional auth_required?: boolean

min_pow_difficulty? ​

optional min_pow_difficulty?: number

payment_required? ​

optional payment_required?: boolean


name? ​

optional name?: string

Defined in: domain/src/other/Relay.ts:55


negentropy? ​

optional negentropy?: number

Defined in: domain/src/other/Relay.ts:61


payments_url? ​

optional payments_url?: string

Defined in: domain/src/other/Relay.ts:66


privacy_policy? ​

optional privacy_policy?: string

Defined in: domain/src/other/Relay.ts:64


pubkey? ​

optional pubkey?: string

Defined in: domain/src/other/Relay.ts:57


redirect_to? ​

optional redirect_to?: string

Defined in: domain/src/other/Relay.ts:73


self? ​

optional self?: string

Defined in: domain/src/other/Relay.ts:56


software? ​

optional software?: string

Defined in: domain/src/other/Relay.ts:59


supported_nips? ​

optional supported_nips?: string[]

Defined in: domain/src/other/Relay.ts:63


terms_of_service? ​

optional terms_of_service?: string

Defined in: domain/src/other/Relay.ts:65


url ​

url: string

Defined in: domain/src/other/Relay.ts:52


version? ​

optional version?: string

Defined in: domain/src/other/Relay.ts:60

Methods ​

display() ​

display(fallback?): string

Defined in: domain/src/other/Relay.ts:90

Parameters ​

fallback? ​

string = ...

Returns ​

string


displayUrl() ​

displayUrl(): string

Defined in: domain/src/other/Relay.ts:85

Returns ​

string


hasNegentropy() ​

hasNegentropy(): boolean

Defined in: domain/src/other/Relay.ts:95

Returns ​

boolean


hasNip() ​

hasNip(nip): boolean

Defined in: domain/src/other/Relay.ts:104

Parameters ​

nip ​

string | number

Returns ​

boolean


isPaid() ​

isPaid(): boolean

Defined in: domain/src/other/Relay.ts:109

Returns ​

boolean