MultisigProgram.sorted constructor

MultisigProgram.sorted(
  1. int threshold,
  2. Iterable<ECPublicKey> pubkeys
)

Creates a multisig script program for a given threshold (t-of-n) and a list of public keys that are sorted according to the big-endian encoded bytes. Public keys will be inserted into the script from smallest to largest encoded data.

Implementation

MultisigProgram.sorted(int threshold, Iterable<ECPublicKey> pubkeys)
  : this(
    threshold,
    pubkeys.sorted((a, b) => compareBytes(a.data, b.data)),
  );