Preparation
Jump to navigation
Jump to search
Initial Conditions
The startwithdrawal API call has been received by the wallet, and all the arguments have been checked for errors.
Sequence
- The algorithm must keep track of the next change address to be used. The initial value is supplied as the
changestart
argument. Any time a change output is allocated, the index value of the address identifier is incremented, and if a change output is remove from a transaction the index value is decremented. The final value will be returned to the caller as thenextchangestart
value in the withdrawal status list. - Prepare an empty list for holding transactions as they are constructed and before they are signed.
- Prepare an empty array to hold the transaction signatures which will be returned to the caller as the
signatures
value. - Prepare an
withdrawal status
object.roundID
: copied fromroundID
argumentnextinputstart
: nilnextchangestart
: nilfees
: 0outputs
: should contain an entry for every output passed:outBailmentID
: copied fromoutBailmentID
entry inoutputs
argumentstatus
: empty stringtransactions
: nil