@brief Set the log level of the global internal logger. This does not enable
the selected categories. Use kernel_enable_log_category to start logging
from a specific, or all categories.
@brief Parse a serialized raw block into a new block object.
Destroy the block.
@brief Calculate and return the hash of a block.
Destroy the block hash.
@brief Destroy the block index.
@brief Return the block hash associated with a block index.
@brief Return the height of a certain block index.
@brief Create options for the block manager. The block manager is used
internally by the chainstate manager for block storage and indexing.
Destroy the block manager options.
@brief Calculate and return the hash of a block.
Destroy the block undo data.
@brief Returns the number of transactions whose undo data is contained in
block undo.
A helper function for destroying an existing byte array.
@brief Creates a chain parameters struct with default parameters based on the
passed in chain type.
Destroy the chain parameters.
Create options for loading the chainstate.
Destroy the chainstate load options
@brief Sets block tree db in memory in the chainstate load options.
@brief Sets chainstate db in memory in the chainstate load options.
@brief Sets wipe block tree db in the chainstate load options.
@brief Sets wipe chainstate db in the chainstate load options.
@brief Create a chainstate manager. This is the main object for many
validation tasks as well as for retrieving data from the chain. It is only
valid for as long as the passed in context also remains in memory.
Destroy the chainstate manager.
@brief This function must be called to initialize the chainstate manager
before doing validation tasks or interacting with its indexes.
@brief Create options for the chainstate manager.
Destroy the chainstate manager options.
@brief Process and validate the passed in block with the chainstate
manager. More detailed validation information in case of a failure can also
be retrieved through a registered validation interface. If the block fails
to validate the block_checked callback’s ‘BlockValidationState’ will
contain details.
@brief Create a new kernel context. If the options have not been previously
set, their corresponding fields will be initialized to default values; the
context will assume mainnet chain parameters and won’t attempt to call the
kernel notification callbacks.
Destroy the context.
@brief Interrupt can be used to halt long-running validation functions like
when reindexing, importing or processing blocks.
Creates an empty context options.
Destroy the context options.
@brief Sets the chain params for the context options. The context created
with the options will be configured for these chain parameters.
@brief Set the kernel notifications for the context options. The context
created with the options will be configured with these notifications.
@brief Copies block data into the returned byte array.
@brief Copies block data into the returned byte array.
@brief Copies the script pubkey data into the returned byte array.
@param[in] script_pubkey Non-null.
@return The serialized script pubkey data.
@brief Copies the script pubkey of an output in the returned script pubkey
opaque object.
Disable a specific log category for the global internal logger.
@brief This disables the global internal logger. No log messages will be
buffered internally anymore once this is called and the buffer is cleared.
This function should only be called once. Log messages will be buffered until
this function is called, or a logging connection is created.
@brief Enable a specific log category for the global internal logger.
@brief Retrieve a block index by its block hash.
@brief Retrieve a block index by its height in the currently active chain.
Once retrieved there is no guarantee that it remains in the active chain.
@brief Get the block index entry of the genesis block.
@brief Get the block index entry of the current chain tip. Once returned,
there is no guarantee that it remains in the active chain.
Returns the validation result from an opaque block validation state pointer.
@brief Return the next block index in the currently active chain, or null if
the current block index is the tip, or is not in the currently active
chain.
@brief Returns the previous block index in the chain, or null if the current
block index entry is the genesis block.
@brief Gets the amount associated with this transaction output
@brief Returns the number of previous transaction outputs contained in the
transaction undo data.
@brief Return a transaction output contained in the transaction undo data of
a block undo data at a certain index.
Returns the validation mode from an opaque block validation state pointer.
@brief May be called after kernel_chainstate_manager_load_chainstate to
initialize the chainstate manager. Triggers the start of a reindex if the
option was previously set for the chainstate and block manager. Can also
import an array of existing block files selected by the user.
@brief Start logging messages through the provided callback. Log messages
produced before this function is first called are buffered and on calling this
function are logged immediately.
Stop logging and destroy the logging connection.
@brief Creates an object for holding the kernel notification callbacks.
Destroy the kernel notifications.
@brief Reads the block the passed in block index points to from disk and
returns it.
@brief Reads the block undo data the passed in block index points to from
disk and returns it.
@brief Create a script pubkey from serialized data.
@param[in] script_pubkey Non-null.
@param[in] script_pubkey_len Length of the script pubkey data.
@return The script pubkey, or null on error.
Destroy the script pubkey.
@brief Create a new transaction from the serialized data.
Destroy the transaction.
@brief Create a transaction output from a script pubkey and an amount.
@param[in] script_pubkey Non-null.
@param[in] amount The amount associated with the script pubkey for this output.
@return The transaction output.
Destroy the transaction output.
@brief Creates a new validation interface for consuming events issued by the
chainstate manager. The interface should be created and registered before the
chainstate manager is created to avoid missing validation events.
Destroy the validation interface. This should be done after unregistering it
if the validation interface was previously registered with a chainstate
manager.
@brief Register a validation interface with the internal task runner
associated with this context. This also registers it with the chainstate
manager if the chainstate manager is subsequently created with this context.
@brief Unregister a validation interface from the internal task runner
associated with this context. This should be done before destroying the
kernel context it was previously registered with.
@brief Verify if the input at input_index of tx_to spends the script pubkey
under the constraints specified by flags. If the witness flag is set the
amount parameter is used. If the taproot flag is set, the spent outputs
parameter is used to validate taproot transactions.