gonative-cc / relayer

Relayer for Native <-> Pera <-> Bitcoin
Mozilla Public License 2.0
1 stars 0 forks source link

EPIC: Native->Bitcoin relayer #20

Open robert-zaremba opened 1 day ago

robert-zaremba commented 1 day ago

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:

The tx processing has 2 phases:

So the tx in the relayer will have the following statuses that we should remember in the relayer.

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

type BtcTxBatch struct {
   Block: int64
   Txs: [][]byte
}

Subtasks