Stages (and Status) endpoint support for Streaming swaps
The context is this Discord thread.
My main impressions at this time:
Remove the /alpha/ versions of the endpoints
(as the non-/alpha/ endpoints for the same result have been available for some time).
Include the Interval/Quantity/Count fields in the Stages output for Streaming swaps.
Since swaps can be queued from memos other than swap memos (also perhaps including streaming swaps in future), always check for a swap rather than referring to the memo.
Until deprecation of the field generated by referring to the memo, use ParseMemoWithTHORNames
rather than ParseMemo
for the memo parsing so that swap memos with THORNames aren't treated as not being swaps.
My specific code proposal at this time: !3062 (merged)
'Stages (and Status) endpoint support for Streaming swaps'.
(Feedback (/requests for changes) are welcome.)
Further thoughts:
Considering the merged !3033 (merged)
'streaming swap tracks which sub-swap fails and for what reason'
and the perhaps-coming #1634
'Streaming Swap - Cancel Swap & Update Limit',
I wonder whether there could be merit to including more information than Interval/Quantity/Count in the Status and/or Stages endpoints.
(I note that if using the StreamingSwap object (and OpenAPI schema) directly,
perhaps emptying the TxID field so that it's not repeated,
the Status/Stages endpoints would automatically (not requiring separate updating) reflect any future StreamingSwap additions.)