if(swapServerUrl===''){returnres.status(500).json({message:"Loop Out Terms Failed!",error:{message:'Loop Server URL is missing in the configuration.'}});}
if(swapServerUrl===''){returnres.status(500).json({message:"Loop Out Terms Failed!",error:{message:'Loop Server URL is missing in the configuration.'}});}
options.url=swapServerUrl+'/loop/out/terms';
options.url=swapServerUrl+'/v1/loop/out/terms';
request(options).then(function(body){
request(options).then(function(body){
logger.info({fileName:'Loop',msg:'Loop Out Terms: '+JSON.stringify(body)});
logger.info({fileName:'Loop',msg:'Loop Out Terms: '+JSON.stringify(body)});
if(swapServerUrl===''){returnres.status(500).json({message:"Loop Out Quote Failed!",error:{message:'Loop Server URL is missing in the configuration.'}});}
if(swapServerUrl===''){returnres.status(500).json({message:"Loop Out Quote Failed!",error:{message:'Loop Server URL is missing in the configuration.'}});}
if(swapServerUrl===''){returnres.status(500).json({message:"Loop Out Terms And Quotes Failed!",error:{message:'Loop Server URL is missing in the configuration.'}});}
if(swapServerUrl===''){returnres.status(500).json({message:"Loop Out Terms And Quotes Failed!",error:{message:'Loop Server URL is missing in the configuration.'}});}
options.url=swapServerUrl+'/loop/out/terms';
options.url=swapServerUrl+'/v1/loop/out/terms';
request(options).then(function(terms){
request(options).then(function(terms){
logger.info({fileName:'Loop',msg:'Loop Out Terms: '+JSON.stringify(terms)});
logger.info({fileName:'Loop',msg:'Loop Out Terms: '+JSON.stringify(terms)});
if(swapServerUrl===''){returnres.status(500).json({message:"Loop In Terms Failed!",error:{message:'Loop Server URL is missing in the configuration.'}});}
if(swapServerUrl===''){returnres.status(500).json({message:"Loop In Terms Failed!",error:{message:'Loop Server URL is missing in the configuration.'}});}
options.url=swapServerUrl+'/loop/in/terms';
options.url=swapServerUrl+'/v1/loop/in/terms';
request(options).then(function(body){
request(options).then(function(body){
logger.info({fileName:'Loop',msg:'Loop In Terms: '+JSON.stringify(body)});
logger.info({fileName:'Loop',msg:'Loop In Terms: '+JSON.stringify(body)});
if(swapServerUrl===''){returnres.status(500).json({message:"Loop In Quote Failed!",error:{message:'Loop Server URL is missing in the configuration.'}});}
if(swapServerUrl===''){returnres.status(500).json({message:"Loop In Quote Failed!",error:{message:'Loop Server URL is missing in the configuration.'}});}
if(swapServerUrl===''){returnres.status(500).json({message:"Loop In Terms And Quotes Failed!",error:{message:'Loop Server URL is missing in the configuration.'}});}
if(swapServerUrl===''){returnres.status(500).json({message:"Loop In Terms And Quotes Failed!",error:{message:'Loop Server URL is missing in the configuration.'}});}
options.url=swapServerUrl+'/loop/in/terms';
options.url=swapServerUrl+'/v1/loop/in/terms';
request(options).then(function(terms){
request(options).then(function(terms){
logger.info({fileName:'Loop',msg:'Loop In Terms: '+JSON.stringify(terms)});
logger.info({fileName:'Loop',msg:'Loop In Terms: '+JSON.stringify(terms)});
"fiatConversion": <parameter to turn fiat conversion off/on. Allowed values - true, false, default false, Required>,
"fiatConversion": <parameter to turn fiat conversion off/on. Allowed values - true, false, default false, Required>,
"currencyUnit": "<Optional: Fiat current Unit for currency conversion, default 'USD' If fiatConversion is true, Required if fiatConversion is true>",
"currencyUnit": "<Optional: Fiat current Unit for currency conversion, default 'USD' If fiatConversion is true, Required if fiatConversion is true>",
"lnServerUrl": "<Service url for LND/CLightning REST APIs for the node, e.g. https://192.168.0.1:8080/v1 OR https://192.168.0.1:3001/v1 OR http://192.168.0.1:8080. Default 'https://localhost:8080/v1', Required",
"lnServerUrl": "<Service url for LND/CLightning REST APIs for the node, e.g. https://192.168.0.1:8080 OR https://192.168.0.1:3001 OR http://192.168.0.1:8080. Default 'https://localhost:8080', Required",
"swapServerUrl": "<Service url for swap server REST APIs for the node, e.g. http://localhost:8081/v1, Optional>",
"swapServerUrl": "<Service url for swap server REST APIs for the node, e.g. http://localhost:8081, Optional>",
}
}
}
}
]
]
@ -45,8 +45,8 @@ parameters have `default` values for initial setup and can be updated after RTL
PORT (port number for the rtl node server, default 3000, Required)
PORT (port number for the rtl node server, default 3000, Required)
HOST (host for the rtl node server, default localhost, Optional)
HOST (host for the rtl node server, default localhost, Optional)
@ -23,8 +23,8 @@ This step is only required to configure the nodes, which will be remotely connec
5. `SSO` section can be used for single-sign-on from applications like BTCPayserver. If using RTL as a stand-alone app to connect with the nodes, keep the `rtlSSO=0` and ignore the rest of `SSO` section.
5. `SSO` section can be used for single-sign-on from applications like BTCPayserver. If using RTL as a stand-alone app to connect with the nodes, keep the `rtlSSO=0` and ignore the rest of `SSO` section.
6. `nodes` section is a json array, with each element of the array representing the specific parameters for the LND node to connect with. `index` must be a number and start with 1. This number must be unique for each node in the array. For each element, two items need to be configured for each node on the network (`macaroonPath` and `lnServerUrl`).
6. `nodes` section is a json array, with each element of the array representing the specific parameters for the LND node to connect with. `index` must be a number and start with 1. This number must be unique for each node in the array. For each element, two items need to be configured for each node on the network (`macaroonPath` and `lnServerUrl`).
7. `macaroonPath` should be set to the local path of the folder containing `admin.macaroon` file for each node. Each node must have a different folder for the `admin.macaroon` on the RTL server.
7. `macaroonPath` should be set to the local path of the folder containing `admin.macaroon` file for each node. Each node must have a different folder for the `admin.macaroon` on the RTL server.
8. `lnServerUrl` must be set to the service url for LND/C Lightining REST APIs for each node, with the unique ip address of the node hosting lnd/clightning e.g. https://192.168.0.1:8080/v1 OR https://192.168.0.1:3001/v1. In this case the ip address of the node hosting lnd/clightning is '192.168.0.1'
8. `lnServerUrl` must be set to the service url for LND/C Lightining REST APIs for each node, with the unique ip address of the node hosting lnd/clightning e.g. https://192.168.0.1:8080 OR https://192.168.0.1:3001. In this case the ip address of the node hosting lnd/clightning is '192.168.0.1'
9. `swapServerUrl` must be set to the swap service url. e.g. http://localhost:8081/v1.
9. `swapServerUrl` must be set to the swap service url. e.g. http://localhost:8081.
10. `configPath` and `bitcoindConfigPath` are optional parameters which can be set only if the RTL is running locally on the same node. Else it can be set to "" or removed from the conf file all together.
10. `configPath` and `bitcoindConfigPath` are optional parameters which can be set only if the RTL is running locally on the same node. Else it can be set to "" or removed from the conf file all together.
11. `lnApiPassword` is mandatory in the ln implementation is ECL and configPath is missing. It is used to provide password for API authentication. It will be ignored in other ln implementations.
11. `lnApiPassword` is mandatory in the ln implementation is ECL and configPath is missing. It is used to provide password for API authentication. It will be ignored in other ln implementations.