mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-14 23:22:35 +02:00
Fix incorrect hash key in gRPC Ruby documentation
This commit is contained in:
@ -128,7 +128,7 @@ macaroon = macaroon_binary.each_byte.map { |b| b.to_s(16).rjust(2,'0') }.join
|
|||||||
The simplest approach to use the macaroon is to include the metadata in each request as shown below.
|
The simplest approach to use the macaroon is to include the metadata in each request as shown below.
|
||||||
|
|
||||||
```ruby
|
```ruby
|
||||||
stub.get_info(Lnrpc::GetInfoRequest.new, metadata: {metadata: macaroon})
|
stub.get_info(Lnrpc::GetInfoRequest.new, metadata: {macaroon: macaroon})
|
||||||
```
|
```
|
||||||
|
|
||||||
However, this can get tiresome to do for each request. We can use gRPC interceptors to add this metadata to each request automatically. Our interceptor class would look like this.
|
However, this can get tiresome to do for each request. We can use gRPC interceptors to add this metadata to each request automatically. Our interceptor class would look like this.
|
||||||
|
Reference in New Issue
Block a user