Function createFlashLock

Create a Flash lock script.

Lock createFlashLock (
  uint age,
  geod24.bitblob.BitBlob!(64L) first_utxo,
  agora.crypto.ECC.Point pair_pk,
  ulong seq_id,
  uint num_peers
) nothrow @safe;

This lock is based on the Eltoo protocol, with some security modifications.

Parameters

NameDescription
age the age constraint for using the settlement keypair
first_utxo the first input's UTXO of the funding transaction. used to be able to derive unique update & settlement keypairs by using the UTXO as an offset.
pair_pk the Schnorr sum of the multi-party public keys. The update an settlement keys will be derived from this origin.
seq_id the sequence ID to use for the settlement branch. For the update branch seq_id + 1 will be used.
num_peers the number of counter-parties in the channel. This number is used to be able to make multi-party channels where the number of peers is greater than two. It's used for peer nonce derivation.

Returns

a lock script which can be unlocked instantly with an update key-pair, or with a settlement key-pair if the age constraint of the input is satisfied.