1 Answer

0 votes

If these assets are being combined together in a single output in a way you don't like, you should be able to use createrawsendfrom to force them to go into different outputs. Explicitly specify vout6 as sending back the remaining 5 asset@A to the original address, then it should automatically add the change output vout7 as you wanted.

You can also use createrawtransaction + appendrawtransaction in which case no change outputs are created automatically.

Note that in either case you might not get the exact ordering of outputs that you want, but hopefully that should not matter.