rooch-network / rooch

Fully on-chain Application Container with Move Language
https://rooch.network
Apache License 2.0
126 stars 53 forks source link

[bitseed] Implements Bitseed Asset Index #1595

Open yubing744 opened 2 weeks ago

yubing744 commented 2 weeks ago

Protocol Document

Implementation points:

Task:

yubing744 commented 2 weeks ago

Bitseed protocol index data flow diagram:

image Source

bitcoin-relayer synchronizes BTC blocks to MoveVM. The bitcoin-move contract loaded by MoveVM is responsible for parsing and indexing UTXO, ORD and ORD-based derivative protocols, such as bitseed.

yubing744 commented 1 week ago

Entity relationship diagram:

image Source

Domain objects related to bitseed protocol include: Operation, Tick, SFT and Account. Account and SFT's associated object SFTBalance.

Operation: Include DeployOP, MintOP, TransferOP, SplitOP and MergeOP. Tick: SFT container SFT: semi-fungible token. SFTBalance: The user's SFT balance.

In order to use UTXO to implement SFT balances and transfers, Rooch Bitseed Index is only responsible for the validity verification of Operation and Tick.

yubing744 commented 1 week ago

Valid record for additional protocols:

    struct InscriptionMetaprotocolValidityRecord has store, copy, drop {
         protocol_type: String,
         is_valid: bool,
         invalid_reason: Option<String>,
    }
yubing744 commented 1 week ago

bitseed.move interface design: // TODO