Skip to content

Welshman Docs / @welshman/domain / Relay

Class: Relay ​

Defined in: other/Relay.ts:31

Constructors ​

Constructor ​

new Relay(url, json): Relay

Defined in: other/Relay.ts:53

Parameters ​

url ​

string

json ​

RelayInfo = {}

Returns ​

Relay

Properties ​

optional banner: string

Defined in: other/Relay.ts:34


contact? ​

optional contact: string

Defined in: other/Relay.ts:38


description? ​

optional description: string

Defined in: other/Relay.ts:42


icon? ​

optional icon: string

Defined in: other/Relay.ts:33


limitation? ​

optional limitation: object

Defined in: other/Relay.ts:46

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: other/Relay.ts:35


negentropy? ​

optional negentropy: number

Defined in: other/Relay.ts:41


privacy_policy? ​

optional privacy_policy: string

Defined in: other/Relay.ts:44


pubkey? ​

optional pubkey: string

Defined in: other/Relay.ts:37


redirect_to? ​

optional redirect_to: string

Defined in: other/Relay.ts:51


self? ​

optional self: string

Defined in: other/Relay.ts:36


software? ​

optional software: string

Defined in: other/Relay.ts:39


supported_nips? ​

optional supported_nips: string[]

Defined in: other/Relay.ts:43


terms_of_service? ​

optional terms_of_service: string

Defined in: other/Relay.ts:45


url ​

url: string

Defined in: other/Relay.ts:32


version? ​

optional version: string

Defined in: other/Relay.ts:40

Methods ​

display() ​

display(fallback): string

Defined in: other/Relay.ts:68

Parameters ​

fallback ​

string = ...

Returns ​

string


displayUrl() ​

displayUrl(): string

Defined in: other/Relay.ts:63

Returns ​

string


hasNegentropy() ​

hasNegentropy(): boolean

Defined in: other/Relay.ts:73

Returns ​

boolean


hasNip() ​

hasNip(nip): boolean

Defined in: other/Relay.ts:82

Parameters ​

nip ​

string | number

Returns ​

boolean