Skip to contents

Creates a Pay‑to‑Script‑Hash (P2SH) multi-signature address without adding it to the wallet. The address can be used in transactions that require multiple signatures, but the node cannot spend funds from it unless the private keys are also imported.

Usage

mc_create_multisig(conn, n_required, keys)

Arguments

conn

A connection object created by mc_connect.

n_required

Integer. Number of required signatures.

keys

Character vector. Public keys or addresses.

Value

A list with two components:

address

The multi-signature address.

redeemScript

The redeem script (needed for spending).

Examples

if (FALSE) { # \dontrun{
multisig <- mc_create_multisig(conn, n_required = 2,
                               keys = c("pubkey1", "pubkey2", "pubkey3"))
cat("Multisig address:", multisig$address)
} # }