mirror of
https://github.com/Ride-The-Lightning/RTL
synced 2024-11-17 15:29:30 +00:00
24 lines
494 B
JavaScript
24 lines
494 B
JavaScript
|
var fs = require('fs');
|
||
|
var config = require('./config');
|
||
|
var clArgs = require('optimist').argv;
|
||
|
|
||
|
if(undefined !== clArgs.lndir) {
|
||
|
config.lnd_dir = clArgs.lndir;
|
||
|
} else {
|
||
|
if(config.lnd_dir === '') {
|
||
|
config.lnd_dir = __dirname;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
var macaroon = fs.readFileSync(config.lnd_dir + '/admin.macaroon').toString('hex');
|
||
|
var options = {
|
||
|
url: '',
|
||
|
rejectUnauthorized: false,
|
||
|
json: true,
|
||
|
headers: {
|
||
|
'Grpc-Metadata-macaroon': macaroon,
|
||
|
},
|
||
|
form: ''
|
||
|
};
|
||
|
|
||
|
module.exports = options;
|