Skip to contents

Issues a new asset, but allows specifying the sender address (which must have sufficient native currency to pay for the transaction). This is useful when the node has multiple addresses.

Usage

mc_issue_from(
  conn,
  from_address,
  to_address,
  name,
  quantity,
  units = 1,
  native_amount = NULL,
  custom_fields = NULL
)

Arguments

conn

A connection object created by mc_connect.

from_address

Character string. Address that will pay for and issue the asset.

to_address

Character string. Recipient address (can be the same as from_address).

name

Either a character string (asset name) or a list of asset parameters (e.g., list(name = "myasset", open = TRUE)).

quantity

Numeric. Total amount to issue.

units

Numeric. Smallest divisible unit. Default is 1.

native_amount

Numeric (optional). Amount of native currency to send along with the issuance.

custom_fields

List (optional). Custom fields.

Value

A character string containing the transaction ID.

Examples

if (FALSE) { # \dontrun{
# Issue from a specific address to the same address
txid <- mc_issue_from(conn, from_address = "1A...", to_address = "1A...",
                      name = "myasset", quantity = 100)
} # }