processUpdate

Process transaction update from subscription.

Handles both transaction updates (with UTXO changes) and progress updates.

For transaction updates (based on status):

  • SUCCESS/PARTIAL_SUCCESS:

  1. Insert created UTXOs (state = AVAILABLE)

  2. Mark spent UTXOs as SPENT (permanent)

  • FAILURE:

  1. Don't insert created UTXOs (never created on-chain)

  2. Unlock spent UTXOs (PENDING → AVAILABLE) so they can be reused

For progress updates:

  • Just return (nothing to do with UTXOs)

Return

ProcessingResult indicating what was done

Parameters

update

Update from subscription