Function Channel.requestCloseChannel

Attempt to collaboratively close the channel.

Result!(agora.crypto.ECC.Point) requestCloseChannel (
  in const(uint) seq_id,
  agora.crypto.ECC.Point peer_nonce,
  in const(Amount) fee
);

The channel will attempt to co-operatively close by offering the counter-party to sign a closing transaction which spends directly from the funding transaction where the closing transaction is not encumbered by any sequence locks.

This closing transaction will need to be externalized before the channel may be considered closed.

If the counter-party is not collaborative or is non-responsive, the node will wait until cooperative_close_timeout time has passed since the last failed co-operative close request. If this timeout is reached the node will forcefully publish the trigger transaction.

Once the trigger transaction is externalized the node will publish the latest update transaction if any, and subsequently will publish the settlement transaction. The settlement transaction may only be published after settle_time blocks were externalized after the trigger/update transaction's UTXO was included in the blockchain - this leaves enough time for the counter-party to react and publish a newer update & settlement transactions in case the closing party tries to cheat by publishing a stale update & settlement pair of transactions.

Parameters

NameDescription
seq_id the sequence ID.

Returns

the update signature, or an error code with an optional error message.