altangent / lnd-async

Lightning Network Daemon gRPC async client
MIT License
21 stars 12 forks source link

TypeScript types #7

Open torkelrogstad opened 6 years ago

torkelrogstad commented 6 years ago

There's no typings for this package. Is that something that would be desired? If so, I could take a stab at implementing them.

I understand that the methods exposed after lnd.connect() aren't implemented in this package, and that this package is just really a somewhat thin wrapper around gRPC calls. However, I believe it is possible to write types for the gRPC calls, meaning that it would be possible to interact with lnd API calls, and have the TypeScript compiler/your IDE tell you what the response contains.

bmancini55 commented 6 years ago

Absolutely, I think that would be a great addition. Especially if the gRPC protocol definitions can be mapped out.

torkelrogstad commented 6 years ago

I've actually started on writing out the gRPC types, but it's quite tedious. Is there some tool out there for extracting it from proto files? It probably won't be 100% correct, but it would be a good starting point.