Skip to contents

Sends an asset (or native currency) from a specific sender address. Useful when the node has multiple addresses and you want to control which address the funds are taken from.

Usage

mc_send_asset_from(
  conn,
  from_address,
  to_address,
  asset,
  quantity,
  native_amount = 0,
  comment = "",
  comment_to = ""
)

Arguments

conn

A connection object created by mc_connect.

from_address

Character string. Sender address (must belong to the node's wallet).

to_address

Character string. Recipient address.

asset

Character string. Asset name, reference, or issuance transaction ID.

quantity

Numeric. Amount of the asset to send.

native_amount

Numeric. Amount of native currency to send (default 0).

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 from a specific address
txid <- mc_send_asset_from(conn, "1A...", "1B...", "myasset", 50)
} # }