Crate subcoin_primitives

Source
Expand description

Primitives for the client.

Re-exports§

pub use subcoin_runtime_primitives as runtime;

Modules§

consensus
tx_pool
Bitcoin transaction pool abstraction for network integration.

Structs§

BlockLocator
Represents a Bitcoin block locator, used to sync blockchain data between nodes.
BlockMetadata
Block metadata for BIP68 validation.
IndexedBlock
Represents an indexed Bitcoin block, identified by its block number and hash.
NoTransactionIndex
Dummy implementor of TransactionIndex.
PoolCoin
UTXO coin with metadata for mempool validation.
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.
MAX_BLOCK_WEIGHT
The maximum allowed weight for a block, see BIP 141 (network rule).
MEDIAN_TIME_SPAN
Number of blocks for median time calculation (BIP113).
MEMPOOL_HEIGHT
Marker height for coins that exist only in the mempool.

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.