From Open Transactions
Revision as of 14:26, 22 October 2014 by Justusranvier (talk | contribs) (Created page with "<div style="float: right"><include iframe src="" width="150" height="502" frameborder="0...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.


  1. 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 the nextchangestart value in the withdrawal status list.
  2. Prepare an empty list for holding transactions as they are constructed and before they are signed.
  3. Prepare an empty array to hold the transaction signatures which will be returned to the caller as the signatures value.
  4. Prepare an withdrawal status object.
    1. roundID: copied from roundID argument
    2. nextinputstart: nil
    3. nextchangestart: nil
    4. fees: 0
    5. outputs: should contain an entry for every output passed:
      1. outBailmentID: copied from outBailmentID entry in outputs argument
      2. status: empty string
      3. transactions: nil