By pete 3465 hours ago    
4.4k

HELP re lightning lnd macaroons path BOUNTY 50KSATS

https://bitx.press/comments.php?p=81
Guys we noticed that our credits page was not working i.e. withdraw .  reason being macaroon path which we use is in /home directory .. along with .. /home/lndata/chain/bitcoin/mainnet/admin.macaroon path setup in auth.js file.. it didnt like it and part of the program KEPT ON looking into ./root/.lnd/data/chain/bitcoin/mainnet/admin.macaroon for it..

It used to work fine.. is it a GO path resetting on us? how could it SUDDENLY STOP WORKING and looking in the wrong path? ??  SO FKN FRUSTRATING this go path issue not sticking on ubuntu latest.

Or is it another issue?


Anyway our work around was to copy the macaroon so it is in both paths.. 

Can anyone help us regarding DEFINITIVE DOCUMENTATION ON HOW TO SET UP 

A. go path to datadir of /home and why in the heck it keeps trying to look into root for macaroon ??


var grpc = require('grpc');

var fs = require("fs");

var auth = require('./BLN/auth');

var protoLoader = require('@grpc/proto-loader');

// Suggested options for similarity to existing grpc.load behavior

var packageDefinition = protoLoader.loadSync(

    './BLN/rpc.proto',    {keepCase: true,     longs: String,     enums: String,     defaults: true,     oneofs: true

    });

var protoDescriptor = grpc.loadPackageDefinition(packageDefinition);

var lnrpc = protoDescriptor.lnrpc;


var macaroonCreds = grpc.credentials.createFromMetadataGenerator(function(args, callback) {

    var macaroon = fs.readFileSync(auth.config.AUTH).toString('hex');

    var metadata = new grpc.Metadata()

    metadata.add('macaroon', macaroon);

    callback(null, metadata);

});


var lndCert = fs.readFileSync(auth.config.CERT);

var sslCreds = grpc.credentials.createSsl(lndCert);

var walletUnlocker = new lnrpc.WalletUnlocker(auth.config.HOST, sslCreds);

var creds = grpc.credentials.combineChannelCredentials(sslCreds, macaroonCreds);

var lightning = new lnrpc.Lightning(auth.config.HOST, creds);



sort by

| Login | Register |

"A bitcoin Lightning Powered Social Platform "