Global Feed Post Login
Replying to Avatar Nice and Kind Vic

One of the most annoying things I run into with development is poorly written documentation, or non existant or poorly titled pages for operations.

As readily available as it should be, I cant seem to find documentation from lightning labs on HOW to do a GRPC request to pay an invoice.

Im looking for the REST equivalent of

lncli payinvoice --pay_req {lnbc...} --force

it seems to be documented as sendpayment marked as deprecated and has a bidirectional endpoint as /v1/channels/transaction-stream. The replacement being /v2/router/send

maybe i just need to put this aside and come back to it. frustrations are no bueno. but if you have worked with this and know the call, or can verify as above, please let me know

Avatar
bob 2y ago

I can show you in a couple hours

Reply to this note

Please Login to reply.

Discussion

Avatar
Nice and Kind Vic 2y ago

im gonna play some d&d tonight and pick it up tomorrow. im down to the last step for paying after decode, verify hash and amount

Avatar
bob 2y ago

I put this together and tested it worked. Missing the imports and what not which I didnt include in the gist. Let me know if this helps. Code makes a payment and tracks the status.

https://gist.github.com/BitcoinCoderBob/6adcc1a79c5c584cbf634c11e01a499f

Thread collapsed
Thread collapsed