1

I want to fund a PSBT transaction that I created with Bitcoin rust.

It looks like there is no such function to do that as the Creator is the only one that can set the inputs and outputs.

There is an API with Bitcoin Core rpc called walletcreatefundedpsbt but unfortunately it only accepts a single op_return data field.

What can I do?

1 Answer 1

2

Transactions with more than one OP_RETURN are non-standard and would not be relayed by most of the network.

That said using the rust-bitcoin library, which i understand you are using already, you can simply append more outputs to the inner transaction and to the PSBT.

2
  • Ah interesting, am I then limited to the 40 bytes of op_return? Your second solution doesn’t work as the additional op_return output will increase the cost of the tx no? Commented Dec 31, 2023 at 16:25
  • 1
    I think the op_return output’s output script can have up to 83 bytes and be considered standard.
    – Murch
    Commented Jan 2 at 17:34

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.