Skip to contents

Sends a payment (native currency or assets) to a specified address. This is a general‑purpose sending function that can handle multiple asset types in a single transaction.

Usage

mc_send(conn, address, amounts, comment = "", comment_to = "")

Arguments

conn

A connection object created by mc_connect.

address

Character string. Recipient address.

amounts

Either a numeric value (for native currency) or a named list specifying assets and quantities, e.g., list(asset1 = 10, asset2 = 5). For metadata, see mc_send_with_data.

comment

Character string. Optional transaction comment (stored on chain).

comment_to

Character string. Optional comment‑to field.

Value

A character string containing the transaction ID (txid).

Examples

if (FALSE) { # \dontrun{
# Send 1.5 native coins
txid <- mc_send(conn, "1A...", 1.5)

# Send assets only
txid <- mc_send(conn, "1A...", list(myasset = 100))

# Send both native and assets
txid <- mc_send(conn, "1A...", list(0.5, myasset = 50))
} # }