Function UpdateSigner.collectSignatures
Start collecting signatures for a new seuqence ID and balance. The balance should have been agreed upon before calling this routine.
Result!(agora.flash.Types.UpdatePair) collectSignatures
(
FlashAPI peer,
uint seq_id,
Output[] outputs,
PrivateNonce priv_nonce,
PublicNonce peer_nonce,
geod24 .bitblob .BitBlob!(64L) prev_utxo_hash,
UTXO prev_utxo
);
Parameters
Name | Description |
---|---|
peer | the FlashAPI peer to communicate with |
seq_id | the new sequence ID. If zero, the signer will create the trigger transaction which spends from the funding transaction, and will also create the settlement spending from the trigger. If sequence is greater than zero it will create update & settlement transactions which both spend from the trigger transaction. |
balance | the balance to use in the settlement transaction. Note that the update transaction always spends the entire funding amount and does not split the balances itself. |
priv_nonce | the private nonce pair the node will use for its part of the settlement & update signing. The actual nonce used is derived from this value, making sure that update & settlement transactions have different nonces. |
peer_nonce | the public nonce pair the counter-party will use for its part of the settlement & update signing. |
prev_tx | when seq_id is zero, this should be the funding
transaction. If seq_id is greater than zero, it should be the
signed trigger transaction created in the first call to
collectSignatures where the seq_id was zero. |
Returns
a pair of signed settlement and update / trigger transactions, or an error if collaboration with the counter-party failed