Author

Topic: Is there any service up yet that provides Lightning API? (Read 278 times)

legendary
Activity: 1463
Merit: 1886
Like we have https://www.blockchain.com/api or https://block.io/api/ for on chain transactions, do we have something similar for Lightning Network?

To be specific, I am looking for the following functions through Lightning API...

- generating a Lightning address

- getting a callback while receiving a Lightning transaction

- creating & broadcasting a Lightning transaction

I think this is actually all possible using BlueWallet's LndHub. You could make API requests to their server, or host your own.
copper member
Activity: 1652
Merit: 1901
Amazon Prime Member #7
There are no "addresses" on the LN, the closest thing to an address is an "invoice" which is for a specific amount of bitcoin. In theory, someone could create a service in which invoices are automatically generated after being told the details of your open LN channels.
So, these are invoice rather than address?

- lnbc50n1pwgvehspp5nf9v6pe2ue7dsgdhxewldggke6sjd25sfgcvgn8pnkjgw7aa5zlqdqqcqzys2 397e93ucr5ynvwanswn9qhe6qluxtx2whwuh57guk8ejyvwv2wkjprjfuhwf5m9gzsmpdtgscp5nfgl laq3h6sprmszkpjmmlzdpxcpe8jlm6
I have not used LN to date, so I cannot say what these strings are. If you received those strings from a LN user asking you to send a payment to that person, they are presumably invoices.

You can only "receive" a LN transaction after you have generated an invoice, after it is "paid". The only entity that is in a position to know a LN invoice is paid is the one who has an open LN channel open the invoice was paid through.
So, as a 3rd party, I'll never know whether the invoices given above are paid or not?
If you are not the sender, nor the receiver of the transaction, you will not know if an invoice is paid.

To my knowledge, the current LN technology does not provide for a way to prove to a third party that an invoice is paid. This may be something the LN devs may provide for in the future, and it would probably be a useful feature. If you are paying a third party service to create invoices for you, and to notify you when they are paid, you would probably need to trust the third party to correctly tell you.....in this case, you would need to trust the third party to send money to you (presumably in batches), so you are already trusting them. 

sr. member
Activity: 860
Merit: 423
There are no "addresses" on the LN, the closest thing to an address is an "invoice" which is for a specific amount of bitcoin. In theory, someone could create a service in which invoices are automatically generated after being told the details of your open LN channels.
So, these are invoice rather than address?

- lnbc50n1pwgvehspp5nf9v6pe2ue7dsgdhxewldggke6sjd25sfgcvgn8pnkjgw7aa5zlqdqqcqzys2 397e93ucr5ynvwanswn9qhe6qluxtx2whwuh57guk8ejyvwv2wkjprjfuhwf5m9gzsmpdtgscp5nfgl laq3h6sprmszkpjmmlzdpxcpe8jlm6

- lnbc50n1pwg8zm4pp5p562th3pfzq52qufqds47x554dr3tgcehnrutfaryaca5q6vfqssdqqcqzysx qyz5vqmw92r5zuwx8uzhzh0yrwssywxlwmnwhx2c8863pw7ka55m2gnjrn48fc53mty5mphkvhmfp4f dx8tta3c4fw26gkpgc48g54pqjttgcpe2eaux

- lnbc50n1pwg9jk3pp5jyrsph7wtatw2w8lvk3uh3tkdnzvgu06qayukgur953pggayvj4qdqqcqzysp vcs472tuym7zs6ed2n27f923dxs4p7gq7jx8sqj223mxzysn7k5rsdntg2d5xlp2408cy57l3c29wmd 3pyr32jhzdqs4x4cuv3zlucp5rnlya

A LN "transaction" is actually a series of Bitcoin multisig transactions that are not intended to be broadcast to the Bitcoin network, and are signed in a very specific order with each party to a transaction signing their portion and only signing the next portion after they have received the other party's signed portion.
Ok.

You can only "receive" a LN transaction after you have generated an invoice, after it is "paid". The only entity that is in a position to know a LN invoice is paid is the one who has an open LN channel open the invoice was paid through.
So, as a 3rd party, I'll never know whether the invoices given above are paid or not?

If you are not wanting to run both a Bitcoin and a LN full node, in the future there may be third party services that will run one for you, and will create invoices and notify you once the invoices have been paid.
Hope so.
copper member
Activity: 1652
Merit: 1901
Amazon Prime Member #7
There are no "addresses" on the LN, the closest thing to an address is an "invoice" which is for a specific amount of bitcoin. In theory, someone could create a service in which invoices are automatically generated after being told the details of your open LN channels.

A LN "transaction" is actually a series of Bitcoin multisig transactions that are not intended to be broadcast to the Bitcoin network, and are signed in a very specific order with each party to a transaction signing their portion and only signing the next portion after they have received the other party's signed portion.

You can only "receive" a LN transaction after you have generated an invoice, after it is "paid". The only entity that is in a position to know a LN invoice is paid is the one who has an open LN channel open the invoice was paid through.

If you are not wanting to run both a Bitcoin and a LN full node, in the future there may be third party services that will run one for you, and will create invoices and notify you once the invoices have been paid.
legendary
Activity: 1876
Merit: 3132
Take a look at OpenNode if you don't want to bother with setting up and maintaining your own Lightning Network node. Here you can find the documentation. You might find it useful.
legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
LND which is client of LN have RPC API, but the downside is you must set a device (VPS, Pi, etc.).
Their documentation/guide page is down at this moment though.

Hi,

There are no such thing as Lightning address or transactions, on lightning are exchanged bitcoin transactions.

I think he meant :
1. Node's IP address which used to to connect to that node
2. Transaction which happen off-chain. But only sender, receiver and nodes used to route transaction who have such information.
sr. member
Activity: 279
Merit: 435
Like we have https://www.blockchain.com/api or https://block.io/api/ for on chain transactions, do we have something similar for Lightning Network?

To be specific, I am looking for the following functions through Lightning API...

- generating a Lightning address

- getting a callback while receiving a Lightning transaction

- creating & broadcasting a Lightning transaction
Hi,

There are no such thing as Lightning address or transactions, on lightning are exchanged bitcoin transactions.
sr. member
Activity: 860
Merit: 423
Like we have https://www.blockchain.com/api or https://block.io/api/ for on chain transactions, do we have something similar for Lightning Network?

To be specific, I am looking for the following functions through Lightning API...

- generating a Lightning address

- getting a callback while receiving a Lightning transaction

- creating & broadcasting a Lightning transaction
Jump to: