Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: SOKO-DEKE on September 22, 2022, 09:18:11 AM



Title: How can I connect lightning network wallet to main blockchain?
Post by: SOKO-DEKE on September 22, 2022, 09:18:11 AM


If I decided to be using lightning network channel, after I have gotten my appropriate wallet for it. How will I now connect my wallet or will the wallet automatically connected main blockchain?

Secondly must recipient also be on lightning network channel before the transaction can take place.?


Title: Re: How can I connect lightning network wallet to main blockchain?
Post by: Rath_ on September 22, 2022, 11:56:32 AM
If I decided to be using lightning network channel, after I have gotten my appropriate wallet for it. How will I now connect my wallet or will the wallet automatically connected main blockchain?

Every Lightning-compatible wallet has its own Bitcoin wallet. You have to fund it before opening any channels. When you open a channel, some of your coins will be moved to a multi-signature address controlled by you and your channel partner. This involves a Bitcoin transaction.

Secondly must recipient also be on lightning network channel before the transaction can take place.?

If the other person has a Lightning node/wallet then you should be able to send a payment, but:

1) if you have a channel with that person then the transaction will be instantaneous and free of charge,
2) if you have a channel with some other person then the transaction will be routed through other nodes, as long as there is a path between you and the payee. You will very likely pay a fee, which is negligible for low-value transactions.

In both cases, the payment might failed due to lack of liquidity; it's a more complex topic. Let me know if you are keeping up so far.

If the other person does not have any Lightning channels, you can do a submarine swap (https://wiki.ion.radar.tech/tech/research/submarine-swap). There are third-party services that will accept your Lightning transaction and send an on-chain transaction to the provided address.


Title: Re: How can I connect lightning network wallet to main blockchain?
Post by: nc50lc on September 22, 2022, 02:08:41 PM
If I decided to be using lightning network channel, after I have gotten my appropriate wallet for it. How will I now connect my wallet or will the wallet automatically connected main blockchain?
So you haven't decided yet?
If so, you can try it without spending anything using a testnet wallet which you can fund through testnet faucets.
There's a tutorial in Beginners and Help board about setting up an LN Channel in testnet: [Tutorial] How to create Lightning Network Channel (Testnet BTC) (https://bitcointalk.org/index.php?topic=5212243.0)
In that tutorial, the site where you'll purchase some "virtual coffee" is connected to Lightning network (Bitcoin testnet).
There's also a link below that post to a beginners' guide to Lightning Network which is worth the read if you really want to try LN.

Secondly must recipient also be on lightning network channel before the transaction can take place.?
The recipient's invoice looks entirely different than a Bitcoin address/invoice.

It would also be great if you can reply (unlike in your other topics where you just left some questions) with your experience after testing LN yourself  ;)


Title: Re: How can I connect lightning network wallet to main blockchain?
Post by: BlackBoss_ on September 25, 2022, 02:14:21 AM
How will I now connect my wallet or will the wallet automatically connected main blockchain?
You can not if I am not wrong.

Because Lightning Network is a second layer solution so it does not connect directly to the layer 1, Bitcoin network.

What you do on Lightning Network is by Lightning Network channels.

LightNing Network Summary (https://lightning.network/lightning-network-summary.pdf)
Quote
The Lightning Network solves these problems. It is one of the first implementations of a multi-party Smart Contract
(programmable money) using bitcoin's built-in scripting. The Lightning Network is leading technological development in
multiparty financial computations with bitcoin

LightNing Network Wiki (https://lightningwiki.net/index.php/Main_Page)
Quote
Lightning enables quick, cheap and scalable Bitcoin payments. The Lightning Network scales blockchains and enables trust-minimized instant payments by keeping most transactions off-chain and leveraging the security of the underlying blockchain as an arbitration layer.

Correct me if I am wrong. Thank you.


Title: Re: How can I connect lightning network wallet to main blockchain?
Post by: n0nce on September 30, 2022, 10:41:05 PM
How will I now connect my wallet or will the wallet automatically connected main blockchain?
You can not if I am not wrong.
Because Lightning Network is a second layer solution so it does not connect directly to the layer 1, Bitcoin network.
You are connected to the blockchain in terms of creating a channel opening (and closing) transaction that are broadcasted and saved on the blockchain.
It's also required to monitor the mempool for cheating attempts, therefore running a Bitcoin Core node on the same machine is usually required.