KasarLabs / barknet

https://kasar.io
MIT License
13 stars 0 forks source link

Add Da client file #20

Closed 0xEniotna closed 1 year ago

0xEniotna commented 1 year ago

Should close issues #3 and #4

Implemented bitcoin/mod.rs. Added mode member to config struct

There are 3 functions:

publish_state_diff is the function where we call bitcoin-da crate and write on Bitcoin. It is also where we serialize the statediff.

last_published_state should return the last block height of the rollup

try_from_config instantiate a new Client (which includes a Relayer).

This PR is a work in progress. Some components still need to be understood. For isntance, I'm not sure if the state diff includes the rollup block height somewhere. It is needed in the ordinals inscription.

Needs issue DA # 45 to be merged.