Skip to contents

Appends additional inputs and outputs to an existing raw transaction. This is useful for building multi‑party transactions or adding extra components after creation.

Usage

mc_append_raw_transaction(conn, tx_hex, inputs = list(), outputs = list())

Arguments

conn

A connection object created by mc_connect.

tx_hex

Character string. The raw transaction hex to which inputs/outputs are added.

inputs

A list of input objects (each with txid and vout).

outputs

A named list of outputs (mapping addresses to amounts).

Value

A character string containing the updated raw transaction hex.

Examples

if (FALSE) { # \dontrun{
# Add another input and output
new_input <- list(list(txid = "def...", vout = 1))
new_output <- list("1C..." = 0.2)
updated_hex <- mc_append_raw_transaction(conn, tx_hex,
                                         inputs = new_input,
                                         outputs = new_output)
} # }