Skip to contents

Sends a payment (native currency or assets) from a specific sender address. This is the counterpart of mc_send for multi‑asset transactions with a chosen source address.

Usage

mc_send_from(
  conn,
  from_address,
  to_address,
  amounts,
  comment = "",
  comment_to = ""
)

Arguments

conn

A connection object created by mc_connect.

from_address

Character string. Sender address.

to_address

Character string. Recipient address.

amounts

Either a numeric value (native) or a named list of assets.

comment

Character string. Optional transaction comment.

comment_to

Character string. Optional comment‑to field.

Value

A character string containing the transaction ID.

Examples

if (FALSE) { # \dontrun{
# Send 2 native coins from one address to another
txid <- mc_send_from(conn, "1A...", "1B...", 2)

# Send assets from a specific address
txid <- mc_send_from(conn, "1A...", "1B...", list(myasset = 100, other = 50))
} # }