Crate subcoin_primitives

Source
Expand description

Primitives for the client.

Re-exports§

pub use subcoin_runtime_primitives as runtime;

Structs§

BlockLocator
Represents a Bitcoin block locator, used to sync blockchain data between nodes.
IndexedBlock
Represents an indexed Bitcoin block, identified by its block number and hash.
NoTransactionIndex
Dummy implementor of TransactionIndex.
TxPosition
Represents the index of a transaction.

Enums§

HeaderError
Error type of Subcoin header.

Constants§

CONFIRMATION_DEPTH
6 blocks is the standard confirmation period in the Bitcoin community.

Traits§

BackendExt
Trait for interfacing with the Bitcoin storage.
BitcoinTransactionAdapter
Trait for converting between Substrate extrinsics and Bitcoin transactions.
BlockLocatorProvider
A trait for retrieving block locators.
ClientExt
A trait to extend the Substrate Client.
CoinStorageKey
Deals with the storage key for UTXO in the state.
TransactionIndex
Interface for retriving the position of given transaction ID.

Functions§

bitcoin_genesis_tx
Returns the encoded Bitcoin genesis block.
convert_to_bitcoin_block
Converts a Substrate block to a Bitcoin block.
extract_bitcoin_block_hash
Extracts the Bitcoin block hash from the given Substrate header.
extract_bitcoin_block_header
Extracts the Bitcoin block header from the given Substrate header.
raw_genesis_tx
Returns the encoded Bitcoin genesis block.
substrate_header_digest
Constructs a Substrate header digest from a Bitcoin header.