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?



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.

2 Answers 2


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.

  • Thanks again Andrew, and thanks for your great contributions.
    – Fontaine
    May 28, 2019 at 16:58

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.

Your Answer

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

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