- Struct
UTXONotExistsEvent
- Struct
RepeatCoinbaseTxEvent
- Resource
BitcoinBlockStore
- Constants
- Function
genesis_init
- Function
get_tx
- Function
get_tx_height
- Function
get_block
- Function
get_block_height
- Function
get_block_hash_by_height
- Function
get_block_by_height
- Function
get_genesis_block
- Function
get_latest_block
- Function
get_bitcoin_time
- Function
contains_header
use 0x1::option;
use 0x1::vector;
use 0x2::bcs;
use 0x2::event;
use 0x2::object;
use 0x2::signer;
use 0x2::simple_multimap;
use 0x2::table;
use 0x2::table_vec;
use 0x2::timestamp;
use 0x3::address_mapping;
use 0x3::bitcoin_address;
use 0x3::chain_id;
use 0x4::bbn;
use 0x4::inscription_updater;
use 0x4::network;
use 0x4::pending_block;
use 0x4::script_buf;
use 0x4::types;
use 0x4::utxo;
struct UTXONotExistsEvent has copy, drop
struct RepeatCoinbaseTxEvent has copy, drop
struct BitcoinBlockStore has key
const ErrorBlockAlreadyProcessed: u64 = 2;
const ORDINAL_GENESIS_HEIGHT: u64 = 767430;
https://github.com/bitcoin/bips/blob/master/bip-0034.mediawiki
const BIP_34_HEIGHT: u64 = 227835;
If the process block failed, we need to stop the system and fix the issue
const ErrorBlockProcessError: u64 = 1;
The reorg is too deep, we need to stop the system and fix the issue
const ErrorReorgTooDeep: u64 = 3;
const ErrorUTXONotExists: u64 = 4;
const ORDINALS_PAUSE_HEIGHT: u64 = 859001;
public(friend) fun genesis_init(_genesis_account: &signer, genesis_block_height: u64, genesis_block_hash: address)
public fun get_tx(txid: address): option::Option<types::Transaction>
public fun get_tx_height(txid: address): option::Option<u64>
Get block via block_hash
public fun get_block(block_hash: address): option::Option<types::Header>
public fun get_block_height(block_hash: address): option::Option<u64>
Get block hash via block_height
public fun get_block_hash_by_height(block_height: u64): option::Option<address>
Get block via block_height
public fun get_block_by_height(block_height: u64): option::Option<types::Header>
public fun get_genesis_block(): types::BlockHeightHash
Get latest block height
public fun get_latest_block(): option::Option<types::BlockHeightHash>
Get the bitcoin time in seconds
public fun get_bitcoin_time(): u32
public fun contains_header(block_header: &types::Header): bool