<p><code>rpc_pb2_grpc</code> is an official <code>lnd</code> API. This is a low-level interface that supports essentially all the same calls you can make through <code>lncli</code>. If you decide to use this one - I can suggest you start with <a href="https://dev.lightning.community/guides/python-grpc/" rel="nofollow noreferrer">this official tutorial</a>.</p>

<p><code>lnd_grpc</code> is a <a href="https://github.com/willcl-ark/lnd_grpc" rel="nofollow noreferrer">third-party wrapper</a> on top of <code>rpc_pb2_grpc</code>, which introducing additional level of abstraction and hides some things from the user (such as handling protocol buffer messages and stubs). It is easier to use for most of the cases, but it is not official and it is less flexible than <code>rpc_pb2_grpc</code>.</p>

<p>Naturally, if you use the latter library - you should open <a href="https://github.com/willcl-ark/lnd_grpc/issues" rel="nofollow noreferrer">issues in their GitHub</a>, since they are not affiliated with the <code>lnd</code> devs.</p>

<p>Regardless of what you use - I think the error you are getting is related to the fact that you start <code>lnd</code> with the <code>--no-macaroons</code> option.</p>

CC BY-SA 4.0
2019-07-01T19:35:32.633Z
2019-07-01T19:35:32.633Z
Dmitry Laptev
<p>I'm trying to automate launching multiple LND instances with a Python script. I've been trying to use lnd_grpc but can't get it to work. I created an <a href="https://github.com/lightningnetwork/lnd/issues/3127" rel="nofollow noreferrer">issue</a> in the LND repository and was pointed towards <a href="https://api.lightning.community/" rel="nofollow noreferrer">https://api.lightning.community/</a>. This website does have plenty of documentation and examples, but I can quite get the relationship between lnd_grpc (which I've  been using) and <code>rpc_pb2_grpc</code> (which is used throughout the documentation).</p>

<p>For instance, initializing a new wallet (as per official docs) in lnd_grpc is:</p>

<pre><code>lnd_rpc = lnd_grpc.Client()
lnd_rpc.gen_seed()
lnd_rpc.init_wallet()
</code></pre>

<p>which is different from <a href="https://api.lightning.community/#initwallet" rel="nofollow noreferrer">that in rpc_pb2_grpc</a>.</p>

<p>Are these libraries (is this a proper word?) compatible? Should I  switch from lnd_grpc to rpc_pb2_grpc?</p>

<lightning-network><lightning-network-daemon><grpc>
RPC for LND: rpc_pb2_grpc vs lnd_grpc
Sergei Tikhomirov
# RPC for LND: rpc_pb2_grpc vs lnd_grpc

(Asked by: username_0 on 2019-05-28)

I'm trying to automate launching multiple LND instances with a Python script. I've been trying to use lnd\_grpc but can't get it to work. I created an [issue](https://github.com/lightningnetwork/lnd/issues/3127) in the LND repository and was pointed towards <https://api.lightning.community/>. This website does have plenty of documentation and examples, but I can quite get the relationship between lnd\_grpc (which I've been using) and `rpc_pb2_grpc` (which is used throughout the documentation).

For instance, initializing a new wallet (as per official docs) in lnd\_grpc is:

```
lnd_rpc = lnd_grpc.Client()
lnd_rpc.gen_seed()
lnd_rpc.init_wallet()

```

which is different from [that in rpc\_pb2\_grpc](https://api.lightning.community/#initwallet).

Are these libraries (is this a proper word?) compatible? Should I switch from lnd\_grpc to rpc\_pb2\_grpc?

**Tags:** lightning-network, lightning-network-daemon, grpc


---

## 1 answers

### Answer by username_1 on 2019-07-01. Score: 1

`rpc_pb2_grpc` is an official `lnd` API. This is a low-level interface that supports essentially all the same calls you can make through `lncli`. If you decide to use this one - I can suggest you start with [this official tutorial](https://dev.lightning.community/guides/python-grpc/).

`lnd_grpc` is a [third-party wrapper](https://github.com/willcl-ark/lnd_grpc) on top of `rpc_pb2_grpc`, which introducing additional level of abstraction and hides some things from the user (such as handling protocol buffer messages and stubs). It is easier to use for most of the cases, but it is not official and it is less flexible than `rpc_pb2_grpc`.

Naturally, if you use the latter library - you should open [issues in their GitHub](https://github.com/willcl-ark/lnd_grpc/issues), since they are not affiliated with the `lnd` devs.

Regardless of what you use - I think the error you are getting is related to the fact that you start `lnd` with the `--no-macaroons` option.


---

