mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-31 17:51:33 +02:00
docs: update path to where macaroons are stored
Co-Authored-By: Karl Ranna <karl@karlranna.com>
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
856500dc43
commit
dc3db4bf62
@@ -158,7 +158,7 @@ public class Main {
|
||||
}
|
||||
|
||||
private static final String CERT_PATH = "/Users/user/Library/Application Support/Lnd/tls.cert";
|
||||
private static final String MACAROON_PATH = "/Users/user/Library/Application Support/Lnd/admin.macaroon";
|
||||
private static final String MACAROON_PATH = "/Users/user/Library/Application Support/Lnd/data/chain/bitcoin/simnet/admin.macaroon";
|
||||
private static final String HOST = "localhost";
|
||||
private static final int PORT = 10009;
|
||||
|
||||
|
@@ -174,9 +174,9 @@ var grpc = require('grpc');
|
||||
|
||||
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA'
|
||||
|
||||
// Lnd admin macaroon is at ~/.lnd/admin.macaroon on Linux and
|
||||
// ~/Library/Application Support/Lnd/admin.macaroon on Mac
|
||||
var m = fs.readFileSync('~/.lnd/admin.macaroon');
|
||||
// Lnd admin macaroon is at ~/.lnd/data/chain/bitcoin/simnet/admin.macaroon on Linux and
|
||||
// ~/Library/Application Support/Lnd/data/chain/bitcoin/simnet/admin.macaroon on Mac
|
||||
var m = fs.readFileSync('~/.lnd/data/chain/bitcoin/simnet/admin.macaroon');
|
||||
var macaroon = m.toString('hex');
|
||||
var meta = new grpc.Metadata().add('macaroon', macaroon);
|
||||
|
||||
@@ -195,9 +195,9 @@ var grpc = require('grpc');
|
||||
|
||||
process.env.GRPC_SSL_CIPHER_SUITES = 'HIGH+ECDSA'
|
||||
|
||||
// Lnd admin macaroon is at ~/.lnd/admin.macaroon on Linux and
|
||||
// ~/Library/Application Support/Lnd/admin.macaroon on Mac
|
||||
var m = fs.readFileSync('~/.lnd/admin.macaroon');
|
||||
// Lnd admin macaroon is at ~/.lnd/data/chain/bitcoin/simnet/admin.macaroon on Linux and
|
||||
// ~/Library/Application Support/Lnd/data/chain/bitcoin/simnet/admin.macaroon on Mac
|
||||
var m = fs.readFileSync('~/.lnd/data/chain/bitcoin/simnet/admin.macaroon');
|
||||
var macaroon = m.toString('hex');
|
||||
|
||||
// build meta data credentials
|
||||
|
@@ -140,9 +140,9 @@ To authenticate using macaroons you need to include the macaroon in the metadata
|
||||
```python
|
||||
import codecs
|
||||
|
||||
# Lnd admin macaroon is at ~/.lnd/admin.macaroon on Linux and
|
||||
# ~/Library/Application Support/Lnd/admin.macaroon on Mac
|
||||
with open(os.path.expanduser('~/.lnd/admin.macaroon'), 'rb') as f:
|
||||
# Lnd admin macaroon is at ~/.lnd/data/chain/bitcoin/simnet/admin.macaroon on Linux and
|
||||
# ~/Library/Application Support/Lnd/data/chain/bitcoin/simnet/admin.macaroon on Mac
|
||||
with open(os.path.expanduser('~/.lnd/data/chain/bitcoin/simnet/admin.macaroon'), 'rb') as f:
|
||||
macaroon_bytes = f.read()
|
||||
macaroon = codecs.encode(macaroon_bytes, 'hex')
|
||||
```
|
||||
|
@@ -119,9 +119,9 @@ You should now see the details of the settled invoice appear.
|
||||
To authenticate using macaroons you need to include the macaroon in the metadata of the request.
|
||||
|
||||
```ruby
|
||||
# Lnd admin macaroon is at ~/.lnd/admin.macaroon on Linux and
|
||||
# ~/Library/Application Support/Lnd/admin.macaroon on Mac
|
||||
macaroon_binary = File.read(File.expand_path("~/.lnd/admin.macaroon"))
|
||||
# Lnd admin macaroon is at ~/.lnd/data/chain/bitcoin/simnet/admin.macaroon on Linux and
|
||||
# ~/Library/Application Support/Lnd/data/chain/bitcoin/simnet/admin.macaroon on Mac
|
||||
macaroon_binary = File.read(File.expand_path("~/.lnd/data/chain/bitcoin/simnet/admin.macaroon"))
|
||||
macaroon = macaroon_binary.each_byte.map { |b| b.to_s(16).rjust(2,'0') }.join
|
||||
```
|
||||
|
||||
@@ -154,7 +154,7 @@ And then we would include it when we create our stub like so.
|
||||
```ruby
|
||||
certificate = File.read(File.expand_path("~/.lnd/tls.cert"))
|
||||
credentials = GRPC::Core::ChannelCredentials.new(certificate)
|
||||
macaroon_binary = File.read(File.expand_path("~/.lnd/admin.macaroon"))
|
||||
macaroon_binary = File.read(File.expand_path("~/.lnd/data/chain/bitcoin/simnet/admin.macaroon"))
|
||||
macaroon = macaroon_binary.each_byte.map { |b| b.to_s(16).rjust(2,'0') }.join
|
||||
|
||||
stub = Lnrpc::Lightning::Stub.new(
|
||||
|
Reference in New Issue
Block a user