|
@ -30,6 +30,7 @@ export const networks = { |
|
|
|
|
|
|
|
|
// Type definition for for local connection settings.
|
|
|
// Type definition for for local connection settings.
|
|
|
type LndConfigSettingsLocalType = {| |
|
|
type LndConfigSettingsLocalType = {| |
|
|
|
|
|
name?: string, |
|
|
alias?: string, |
|
|
alias?: string, |
|
|
autopilot?: boolean, |
|
|
autopilot?: boolean, |
|
|
autopilotMaxchannels?: number, |
|
|
autopilotMaxchannels?: number, |
|
@ -42,6 +43,7 @@ type LndConfigSettingsLocalType = {| |
|
|
|
|
|
|
|
|
// Type definition for for custom connection settings.
|
|
|
// Type definition for for custom connection settings.
|
|
|
type LndConfigSettingsCustomType = {| |
|
|
type LndConfigSettingsCustomType = {| |
|
|
|
|
|
name?: string, |
|
|
host: string, |
|
|
host: string, |
|
|
cert: string, |
|
|
cert: string, |
|
|
macaroon: string |
|
|
macaroon: string |
|
@ -49,6 +51,7 @@ type LndConfigSettingsCustomType = {| |
|
|
|
|
|
|
|
|
// Type definition for for BTCPay Server connection settings.
|
|
|
// Type definition for for BTCPay Server connection settings.
|
|
|
type LndConfigSettingsBtcPayServerType = {| |
|
|
type LndConfigSettingsBtcPayServerType = {| |
|
|
|
|
|
name?: string, |
|
|
string: string, |
|
|
string: string, |
|
|
host: string, |
|
|
host: string, |
|
|
macaroon: string |
|
|
macaroon: string |
|
@ -90,6 +93,7 @@ const safeUntildify = <T>(val: ?T): ?T => (typeof val === 'string' ? untildify(v |
|
|
class LndConfig { |
|
|
class LndConfig { |
|
|
static SETTINGS_PROPS = { |
|
|
static SETTINGS_PROPS = { |
|
|
local: [ |
|
|
local: [ |
|
|
|
|
|
'name', |
|
|
'alias', |
|
|
'alias', |
|
|
'autopilot', |
|
|
'autopilot', |
|
|
'autopilotMaxchannels', |
|
|
'autopilotMaxchannels', |
|
@ -99,11 +103,12 @@ class LndConfig { |
|
|
'autopilotPrivate', |
|
|
'autopilotPrivate', |
|
|
'autopilotMinconfs' |
|
|
'autopilotMinconfs' |
|
|
], |
|
|
], |
|
|
custom: ['host', 'cert', 'macaroon'], |
|
|
custom: ['name', 'host', 'cert', 'macaroon'], |
|
|
btcpayserver: ['host', 'macaroon', 'string'] |
|
|
btcpayserver: ['name', 'host', 'macaroon', 'string'] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static SETTINGS_DEFAULTS = { |
|
|
static SETTINGS_DEFAULTS = { |
|
|
|
|
|
name: null, |
|
|
autopilot: true, |
|
|
autopilot: true, |
|
|
autopilotMaxchannels: 5, |
|
|
autopilotMaxchannels: 5, |
|
|
autopilotMinchansize: 20000, |
|
|
autopilotMinchansize: 20000, |
|
@ -124,6 +129,7 @@ class LndConfig { |
|
|
cert: ?string |
|
|
cert: ?string |
|
|
macaroon: ?string |
|
|
macaroon: ?string |
|
|
string: ?string |
|
|
string: ?string |
|
|
|
|
|
name: ?string |
|
|
alias: ?string |
|
|
alias: ?string |
|
|
autopilot: ?boolean |
|
|
autopilot: ?boolean |
|
|
autopilotMaxchannels: ?number |
|
|
autopilotMaxchannels: ?number |
|
|