0

Trying to learn the Lightning Network :)

Can I do something like this:

STEP 1: Generate new addresses

  • address_1 = cli/lightning-cli newaddr
  • address_2 = cli/lightning-cli newaddr
  • address_3 = cli/lightning-cli newaddr
  • address_4 = cli/lightning-cli newaddr
  • address_5 = cli/lightning-cli newaddr

STEP 2: Get transaction ids

  • txnid_1 = bitcoin-cli -testnet sendtoaddress address_1 60000
  • txnid_2 = bitcoin-cli -testnet sendtoaddress address_2 70000
  • txnid_3 = bitcoin-cli -testnet sendtoaddress address_3 80000
  • txnid_4 = bitcoin-cli -testnet sendtoaddress address_4 90000

Question 1: the commands above transfer money the BITCOIN NETWORK to the LIGHTNNG NETWORK - right??? If so, which BITCOIN "FROM" address is being used?

STEP 3: See who I am connected to

run: cli/lightning-cli listpeers (to see who I am connected with)

Please note that for my example:

  • Public Key for NODE_B => is not on list above (not a peer)
  • Public Key for NODE_C => is not on list above (not a peer)
  • Public Key for NODE_D => is not on list above (not a peer)

STEP 4: Fund the channels:

The command I see for funding a channel is: cli/lightning-cli fundchannel

  • BUT -

What I would like to do:

  • cli/lightning-cli fundchannel NODE_B 10000 [txnid_2]

  • cli/lightning-cli fundchannel NODE_C 20000 [txnid_2]

  • cli/lightning-cli fundchannel NODE_B 30000 [txnid_3]

  • cli/lightning-cli fundchannel NODE_D 40000 [txnid_4]

For example I want to fund a channel to NODE_B with 10000 Satoshi from txnid_2

Question 2: Is what I would like to do possible?

TIA

1 Answer 1

0

he commands above transfer money the BITCOIN NETWORK to the LIGHTNNG NETWORK - right???

No. It sends money to addresses the c-lightning can use for creating Lightning Network transactions. There is no "transfer money from Bitcoin to Lightning", they are not separate and distinct things.

If so, which BITCOIN "FROM" address is being used?

There is no such thing as a Bitcoin from address. That is not how Bitcoin works. It may seem like there are from addresses, but that's just a simplification for users.

Is what I would like to do possible?

No, it is currently not possible to choose what transactions to use to fund your channels with c-lightning.

1
  • thanks for the response! Above, you said: "No, it is currently not possible to choose what transactions to use to fund your channels with c-lightning." Is there any other way that this can be done? TIA Apr 14, 2018 at 22:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.