githubEdit

hBK Smart Contract

🌐 Overview


🚧 Phase 0 - Essentials

This initial phase is focused on core Bitcoin protocol data:

  • Script/Address Balances

  • UTXO Set

  • Full Transactions w/ Output Availability

  • Transaction Confirmations

  • BTC Headers (Last and N)


πŸ—οΈ Struct Definitions

UTXO

Represents an unspent transaction output (UTXO).


Transaction

Represents a Bitcoin transaction.


Input

Represents a Bitcoin transaction input.


Output

Represents a Bitcoin transaction output.


SpentDetail

Represents details of a spent output.


BitcoinHeader

Represents a Bitcoin block header.


πŸ§‘β€πŸ’» IBitcoinKit Interface

The IBitcoinKit interface defines the methods available for interacting with the BitcoinKit contract.


getBitcoinAddressBalance

Retrieves the balance of a given Bitcoin address.

Precompile Address: 0x40


getUTXOsForBitcoinAddress

Precompile Address: 0x41

Retrieves UTXOs for a given Bitcoin address, page number, and page size.


getTransactionByTxId

Retrieves UTXOs for a given Bitcoin address, page number, and page size.

Precompile Address: 0x42


getTxConfirmations

Retrieves the number of confirmations for a given transaction ID.

Precompile Address: 0x43


getLastHeader

Retrieves the latest Bitcoin block header.

Precompile Address: 0x44


getHeaderN

Precompile Address: 0x45

Retrieves the Bitcoin block header at a specific height.


Last updated

Was this helpful?