Unspent output ordering within createrawtransaction

+4 votes

When using createrawtransaction, are the unspent outputs ordered as they are presented within the request?

So if I have a sample set of outputs like below:


Can I always assume the output for the token-1 is [0] and the new asset issuance is output [1] , and that the asset details which would be appended in a follow-on transaction using appendrawdata would be output [2]?




asked Aug 22, 2017 by marty

1 Answer

0 votes

Yes, the outputs are added in the same order as they are provided in the API request, and the metadata outputs (which you can also now specify in createrawtransaction itself) will come after the outputs which go to specific addresses.

answered Aug 22, 2017 by MultiChain
Great...thx.  Missed the change the createrawtransaction to build it all in one call.....