Skip to contents

Retrieves a transaction from the blockchain by its transaction ID. If verbose = TRUE, returns a detailed decoded transaction; if FALSE (default), returns the raw transaction in hexadecimal.

Usage

mc_get_raw_transaction(conn, txid, verbose = FALSE)

Arguments

conn

A connection object created by mc_connect.

txid

Character string. Transaction ID.

verbose

Logical. If TRUE, returns a parsed transaction object; if FALSE, returns the raw transaction hex. Default is FALSE.

Value

If verbose = FALSE, a character string (hex). If verbose = TRUE, a list with transaction details.

See also

mc_get_tx_out to inspect a specific output.

Other mempool & transactions: mc_get_mempool_info(), mc_get_raw_mempool(), mc_get_tx_out()

Examples

if (FALSE) { # \dontrun{
# Get raw hex of a transaction
raw <- mc_get_raw_transaction(conn, "abc...")

# Get decoded transaction
tx <- mc_get_raw_transaction(conn, "abc...", verbose = TRUE)
} # }