3

This question is almost the opposite of How to find the change / sender address given a txid?

If I am making a transaction using createrawtransaction how can I define the change (sender) address?

Murch
  • 75,206
  • 34
  • 186
  • 622
Felipe
  • 1,738
  • 3
  • 19
  • 33

1 Answers1

4

In Bitcoin, change is a normal output which sends the remaining money to one of your addresses. When creating a transaction with createrawtransaction, you have to add change output manually (just like any other output), otherwise that money would go to the miners.

abacabadabacaba
  • 983
  • 1
  • 8
  • 21
  • i came with the same question because im not sure how to define the 2nd output. the example shows the output as a single object, not an array. – Sonic Soul Sep 01 '18 at 16:12