Completes a multi-party atomic exchange by adding the final input–output pair. After this step, the transaction is fully built and ready to be broadcast.
Arguments
- conn
A connection object created by
mc_connect.- tx_hex
Character string. Hexadecimal representation of the partial exchange transaction (should already contain all other parties' contributions).
- txid
Character string. Transaction ID of the completing output.
- vout
Integer. Output index (vout) of the completing transaction.
- amounts
A list specifying the assets or native currency for the final part of the exchange.
- data
Optional metadata. Can be a character string or a list (which will be converted to JSON and then to hex). This data is embedded in the transaction.
Value
Character string. Raw transaction hex ready for sending via
mc_send_raw_transaction.
Examples
if (FALSE) { # \dontrun{
final <- mc_complete_raw_exchange(conn, partial_hex,
txid = "def...", vout = 1,
amounts = list(ETH = 5),
data = "exchange complete")
} # }