RPC for LND: rpc_pb2_grpc vs lnd_grpc
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 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.
Are these libraries (is this a proper word?) compatible? Should I switch from lnd_grpc to rpc_pb2_grpc?