What is the input and output script of the funding transaction?

2

I'm looking for what the state block look like on the blockchain to set a channel on the lightning network. I found everywhere that the input script is a multisig script (since the two people that set the channel will put there state on the blockchain), but I can't find how they lock the amount until the channel is closed.

So I have two questions :
What is the script of the output script of the state block (the block that starts the channel)?
Where to find such information ? If you have the scripts of the block that is published on the blockchain after the channel is closed, I would gladly take them also :)

Thank you for your help!

fbertoia

Posted 2018-07-01T15:56:58.460

Reputation: 21

Answers

3

What is the script of the output script of the state block (the block that starts the channel)?

The output script of the funding transaction is a P2WSH output where the witness script is a 2-of-2 multisig. Because it is P2WSH, you cannot see this script.

This locks in the amount because the output with that script has a specific amount (the amount the channel is being funded with) and the only way to spend that output is with both parties agreeing to spend it.

Where to find such information ?

All of this information is specified in the Lightning BOLTs, specifically BOLT 3.

Andrew Chow

Posted 2018-07-01T15:56:58.460

Reputation: 40 910