<p>A PSBT contains an unsigned transaction that has all of the inputs and output that you want. The other data PSBT allows for are put in around that unsigned transaction.</p>

<p>Here, <code>data</code> just means that the unsigned transaction will have an output that has an <code>OP_RETURN</code> followed by whatever data you want. This directly reflects what <code>createrawtransaction</code>. <code>data</code> is not specific to PSBT nor is it necessary.</p>

CC BY-SA 4.0
2019-05-28T16:58:47.727Z
Thanks again Andrew, and thanks for your great contributions.
Fontaine
CC BY-SA 4.0
2019-05-28T14:41:35.147Z
2019-05-28T14:41:35.147Z
Ava Chow
<p>Thanks! it would be useful to specify it a little better in the &quot;help&quot;, because now it seems the parameter is mandatory and it is not trivial to find this useful post.</p>

CC BY-SA 4.0
2021-01-28T10:31:36.917Z
2021-01-28T10:31:36.917Z
Gabriele Domenichini
<p>I am sure this is a dumb question but if using:</p>

<p><code>bitcoin-cli walletcreatefundedpsbt "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"</code></p>

<p>How do you create the data parameter? Where does it come from?</p>

<p><code>\"00010203\"</code></p>

<p>Edit:</p>

<p>I should have read the BIP first, it looks like it is an unsigned tx. So in order to create a PSBT you need to first create an unsigned tx? And include the hex as an argument.</p>

<json-rpc><bitcoin-cli><bip174-psbt>
How to create the data parameter for a PSBT?
Fontaine
# How to create the data parameter for a PSBT?

(Asked by: username_0 on 2019-05-28)

I am sure this is a dumb question but if using:

`bitcoin-cli walletcreatefundedpsbt "[{\"txid\":\"myid\",\"vout\":0}]" "[{\"data\":\"00010203\"}]"`

How do you create the data parameter? Where does it come from?

`\"00010203\"`

Edit:

I should have read the BIP first, it looks like it is an unsigned tx. So in order to create a PSBT you need to first create an unsigned tx? And include the hex as an argument.

**Tags:** json-rpc, bitcoin-cli, bip174-psbt


---

## 2 answers

### Answer by username_1 on 2019-05-28. Score: 0 | Accepted answer

A PSBT contains an unsigned transaction that has all of the inputs and output that you want. The other data PSBT allows for are put in around that unsigned transaction.

Here, `data` just means that the unsigned transaction will have an output that has an `OP_RETURN` followed by whatever data you want. This directly reflects what `createrawtransaction`. `data` is not specific to PSBT nor is it necessary.

> **Comments:**
> **username_0**: Thanks again Andrew, and thanks for your great contributions.  

---

### Answer by username_2 on 2021-01-28. Score: 0

Thanks! it would be useful to specify it a little better in the "help", because now it seems the parameter is mandatory and it is not trivial to find this useful post.


---

