Function FlashControlAPI.openNewChannel

Schedule opening a new channel with another flash node. If this funding_utxo is already used, an error is returned. Otherwise, the Listener will receive a notification through the onChannelNotify() API at a later point whenever the channel is accepted / rejected by the counter-party.

abstract Result!(geod24.bitblob.BitBlob!(64L).BitBlob) openNewChannel (
  UTXO funding_utxo,
  geod24.bitblob.BitBlob!(64L) funding_utxo_hash,
  Amount capacity,
  uint settle_time,
  agora.crypto.ECC.Point peer_pk,
  bool is_private,
  Address peer_address
) @safe;

Parameters

NameDescription
funding_utxo the UTXO that will be used to fund the setup tx
funding_utxo_hash hash of funding_utxo
capacity the amount that will be used to fund the setup tx
settle_time closing settle time in number of blocks since last setup / update tx was published on the blockchain
peer_pk the public key of the counter-party flash node
peer_address network address of the peer to bootstrap the communication in case the peer is not registered in the name registry

Returns

The channel ID, or an error if this funding UTXO is already used for another pending / open channel.