<blockquote>
  <p>What is the script of the output script of the state block (the block that starts the channel)?</p>
</blockquote>

<p>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.</p>

<p>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.</p>

<blockquote>
  <p>Where to find such information ?</p>
</blockquote>

<p>All of this information is specified in the <a href="https://github.com/lightningnetwork/lightning-rfc" rel="nofollow noreferrer">Lightning BOLTs</a>, specifically <a href="https://github.com/lightningnetwork/lightning-rfc/blob/master/03-transactions.md#funding-transaction-output" rel="nofollow noreferrer">BOLT 3</a>.</p>

CC BY-SA 4.0
2018-07-01T18:46:15.443Z
2018-07-01T18:46:15.443Z
Ava Chow
<p>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.</p>

<p>So I have two questions :<br>
What is the script of the output script of the state block (the block that starts the channel)?<br>
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 :)</p>

<p>Thank you for your help!</p>

<lightning-network><ln-commitment-transaction>
What is the input and output script of the funding transaction?
fbertoia
# What is the input and output script of the funding transaction?

(Asked by: username_0 on 2018-07-01)

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!

**Tags:** lightning-network, ln-commitment-transaction


---

## 1 answers

### Answer by username_1 on 2018-07-01. Score: 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](https://github.com/lightningnetwork/lightning-rfc), specifically [BOLT 3](https://github.com/lightningnetwork/lightning-rfc/blob/master/03-transactions.md#funding-transaction-output).


---

