Crate libbitcoinkernel_sys

Crate libbitcoinkernel_sys 

Source

Structs§

__fsid_t
btck_Block
btck_BlockHash
btck_BlockSpentOutputs
btck_BlockTreeEntry
btck_BlockValidationState
btck_Chain
btck_ChainParameters
btck_ChainstateManager
btck_ChainstateManagerOptions
btck_Coin
btck_Context
btck_ContextOptions
btck_LoggingConnection
btck_LoggingOptions
Options controlling the format of log messages.
btck_NotificationInterfaceCallbacks
A struct for holding the kernel notification callbacks. The user data pointer may be used to point to user-defined structures to make processing the notifications easier. Note that this makes it the user’s responsibility to ensure that the user_data outlives the kernel objects. Notifications can occur even as kernel objects are deleted, so care has to be taken to ensure safe unwinding.
btck_ScriptPubkey
btck_Transaction
btck_TransactionOutput
btck_TransactionSpentOutputs
btck_ValidationInterfaceCallbacks
Holds the validation interface callbacks. The user data pointer may be used to point to user-defined structures to make processing the validation callbacks easier. Note that these callbacks block any further validation execution when they are called.
max_align_t

Constants§

INT8_MAX
INT8_MIN
INT16_MAX
INT16_MIN
INT32_MAX
INT32_MIN
INTPTR_MAX
INTPTR_MIN
INT_FAST8_MAX
INT_FAST8_MIN
INT_FAST16_MAX
INT_FAST16_MIN
INT_FAST32_MAX
INT_FAST32_MIN
INT_LEAST8_MAX
INT_LEAST8_MIN
INT_LEAST16_MAX
INT_LEAST16_MIN
INT_LEAST32_MAX
INT_LEAST32_MIN
PTRDIFF_MAX
PTRDIFF_MIN
SIG_ATOMIC_MAX
SIG_ATOMIC_MIN
SIZE_MAX
UINT8_MAX
UINT16_MAX
UINT32_MAX
UINTPTR_MAX
UINT_FAST8_MAX
UINT_FAST16_MAX
UINT_FAST32_MAX
UINT_LEAST8_MAX
UINT_LEAST16_MAX
UINT_LEAST32_MAX
WINT_MAX
WINT_MIN
_ATFILE_SOURCE
_BITS_STDINT_INTN_H
_BITS_STDINT_LEAST_H
_BITS_STDINT_UINTN_H
_BITS_TIME64_H
_BITS_TYPESIZES_H
_BITS_TYPES_H
_BITS_WCHAR_H
_DEFAULT_SOURCE
_FEATURES_H
_POSIX_C_SOURCE
_POSIX_SOURCE
_STDC_PREDEF_H
_STDINT_H
_SYS_CDEFS_H
__FD_SETSIZE
__GLIBC_MINOR__
__GLIBC_USE_C2X_STRTOL
__GLIBC_USE_DEPRECATED_GETS
__GLIBC_USE_DEPRECATED_SCANF
__GLIBC_USE_IEC_60559_BFP_EXT
__GLIBC_USE_IEC_60559_BFP_EXT_C2X
__GLIBC_USE_IEC_60559_EXT
__GLIBC_USE_IEC_60559_FUNCS_EXT
__GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
__GLIBC_USE_IEC_60559_TYPES_EXT
__GLIBC_USE_ISOC2X
__GLIBC_USE_LIB_EXT2
__GLIBC__
__GNU_LIBRARY__
__HAVE_GENERIC_SELECTION
__KERNEL_OLD_TIMEVAL_MATCHES_TIMEVAL64
__LDOUBLE_REDIRECTS_TO_FLOAT128_ABI
__RLIM_T_MATCHES_RLIM64_T
__STATFS_MATCHES_STATFS64
__STDC_IEC_559_COMPLEX__
__STDC_IEC_559__
__STDC_IEC_60559_BFP__
__STDC_IEC_60559_COMPLEX__
__STDC_ISO_10646__
__TIMESIZE
__USE_ATFILE
__USE_FORTIFY_LEVEL
__USE_ISOC11
__USE_ISOC95
__USE_ISOC99
__USE_MISC
__USE_POSIX
__USE_POSIX2
__USE_POSIX199309
__USE_POSIX199506
__USE_POSIX_IMPLICITLY
__USE_XOPEN2K
__USE_XOPEN2K8
__WORDSIZE
__WORDSIZE32_PTRDIFF_LONG
__WORDSIZE32_SIZE_ULONG
__WORDSIZE_TIME64_COMPAT32
__glibc_c99_flexarr_available

Functions§

btck_block_copy
@brief Copy a block. Blocks are reference counted, so this just increments the reference count.
btck_block_count_transactions
@brief Count the number of transactions contained in a block.
btck_block_create
@brief Parse a serialized raw block into a new block object.
btck_block_destroy
Destroy the block.
btck_block_get_hash
btck_block_get_transaction_at
@brief Get the transaction at the provided index. The returned transaction is not owned and depends on the lifetime of the block.
btck_block_hash_copy
@brief Copy a block hash.
btck_block_hash_create
@brief Create a block hash from its raw data.
btck_block_hash_destroy
Destroy the block hash.
btck_block_hash_to_bytes
@brief Serializes the block hash to bytes.
btck_block_read
@brief Reads the block the passed in block index points to from disk and returns it.
btck_block_spent_outputs_copy
@brief Copy a block’s spent outputs.
btck_block_spent_outputs_count
@brief Returns the number of transaction spent outputs whose data is contained in block spent outputs.
btck_block_spent_outputs_destroy
Destroy the block spent outputs.
btck_block_spent_outputs_get_transaction_spent_outputs_at
@brief Returns a transaction spent outputs contained in the block spent outputs at a certain index. The returned pointer is unowned and only valid for the lifetime of block_spent_outputs.
btck_block_spent_outputs_read
@brief Reads the block spent coins data the passed in block tree entry points to from disk and returns it.
btck_block_to_bytes
btck_block_tree_entry_get_block_hash
@brief Return the block hash associated with a block tree entry.
btck_block_tree_entry_get_height
@brief Return the height of a certain block tree entry.
btck_block_tree_entry_get_previous
@brief Returns the previous block tree entry in the chain, or null if the current block tree entry is the genesis block.
btck_block_validation_state_get_block_validation_result
Returns the validation result from an opaque block validation state pointer.
btck_block_validation_state_get_validation_mode
Returns the validation mode from an opaque block validation state pointer.
btck_chain_contains
@brief Return true if the passed in chain contains the block tree entry.
btck_chain_get_by_height
@brief Retrieve a block tree entry by its height in the currently active chain. Once retrieved there is no guarantee that it remains in the active chain.
btck_chain_get_genesis
btck_chain_get_height
@brief Return the height of the tip of the chain.
btck_chain_get_tip
@brief Get the block tree entry of the current chain tip. Once returned, there is no guarantee that it remains in the active chain.
btck_chain_parameters_copy
Copy the chain parameters.
btck_chain_parameters_create
@brief Creates a chain parameters struct with default parameters based on the passed in chain type.
btck_chain_parameters_destroy
Destroy the chain parameters.
btck_chainstate_manager_create
@brief Create a chainstate manager. This is the main object for many validation tasks as well as for retrieving data from the chain and interacting with its chainstate and indexes.
btck_chainstate_manager_destroy
Destroy the chainstate manager.
btck_chainstate_manager_get_active_chain
@brief Returns the best known currently active chain. Its lifetime is dependent on the chainstate manager and state transitions within the chainstate manager, e.g. when processing blocks, will also change the chain. Data retrieved from this chain is only consistent up to the point when new data is processed in the chainstate manager. It is the user’s responsibility to guard against these inconsistencies.
btck_chainstate_manager_get_block_tree_entry_by_hash
@brief Retrieve a block tree entry by its block hash.
btck_chainstate_manager_import_blocks
@brief 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.
btck_chainstate_manager_options_create
@brief Create options for the chainstate manager.
btck_chainstate_manager_options_destroy
Destroy the chainstate manager options.
btck_chainstate_manager_options_set_block_tree_db_in_memory
@brief Sets block tree db in memory in the options.
btck_chainstate_manager_options_set_chainstate_db_in_memory
@brief Sets chainstate db in memory in the options.
btck_chainstate_manager_options_set_wipe_dbs
@brief Sets wipe db in the options. In combination with calling @ref btck_chainstate_manager_import_blocks this triggers either a full reindex, or a reindex of just the chainstate database.
btck_chainstate_manager_options_set_worker_threads_num
@brief Set the number of available worker threads used during validation.
btck_chainstate_manager_process_block
@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.
btck_coin_confirmation_height
@brief Returns the height of the block that contains the coin’s prevout.
btck_coin_copy
@brief Copy a coin.
btck_coin_destroy
Destroy the coin.
btck_coin_get_output
@brief Return the transaction output of a coin. The returned pointer is unowned and only valid for the lifetime of the coin.
btck_coin_is_coinbase
@brief Returns whether the containing transaction was a coinbase.
btck_context_copy
Copy the context.
btck_context_create
@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.
btck_context_destroy
Destroy the context.
btck_context_interrupt
@brief Interrupt can be used to halt long-running validation functions like when reindexing, importing or processing blocks.
btck_context_options_create
Creates an empty context options.
btck_context_options_destroy
Destroy the context options.
btck_context_options_set_chainparams
@brief Sets the chain params for the context options. The context created with the options will be configured for these chain parameters.
btck_context_options_set_notifications
@brief Set the kernel notifications for the context options. The context created with the options will be configured with these notifications.
btck_context_options_set_validation_interface
@brief Set the validation interface callbacks for the context options. The context created with the options will be configured for these validation interface callbacks. The callbacks will then be triggered from validation events issued by the chainstate manager created from the same context.
btck_logging_connection_create
@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.
btck_logging_connection_destroy
Stop logging and destroy the logging connection.
btck_logging_disable
@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 and is not thread or re-entry safe. Log messages will be buffered until this function is called, or a logging connection is created.
btck_logging_disable_category
@brief Disable a specific log category for the global internal logger. This changes a global setting and will override settings for all existing @ref btck_LoggingConnection instances.
btck_logging_enable_category
@brief Enable a specific log category for the global internal logger. This changes a global setting and will override settings for all existing @ref btck_LoggingConnection instances.
btck_logging_set_level_category
@brief Set the log level of the global internal logger. This does not enable the selected categories. Use @ref btck_logging_enable_category to start logging from a specific, or all categories. This changes a global setting and will override settings for all existing @ref btck_LoggingConnection instances.
btck_script_pubkey_copy
@brief Copy a script pubkey.
btck_script_pubkey_create
@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.
btck_script_pubkey_destroy
Destroy the script pubkey.
btck_script_pubkey_to_bytes
btck_script_pubkey_verify
@brief Verify if the input at input_index of tx_to spends the script pubkey under the constraints specified by flags. If the btck_SCRIPT_FLAGS_VERIFY_WITNESS flag is set in the flags bitfield, the amount parameter is used. If the taproot flag is set, the spent outputs parameter is used to validate taproot transactions.
btck_transaction_copy
@brief Copy a transaction. Transactions are reference counted, so this just increments the reference count.
btck_transaction_count_inputs
@brief Get the number of inputs of a transaction.
btck_transaction_count_outputs
@brief Get the number of outputs of a transaction.
btck_transaction_create
@brief Create a new transaction from the serialized data.
btck_transaction_destroy
Destroy the transaction.
btck_transaction_get_output_at
@brief Get the transaction outputs at the provided index. The returned transaction output is not owned and depends on the lifetime of the transaction.
btck_transaction_output_copy
@brief Copy a transaction output.
btck_transaction_output_create
@brief Create a transaction output from a script pubkey and an amount.
btck_transaction_output_destroy
Destroy the transaction output.
btck_transaction_output_get_amount
@brief Get the amount in the output.
btck_transaction_output_get_script_pubkey
@brief Get the script pubkey of the output. The returned script pubkey is not owned and depends on the lifetime of the transaction output.
btck_transaction_spent_outputs_copy
@brief Copy a transaction’s spent outputs.
btck_transaction_spent_outputs_count
@brief Returns the number of previous transaction outputs contained in the transaction spent outputs data.
btck_transaction_spent_outputs_destroy
Destroy the transaction spent outputs.
btck_transaction_spent_outputs_get_coin_at
@brief Returns a coin contained in the transaction spent outputs at a certain index. The returned pointer is unowned and only valid for the lifetime of transaction_spent_outputs.
btck_transaction_to_bytes

Type Aliases§

__blkcnt64_t
__blkcnt_t
__blksize_t
__caddr_t
__clock_t
__clockid_t
__daddr_t
__dev_t
__fsblkcnt64_t
__fsblkcnt_t
__fsfilcnt64_t
__fsfilcnt_t
__fsword_t
__gid_t
__id_t
__ino64_t
__ino_t
__int8_t
__int16_t
__int32_t
__int64_t
__int_least8_t
__int_least16_t
__int_least32_t
__int_least64_t
__intmax_t
__intptr_t
__key_t
__loff_t
__mode_t
__nlink_t
__off64_t
__off_t
__pid_t
__quad_t
__rlim64_t
__rlim_t
__sig_atomic_t
__socklen_t
__ssize_t
__suseconds64_t
__suseconds_t
__syscall_slong_t
__syscall_ulong_t
__time64_t
__time_t
__timer_t
__u_char
__u_int
__u_long
__u_quad_t
__u_short
__uid_t
__uint8_t
__uint16_t
__uint32_t
__uint64_t
__uint_least8_t
__uint_least16_t
__uint_least32_t
__uint_least64_t
__uintmax_t
__useconds_t
btck_BlockValidationResult
A granular “reason” why a block was invalid.
btck_ChainType
btck_DestroyCallback
Function signature for freeing user data.
btck_LogCallback
Function signature for the global logging callback. All bitcoin kernel internal logs will pass through this callback.
btck_LogCategory
A collection of logging categories that may be encountered by kernel code.
btck_LogLevel
The level at which logs should be produced.
btck_NotifyBlockTip
Function signatures for the kernel notifications.
btck_NotifyFatalError
btck_NotifyFlushError
btck_NotifyHeaderTip
btck_NotifyProgress
btck_NotifyWarningSet
btck_NotifyWarningUnset
btck_ScriptVerificationFlags
Script verification flags that may be composed with each other.
btck_ScriptVerifyStatus
A collection of status codes that may be issued by the script verify function.
btck_SynchronizationState
Current sync state passed to tip changed callbacks.
btck_ValidationInterfaceBlockChecked
Function signatures for the validation interface.
btck_ValidationMode
Whether a validated data structure is valid, invalid, or an error was encountered during processing.
btck_Warning
Possible warning types issued by validation.
btck_WriteBytes
Function signature for serializing data.
int_fast8_t
int_fast16_t
int_fast32_t
int_fast64_t
int_least8_t
int_least16_t
int_least32_t
int_least64_t
intmax_t
uint_fast8_t
uint_fast16_t
uint_fast32_t
uint_fast64_t
uint_least8_t
uint_least16_t
uint_least32_t
uint_least64_t
uintmax_t
wchar_t