pub(crate) async fn assemble<N: Network>(
sequence: &mut ScriptSequenceKind<N>,
signatures: &[String],
config: &Config,
) -> Result<()>where
N::TxEnvelope: for<'de> Deserialize<'de> + Serialize,Expand description
Adds the owner approvals in signatures to the transactions awaiting their owners, and checks
that every one of them that was not sent yet reaches its threshold and can still be sent. The
broadcast then sends them in order, signed with the approvals, recording each as a submission
attempt only then.
The valid approvals are saved first, so that they can be collected over several runs, and the same signatures can be given again. Fails before anything is sent when a signature approves none of the transactions, when one of them lacks approvals, or when the account spent a planned nonce. When the account’s configuration changed, a deadline passed, or the base fee rose above the fee the owners approved, the unsent transactions of that sequence are dropped, so that the broadcast saves them again for the owners to approve with new digests.