Native will record Bitcoin transactions that has to be signed by Ika and user. Once the signature is made we need to relay those transactions to Bitcoin.
In Native, each transaction will have it's own ID - a sequence number (1, 2 ...) - we will call it btctx.nid
Relayer has to tract the following:
What's the latest btctx.id that was processed by the relayer
What's the latest Native block processed by the relayer
for each new block - see if there are new txs (for the moment you can mock it - we don't have that yet) and start processing the tx.
In Native we need to remember the user signature.
The tx processing has 2 phases:
sent to Ika for signing - in order to send to Ika , user has to sign it as well.
get signature
broadcast to Bitcoin
So the tx in the relayer will have the following statuses that we should remember in the relayer.
Native will record Bitcoin transactions that has to be signed by Ika and user. Once the signature is made we need to relay those transactions to Bitcoin.
In Native, each transaction will have it's own ID - a sequence number (1, 2 ...) - we will call it
btctx.nid
Relayer has to tract the following:
btctx.id
that was processed by the relayerThe tx processing has 2 phases:
So the tx in the relayer will have the following statuses that we should remember in the relayer.
ika_sign: {pending_dwallet, dwallet_signed, broadcasted}
user_signed: boolean
Create subtasks to cover:
Each task must come with unit tests (so no need for an additional task for unit tests).
For PoC start with a simple Native mock service: a hardcoded variable with list of blocks and transactions
Subtasks