ConfigurationBuilder
Constructor Summary
Public Constructor | ||
public |
|
Method Summary
Public Methods | ||
public |
blockConfirmations(confirmations: number): Client.ConfigurationBuilder Sets the number of blocks required to consider a transaction confirmed. |
|
public |
build(): Client.Configuration |
|
public |
dumb(): Client.ConfigurationBuilder Configure the client to be not reachable from the outside. |
|
public |
feature(feature: ...Client.Feature): Client.ConfigurationBuilder |
|
public |
Instantiates a client from this configuration builder. |
|
public |
protocol(protocol: 'dumb' | 'rtc' | 'ws' | 'wss', host: string, port: number, tlsKey: string, tlsCert: string): Client.ConfigurationBuilder Configure the protocol this client uses. |
|
public |
reverseProxy(port: number, header: string, addresses: ...string): Client.ConfigurationBuilder |
|
public |
rtc(): Client.ConfigurationBuilder Configure the client to be publicly reachable via WebRTC. |
|
public |
volatile(volatile: boolean): Client.ConfigurationBuilder Disable persistent storage. |
|
public |
ws(host: string, port: number): Client.ConfigurationBuilder Configure the client to provide a public, insecure WebSocket server. |
|
public |
wss(host: string, port: number, tlsKey: string, tlsCert: string): Client.ConfigurationBuilder Configure the client to provide a public, secure WebSocket server. |
Public Constructors
public constructor() source
Public Methods
public blockConfirmations(confirmations: number): Client.ConfigurationBuilder source
Sets the number of blocks required to consider a transaction confirmed. Defaults to 10.
Params:
Name | Type | Attribute | Description |
confirmations | number |
Return:
Client.ConfigurationBuilder |
public build(): Client.Configuration source
Return:
Client.Configuration | The configuration object to create a client with. |
public dumb(): Client.ConfigurationBuilder source
Configure the client to be not reachable from the outside.
Return:
Client.ConfigurationBuilder |
public feature(feature: ...Client.Feature): Client.ConfigurationBuilder source
Params:
Name | Type | Attribute | Description |
feature | ...Client.Feature |
Return:
Client.ConfigurationBuilder |
public protocol(protocol: 'dumb' | 'rtc' | 'ws' | 'wss', host: string, port: number, tlsKey: string, tlsCert: string): Client.ConfigurationBuilder source
Configure the protocol this client uses. Defaults to rtc for supported browsers and dumb otherwise.
Params:
Name | Type | Attribute | Description |
protocol | 'dumb' | 'rtc' | 'ws' | 'wss' | One of: dumb, rtc, ws, wss |
|
host | string |
|
Publicly reachable hostname of this node (required for ws and wss) |
port | number |
|
Publicly reachable port (required for ws and wss) |
tlsKey | string |
|
Path to the tls private key (required for wss) |
tlsCert | string |
|
Path to the tls certificate (required for wss) |
Return:
Client.ConfigurationBuilder |
public reverseProxy(port: number, header: string, addresses: ...string): Client.ConfigurationBuilder source
Params:
Name | Type | Attribute | Description |
port | number | ||
header | string | ||
addresses | ...string |
Return:
Client.ConfigurationBuilder |
public rtc(): Client.ConfigurationBuilder source
Configure the client to be publicly reachable via WebRTC.
Return:
Client.ConfigurationBuilder |
public volatile(volatile: boolean): Client.ConfigurationBuilder source
Disable persistent storage. By default persistent storage will be used.
Params:
Name | Type | Attribute | Description |
volatile | boolean |
|
Return:
Client.ConfigurationBuilder |
public ws(host: string, port: number): Client.ConfigurationBuilder source
Configure the client to provide a public, insecure WebSocket server.
Params:
Name | Type | Attribute | Description |
host | string | Publicly reachable hostname of this node |
|
port | number |
|
Publicly reachable port |
Return:
Client.ConfigurationBuilder |
public wss(host: string, port: number, tlsKey: string, tlsCert: string): Client.ConfigurationBuilder source
Configure the client to provide a public, secure WebSocket server.
Params:
Name | Type | Attribute | Description |
host | string | Publicly reachable hostname of this node |
|
port | number |
|
Publicly reachable port |
tlsKey | string | Path to the tls private key |
|
tlsCert | string | Path to the tls certificate |
Return:
Client.ConfigurationBuilder |