elements
elements copied to clipboard
[WIP] added createrawtransaction rpc
Inputs same format as createrawtransaction (an array of outpoints), but with that RPC you also supply a map of addresses to amounts and then another map of addresses to asset IDs (meaning you cannot have two outputs with the same address). createrawtxoutputs you specify all outputs explicitly (via the second array).
Several use cases where users want to send different assets to the same address in the same transaction.
Hmm, I agree that this way of inputting things is a lot better than the current createrawtransaction
way. The latter is really hacked to be backwards compatible with Core.
We're discussing how we can get rid of the intrinsic 8-decimal Bitcoin notation and one of the potential solutions is to create alternatives for a lot of the RPC methods, so this might fit into that picture.
I think a better approach would be to just change ConstructTransaction
in rpc/rawtransaction_util.cpp so that the duplicate check checks (destination, asset) pairs instead of just destination. This would be a much smaller change and then would be consistent across createrawtransaction
sendmany
, send
, etc