Namespaces

Name

Description

BCLog

Bitcoin Core logging facilities: log categories and their bit flags.

Consensus

Transaction validation functions

CuckooCache

High‐performance cache primitives.

NetMsg

Helpers for constructing serialized network messages.

NetMsgFeature

Identifiers for individual peer‐negotiated features (BIP 434).

NetMsgType

Bitcoin protocol message types. When adding new message types, don't forget to update ALL_NET_MESSAGE_TYPES below.

bech32

Bech32 and Bech32m string encoding used by newer Bitcoin address types.

bitcoin_http

Constants and error types for the built‐in HTTP server's request parsing.

bitset_detail

Implementation details backing the BitSet alias.

btck

Type‐safe C++ RAII wrapper over the libbitcoinkernel C API.

btcsignals

btcsignals is a simple mechanism for signaling events to multiple subscribers. It is api‐compatible with a minimal subset of boost::signals2.

cluster_linearize

Algorithms and data structures for ordering (linearizing) clusters of dependent transactions.

common

Shared types used across the node, wallet, and GUI code.

dbwrapper_private

These should be considered an implementation detail of the specific database.

detail

Internal helpers for parsing blobs from hex strings.

fs

Filesystem operations and types

fsbridge

Bridge operations to C stdio

i2p

Support for connecting to and accepting connections over the I2P network.

index_util

Shared database key types for blockfilterindex and coinstatsindex.

init

Initialization helpers shared by the node, wallet, and other executables.

interfaces

Interfaces between the node and the rest of the application.

kernel

Kernel library components for validating blocks and maintaining chain state.

leveldb

The LevelDB library namespace, forward‐declared to avoid a public dependency.

memusage

Helpers for estimating the dynamic memory usage of common data structures.

miniscript

Miniscript: a structured representation of Bitcoin Scripts.

node

Full‐node components that run the block, chainstate, and mempool machinery.

poly1305_donna

Low‐level Poly1305 routines based on the public domain poly1305‐donna implementation by Andrew Moon (poly1305‐donna‐32.h).

script

Helpers for parsing output descriptor strings.

sha256_implementation

Runtime selection of the SHA‐256 implementation.

std

Standard library namespace, extended here with a deleted hash specialization.

subprocess

Getting started with reading this source code. The source is mainly divided into four parts: 1. Exception Classes: These are very basic exception classes derived from runtime_error exception. There are two types of exception thrown from subprocess library: OSError and CalledProcessError

tinyformat

Tiny type‐safe printf‐style string formatting library.

txindex

Database key types and constants for the transaction index.

txindex_tests

Unit‐test helpers that reach into TxIndex internals.

util

Application‐agnostic logging interface shared across Bitcoin Core.

wallet

Wallet subsystem.

Namespace Aliases

Name

Description

tfm

Short namespace alias for tinyformat.

Types

Name

Description

AEADChaCha20Poly1305

The AEAD_CHACHA20_POLY1305 authenticated encryption algorithm from RFC8439 section 2.8.

AES256CBCDecrypt

A decryption class for AES‐256 in CBC mode with optional PKCS#7 padding.

AES256CBCEncrypt

An encryption class for AES‐256 in CBC mode with optional PKCS#7 padding.

AES256Decrypt

A decryption class for AES‐256.

AES256Encrypt

An encryption class for AES‐256.

AbstractThresholdConditionChecker

Abstract class that implements BIP9‐style threshold logic, and caches results.

ActionSerialize

Support for all macros providing or using the ser_action parameter of the SerializationOps method.

ActionUnserialize

Action that drives the SerializationOps method to unserialize (read) objects.

AddedNodeInfo

Connection status of a manually added node.

AddedNodeParams

Parameters describing a manually added node (‐addnode / ‐connect).

AddrInfo

Internal per‐address record stored in the address manager tables.

AddrMan

Stochastic address manager

AddrManImpl

Private implementation of the address manager (pimpl).

AddressPosition

Location information for an address in AddrMan

AmountCompression

Serialization wrapper that stores amounts using the compact amount encoding.

AnnotatedMixin

Template mixin that adds ‐Wthread‐safety locking annotations and lock order checking to a subset of the mutex API.

Arena

An arena manages a contiguous region of memory by dividing it into chunks.

ArgsManager

Parses and stores command‐line and configuration file arguments.

AssumeutxoData

Holds configuration for use during UTXO snapshot load and validation. The contents here are security critical, since they dictate which UTXO snapshots are recognized as valid.

AssumeutxoHash

Strongly typed hash of a serialized UTXO snapshot.

AutoFile

Non‐refcounted RAII wrapper for FILE*

BIP324Cipher

The BIP324 packet cipher, encapsulating its key derivation, stream cipher, and AEAD.

BIP9GBTStatus

getblocktemplate status for the BIP9 deployments grouped by signalling state.

BIP9Info

Detailed status of an enabled BIP9 deployment

BIP9Stats

Display status of an in‐progress BIP9 softfork

BanMan

Tracks banned and discouraged peers.

BaseHash

Wraps a fixed‐size hash value and exposes byte‐range access to it.

BaseIndex

Base class for the node's optional block‐chain indexes.

BaseSignatureChecker

Interface for verifying signatures and time locks encountered during script evaluation.

BaseSignatureCreator

Interface for signature creators.

BitStreamReader

Reads individual bits, most significant first, from an underlying byte stream.

BitStreamWriter

Writes individual bits, most significant first, into an underlying byte stream.

BlockFilter

Complete block filter struct as defined in BIP 157. Serialization matches payload of "cfilter" messages.

BlockFilterIndex

BlockFilterIndex is used to store and retrieve block filters, hashes, and headers for a range of blocks by height. An index is constructed for each supported filter type with its own database (ie. filter data for different types are stored in separate databases).

BlockHasher

Hashes a block hash by reading its low 64 bits directly, with no salt.

BlockTransactions

A blocktxn message carrying the transactions requested for a block.

BlockTransactionsRequest

A getblocktxn message requesting specific transactions of a block by index.

BlockValidationState

Validation state specialized for block‐level results.

BufferedFile

Wrapper around an AutoFile& that implements a ring buffer to deserialize from. It guarantees the ability to rewind a given number of bytes.

BufferedReader

Wrapper that buffers reads from an underlying stream. Requires underlying stream to support read() and detail_fread() calls to support fixed‐size and variable‐sized reads, respectively.

BufferedWriter

Wrapper that buffers writes to an underlying stream. Requires underlying stream to support write_buffer() method for efficient buffer flushing and obfuscation.

ByRatio

Wrapper around FeeFrac & derived types, which adds a feerate‐based ordering which treats equal‐feerate but distinct‐size FeeFracs as equals.

ByRatioNegSize

Wrapper around FeeFrac & derived types, which adds a total ordering which first sorts by feerate and then by reversed size (i.e., larger sizes come first).

ByteVectorHash

Implementation of Hash named requirement for types that internally store a byte array. This may be used as the hash function in std::unordered_set or std::unordered_map over such types. Internally, this uses a random instance of SipHash‐2‐4.

CAddress

A CService with information about it as peer

CBanDB

Access to the banlist database (banlist.json)

CBanEntry

Record of a single ban, storing when it was created and when it expires.

CBaseChainParams

CBaseChainParams defines the base parameters (shared between bitcoin‐cli and bitcoind) of a given instance of the Bitcoin system.

CBlock

A full block, extending the header with its transactions and cached check flags.

CBlockHeader

Nodes collect new transactions into a block, hash them into a hash tree, and scan through nonce values to make the block's hash satisfy proof‐of‐work requirements. When they solve the proof‐of‐work, they broadcast the block to everyone and the block is added to the block chain. The first transaction in the block is a special one that creates a new coin owned by the creator of the block.

CBlockHeaderAndShortTxIDs

A cmpctblock message: a block header with short transaction IDs for compact relay.

CBlockIndex

The block chain is a tree shaped structure starting with the genesis block at the root, with each block potentially having multiple candidates to be the next block. A blockindex may have multiple pprev pointing to it, but at most one of them can be part of the currently active branch.

CBlockLocator

Describes a place in the block chain to another node such that if the other node doesn't have the same branch, it can find a recent common trunk. The further back it is, the further before the fork it may be.

CBlockPolicyEstimator

The BlockPolicyEstimator is used for estimating the feerate needed for a transaction to be included in a block within a certain number of blocks.

CBlockUndo

Undo information for a CBlock

CBloomFilter

BloomFilter is a probabilistic filter which SPV clients provide so that we can filter the transactions we send them.

CChain

An in‐memory indexed chain of blocks.

CChainParams

Chain parameters describing a particular Bitcoin network.

CCheckQueue

Queue for verifications that have to be performed. The verifications are represented by a type T, which must provide an operator(), returning an std::optional<R>.

CCheckQueueControl

RAII‐style controller object for a CCheckQueue that guarantees the passed queue is finished before continuing.

CClientUIInterface

Interface used to notify the UI about node events.

CCoinsCacheEntry

A Coin in one level of the coins database caching hierarchy.

CCoinsView

Pure abstract view on the open txout dataset.

CCoinsViewBacked

CCoinsView backed by another CCoinsView

CCoinsViewCache

CCoinsView that adds a memory cache for transactions to another CCoinsView

CCoinsViewCursor

Cursor for iterating over CoinsView state

CCoinsViewDB

CCoinsView backed by the coin database (chainstate/)

CCoinsViewErrorCatcher

This is a minimally invasive approach to shutdown on LevelDB read errors from the chainstate, while keeping user interface out of the common library, which is shared between bitcoind, and bitcoin‐qt and non‐server tools.

CCoinsViewMemPool

CCoinsView that brings transactions from a mempool into view. It does not check for spendings by memory pool transactions. Instead, it provides access to all Coins which are either unspent in the base CCoinsView, are outputs from any mempool transaction, or are tracked temporarily to allow transaction dependencies in package validation. This allows transaction replacement to work as expected, as you want to have all inputs "available" to check signatures, and any cycles in the dependency graph are checked directly in AcceptToMemoryPool. It also allows you to sign a double‐spend directly in signrawtransactionwithkey and signrawtransactionwithwallet, as long as the conflicting transaction is not yet confirmed.

CConnman

Manages all P2P connections: opening, accepting, servicing and tearing them down.

CDBBatch

Batch of changes queued to be written to a CDBWrapper

CDBIterator

Iterates over the key‐value entries of a CDBWrapper.

CDBWrapper

Wraps a LevelDB database, providing typed, serialized key‐value access.

CDiskBlockIndex

Used to marshal pointers into hashes for db storage.

CDiskTxPos

On‐disk position of a transaction: a block file position plus an offset within the block.

CExtKey

A BIP32 extended private key: a private key plus the chain code and metadata needed for derivation.

CExtPubKey

A BIP32 extended public key: a public key plus the chain code and metadata needed for derivation.

CFeeRate

Fee rate in satoshis per virtualbyte: CAmount / vB the feerate is represented internally as FeeFrac

CHKDF_HMAC_SHA256_L32

A rfc5869 HKDF implementation with HMAC_SHA256 and fixed key output length of 32 bytes (L=32)

CHMAC_SHA256

A hasher class for HMAC‐SHA‐256.

CHMAC_SHA512

A hasher class for HMAC‐SHA‐512.

CHash160

A hasher class for Bitcoin's 160‐bit hash (SHA‐256 + RIPEMD‐160).

CHash256

A hasher class for Bitcoin's 256‐bit hash (double SHA‐256).

CInv

inv message data

CKey

An encapsulated private key.

CKeyID

A reference to a CKey: the Hash160 of its serialized public key

CMerkleBlock

Used to relay blocks as header + vector<merkle branch> to filtered nodes.

CMessageHeader

Message header. (4) message start. (12) message type. (4) size. (4) checksum.

CMutableTransaction

A mutable version of CTransaction.

CNetAddr

Network address.

CNetMessage

Transport protocol agnostic message container. Ideally it should only contain receive time, payload, type and size.

CNoDestination

A destination that has no associated address, optionally wrapping a script.

CNode

Information about a peer

CNodeOptions

Per‐connection options passed when constructing a CNode.

CNodeStateStats

Per‐peer state statistics reported for diagnostics (e.g. getpeerinfo).

CNodeStats

Reported statistics about a single peer connection.

COutPoint

An outpoint ‐ a combination of a transaction hash and an index n into its vout

CPartialMerkleTree

Data structure that represents a partial merkle tree.

CPubKey

An encapsulated public key.

CRIPEMD160

A hasher class for RIPEMD‐160.

CRPCCommand

A single registered RPC command together with its dispatch metadata.

CRPCTable

Registry of available RPC commands.

CRollingBloomFilter

RollingBloomFilter is a probabilistic "keep track of most recently inserted" set. Construct it with the number of items to keep track of, and a false‐positive rate. Unlike CBloomFilter, by default nTweak is set to a cryptographically secure random value for you. Similarly rather than clear() the method reset() is provided, which also changes nTweak to decrease the impact of false‐positives.

CSHA1

A hasher class for SHA1.

CSHA256

A hasher class for SHA‐256.

CSHA512

A hasher class for SHA‐512.

CScheduler

Schedules deferred and recurring background tasks.

CScript

Serialized script, used inside transaction inputs and outputs

CScriptCheck

Closure representing one script verification Note that this stores references to the spending transaction

CScriptID

A reference to a CScript: the Hash160 of its serialization

CScriptNum

Script integer with the overflow and encoding semantics of Bitcoin's numeric opcodes.

CScriptWitness

Witness stack for a single transaction input.

CSerializedNetMsg

A fully serialized network message, ready to be handed to the transport.

CService

A combination of a network address (CNetAddr) and a (TCP) port

CServiceHash

Hasher for CService, suitable for use with unordered containers.

CSipHasher

General SipHash‐2‐4 implementation.

CSubNet

A subnet: a network base address together with a netmask.

CThreadInterrupt

A helper class for interruptible sleeps. Calling operator() will interrupt any current sleep, and after that point operator bool() will return true until reset.

CTransaction

The basic transaction that is broadcasted on the network and contained in blocks. A transaction can contain multiple inputs and outputs.

CTxIn

An input of a transaction. It contains the location of the previous transaction's output that it claims and a signature that matches the output's public key.

CTxMemPool

The node's memory pool of unconfirmed transactions.

CTxMemPoolEntry

CTxMemPoolEntry stores data about the corresponding transaction, as well as data about all in‐mempool transactions that depend on the transaction ("descendant" transactions).

CTxOut

An output of a transaction. It contains the public key that the next input must be able to sign with to claim it.

CTxUndo

Undo information for a CTransaction

CValidationInterface

Implement this to subscribe to events generated in validation and mempool

CVerifyDB

RAII wrapper for VerifyDB: Verify consistency of the block and coin databases

CZMQAbstractNotifier

Base class for ZMQ notifiers that publish node events to a subscriber.

CZMQAbstractPublishNotifier

Base class for ZMQ publisher notifiers that send multipart messages to subscribers.

CZMQNotificationInterface

Validation‐interface listener that fans node events out to the configured ZMQ notifiers.

CZMQPublishHashBlockNotifier

Publishes the hash of each new active chain tip block.

CZMQPublishHashTransactionNotifier

Publishes the hash of each notified transaction.

CZMQPublishRawBlockNotifier

Publishes the serialized bytes of each new active chain tip block.

CZMQPublishRawTransactionNotifier

Publishes the serialized bytes of each notified transaction.

CZMQPublishSequenceNotifier

Publishes lightweight sequence messages for block and mempool events.

CachingTransactionSignatureChecker

Signature checker that consults and updates a SignatureCache to avoid repeat verification.

ChaCha20

Unrestricted ChaCha20 cipher.

ChaCha20Aligned

ChaCha20 cipher that only operates on multiples of 64 bytes.

ChainCode

A BIP32 chain code. Cleansed on destruction.

ChainTxData

Holds various statistics on transactions within a chain. Used to estimate verification progress during chain sync.

Chainstate

Chainstate stores and provides an API to update our local knowledge of the current best chain.

ChainstateManager

Interface for managing multiple Chainstate objects, where each chainstate is associated with chainstate* subdirectory in the data directory and contains a database of UTXOs existing at a different point in history. (See the Chainstate class for more information.)

CheckVarIntMode

Compile‐time check that a VarInt mode and integer type are compatible.

ChronoFormatter

Formatter that serializes a time point as its underlying representation type U.

Coin

A UTXO entry.

CoinStatsIndex

CoinStatsIndex maintains statistics on the UTXO set.

CoinsViewCacheCursor

Cursor for iterating over the linked list of flagged entries in CCoinsViewCache.

CoinsViewEmpty

Noop coins view.

CoinsViewOptions

Tunable options for the on‐disk coins (UTXO) view database.

CoinsViewOverlay

CCoinsViewCache subclass that asynchronously fetches most block input prevouts in parallel during ConnectBlock without mutating the base cache.

CoinsViews

A convenience class for constructing the CCoinsView* hierarchy used to facilitate access to the UTXO set.

CompactSizeFormatter

Formatter for integers in CompactSize format.

CompactSizeReader

Reads a CompactSize value from a stream into a referenced integer.

CompactSizeWriter

Writes a fixed integer value to a stream in CompactSize format.

CompareIteratorByHash

Orders mempool entry handles by the hash of their transaction.

CompareTxMemPoolEntryByEntryTime

Orders mempool entries by the time they entered the mempool.

CompressedHeader

A compressed CBlockHeader, which leaves out the prevhash.

ConnectedBlock

A block that has been connected to the active chain, tracked during chain activation.

ConnmanTestMsg

Test harness that exposes CConnman internals for unit tests.

CountingSemaphoreGrant

RAII‐style semaphore lock

CustomUintFormatter

Serialization wrapper class for custom integers and enums.

DBOptions

User‐controlled performance and debug options.

DBParams

Application‐specific storage settings.

DataStream

Double ended buffer combining vector and stream‐like interfaces.

DefaultFormatter

Default formatter. Serializes objects as themselves.

DeferringSignatureChecker

Signature checker that forwards every check to a wrapped checker.

DereferencingComparator

Comparator that orders pointers by the values they point to.

Descriptor

Interface for parsed descriptor objects.

DescriptorCache

Cache for single descriptor's derived extended pubkeys

DifferenceFormatter

Formatter that (de)serializes a monotonically increasing sequence as differences.

DisconnectedBlockTransactions

Transactions removed from the chain during a reorg, held for possible re‐addition to the mempool.

ECC_Context

RAII class initializing and deinitializing global state for elliptic curve support. Only one instance may be initialized at a time.

EllSwiftPubKey

An ElligatorSwift‐encoded public key.

EstimationResult

Used to return detailed information about a fee estimate calculation.

EstimatorBucket

Used to return detailed information about a feerate bucket.

ExternalSigner

Enables interaction with an external signing device or service, such as a hardware wallet. See doc/external‐signer.md

FSChaCha20

Forward‐secure ChaCha20

FSChaCha20Poly1305

Forward‐secure wrapper around AEADChaCha20Poly1305.

FastRandomContext

Fast randomness source. This is seeded once with secure random data, but is completely deterministic and does not gather more entropy after that.

FeeCalculation

Aggregate details about how a smart fee estimate was reached.

FeeFilterRounder

Quantizes minimum fee values to a discrete set of feerates for fee filter privacy.

FeeFrac

Data structure storing a fee and size.

FeePerUnit

Tagged wrapper around FeeFrac to avoid unit confusion.

FeeRateEstimation

A successful fee rate estimate returned by a fee rate estimator.

FeeRateEstimationError

A failed fee rate estimation, carrying the zero‐value estimation that identifies the estimator and target alongside the error reason.

FeeRateEstimatorManager

Tracks fee‐rate estimates derived from observed transactions.

FillableSigningProvider

Fillable signing provider that keeps keys in an address‐>secret map

FlatFilePos

Location of a record within a numbered flat file: a file index and byte offset.

FlatFileSeq

FlatFileSeq represents a sequence of numbered files storing raw data. This class facilitates access to and efficient management of these files.

FlatSigningProvider

A signing provider backed by plain in‐memory maps of keys and scripts.

GCSFilter

This implements a Golomb‐coded set as defined in BIP 158. It is a compact, probabilistic data structure for testing set membership.

GenTxid

A transaction identifier that holds either a txid or a wtxid.

GenericTransactionSignatureChecker

Signature checker that validates against a concrete spending transaction.

GlobalMutex

Different type to mark Mutex at global scope

HTTPHeaders

Collection of HTTP header field‐value pairs for a request or response.

HTTPRemoteClient

A connected HTTP client, holding its socket plus the receive and send buffers.

HTTPRequest

A single HTTP request being parsed from and replied to over a client connection.

HTTPResponse

Status line, headers and version of an HTTP response.

HTTPServer

Socket‐based HTTP server that accepts connections and dispatches requests to worker threads.

HTTPVersion

Major and minor components of an HTTP protocol version.

HashVerifier

Reads data from an underlying stream, while hashing the read data.

HashWriter

A writer stream (for serialization) that computes a 256‐bit hash.

HashedSourceWriter

Writes data to an underlying source stream, while hashing the written data.

HeadersSyncParams

Configuration for headers sync memory usage.

HeadersSyncState

HeadersSyncState:

HelpElisionNone

Controls how an RPCResult is rendered in human‐readable help text. The std::string alternative carries the summary text rendered as "...".

HelpElisionSkip

Elision mode that hides a field from the rendered help text.

HelpResult

Exception carrying pre‐rendered RPC help text to return to the caller.

HidingSigningProvider

Wraps a signing provider, optionally hiding secret keys and key origins.

IndexSummary

A snapshot of an index's identity and sync progress.

InsecureRandomContext

xoroshiro128++ PRNG. Extremely fast, not appropriate for cryptographic purposes.

InvalidAddrManVersionError

Exception thrown when peers.dat has an unsupported addrman version.

JSONRPCRequest

Context and parameters for a single JSON‐RPC request.

KeyInfo

Parsed components of a configuration key.

KeyOriginInfo

Origin information (master key fingerprint and derivation path) for a public key.

KeyPair

KeyPair

KeyPathElement

A single element of a BIP32 hierarchical deterministic key path.

LevelDBContext

Opaque holder for the LevelDB‐specific state of a CDBWrapper.

LimitedStringFormatter

Formatter that serializes a string and rejects lengths above a compile‐time limit.

LimitedVectorFormatter

Limited vector formatter. Throws an error if a vector is oversized.

LocalServiceInfo

A local address we advertise, together with how trustworthy it is.

LockPoints

Cached block height and time that satisfy a transaction's relative locktimes.

LockedPageAllocator

OS‐dependent allocation and deallocation of locked/pinned memory pages. Abstract base class.

LockedPool

Pool for locked memory chunks.

LockedPoolManager

Singleton class to keep track of locked (ie, non‐swappable) memory, for use in std::allocator templates.

LogCategory

A log category paired with whether it is currently enabled.

MappingResult

Successful response to a port mapping.

MemPoolFeeRateEstimator

Estimate the fee rate required for a transaction to be included in the next block.

MemPoolFeeRateEstimatorCache

MemPoolFeeRateEstimatorCache holds a cache of recent fee rate estimates. A cached fee rate is only provided while it is not older than CACHE_LIFE and the chain tip has not changed.

MempoolAcceptResult

Validation result for a transaction evaluated by MemPoolAccept (single or package). Here are the expected fields and properties of a result depending on its ResultType, applicable to results returned from package evaluation:+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+| Field or property | VALID | INVALID | MEMPOOL_ENTRY | DIFFERENT_WITNESS || | |‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐| | || | | TX_RECONSIDERABLE | Other | | |+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+| txid in mempool? | yes | no | no* | yes | yes || wtxid in mempool? | yes | no | no* | yes | no || m_state | yes, IsValid() | yes, IsInvalid() | yes, IsInvalid() | yes, IsValid() | yes, IsValid() || m_vsize | yes | no | no | yes | no || m_base_fees | yes | no | no | yes | no || m_effective_feerate | yes | yes | no | no | no || m_wtxids_fee_calculations | yes | yes | no | no | no || m_other_wtxid | no | no | no | no | yes |+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐+ (*) Individual transaction acceptance doesn't return MEMPOOL_ENTRY and DIFFERENT_WITNESS. It returns INVALID, with the errors txn‐already‐in‐mempool and txn‐same‐nonwitness‐data‐in‐mempool respectively. In those cases, the txid or wtxid may be in the mempool for a TX_CONFLICT.

MinedBlockStats

Weight statistics for a recently mined block, used to assess mempool coverage.

MockableSteadyClock

Version of SteadyClock that is mockable in the context of tests (via FakeSteadyClock, or Self::SetMockTime), otherwise the system steady clock.

MuHash3072

A multiplicative hash of the UTXO set.

MuSig2SecNonce

MuSig2SecNonce encapsulates a secret nonce in use in a MuSig2 signing session. Since this nonce persists outside of libsecp256k1 signing code, we must handle its construction and destruction ourselves. The secret nonce must be kept a secret, otherwise the private key may be leaked. As such, it needs to be treated in the same way that CKeys are treated. So this class handles the secure allocation of the secp256k1_musig_secnonce object that libsecp256k1 uses, and only gives out references to this object to avoid any possibility of copies being made. Furthermore, objects of this class are not copyable to avoid nonce reuse.

MuSig2SecNonceImpl

Implementation detail that owns the secure storage of a MuSig2 secret nonce.

MultiSigningProvider

A signing provider to be used to interface with multiple signing providers at once.

MutableTransactionSignatureCreator

A signature creator for transactions.

NetEventsInterface

Interface for message handling

NetGroupManager

Netgroup manager

NetPermissions

Holds the permission flags granted to a peer and helpers to query and modify them.

NetWhitebindPermissions

Permissions bound to a specific listening address, parsed from a ‐whitebind entry.

NetWhitelistPermissions

Permissions applied to peers matching a subnet, parsed from a ‐whitelist entry.

NewMempoolTransactionInfo

Notification payload describing a transaction added to the mempool.

NodeClock

Version of the system clock that is mockable in the context of tests (via FakeNodeClock or ::SetMockTime), otherwise the system clock.

NodeEvictionCandidate

Snapshot of one inbound peer's attributes used by the eviction selection logic.

NoechoInst

Scoped guard that disables terminal echo on standard input.

NonFatalCheckError

Exception thrown by CHECK_NONFATAL() when its condition is false.

Num3072

A 3072‐bit number in the MuHash prime field, stored as an array of limbs.

Obfuscation

XOR‐based obfuscation over a fixed‐size key, applied to byte ranges.

PKHash

A public‐key‐hash destination for a P2PKH address.

PSBTInput

A structure for PSBTs which contain per‐input information

PSBTOutput

A structure for PSBTs which contains per output information

PSBTProprietary

A structure for PSBT proprietary types

PackageMempoolAcceptResult

Validation result for package mempool acceptance.

PackageValidationState

Validation state for a package, carrying a PackageValidationResult rejection reason.

ParamsStream

Wrapper that overrides the GetParams() function of a stream.

ParamsWrapper

Wrapper that serializes objects with the specified parameters.

PartiallyDownloadedBlock

A block being reconstructed from a compact block plus mempool/extra transactions.

PartiallySignedTransaction

A version of CTransaction with the PSBT format

PayToAnchor

A pay‐to‐anchor destination for a P2A address.

PeerManager

Drives the peer‐to‐peer message processing and relay logic for a node.

PeerManagerInfo

Aggregate information about the peer manager, reported for diagnostics.

Poly1305

C++ wrapper with std::byte span interface around poly1305_donna code.

PoolAllocator

Forwards all allocations/deallocations to the PoolResource.

PoolResource

A memory resource similar to std::pmr::unsynchronized_pool_resource, but optimized for node‐based containers. It has the following properties:

PoolResourceTester

Access to internals for testing purpose only

PrecomputedTransactionData

Cached transaction data reused across signature‐hash computations for a single transaction.

PrefilledTransaction

A transaction sent inline within a compact block, plus its position.

PresaltedSipHasher

Optimized SipHash‐2‐4 implementation for uint256.

PrivateBroadcast

Store a list of transactions to be broadcast privately. Supports the following operations: ‐ Add a new transaction ‐ Remove a transaction ‐ Pick a transaction for sending to one recipient ‐ Query which transaction has been picked for sending to a given recipient node ‐ Mark that a given recipient node has confirmed receipt of a transaction ‐ Query whether a given recipient node has confirmed reception ‐ Query whether any transactions that need sending are currently on the list

Proxy

A proxy endpoint, either a network service or a local unix domain socket.

ProxyCredentials

Credentials for proxy authentication

PubKeyDestination

A pay‐to‐public‐key destination that has no associated address.

RPCArg

Describes a single argument of an RPC method for validation and help text.

RPCArgOptions

Optional settings controlling how an RPCArg is validated and rendered.

RPCExamples

Holds example invocations shown in an RPC method's help text.

RPCMethod

Describes an RPC method: its name, arguments, results, examples, and handler.

RPCResult

Describes one part of an RPC method's result for type checking and help text.

RPCResultOptions

Optional settings controlling how an RPCResult is validated and rendered.

RPCResults

The complete set of result variants an RPC method can return.

RandomMixin

Mixin class that provides helper randomness functions.

ReachableNets

List of reachable networks. Everything is reachable by default.

RemovedMempoolTransactionInfo

Notification payload describing a transaction removed from the mempool.

SHA3_256

A hasher class for SHA3‐256 (fixed 256‐bit output Keccak).

SaltedCoinsCacheHasher

SipHash‐1‐3‐UJ based hasher for the coins cache and related coins containers.

SaltedOutpointHasher

Hashes a transaction outpoint (COutPoint) with a per‐instance random salt.

SaltedSipHasher

Hashes an arbitrary byte span with a per‐instance random SipHash salt.

SaltedTxidHasher

Hashes a transaction id (Txid) with a per‐instance random salt.

SaltedUint256Hasher

Hashes a uint256 with a per‐instance random salt.

SaltedWtxidHasher

Hashes a witness transaction id (Wtxid) with a per‐instance random salt.

ScopedDataStreamUsage

Require empty scratch streams on entry and reset them on exit.

ScriptCompression

Compact serializer for scripts.

ScriptExecutionData

Mutable per‐input state carried through Taproot/Tapscript execution.

ScriptHash

A script‐hash destination for a P2SH address.

SectionInfo

Location where a config section name was encountered.

Sections

Accumulator for the formatted sections that make up RPC help text.

SecureUniqueDeleter

Deleter that securely deallocates a single object through secure_allocator.

SerialTaskRunner

Class used by CScheduler clients which may schedule multiple jobs which are required to be run serially. Jobs may not be run on the same thread, but no two jobs will be executed at the same time and memory will be release‐acquire consistent (the scheduler will internally do an acquire before invoking a callback as well as a release at the end). In practice this means that a callback B() will be able to observe all of the effects of callback A() which executed before it.

ShortestVectorFirstComparator

Orders byte vectors by length first, then lexicographically.

SigHashCache

Data structure to cache SHA256 midstates for the ECDSA sighash calculations (bare, P2SH, P2WPKH, P2WSH).

SignOptions

Options that influence how an input is signed.

SignatureCache

Valid signature cache, to avoid doing expensive ECDSA signature checking twice for every transaction (once when accepted into memory pool, and again when accepted into the block chain)

SignatureCacheHasher

We're hashing a nonce into the entries themselves, so we don't need extra blinding in the set hash computation.

SignatureData

Signature material collected for a single transaction input.

SignetTxs

Generate the signet tx corresponding to the given block

SigningProvider

An interface to be implemented by keystores that support signing.

SipHashState

Shared SipHash state (v0..v3) with its round, compression, and finalization primitives. Internal building block, only meant to be composed by the hasher classes below.

SipHasher13UJ

A custom weaker variant of SipHash‐1‐3 without padding, and supporting "jumbo" inputs.

SizeComputer

Stream‐like object that only records how many bytes a serialization would write.

Sock

RAII helper class that manages a socket and closes it automatically when it goes out of scope.

SourceLocation

Like std::source_location, but allowing to override the function name.

SourceLocationEqual

Equality comparator for SourceLocation keys, comparing line and file name.

SourceLocationHasher

Hash functor for SourceLocation keys, mixing line and file name.

SpanReader

Minimal stream for reading from an existing byte array by std::span.

SpanWriter

Minimal stream for writing to an existing span of bytes.

StdMutex

An annotated version of std::mutex for Clang Thread Safety Analysis.

TaprootBuilder

Utility class to construct Taproot outputs from internal key and script tree.

TaprootSpendData

Data needed to spend a Taproot output, including its script tree.

ThreadPool

Fixed‐size thread pool for running arbitrary tasks concurrently.

TimeOffsets

Tracks clock differences against outbound peers and warns when the local clock drifts.

TokenPipe

An interprocess or interthread pipe for sending tokens (one‐byte values) over.

TokenPipeEnd

One end of a token pipe.

TorControlConnection

Low‐level handling for Tor control connection. Speaks the SMTP‐like protocol as defined in torspec/control‐spec.txt

TorControlReply

Reply from Tor, can be single or multi‐line

TorController

Manages the node's Tor hidden service and control connection.

TransactionInfo

Snapshot of the policy‐relevant data for a mempool transaction.

TransactionSerParams

Serialization parameters controlling whether transaction witnesses are included.

Transport

The Transport converts one connection's sent messages to wire bytes, and received bytes back.

TxConfirmStats

Tracks transaction confirmation history for a single time horizon.

TxDocOptions

Options controlling how TxDoc renders the decoded transaction help.

TxGraph

Data structure to encapsulate fees, sizes, and dependencies for a set of transactions.

TxInUndoFormatter

Formatter for undo information for a CTxIn

TxIndex

TxIndex is used to look up transactions included in the blockchain by hash. The index is written to a LevelDB database and records the block sequence number and serialized block offset of each transaction by transaction hash.

TxIndexResult

A found transaction and the hash of the block that contains it.

TxMempoolInfo

Information about a mempool transaction.

TxOutCompression

wrapper for CTxOut that provides a more compact serialization

TxReconciliationTracker

Transaction reconciliation is a way for nodes to efficiently announce transactions. This object keeps track of all txreconciliation‐related communications with the peers. The high‐level protocol is: 0. Txreconciliation protocol handshake. 1. Once we receive a new transaction, add it to the set instead of announcing immediately. 2. At regular intervals, a txreconciliation initiator requests a sketch from a peer, where a sketch is a compressed representation of short form IDs of the transactions in their set. 3. Once the initiator received a sketch from the peer, the initiator computes a local sketch, and combines the two sketches to attempt finding the difference in sets. 4a. If the difference was not larger than estimated, see SUCCESS below. 4b. If the difference was larger than estimated, initial txreconciliation fails. The initiator requests a larger sketch via an extension round (allowed only once). ‐ If extension succeeds (a larger sketch is sufficient), see SUCCESS below. ‐ If extension fails (a larger sketch is insufficient), see FAILURE below.

TxRequestTracker

Data structure to keep track of, and schedule, transaction downloads from peers.

TxValidationState

Holds the outcome and reason of transaction‐level validation.

TxoSpender

A spending transaction and the hash of the block that contains it.

TxoSpenderIndex

TxoSpenderIndex is used to look up which transaction spent a given output. The index is written to a LevelDB database and, for each input of each transaction in a block, records the outpoint that is spent and the hash of the spending transaction.

UniValue

A dynamically typed JSON value used across Bitcoin Core's RPC layer.

UniValueType

Wrapper for UniValue::VType, which includes typeAny: Used to denote don't care type.

UniqueLock

Wrapper around std::unique_lock style lock for MutexType.

V1Transport

Transport implementation for the legacy (v1) unencrypted P2P protocol.

V2Transport

Transport implementation for the encrypted BIP324 (v2) P2P protocol, with automatic fallback to v1 when the peer does not speak v2.

VBDeploymentInfo

Static description of a version‐bits soft fork deployment.

VSizeTag

Tag selecting the satoshi‐per‐vbyte FeePerUnit instantiation.

ValidationCache

Convenience class for initializing and passing the script execution cache and signature cache.

ValidationInterfaceTest

Test fixture granted access to the interface's protected callbacks.

ValidationSignals

Dispatches validation event notifications to registered subscribers.

ValidationSignalsImpl

Private implementation details of ValidationSignals.

ValidationState

Template for capturing information about block/transaction validation. This is instantiated by TxValidationState and BlockValidationState for validation information on transactions and blocks respectively.

VarIntFormatter

Serialization wrapper class for integers in VarInt format.

VecDeque

Data structure largely mimicking std::deque, but using single preallocated ring buffer.

VectorFormatter

Formatter to serialize/deserialize vector elements using another formatter

VectorWriter

Minimal stream for overwriting and/or appending to an existing byte vector

VersionBitsCache

BIP 9 allows multiple softforks to be deployed in parallel. We cache per‐period state for every one we implement and warning state for each BIP 323 allowed bit.

VersionBitsConditionChecker

Class to implement versionbits logic.

WalletInitInterface

Interface that lets the node initialize the optional wallet component.

WeightTag

Tag selecting the satoshi‐per‐weight‐unit FeePerUnit instantiation.

WitnessUnknown

CTxDestination subtype to encode any future Witness version.

WitnessV0KeyHash

A version‐0 witness key‐hash destination for a P2WPKH address.

WitnessV0ScriptHash

A version‐0 witness script‐hash destination for a P2WSH address.

WitnessV1Taproot

A version‐1 taproot destination for a P2TR address.

Wrapper

Simple wrapper class to serialize objects using a formatter; used by Using().

XOnlyPubKey

A BIP340‐style x‐only public key, storing only the 32‐byte x coordinate.

arith_uint256

256‐bit unsigned big integer.

base_blob

Template base class for fixed‐sized opaque blobs.

base_uint

Template base class for unsigned big integers.

bilingual_str

Bilingual messages: ‐ in GUI: user's native language + untranslated (i.e. English) ‐ in log and stderr: untranslated only

bitdeque

Class that mimics std::deque<bool>, but with std::vector<bool>'s bit packing.

btck_Block

Opaque data structure for holding a block.

btck_BlockHash

Opaque data structure for holding a block hash.

btck_BlockHeader

Opaque data structure for holding a btck_BlockHeader.

btck_BlockSpentOutputs

Opaque data structure for holding a block's spent outputs.

btck_BlockTreeEntry

Opaque data structure for holding a block tree entry.

btck_BlockValidationState

Opaque data structure for holding the state of a block during validation.

btck_Chain

Opaque data structure for holding the currently known best‐chain associated with a chainstate.

btck_ChainParameters

Opaque data structure for holding the chain parameters.

btck_ChainstateManager

Opaque data structure for holding a chainstate manager.

btck_ChainstateManagerOptions

Opaque data structure for holding options for creating a new chainstate manager.

btck_Coin

Opaque data structure for holding a coin.

btck_ConsensusParams

Opaque data structure for holding the Consensus Params.

btck_Context

Opaque data structure for holding a kernel context.

btck_ContextOptions

Opaque data structure for holding options for creating a new kernel context.

btck_LoggingConnection

Opaque data structure for holding a logging connection.

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.

btck_PrecomputedTransactionData

Opaque data structure for holding precomputed transaction data.

btck_ScriptPubkey

Opaque data structure for holding a script pubkey.

btck_Transaction

Opaque data structure for holding a transaction.

btck_TransactionInput

Opaque data structure for holding a transaction input.

btck_TransactionOutPoint

Opaque data structure for holding a transaction out point.

btck_TransactionOutput

Opaque data structure for holding a transaction output.

btck_TransactionSpentOutputs

Opaque data structure for holding a transaction's spent outputs.

btck_TxValidationState

Opaque data structure for holding the state of a transaction during validation.

btck_Txid

Opaque data structure for holding a btck_Txid.

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.

btck_WitnessStack

Opaque data structure for holding a witness stack.

dbwrapper_error

Exception thrown when a database operation fails.

deserialize_type

Dummy data type to identify deserializing constructors.

entry_time

Multi‐index tag for the index ordered by mempool entry time.

index_by_wtxid

Multi‐index tag for the index keyed by witness‐transaction hash (wtxid).

indirectmap

Map whose keys are pointers, but are compared by their dereferenced values.

mempoolentry_txid

Extracts a transaction hash (txid) from a CTxMemPoolEntry or CTransactionRef.

mempoolentry_wtxid

Extracts a transaction witness‐hash (wtxid) from a CTxMemPoolEntry or CTransactionRef.

prevector

Implements a drop‐in replacement for std::vector<T> which stores up to N elements directly (without heap allocation). The types Size and Diff are used to store element counts, and can be any unsigned + signed type.

script_verify_flags

Type‐safe set of script verification flags backed by a bitmask.

scriptnum_error

Exception thrown for invalid CScriptNum operations or encodings.

secp256k1_context_struct

Opaque libsecp256k1 context structure.

secp256k1_musig_keyagg_cache

Opaque libsecp256k1 cache holding the aggregate public key state of a MuSig2 session.

secp256k1_musig_secnonce

Opaque libsecp256k1 object holding a MuSig2 secret nonce.

secure_allocator

Allocator that locks its contents from being paged out of memory and clears its contents before deletion.

sqlite3

Opaque SQLite database connection handle, defined by the SQLite library.

sqlite3_stmt

Opaque SQLite prepared statement handle, defined by the SQLite library.

test_only_CheckFailuresAreExceptionsNotAborts

RAII guard that makes failed checks throw instead of abort for the duration of a test.

transaction_identifier

transaction_identifier represents the two canonical transaction identifier types (txid, wtxid).

uint160

160‐bit opaque blob.

uint256

256‐bit opaque blob.

uint_error

Exception thrown on arithmetic errors involving big integers.

zero_after_free_allocator

Allocator that clears the memory it manages before returning it to the system.

Type Aliases

Name

Description

BigEndianFormatter

CustomUintFormatter alias that serializes integers in big‐endian byte order.

BinarySemaphoreGrant

A grant over a binary (single‐slot) semaphore.

BitSet

A bitset supporting at least BITS elements.

CAmount

Amount in satoshis (Can be negative)

CCoinsMap

PoolAllocator's MAX_BLOCK_SIZE_BYTES parameter here uses sizeof the data, and adds the size of 4 pointers. We do not know the exact node size used in the std::unordered_node implementation because it is implementation defined. Most implementations have an overhead of 1 or 2 pointers, so nodes can be connected in a linked list, and in some cases the hash value is stored as well. Using an additional sizeof(void*)*4 for MAX_BLOCK_SIZE_BYTES should thus be sufficient so that all implementations can allocate the nodes from the PoolAllocator.

CCoinsMapMemoryResource

Memory resource backing the pool allocator used by the coins map.

CPrivKey

CPrivKey is a serialized private key, with all parameters included (SIZE bytes)

CScriptBase

We use a prevector for the script to reduce the considerable memory overhead of vectors in cases where they normally contain a small number of small elements.

CTransactionRef

Shared pointer to an immutable transaction.

CTxDestination

A txout script categorized into standard templates. * CNoDestination: Optionally a script, no corresponding address. * PubKeyDestination: TxoutType::PUBKEY (P2PK), no corresponding address * PKHash: TxoutType::PUBKEYHASH destination (P2PKH address) * ScriptHash: TxoutType::SCRIPTHASH destination (P2SH address) * WitnessV0ScriptHash: TxoutType::WITNESS_V0_SCRIPTHASH destination (P2WSH address) * WitnessV0KeyHash: TxoutType::WITNESS_V0_KEYHASH destination (P2WPKH address) * WitnessV1Taproot: TxoutType::WITNESS_V1_TAPROOT destination (P2TR address) * PayToAnchor: TxoutType::ANCHOR destination (P2A address) * WitnessUnknown: TxoutType::WITNESS_UNKNOWN destination (P2W??? address) A CTxDestination is the internal data type encoded in a bitcoin address

CTxMemPoolEntryRef

A reference to a constant mempool entry.

CZMQNotifierFactory

Factory function that creates a ZMQ notifier instance.

CoinsCachePair

Key‐value pair stored in the coins map, linking an outpoint to its cache entry.

CompressedScript

This saves us from making many heap allocations when serializing and deserializing compressed scripts.

DNSLookupFn

Function type used to resolve a host name to network addresses.

DataBuffer

Byte buffer used by the buffered stream wrappers.

ECDHSecret

Fixed‐size buffer holding an ECDH shared secret (ECDH_SECRET_SIZE bytes).

ExtPubKeyMap

Map from a derivation index to its cached extended public key.

FeePerVSize

Fee rate expressed in satoshis per virtual byte.

FeePerWeight

Fee rate expressed in satoshis per weight unit.

HTTPRequestHandler

Handler for requests to a certain HTTP path

HelpElision

How a result field is elided in help: printed normally, hidden, or summarized as "...".

HoursDouble

Duration of hours stored as a double.

KeyFingerprint

The first four bytes of a key identifier, used as a BIP32 parent fingerprint.

LoadWalletFn

Callback invoked when a wallet is loaded, receiving the wallet interface.

LossyChronoFormatter

ChronoFormatter alias that allows lossy conversion of the time point representation.

MessageStartChars

Four‐byte magic prefix that starts every P2P network message.

MillisecondsDouble

Duration of milliseconds stored as a double.

MutableTransactionSignatureChecker

Signature checker bound to a CMutableTransaction.

Mutex

Wrapped mutex: supports waiting but not recursive locking

NodeId

Type used to uniquely identify a connected peer.

NodeId

Identifier assigned to a connected peer.

NodeSeconds

NodeClock time point measured in whole seconds.

PCPMappingNonce

PCP mapping nonce. Arbitrary data chosen by the client to identify a mapping.

Package

A package is an ordered list of transactions. The transactions cannot conflict with (spend the same inputs as) one another.

RPCArgList

A list of named RPC arguments, each a (name, value) pair.

ReadStatus

Outcome of reading or reconstructing a compact block.

RecursiveMutex

Wrapped mutex: supports recursive locking, but no waiting TODO: We should move away from using the recursive lock by default.

RpcMethodFnType

Pointer to a factory function returning the metadata for an RPC method.

SOCKET

Socket descriptor type on non‐Windows platforms, mapped to the Windows SOCKET handle.

ScriptError

Error codes returned by the Bitcoin Script interpreter.

SecondsDouble

Duration of seconds stored as a double.

SecureString

A std::string that keeps its contents in locked, cleared‐on‐free memory.

SerializeData

Byte‐vector that clears its contents before deletion.

SigPair

A public key paired with a signature produced for it.

SteadyClock

The monotonic steady clock.

SteadyMicroseconds

Steady clock time point measured in microseconds.

SteadyMilliseconds

Steady clock time point measured in milliseconds.

SteadySeconds

Steady clock time point measured in whole seconds.

SystemClock

The wall‐clock system clock.

ThresholdConditionCache

Maps a block's parent to the threshold state for the following period.

TransactionCompression

Formatter used to (de)serialize transactions inside compact blocks.

TransactionSignatureChecker

Signature checker bound to an immutable CTransaction.

TranslateFn

Translate a message to the native language of the user.

Txid

Txid commits to all transaction fields except the witness.

Wtxid

Wtxid commits to all transaction fields including the witness.

banmap_t

Map of banned subnets to their ban entries.

btck_Block

Opaque data structure for holding a block.

btck_BlockCheckFlags

Bitflags to control context‐free block checks (optional).

btck_BlockHash

Opaque data structure for holding a block hash.

btck_BlockHeader

Opaque data structure for holding a btck_BlockHeader.

btck_BlockSpentOutputs

Opaque data structure for holding a block's spent outputs.

btck_BlockTreeEntry

Opaque data structure for holding a block tree entry.

btck_BlockValidationResult

A granular "reason" why a block was invalid.

btck_BlockValidationState

Opaque data structure for holding the state of a block during validation.

btck_Chain

Opaque data structure for holding the currently known best‐chain associated with a chainstate.

btck_ChainParameters

Opaque data structure for holding the chain parameters.

btck_ChainType

Identifies which Bitcoin chain (network) a set of chain parameters describes.

btck_ChainstateManager

Opaque data structure for holding a chainstate manager.

btck_ChainstateManagerOptions

Opaque data structure for holding options for creating a new chainstate manager.

btck_Coin

Opaque data structure for holding a coin.

btck_ConsensusParams

Opaque data structure for holding the Consensus Params.

btck_Context

Opaque data structure for holding a kernel context.

btck_ContextOptions

Opaque data structure for holding options for creating a new kernel context.

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_LoggingConnection

Opaque data structure for holding a logging connection.

btck_NotifyBlockTip

Function signatures for the kernel notifications.

btck_NotifyFatalError

Callback invoked on an unrecoverable kernel error.

btck_NotifyFlushError

Callback invoked when flushing chainstate data fails.

btck_NotifyHeaderTip

Callback invoked when a new best header tip is seen during sync.

btck_NotifyProgress

Callback reporting validation or sync progress as a percentage.

btck_NotifyWarningSet

Callback invoked when a kernel warning is raised.

btck_NotifyWarningUnset

Callback invoked when a previously raised kernel warning is cleared.

btck_PrecomputedTransactionData

Opaque data structure for holding precomputed transaction data.

btck_ScriptPubkey

Opaque data structure for holding a script pubkey.

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_Transaction

Opaque data structure for holding a transaction.

btck_TransactionInput

Opaque data structure for holding a transaction input.

btck_TransactionOutPoint

Opaque data structure for holding a transaction out point.

btck_TransactionOutput

Opaque data structure for holding a transaction output.

btck_TransactionSpentOutputs

Opaque data structure for holding a transaction's spent outputs.

btck_TxValidationResult

Indicates the reason why a transaction failed validation. The subset of values reachable depends on which validation function was used.

btck_TxValidationState

Opaque data structure for holding the state of a transaction during validation.

btck_Txid

Opaque data structure for holding a btck_Txid.

btck_ValidationInterfaceBlockChecked

Function signatures for the validation interface.

btck_ValidationInterfaceBlockConnected

Callback when a block is connected to the active chain.

btck_ValidationInterfaceBlockDisconnected

Callback when a block is disconnected from the active chain.

btck_ValidationInterfacePoWValidBlock

Callback when a proof‐of‐work valid block is accepted into the tree.

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_WitnessStack

Opaque data structure for holding a witness stack.

btck_WriteBytes

Function signature for serializing data.

mapMsgTypeSize

Maps a message type to the total number of bytes seen for it.

secp256k1_context

Handle to an opaque libsecp256k1 context.

secure_unique_ptr

A unique_ptr whose managed object lives in secure memory and is securely freed.

Enums

Name

Description

Unnamed enum

How a local address became known, from least to most trusted.

Unnamed enum

Signature hash types/flags

Assumeutxo

Chainstate assumeutxo validity.

AuthCookieResult

Outcome of generating or reading the RPC authentication cookie.

BlockFilterType

Identifies the kind of block filter, controlling which data it indexes.

BlockPolicyEstimateReason

Enumeration of reason for returned fee estimate.

BlockStatus

Bit flags describing how far a block has been validated and which data is available for it.

BlockValidationResult

A "reason" why a block was invalid, suitable for determining whether the provider of the block should be banned/ignored/disconnected/etc. These are much more granular than the rejection codes, which may be more useful for some other use‐cases.

ByteUnit

Used by ParseByteUnits() Lowercase base 1000 Uppercase base 1024

ChainType

Identifies which Bitcoin chain a node operates on.

ChangeType

General change type (added, updated, removed).

CoinsCacheSizeState

How full the in‐memory coins cache is relative to its budget.

ConnectionDirection

Bit flags describing the direction of a connection.

ConnectionType

Different types of connections to a peer. This enum encapsulates the information we have available at the time of opening or accepting the connection. Aside from INBOUND, all types are initiated by us.

DiagramCheckError

Reason a feerate diagram comparison could not confirm an improvement.

DisconnectResult

Outcome of disconnecting a block from the UTXO set.

ElisionMode

How top‐level fields are elided when rendering transaction help.

FeeEstimateHorizon

Identifier for each of the 3 different TxConfirmStats which track history over different time horizons.

FeeEstimateMode

Used to determine type of fee estimation requested

FeeRateEstimatorType

Identifier for fee rate estimator.

FeeRateFormat

Selects the unit used when formatting a fee rate as text.

FeeReason

Used to determine the reason a wallet selected a transaction fee rate

FlushStateMode

How aggressively FlushStateToDisk should flush chainstate to disk.

GetDataMsg

getdata / inv message types. These numbers are defined by the protocol. When adding a new value, be sure to mention it in the respective BIP.

HTTPRequestMethod

HTTP request method parsed from a request line.

HTTPStatusCode

HTTP status codes

JSONRPCVersion

Version of the JSON‐RPC protocol a request or reply uses.

MappingError

Unsuccessful response to a port mapping.

MemPoolRemovalReason

Reason why a transaction was removed from the mempool, this is passed to the notification signal.

MessageVerificationResult

The result of a signed message verification. Message verification takes as an input: ‐ address (with whose private key the message is supposed to have been signed) ‐ signature ‐ message

MissingDataBehavior

Enum to specify what *TransactionSignatureChecker's behavior should be when dealing with missing transaction data.

NetPermissionFlags

Fine‐grained permissions granted to a peer via ‐whitebind or ‐whitelist.

Network

A network type.

OptionsCategory

Grouping used to organize options in the help output.

OuterType

Serializing JSON objects depends on the outer type. Only arrays and dictionaries can be nested in json. The top‐level outer type is "NONE".

OutputType

Address encoding to use for a newly generated destination.

PSBTRole

The roles a participant can play when processing a PSBT.

PackageValidationResult

A "reason" why a package was invalid. It may be that one or more of the included transactions is invalid or the package itself violates our rules. We don't distinguish between consensus and policy violations right now.

RBFTransactionState

The rbf state of unconfirmed transactions

RESTResponseFormat

Response body format requested from the REST interface.

ReadStatus_t

Outcome of reading or reconstructing a compact block.

ReconciliationRegisterResult

Outcome of trying to register a peer for transaction reconciliation.

SafeChars

Used by SanitizeString()

ScriptError_t

Error codes returned by the Bitcoin Script interpreter.

ServiceFlags

nServices flags

SigVersion

Script execution context that selects the signature‐hashing scheme.

SigningResult

Outcome of an attempt to sign a message.

SnapshotCompletionResult

Outcome of attempting to complete validation of an assumeutxo snapshot.

SynchronizationState

Stage of block synchronization the node is currently in.

ThresholdState

Opaque type for BIP9 state. See versionbits_impl.h for details.

TransportProtocolType

Transport layer version

TxValidationResult

A "reason" why a transaction was invalid, suitable for determining whether the provider of the transaction should be banned/ignored/disconnected/etc.

TxVerbosity

Verbose level for block's transaction

TxoutType

Classification of a scriptPubKey into a standard output type.

VarIntMode

Mode for encoding VarInts.

VerifyDBResult

Outcome of verifying the consistency of the block and coin databases.

bloomflags

First two bits of nFlags control how much IsRelevantAndUpdate actually updates The remaining bits are reserved

opcodetype

Script opcodes

script_verify_flag_name

Names of the individual SCRIPT_VERIFY_* verification flags (forward declaration).

Functions

Name

Description

AbsPathForConfigVal

Most paths passed as configuration arguments are treated as relative to the datadir if they are not absolute.

AcceptToMemoryPool

Try to add a transaction to the mempool. This is an internal function and is exposed only for testing. Client code should use ChainstateManager::ProcessTransaction()

AccessByTxid

Utility function to find any unspent output with a given txid. This function can be quite expensive because in the event of a transaction which is not found in the cache, it can cause up to MAX_OUTPUTS_PER_BLOCK lookups to database, so it should be used with care.

AddAndGetDestinationForScript

Get a destination of the requested type (if possible) to the specified script. This function will automatically add the script (and any other necessary scripts) to the keystore.

AddAndGetMultisigDestination

Build a multisig destination and add its keys and script to the keystore.

AddCoins

Utility function to add all of a transaction's outputs to a cache. When check is false, this assumes that overwrites are only possible for coinbase transactions. When check is true, the underlying view may be queried to determine whether an addition is an overwrite.

AddInputs

Normalize univalue‐represented inputs and add them to the transaction

AddLocal

AddLocal overloads

AddOutputs

Normalize, parse, and add outputs to the transaction

AdditionOverflow

Test whether the sum of two integers would overflow.

AllBlockFilterTypes

Get a list of known filter types.

AllocateFileRange

Pre‐allocate a range of a file so later writes into it do not fragment or fail.

AmountFromValue

Validate and return a CAmount from a UniValue number or string.

AppInitBasicSetup

Initialize bitcoin core: Basic context setup.

AppInitInterfaces

Initialize node and wallet interface pointers. Has no prerequisites or side effects besides allocating memory.

AppInitLockDirectories

Lock bitcoin core critical directories.

AppInitMain

Bitcoin core main initialization.

AppInitParameterInteraction

Initialization: parameter interaction.

AppInitSanityChecks

Initialization sanity checks.

ApplyArgsManOptions

Overlay the options set in argsman on top of corresponding members in mempool_opts. Returns an error if one was encountered.

ArithToUint256

Converts an arithmetic 256‐bit integer to a uint256 blob.

AsBase

AsBase overloads

AsmapVersion

Calculate the asmap version, a checksum identifying the asmap being used.

AssertLockHeldInternal

Assert that the given mutex is held by the current thread.

AssertLockNotHeldInline

AssertLockNotHeldInline overloads

AssertLockNotHeldInternal

Assert that the given mutex is not held by the current thread.

BIP32Hash

Computes the BIP32 child key derivation hash.

BanMapFromJson

Convert a JSON array to a banmap_t object.

BanMapToJson

Convert a banmap_t object to a JSON array.

BaseParams

Return the currently selected parameters. This won't change after app startup, except for unit tests.

BitsToBytes

Pack a vector of bits into bytes, eight bits per byte, least significant bit first.

BlockFilterTypeByName

Find a filter type by its human‐readable name.

BlockFilterTypeName

Get the human‐readable name for a filter type. Returns empty string for unknown types.

BlockMerkleRoot

Compute the Merkle root of the transactions in a block. *mutated is set to true if a duplicated subtree was found.

BlockPolicyFeeEstPath

Path of the block policy fee estimator data file.

BlockWitnessMerkleRoot

Compute the Merkle root of the witness transactions in a block.

BuildScript

Build a script by concatenating other scripts, or any argument accepted by CScript::operator<<.

BytesToBits

Unpack bytes into a vector of bits, eight bits per byte, least significant bit first.

CalculateClaimedHeadersWork

Return the sum of the claimed work on a given set of headers. No verification of PoW is done.

CalculateLockPointsAtTip

Calculate LockPoints required to check if transaction will be BIP68 final in the next block to be created on top of tip.

CalculateNextWorkRequired

Compute the retargeted proof‐of‐work target after a difficulty adjustment interval.

CalculateOutputValue

Sums the value of all outputs of a transaction.

CalculatePercentilesByWeight

Used by getblockstats to get feerates at different percentiles by weight

CalculateSequenceLocks

Calculates the block height and previous block's median time past at which the transaction will be considered final in the context of BIP 68. For each input that is not sequence locked, the corresponding entries in prevHeights are set to 0 as they do not affect the calculation.

Capitalize

Capitalizes the first character of the given string. This function is locale independent. It only converts lowercase characters in the standard 7‐bit ASCII range. This is a feature, not a limitation.

CaseInsensitiveEqual

Locale‐independent, ASCII‐only comparator

Cat

Cat overloads

CeilDiv

Integer ceiling division (for unsigned values).

ChainTypeFromString

Parse a chain type from its canonical string name.

ChainTypeToString

Convert a chain type to its canonical string name.

CheckBlock

Context‐independent validity checks.

CheckBlockDataAvailability

Check that a block's data (and optionally undo data) is available on disk.

CheckDataDirOption

Return true if ‐datadir option points to a valid directory or is not specified.

CheckDiskSpace

Check that a directory has enough free space for an additional write.

CheckEphemeralSpends

Called for each transaction(package) if any dust is in the package. Checks that each transaction's parents have their dust spent by the child, where parents are either in the mempool or in the package itself. Sets out_child_state and out_child_wtxid on failure.

CheckFinalTxAtTip

Check if transaction will be final in the next block to be created.

CheckLastCritical

Verify that the most recently entered critical section matches the given mutex.

CheckMinimalPush

Checks whether pushed data uses the minimal encoding for its opcode.

CheckProofOfWork

Check whether a block hash satisfies the proof‐of‐work requirement specified by nBits

CheckProofOfWorkImpl

Implementation of CheckProofOfWork that verifies a hash against a compact target.

CheckSequenceLocksAtTip

Check if transaction will be BIP68 final in the next block to be created on top of tip.

CheckSignatureEncoding

Check that a signature uses a valid encoding for the given verification flags.

CheckSignetBlockSolution

Extract signature and check whether a block has a valid solution

CheckStandardAsmap

Check standard asmap data (128 bits for IPv6).

CheckTransaction

Performs context‐independent validity checks on a transaction.

CheckedAdd

Add two integers, checking for overflow.

CheckedLeftShift

Left bit shift with overflow checking.

ClearLocal

Forget all known local addresses.

ClearShrink

Clear a vector (or std::deque) and release its allocated memory.

CombinePSBTs

Combines PSBTs with the same underlying transaction, resulting in a single PSBT with all partial signatures from each input.

CompareChunks

Compare the feerate diagrams implied by the provided sorted chunks data.

CompressAmount

Compress amount.

CompressScript

Compresses a script into the compact on‐disk representation.

ComputeMerkleRoot

Compute a Merkle root from the provided leaf hashes. If non‐null, *mutated is set to true if two identical hashes are paired at any tree level before the odd‐count hash duplication step, and false otherwise.

ComputeTapbranchHash

Compute the BIP341 tapbranch hash from two branches. Spans must be 32 bytes each.

ComputeTapleafHash

Compute the BIP341 tapleaf hash from leaf version & script.

ComputeTaprootMerkleRoot

Compute the BIP341 taproot script tree Merkle root from control block and leaf hash. Requires control block to have valid length (33 + k*32, with k in {0,1,..,128}).

ConnectDirectly

ConnectDirectly overloads

ConnectThroughProxy

Connect to a specified destination service through a SOCKS5 proxy by first connecting to the SOCKS5 proxy.

ConnectionTypeAsString

Convert ConnectionType enum to a string value

ConstructTransaction

Create a transaction from univalue parameters

ConvertBits

Convert from one power‐of‐2 number base to another.

CopyrightHolders

Build the multi‐line copyright holders string.

CountPSBTUnsignedInputs

Counts the unsigned inputs of a PSBT.

CountWitnessSigOps

Count the signature operations contributed by a witness spend.

CreateBaseChainParams

Creates and returns a std::unique_ptr<CBaseChainParams> of the chosen chain.

CreateChainParams

Creates and returns a std::unique_ptr<CChainParams> of the chosen chain.

CreateMuSig2AggregateSig

Combine the participants' partial signatures into a final MuSig2 aggregate signature.

CreateMuSig2Nonce

Generate a MuSig2 public nonce for a signing session and store the matching secret nonce.

CreateMuSig2PartialSig

Produce this participant's MuSig2 partial signature for the session.

CreateMuSig2SyntheticXpub

Construct the BIP 328 synthetic xpub for a pubkey

CreateSockOS

Create a real socket from the operating system.

CreateUTXOSnapshot

Helper to create UTXO snapshots given a chainstate and a file handle.

DataFromTransaction

Extract signature data from a transaction input, and insert it.

DecodeAsmap

Read and check asmap from provided binary file.

DecodeBase32

Decode a base32‐encoded string.

DecodeBase58

Decode a base58‐encoded string (str) into a byte vector (vchRet). return true if decoding is successful.

DecodeBase58Check

Decode a base58‐encoded string (str) that includes a checksum into a byte vector (vchRet), return true if decoding is successful

DecodeBase64

Decode a base64‐encoded string.

DecodeBase64PSBT

Decode a base64‐encoded PSBT into a PartiallySignedTransaction.

DecodeDestination

DecodeDestination overloads

DecodeDouble

Decode a double from its IEEE 754 binary64 representation.

DecodeExtKey

Decode a Base58Check‐encoded extended private key.

DecodeExtPubKey

Decode a Base58Check‐encoded extended public key.

DecodeHexBlk

Decode a hex‐encoded serialized block.

DecodeHexBlockHeader

Decode a hex‐encoded serialized block header.

DecodeHexTx

Decode a hex‐encoded serialized transaction.

DecodeRawPSBT

Decode a raw binary PSBT into a PartiallySignedTransaction.

DecodeSecret

Decode a WIF‐encoded private key.

DecompressAmount

Reverses CompressAmount, recovering the original amount in satoshis.

DecompressScript

Reconstructs a script from its compressed representation.

DefaultOnionServiceTarget

Build the default local target address for the onion service.

DeleteAuthCookie

Delete RPC authentication cookie from disk

DeleteLock

Remove all lock‐order bookkeeping for the given mutex.

DeploymentActiveAfter

DeploymentActiveAfter overloads

DeploymentActiveAt

DeploymentActiveAt overloads

DeploymentEnabled

DeploymentEnabled overloads

DeploymentName

DeploymentName overloads

DeriveExtKey

Get extended key and origin info for a given path

DeriveTarget

Convert nBits value to target.

DescribeAddress

Describe an address as a JSON object for RPC output.

DescriptorID

Unique identifier that may not change over time, unless explicitly marked as not backwards compatible. This is not part of BIP 380, not guaranteed to be interoperable and should not be exposed to the user.

DeserializeHDKeypath

Deserialize a length‐prefixed KeyOriginInfo from a stream.

DeserializeHDKeypaths

Deserialize an HD keypath and insert it into a map keyed by public key.

DeserializeKeyOrigin

Deserialize a fixed number of bytes from a stream as a KeyOriginInfo.

DeserializeMuSig2ParticipantDataIdentifier

Deserialize the MuSig2 participant identifiers from a PSBT MuSig2 field.

DeserializeMuSig2ParticipantPubkeys

Deserialize a PSBT_{IN,OUT}_MUSIG2_PARTICIPANT_PUBKEYS field.

DestroyAllBlockFilterIndexes

Destroy all open block filter indexes.

DestroyBlockFilterIndex

Destroy the block filter index with the given type. Returns false if no such index exists. This just releases the allocated memory and closes the database connection, it does not delete the index data.

DestroyDB

Destroys the LevelDB database stored at the given path.

DirectoryCommit

Sync directory contents. This is required on some environments to ensure that newly created files are committed to disk.

Discover

Look up IP addresses from all interfaces on the machine and add them to the list of local addresses to self‐advertise. The loopback interface is skipped.

DumpAnchors

Dump the anchor IP address database (anchors.dat)

DumpPeerAddresses

Writes the peer address database (peers.dat) to disk.

ECC_InitSanityCheck

Check that required EC support is available at runtime.

ElideGroup

Stamp elision onto an entire vector of RPCResult fields at once. Merges into existing m_opts so that flags like skip_type_check are preserved.

EnableFuzzDeterminism

Report whether fuzz determinism is currently enabled.

EncodeBase32

Base32 encode. If pad is true, then the output will be padded with '=' so that its length is a multiple of 8.

EncodeBase58

Encode a byte span as a base58‐encoded string

EncodeBase58Check

Encode a byte span into a base58‐encoded string, including checksum

EncodeBase64

EncodeBase64 overloads

EncodeDestination

Encode a destination as an address string.

EncodeDouble

Encode a double using the IEEE 754 binary64 format.

EncodeExtKey

Encode an extended private key in Base58Check format.

EncodeExtPubKey

Encode an extended public key in Base58Check format.

EncodeHexTx

Serialize a transaction and encode it as a hex string.

EncodeSecret

Encode a private key in WIF format.

EnsureAddrman

Get the address manager from a node context, asserting it is present.

EnsureAnyAddrman

Get the address manager from an opaque RPC context, asserting it is present.

EnsureAnyArgsman

Get the argument manager from an opaque RPC context, asserting it is present.

EnsureAnyBanman

Get the ban manager from an opaque RPC context, asserting it is present.

EnsureAnyChainman

Get the chainstate manager from an opaque RPC context, asserting it is present.

EnsureAnyFeeEstimatorMan

Get the fee estimator from an opaque RPC context, asserting it is present.

EnsureAnyMemPool

Get the mempool from an opaque RPC context, asserting it is present.

EnsureAnyNodeContext

Extract the node context from an opaque RPC context, asserting it is present.

EnsureArgsman

Get the argument manager from a node context, asserting it is present.

EnsureBanman

Get the ban manager from a node context, asserting it is present.

EnsureChainman

Get the chainstate manager from a node context, asserting it is present.

EnsureConnman

Get the connection manager from a node context, asserting it is present.

EnsureFeeEstimatorMan

Get the fee estimator from a node context, asserting it is present.

EnsureMemPool

Get the mempool from a node context, asserting it is present.

EnsureMining

Get the mining interface from a node context, asserting it is present.

EnsurePeerman

Get the peer manager from a node context, asserting it is present.

EnterCritical

Register that a critical section is being entered, for lock‐order checking.

EntriesAndTxidsDisjoint

Check the intersection between two sets of transactions (a set of mempool entries and a set of txids) to make sure they are disjoint.

EstimationError

Build a fee rate estimation error result: a zero‐value estimation identifying the estimator and target, alongside the error message.

EvalDescriptorStringOrObject

Evaluate a descriptor given as a string, or as a {"desc":...,"range":...} object, with default range of 1000.

EvalScript

EvalScript overloads

EvaluateSequenceLocks

Checks whether previously computed sequence locks are satisfied by a block.

ExecuteHTTPRPC

Execute a single HTTP request containing one or more JSONRPC requests. Specified jreq will be modified and status will be returned.

ExtractDestination

Parse a scriptPubKey for the destination.

FatalError

Report an unrecoverable error, flag the validation state as failed, and notify the node to shut down.

FeeRateEstimationRef

Return the estimation carried by a fee rate estimate result: the successful estimation, or the error's zero‐value estimation.

FeeRateEstimatorTypeFromString

Parse a fee rate estimator type from its canonical string name.

FeeRateEstimatorTypeToString

Convert a fee rate estimator type to its canonical string name.

FileCommit

Ensure file contents are fully committed to disk, using a platform‐specific feature analogous to fsync().

FinalizeAndExtractPSBT

Finalizes a PSBT if possible, and extracts it to a CMutableTransaction if it could be finalized.

FinalizePSBT

Finalizes a PSBT if possible, combining partial signatures.

FindAndDelete

Remove every occurrence of a subscript from a script in place.

FindFirst

Return the first element of a vector matching a predicate.

ForEachBlockFilterIndex

Iterate over all running block filter indexes, invoking fn on each.

FormatAllOutputTypes

Return a comma‐separated list of all supported output type names.

FormatFullVersion

Returns the full client version string, including build metadata.

FormatHDKeypath

Format an HD keypath as a string, prefixed with the master key marker "m".

FormatISO8601Date

Format a Unix timestamp as an ISO 8601 date string.

FormatISO8601DateTime

ISO 8601 formatting is preferred. Use the FormatISO8601{DateTime,Date} helper functions if possible.

FormatMoney

Format an amount as a string denoted in full coins.

FormatOutputType

Return the string name of an output type.

FormatParagraph

Format a paragraph of text to a fixed width, adding spaces for indentation to any added line.

FormatRFC1123DateTime

RFC1123 formatting https://www.rfc‐editor.org/rfc/rfc1123#section‐5.2.14 Used in HTTP/1.1 responses

FormatScript

Format a script as a compact single‐line string for logging and display.

FormatSubVersion

Formats a BIP14‐style user agent subversion string.

GenerateAuthCookie

Generate a new RPC authentication cookie and write it to disk

GenerateRandomKey

Generate a new random private key.

GetAllOutputTypes

Gets all existing output types formatted for RPC help sections.

GetAuthCookie

Read the RPC authentication cookie from disk

GetBindAddress

Get the bind address for a socket as CService.

GetBitsProof

Compute how much work an nBits value corresponds to.

GetBlockFilterIndex

Get a block filter index by type. Returns nullptr if index has not been initialized or was already destroyed.

GetBlockProof

GetBlockProof overloads

GetBlockProofEquivalentTime

Return the time it would take to redo the work difference between from and to, assuming the current hashrate corresponds to the difficulty at tip, in seconds.

GetBlockScriptFlags

Return the script flags which should be checked for a given block.

GetBlockSubsidy

Compute the block subsidy (newly created coins) for a block at a given height.

GetBuriedDeployment

Looks up a buried deployment by its name.

GetDefaultDataDir

Get the default data directory for the current platform and user.

GetDescriptorChecksum

Get the checksum for a descriptor.

GetDifficulty

Get the difficulty of the net wrt to the given block index.

GetDust

Get the vout index numbers of all dust outputs

GetDustThreshold

Compute the minimum output value below which an output is considered dust.

GetEntriesForConflicts

Get all descendants of iters_conflicting. Checks that there are no more than MAX_REPLACEMENT_CANDIDATES distinct clusters affected.

GetFileSize

Get the size of a file by scanning it.

GetKeyForDestination

Return the CKeyID of the key involved in a script (if there is a unique one).

GetLegacySigOpCount

Count ECDSA signature operations the old‐fashioned (pre‐0.6) way

GetListenPort

Return the port we listen on for incoming connections.

GetLocalAddrForPeer

Returns a local address that we should advertise to this peer.

GetLocalAddress

Return the best local address to use when talking to the given peer.

GetLocalAddresses

Return all local non‐loopback IPv4 and IPv6 network addresses.

GetLocator

Get a locator for a block index entry.

GetMockTime

For testing.

GetNameProxy

Get the configured name proxy, if any.

GetNetworkForMagic

Determines which chain a set of network magic bytes belongs to.

GetNetworkName

Get the canonical name of a network.

GetNetworkNames

Return a vector of publicly routable Network names; optionally append NET_UNROUTABLE.

GetNextWorkRequired

Compute the proof‐of‐work target (nBits) required for the block following pindexLast.

GetNumCores

Return the number of cores available on the current system.

GetOpName

Returns the mnemonic name of an opcode.

GetP2SHSigOpCount

Count ECDSA signature operations in pay‐to‐script‐hash inputs.

GetPackageHash

Get the hash of the concatenated wtxids of transactions, with wtxids treated as a little‐endian numbers and sorted in ascending numeric order.

GetProxy

Get the proxy configured for a given network, if any.

GetPruneHeight

Return height of highest block that has been pruned, or std::nullopt if no blocks have been pruned

GetQueryParameterFromUri

Extract a query‐string parameter value from a request URI.

GetRandBytes

Generate random data via the internal PRNG.

GetRandHash

Generate a random uint256.

GetScriptFlagNames

List the human‐readable names of the set verification flags.

GetScriptForDestination

Generate a Bitcoin scriptPubKey for the given CTxDestination. Returns a P2PKH script for a CKeyID destination, a P2SH script for a CScriptID, and an empty script for CNoDestination.

GetScriptForMultisig

Generate a multisig script.

GetScriptForRawPubKey

Generate a P2PK script for the given pubkey.

GetScriptOp

Reads the next opcode, and any pushed data, from a script.

GetSecp256k1SignContext

Access the secp256k1 context used for signing and MuSig2 nonce generation.

GetSerializeSize

Return the number of bytes the serialization of an object would occupy.

GetSigOpsAdjustedWeight

Adjust a transaction weight to account for its signature operation cost.

GetSizeOfCompactSize

Compact Size size < 253 ‐‐ 1 byte size <= USHRT_MAX ‐‐ 3 bytes (253 + 2 bytes) size <= UINT_MAX ‐‐ 5 bytes (254 + 4 bytes) size > UINT_MAX ‐‐ 9 bytes (255 + 8 bytes)

GetSizeOfVarInt

Return the number of bytes the VarInt encoding of a value occupies.

GetSpecialScriptSize

Returns the decompressed byte length of a special (compressed) script.

GetStrongRandBytes

Gather entropy from various sources, feed it into the internal PRNG, and generate random data using it.

GetTarget

* Get the target for a given block index.

GetTime

GetTime overloads

GetTransactionSigOpCost

Compute total signature operation cost of a transaction.

GetTxnOutputType

Get the name of a TxoutType as a string

GetUptime

Monotonic uptime (not affected by system time changes).

GetVirtualTransactionInputSize

Compute the virtual size of a single transaction input.

GetVirtualTransactionSize

GetVirtualTransactionSize overloads

GetWitnessCommitmentIndex

Compute at which vout of the block's coinbase transaction the witness commitment occurs, or ‐1 if not found

GolombRiceDecode

Golomb‐Rice decode a value from a bit stream.

GolombRiceEncode

Golomb‐Rice encode a value into a bit stream.

HasHardenedDerivation

Whether a parsed HD keypath contains at least one hardened derivation step.

HasTestOption

Checks if a particular test option is present in ‐test command‐line arg options

HasValidProofOfWork

Check that the proof of work on each blockheader matches the value in nBits.

Hash

Hash overloads

Hash160

Compute the 160‐bit hash an object.

HaveNameProxy

Check whether a name proxy has been configured.

HelpExampleCli

Format a bitcoin‐cli example invocation with positional arguments.

HelpExampleCliNamed

Format a bitcoin‐cli example invocation with named arguments.

HelpExampleRpc

Format a JSON‐RPC example request with positional arguments.

HelpExampleRpcNamed

Format a JSON‐RPC example request with named arguments.

HelpMessageGroup

Format a string to be used as group of options in help messages

HelpMessageOpt

Format a string to be used as option description in help messages

HelpRequested

Return whether the user asked for help on the command line.

HexDigit

Return the numeric value of a hexadecimal digit character.

HexStr

HexStr overloads

HexToPubKey

Parse a hex‐encoded public key, throwing an RPC error if it is invalid.

IOErrorIsPermanent

Check whether a socket error code represents a permanent failure.

ImprovesFeerateDiagram

The replacement transaction must improve the feerate diagram of the mempool.

InferDescriptor

Find a descriptor for the specified script, using information from provider where possible.

InferTaprootTree

Given a TaprootSpendData and the output key, reconstruct its script tree.

InitBlockFilterIndex

Initialize a block filter index for the given type if one does not already exist. Returns true if a new index is created and false if one has already been initialized.

InitContext

Initialize node context shutdown and args variables.

InitError

InitError overloads

InitHTTPServer

Initialize HTTP server. Call this before RegisterHTTPHandler or EventBase().

InitLogging

Initialize the logging infrastructure

InitParameterInteraction

Parameter interaction: change current parameters depending on various rules

InitWarning

Show warning message

Interpret

Map an IP address to its Autonomous System Number using the given asmap.

InterpretKey

Split a raw configuration key into its section, name, and negation.

InterpretPermString

Interpret a custom permissions level string as fs::perms

InterpretValue

Interpret a raw configuration value according to a key and its flags.

Interrupt

Interrupt threads

InterruptHTTPRPC

Interrupt HTTP RPC subsystem.

InterruptHTTPServer

Interrupt HTTP server threads

InterruptMapPort

Signal the port mapping thread to stop as soon as possible.

InterruptREST

Interrupt RPC REST subsystem.

InterruptRPC

Interrupt the RPC service, unblocking any pending waits.

IsBIP30Repeat

Identifies blocks that overwrote an existing coinbase output in the UTXO set (see BIP30).

IsBIP30Unspendable

Identifies blocks which coinbase output was subsequently overwritten in the UTXO set (see BIP30).

IsBadPort

Determine if a port is "bad" from the perspective of attempting to connect to a node on that port.

IsBlockMutated

Check if a block has been mutated (with respect to its merkle root and witness commitments).

IsChildWithParents

Context‐free check that a package is exactly one child and its parents; not all parents need to be present, but the package must not contain any transactions that are not the child's parents. It is expected to be sorted, which means the last transaction must be the child.

IsChildWithParentsTree

Context‐free check that a package IsChildWithParents() and none of the parents depend on each other (the package is a "tree").

IsConsistentPackage

Checks that these transactions don't conflict, i.e., spend the same prevout. This includes checking that there are no duplicate transactions. Since these checks require looking at the inputs of a transaction, returns false immediately if any transactions have empty vin.

IsDeprecatedRPCEnabled

Report whether the given deprecated RPC method is currently enabled.

IsDigit

Tests if the given character is a decimal digit.

IsDirWritable

Check if a directory is writable by creating a temporary file on it.

IsDust

Test whether an output is dust at the given relay fee rate.

IsFinalTx

Check if transaction is final and can be included in a block with the specified height and time. Consensus critical.

IsHex

Returns true if each character in str is a hex character, and has an even number of hex digits.

IsLocal

Return whether the given address is one of our known local addresses.

IsOpSuccess

Test for OP_SUCCESSx opcodes as defined by BIP342.

IsProxy

Check whether an address is one of the configured proxies.

IsPushdataOp

Test whether an opcode is a data‐push operation.

IsRBFOptIn

Determine whether an unconfirmed transaction is signaling opt‐in to RBF according to BIP 125 This involves checking sequence numbers of the transaction, as well as the sequence numbers of all in‐mempool ancestors.

IsRBFOptInEmptyMempool

Determine the RBF signaling state of a transaction assuming an empty mempool.

IsRPCRunning

Query whether RPC is running

IsSegWitOutput

Check whether a scriptPubKey is known to be segwit.

IsSpace

Tests if the given character is a whitespace character. The whitespace characters are: space, form‐feed ('f'), newline (' '), carriage return ('r'), horizontal tab ('t'), and vertical tab ('v').

IsStandard

Determine whether a scriptPubKey uses a standard output form.

IsStandardTx

Check for standard transaction types

IsSwitchChar

Return true if the character introduces a command‐line switch.

IsTopoSortedPackage

If any direct dependencies exist between transactions (i.e. a child spending the output of a parent), checks that all parents appear somewhere in the list before their respective children. No other ordering is enforced. This function cannot detect indirect dependencies (e.g. a transaction's grandparent if its parent is not present).

IsUnixSocketPath

Check if a string is a valid UNIX domain socket path

IsValidDestination

Check whether a CTxDestination corresponds to one with an address.

IsValidDestinationString

IsValidDestinationString overloads

IsWellFormedPackage

Context‐free package policy checks: 1. The number of transactions cannot exceed MAX_PACKAGE_COUNT. 2. The total weight cannot exceed MAX_PACKAGE_WEIGHT. 3. If any dependencies exist between transactions, parents must appear before children. 4. Transactions cannot conflict, i.e., spend the same inputs.

IsWitnessStandard

Check if the transaction is over standard P2WSH resources limit: 3600bytes witnessScript size, 80bytes per witness stack element, 100 witness stack elements These limits are adequate for multisignatures up to n‐of‐100 using OP_CHECKSIG, OP_ADD, and OP_EQUAL.

JSONRPCError

Build a JSON‐RPC error object.

JSONRPCExec

Execute an RPC request and return its JSON‐RPC reply.

JSONRPCPSBTError

Build a JSON‐RPC error object for a PSBT error.

JSONRPCProcessBatchReply

Parse JSON‐RPC batch reply into a vector

JSONRPCReplyObj

Build a JSON‐RPC reply object from a result or error.

JSONRPCRequestObj

JSON‐RPC 2.0 request, only used in bitcoin‐cli

JSONRPCTransactionError

Build a JSON‐RPC error object for a transaction error.

KeccakF

The Keccak‐f[1600]permutation.

LargeCoinsCacheThreshold

Compute the coins‐cache usage threshold above which a periodic flush is warranted.

LastCommonAncestor

Find the forking point between two chain tips.

LeaveCritical

Register that the most recently entered critical section is being left.

LicenseInfo

Returns licensing information (for ‐version)

ListBlockFilterTypes

Get a comma‐separated list of known filter type names.

LoadAddrman

Loads the address manager (peers.dat), creating a fresh one if needed.

LocaleIndependentAtoi

Locale‐independent replacement for std::atoi, provided for backwards compatibility reasons.

LocatorEntries

Construct a list of hash entries to put in a locator.

LockStackEmpty

Check whether the current thread holds no tracked critical sections.

LogInstance

Access the global logger instance.

Lookup

Lookup overloads

LookupHost

LookupHost overloads

LookupNumeric

Resolve a service string with a numeric IP to its first corresponding service.

LookupSubNet

Parse and resolve a specified subnet string into the appropriate internal representation.

MakeByteSpan

Return a read‐only span of bytes viewing the same memory as the range v.

MakeExponentiallyDistributed

Given a uniformly random uint64_t, return an exponentially distributed double with mean 1.

MakeTransactionRef

Builds a shared pointer to an immutable transaction from the given value.

MakeTxGraph

Construct a new TxGraph with the specified limit on the number of transactions within a cluster, and on the sum of transaction sizes within a cluster.

MakeUCharSpan

Like the std::span constructor, but for (const) unsigned char member types only. Only works for (un)signed char containers.

MakeWritableByteSpan

Return a writable span of bytes viewing the same memory as the range v.

MakeWritableUCharSpan

Like MakeUCharSpan, but returns a writable span of unsigned char.

MatchMultiA

Determine if script is a "multi_a" script. Returns (threshold, keyspans) if so, and nullopt otherwise. The keyspans refer to bytes in the passed script.

MaybeCheckNotHeld

MaybeCheckNotHeld overloads

MaybeFlipIPv6toCJDNS

If an IPv6 address belongs to the address range used by the CJDNS network and the CJDNS network is reachable (‐cjdnsreachable config is set), then change the type from NET_IPV6 to NET_CJDNS.

MaybeMigrateLegacyFeeEstimates

Move a legacy fee_estimates.dat file to the current block policy fee estimator path, if needed.

MempoolInfoToJSON

Mempool information to JSON

MempoolPolicyEstimatorPath

Path of the mempool policy estimator data file.

MempoolToJSON

Mempool to JSON

MessageHash

Hashes a message for signing and verification in a manner that prevents inadvertently signing a transaction.

MessageSign

Sign a message.

MessageVerify

Verify a signed message.

MillisToTimeval

Convert milliseconds to a struct timeval for e.g. select.

MoneyRange

Returns true when the amount is non‐negative and does not exceed MAX_MONEY.

MuSig2AggregatePubkeys

MuSig2AggregatePubkeys overloads

MuSig2SessionID

Computes an arbitrary unique session ID to identify ongoing signing sessions. It is the SHA256 of the signing (aggregate) pubkey, the participant pubkey, the sighash, and the pubnonce

MurmurHash3

Computes the 32‐bit MurmurHash3 of the given data.

NATPMPRequestPortMap

Try to open a port using RFC 6886 NAT‐PMP. IPv4 only.

NetworkErrorString

Return readable error string for a network error code.

NextEmptyBlockIndex

Return an empty block index on top of the tip, with height, time and nBits set

NormalizeOutputs

Normalize univalue‐represented outputs

Now

Return the current time point cast to the given precision. Only use this when an exact precision is needed, otherwise use T::clock::now() directly.

OnionToString

Encode a raw Tor v3 address as its human‐readable .onion string.

OutputTypeFromDestination

Get the OutputType for a CTxDestination

PCPRequestPortMap

Try to open a port using RFC 6887 Port Control Protocol (PCP). Handles IPv4 and IPv6.

PSBTInputSigned

Checks whether a PSBTInput is already signed by checking for non‐null finalized fields.

PSBTInputSignedAndVerified

Checks whether a PSBTInput is already signed by doing script verification using final fields.

PSBTRoleName

Return a human‐readable name for a PSBT role.

PackageTRUCChecks

Must be called for every transaction that is submitted within a package, even if not TRUC.

Params

Return the currently selected parameters. This won't change after app startup, except for unit tests.

Parse

Parse a descriptor string. Included private keys are put in out.

ParseByteUnits

Parse a string with suffix unit [k|K|m|M|g|G|t|T]. Must be a whole integer, fractions not allowed (0.5t), no whitespace or +‐ Lowercase units are 1000 base. Uppercase units are 1024 base. Examples: 2m,27M,19g,41T

ParseConfirmTarget

Parse a confirm target option and raise an RPC error if it is invalid.

ParseDataFormat

Parse a URI to get the data format and URI without data format and query string.

ParseDescriptorRange

Parse a JSON range specified as an int64 or as a [int64, int64]pair.

ParseFeeRate

Parse a json number or string, denoting BTC/kvB, into a CFeeRate (sat/kvB). Reject negative values or rates larger than 1BTC/kvB.

ParseFixedPoint

Parse number as fixed point according to JSON number syntax.

ParseHDKeypath

Parse an HD keypaths like "m/7/0'/2000".

ParseHashO

Parse a hex‐encoded hash from a named field of an object.

ParseHashV

Parse a hex‐encoded hash from a UniValue, throwing an RPC error if it is not valid hex.

ParseHex

Like TryParseHex, but returns an empty vector on invalid input.

ParseHexO

Parse a hex‐encoded byte vector from a named field of an object.

ParseHexV

Parse a hex‐encoded byte vector from a UniValue, throwing an RPC error if it is not valid hex.

ParseISO8601DateTime

Parse an ISO 8601 date and time string into a Unix timestamp.

ParseKeyPathElement

Parse a single key path element like "0", "0'", or "0h". Returns the derivation index and hardened status, or an error message.

ParseMoney

Parse an amount denoted in full coins. E.g. "0.0034" supplied on the command line.

ParseNetwork

Parse a network name into its Network enumerator.

ParseOutputType

Parse an output type from its string name.

ParseOutputs

Parse normalized outputs into destination, amount tuples

ParsePathBIP32

Parse a BIP32 derivation path.

ParsePrevouts

Parse a prevtxs UniValue array and get the map of coins from it

ParseScript

Parse a human‐readable script (opcodes and push data) into a CScript.

ParseSighashString

Parse a sighash string representation and raise an RPC error if it is invalid.

ParseVerbosity

Parses verbosity from provided UniValue.

PaysForRBF

The replacement transaction must pay more fees than the original transactions. The additional fees must pay for the replacement's bandwidth at or above the incremental relay feerate.

PermittedDifficultyTransition

Return false if the proof‐of‐work requirement specified by new_nbits at a given height is not possible, given the proof‐of‐work on the prior block as specified by old_nbits.

PermsToSymbolicString

Convert fs::perms to symbolic string of the form 'rwxrwxrwx'

PreCheckEphemeralTx

Called for each transaction once transaction fees are known. Does context‐less checks about a single transaction.

PrecomputePSBTData

Compute a PrecomputedTransactionData object from a psbt.

PrintExceptionContinue

Log an exception and its originating thread without rethrowing.

ProcessNewPackage

Validate (and maybe submit) a package to the mempool. See doc/policy/packages.md for full details on package validation rules.

ProduceSignature

Produce a script signature using a generic signature creator.

ProtectEvictionCandidatesByRatio

Protect desirable or disadvantaged inbound peers from eviction by ratio.

PruneBlockFilesManual

Prune block files up to a given height.

PushWarnings

PushWarnings overloads

QueryDefaultGateway

Query the OS for the default gateway for network. This only makes sense for NET_IPV4 and NET_IPV6. Returns std::nullopt if it cannot be found, or there is no support for this OS.

RIPEMD160

Compute the 160‐bit RIPEMD‐160 hash of an array.

RPCConvertNamedValues

Convert named arguments to command‐specific RPC representation

RPCConvertValues

Convert positional arguments to command‐specific RPC representation

RPCErrorFromTransactionError

Map a transaction error to the matching RPC error code.

RPCIsInWarmup

Report whether the RPC server is still warming up.

RPCTypeCheckObj

Check that an object contains the expected keys with the expected value types.

RaiseFileDescriptorLimit

Try to raise the file descriptor limit to the requested number.

RandAddDynamicEnv

Gather non‐cryptographic environment data that changes over time.

RandAddEvent

Gathers entropy from the low bits of the time at which events occur. Should be called with a uint32_t describing the event at the time an event occurs.

RandAddPeriodic

Gather entropy from various expensive sources, and feed them to the PRNG state.

RandAddStaticEnv

Gather non‐cryptographic environment data that does not change over time.

RandomInit

Initialize global RNG state and log any CPU features that are used.

Random_SanityCheck

Check that OS randomness is available and returning the requested number of bytes.

ReadAnchors

Read the anchor IP address database (anchors.dat)

ReadBE16

Read a big‐endian 16‐bit integer from a byte buffer.

ReadBE32

Read a big‐endian 32‐bit integer from a byte buffer.

ReadBE64

Read a big‐endian 64‐bit integer from a byte buffer.

ReadBinaryFile

Read full contents of a file and return them in a std::string.

ReadCompactSize

Decode a CompactSize‐encoded variable‐length integer.

ReadFromStream

Reads peer addresses from a stream into the address manager.

ReadLE16

Read a little‐endian 16‐bit integer from a byte buffer.

ReadLE32

Read a little‐endian 32‐bit integer from a byte buffer.

ReadLE64

Read a little‐endian 64‐bit integer from a byte buffer.

ReadVarInt

Read a VarInt‐encoded value from a stream.

RecursiveDynamicUsage

Recursively measure the dynamic memory used by the pointee of a shared pointer.

RegisterBlockchainRPCCommands

Register the blockchain RPC commands.

RegisterFeeRPCCommands

Register the fee‐estimation RPC commands.

RegisterHTTPHandler

Register handler for prefix. If multiple handlers match a prefix, the first‐registered one will be invoked.

RegisterMempoolRPCCommands

Register the mempool RPC commands.

RegisterMiningRPCCommands

Register the mining RPC commands.

RegisterNetRPCCommands

Register the network RPC commands.

RegisterNodeRPCCommands

Register the node RPC commands.

RegisterOutputScriptRPCCommands

Register the output‐script RPC commands.

RegisterRawTransactionRPCCommands

Register the raw‐transaction RPC commands.

RegisterSignMessageRPCCommands

Register the message‐signing RPC commands.

RegisterSignerRPCCommands

Register the external‐signer RPC commands.

RegisterTxoutProofRPCCommands

Register the txout‐proof RPC commands.

RegisterZMQRPCCommands

Register the ZMQ‐related RPC commands.

ReleaseDirectoryLocks

Release all directory locks. This is used for unit testing only, at runtime the global destructor will take care of the locks.

RemovalReasonToString

Convert a mempool removal reason to a human‐readable string.

RemoveLocal

Forget a previously recorded local address.

RemoveUnnecessaryTransactions

Reduces the size of the PSBT by dropping unnecessary non_witness_utxos (i.e. complete previous transactions) from a psbt when all inputs are segwit v1.

RenameOver

Rename src to dest.

RpcInterruptionPoint

Throw JSONRPCError if RPC is not running

RunCommandParseJSON

Execute a command which returns JSON, and parse the result.

SHA256AutoDetect

Autodetect the best available SHA256 implementation. Returns the name of the implementation.

SHA256D64

Compute multiple double‐SHA256's of 64‐byte blobs. output: pointer to a blocks*32 byte output buffer input: pointer to a blocks*64 byte input buffer blocks: the number of hashes to compute.

SHA256Uint256

Single‐SHA256 a 32‐byte input (represented as uint256).

SanitizeString

Remove unsafe chars. Safe chars chosen to allow simple messages/URLs/email addresses, but avoid anything even possibly remotely dangerous like & or >

SanityCheckAsmap

Check that the asmap is well formed for the given address size.

SaturatingAdd

Add two integers, saturating instead of overflowing.

SaturatingLeftShift

Left bit shift with safe minimum and maximum values.

ScheduleBatchPriority

On platforms that support it, tell the kernel the calling thread is CPU‐intensive and non‐interactive. See SCHED_BATCH in sched(7) for details.

ScriptErrorString

Returns a human‐readable message describing a script error code.

ScriptFlagNamesToEnum

Return the mapping from verification flag names to their enum values.

ScriptPubKeyDoc

Return the standard result documentation for a scriptPubKey object.

ScriptToAsmStr

Render a script as a human‐readable assembly string.

ScriptToUniv

Fill a JSON object with a human‐readable description of a script.

SeedsAssumedServiceFlags

Service flags we assume for addresses obtained from the DNS seeds and the fixed seeds, which don't come with service flags attached. BIP324 support can be safely assumed because the vast majority of listening nodes signals NODE_P2P_V2, and if the assumption is wrong for a given peer we simply reconnect using v1 transport.

SeedsServiceFlags

State independent service flags. If the return value is changed, contrib/seeds/makeseeds.py should be updated appropriately to filter for nodes with desired service flags (compatible with our new flags).

SeenLocal

Mark a local address as having been seen, returning whether it was already known.

SelectBaseParams

Sets the params returned by Params() to those for the given chain.

SelectNodeToEvict

Select an inbound peer to evict after filtering out (protecting) peers having distinct, difficult‐to‐forge characteristics. The protection logic picks out fixed numbers of desirable peers per various criteria, followed by (mostly) ratios of desirable or disadvantaged peers. If any eviction candidates remain, the selection logic chooses a peer to evict.

SelectParams

Sets the params returned by Params() to those for the given chain type.

SequenceLocks

Check if transaction is final per BIP 68 sequence numbers and can be included in a block. Consensus critical. Takes as input a list of heights at which tx's inputs (in order) confirmed.

Serialize

Serialize overloads

SerializeHDKeypath

Serialize a length‐prefixed KeyOriginInfo to a stream.

SerializeHDKeypaths

Serialize a map of HD keypaths to a stream under the given key type.

SerializeKeyOrigin

Serialize a KeyOriginInfo to a stream.

SerializeMany

Serialize several objects in sequence to the same stream.

SerializeToVector

Serialize arguments as a length‐prefixed vector into a stream.

SerializeTransaction

Writes a transaction to a stream, optionally including witness data.

SetMockTime

SetMockTime overloads

SetNameProxy

Set the name proxy to use for all connections to nodes specified by a hostname. After setting this proxy, connecting to a node specified by a hostname won't result in a local lookup of said hostname, rather, connect to the node by asking the name proxy for a proxy connection to the hostname, effectively delegating the hostname lookup to the specified proxy.

SetProxy

Set the proxy used to reach a given network.

SetRPCWarmupFinished

Mark warmup as done. RPC calls will be processed from now on.

SetRPCWarmupStarting

Enter the warmup state so RPC calls report that the node is starting up.

SetRPCWarmupStatus

Set the RPC warmup status. When this is done, all RPC calls will error out immediately with RPC_IN_WARMUP.

SettingTo

SettingTo overloads

SettingToBool

SettingToBool overloads

SettingToString

SettingToString overloads

SetupChainParamsBaseOptions

Set the arguments for chainparams

SetupEnvironment

Initialize locale, standard streams, and other process‐wide environment settings.

SetupHelpOptions

Add help options to the args manager

SetupNetworking

Initialize networking support for the current platform.

SetupServerArgs

Register all arguments with the ArgsManager

ShellEscape

Quote and escape a string so it can be safely passed as a single shell argument.

Shutdown

Shut down the node, stopping threads and releasing resources.

ShutdownRequested

Return whether node shutdown was requested.

SighashFromStr

Parse a signature‐hash type from its textual name.

SighashToStr

Convert a signature‐hash type byte into its textual name.

SignPSBTInput

Signs a PSBTInput, verifying that all provided data matches what is being signed.

SignTransaction

SignTransaction overloads

SignTransactionResultToJSON

Encode the outcome of a signing attempt as a JSON object

SignalsOptInRBF

Check whether the sequence numbers on this transaction are signaling opt‐in to replace‐by‐fee, according to BIP 125. Allow opt‐out of transaction replacement by setting nSequence > MAX_BIP125_RBF_SEQUENCE (SEQUENCE_FINAL‐2) on all inputs.

SignatureHash

Compute the signature hash for one input under the selected signature version.

SignatureHashSchnorr

Compute the BIP341 Taproot signature hash for one input.

SigningResultString

Return a human‐readable description of a signing result.

SingleTRUCChecks

Must be called for every transaction, even if not TRUC. Not strictly necessary for transactions accepted through AcceptMultipleTransactions.

Socks5

Connect to a specified destination service through an already connected SOCKS5 proxy.

Solver

Parse a scriptPubKey and identify script type for standard scripts. If successful, returns script type and parsed pubkeys or hashes, depending on the type. For example, for a P2SH script, vSolutionsRet will contain the script hash, for P2PKH it will contain the key hash, etc.

SpanPopBack

Pop the last element off a span, and return a reference to that element.

SpendsNonAnchorWitnessProg

Check whether this transaction spends any witness program but P2A, including not‐yet‐defined ones. May return false early for consensus‐invalid transactions.

SplitHostPort

Splits socket address string into host string and port value. Validates port value.

StartHTTPRPC

Start HTTP RPC subsystem. Precondition; HTTP and RPC has been started.

StartHTTPServer

Start HTTP server. This is separate from InitHTTPServer to give users race‐condition‐free time to register their handlers between InitHTTPServer and StartHTTPServer.

StartIndexBackgroundSync

Validates requirements to run the indexes and spawns each index initial sync thread

StartMapPort

Start the port mapping thread that requests a port forward from the gateway.

StartREST

Start HTTP REST subsystem. Precondition; HTTP and RPC has been started.

StartRPC

Start the RPC service so it begins accepting calls.

StateName

Get a string with the state name

StdinReady

Reports whether standard input has data available to read.

StdinTerminal

Reports whether standard input is connected to a terminal.

StopHTTPRPC

Stop HTTP RPC subsystem. Precondition; HTTP and RPC has been stopped.

StopHTTPServer

Stop HTTP server

StopMapPort

Stop the port mapping thread and remove any established port mapping.

StopREST

Stop HTTP REST subsystem. Precondition; HTTP and RPC has been stopped.

StopRPC

Stop the RPC service and release its resources.

StrFormatInternalBug

Format an internal bug report message that includes its source location.

StringForBlockPolicyEstimateReason

Return a human‐readable name for a block policy estimate reason.

StringForFeeEstimateHorizon

Return a human‐readable name for a fee estimate horizon.

SubmitErrorString

Returns a human‐readable description of a task submission error.

SysErrorString

Return system error string from errno value. Use this instead of std::strerror, which is not thread‐safe. For network errors use NetworkErrorString from sock.h instead.

TaggedHash

Return a HashWriter primed for tagged hashes (as specified in BIP 340).

TestBlockValidity

Verify a block, including transactions.

TestLockPointValidity

Test whether the LockPoints height and time are still valid on the current chain

Ticks

Helper to count the seconds of a duration/time_point.

TicksSeconds

Count the whole seconds of a duration as a signed 64‐bit integer.

TicksSinceEpoch

Count the ticks of a time point's duration since the clock epoch.

TimingResistantEqual

Timing‐attack‐resistant comparison. Takes time proportional to length of first argument.

ToByteVector

Copies the bytes of a container into a byte vector.

ToGenTxid

Convert a TX/WITNESS_TX/WTX CInv to a GenTxid.

ToIntegral

Convert string to integral type T. Leading whitespace, a leading +, or any trailing character fail the parsing. The required format expressed as regex is ‐?[0‐9]+ by default (or ‐?[0‐9a‐fA‐F]+ if base = 16). The minus sign is only permitted for signed integer types.

ToKeyID

ToKeyID overloads

ToLower

ToLower overloads

ToScriptID

Convert a script‐hash destination back to a script identifier.

ToUpper

ToUpper overloads

TransactionMerklePath

Compute merkle path to the specified transaction

TransportTypeAsString

Convert TransportProtocolType enum to a string value

TruncateFile

Truncate a file to the given length.

TryCreateDirectories

Create a directory and any missing parent directories.

TryGetTotalRam

Return the total RAM available on the current system, if detectable.

TryParseHex

Parse the hex string into bytes (uint8_t or std::byte). Ignores whitespace. Returns nullopt on invalid input.

TrySub

Subtract j from i in place, only if it does not underflow.

TxDoc

Explain the UniValue "decoded" transaction object, may include extra fields if processed by wallet

TxToUniv

Fill a JSON object with a human‐readable description of a transaction.

UCharCast

UCharCast overloads

UCharSpanCast

Convert a span to a span of [const]unsigned char viewing the same memory.

UintToArith256

Converts a uint256 blob to an arithmetic 256‐bit integer.

UninterruptibleSleep

Sleep for the given duration without responding to interruption.

UnlockDirectory

Release a directory lock previously taken with LockDirectory.

UnregisterHTTPHandler

Unregister handler for prefix.

Unserialize

Unserialize overloads

UnserializeFromVector

Unserialize a length‐prefixed vector of objects from a stream.

UnserializeMany

Unserialize several objects in sequence from the same stream.

UnserializeTransaction

Basic transaction serialization format: ‐ uint32_t version ‐ std::vector<CTxIn> vin ‐ std::vector<CTxOut> vout ‐ uint32_t nLockTime

Untranslated

Mark a bilingual_str as untranslated

UpdateInput

Write the scriptSig and witness from signature data back into an input.

UpdatePSBTOutput

Updates a PSBTOutput with information from provider.

UrlDecode

Decode a percent‐encoded URL string.

UrlEncode

Percent‐encode a string for use in a URL.

Using

Cause serialization/deserialization of an object to be done using a specified formatter class.

ValidateInputsStandardness

Check for standard transaction types

ValueFromAmount

Convert an amount in satoshis into a JSON value denominated in whole coins.

Vector

Construct a vector with the specified elements.

VerifyScript

Verify that an input's scriptSig and witness satisfy the output's scriptPubKey.

WrappedGetAddrInfo

Wrapper for getaddrinfo(3). Do not use directly: call Lookup/LookupHost/LookupNumeric/LookupSubNet.

WriteBE16

Write a 16‐bit integer to a byte buffer in big‐endian order.

WriteBE32

Write a 32‐bit integer to a byte buffer in big‐endian order.

WriteBE64

Write a 64‐bit integer to a byte buffer in big‐endian order.

WriteBinaryFile

Write contents of std::string to a file.

WriteCompactSize

WriteCompactSize overloads

WriteHDKeypath

Write HD keypaths as strings.

WriteLE16

Write a 16‐bit integer to a byte buffer in little‐endian order.

WriteLE32

Write a 32‐bit integer to a byte buffer in little‐endian order.

WriteLE64

Write a 64‐bit integer to a byte buffer in little‐endian order.

WriteVarInt

WriteVarInt overloads

_

Translation marker macro helper: return the literal unchanged at compile time.

assertion_fail [noreturn]

Internal helper. The noreturn enables optimizers to discard invalid paths.

be16toh_internal

Converts a 16‐bit value from big‐endian byte order to host byte order.

be32toh_internal

Converts a 32‐bit value from big‐endian byte order to host byte order.

be64toh_internal

Converts a 64‐bit value from big‐endian byte order to host byte order.

blockToJSON

Block description to JSON

blockheaderToJSON

Block header to JSON

btck_block_check

Perform context‐free validation checks on a btck_Block.

btck_block_copy

Copy a block. Blocks are reference counted, so this just increments the reference count.

btck_block_count_transactions

Count the number of transactions contained in a block.

btck_block_create

Parse a serialized raw block into a new block object.

btck_block_destroy

Destroy the block.

btck_block_get_hash

Calculate and return the hash of a block.

btck_block_get_header

Get the btck_BlockHeader from the block.

btck_block_get_transaction_at

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

Copy a block hash.

btck_block_hash_create

Create a block hash from its raw data.

btck_block_hash_destroy

Destroy the block hash.

btck_block_hash_equals

Check if two block hashes are equal.

btck_block_hash_to_bytes

Serializes the block hash to bytes.

btck_block_header_copy

Copy a btck_BlockHeader.

btck_block_header_create

Create a btck_BlockHeader from serialized data.

btck_block_header_destroy

Destroy the btck_BlockHeader.

btck_block_header_get_bits

Get the nBits difficulty target from btck_BlockHeader.

btck_block_header_get_hash

Get the btck_BlockHash.

btck_block_header_get_nonce

Get the nonce from btck_BlockHeader.

btck_block_header_get_prev_hash

Get the previous btck_BlockHash from btck_BlockHeader. The returned hash is unowned and only valid for the lifetime of the btck_BlockHeader.

btck_block_header_get_timestamp

Get the timestamp from btck_BlockHeader.

btck_block_header_get_version

Get the version from btck_BlockHeader.

btck_block_header_to_bytes

Serializes the btck_BlockHeader to bytes. This is consensus serialization that is also used for the P2P network.

btck_block_read

Reads the block the passed in block tree entry points to from disk and returns it.

btck_block_spent_outputs_copy

Copy a block's spent outputs.

btck_block_spent_outputs_count

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

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

Reads the block spent coins data the passed in block tree entry points to from disk and returns it.

btck_block_to_bytes

Serializes the block through the passed in callback to bytes. This is consensus serialization that is also used for the P2P network.

btck_block_tree_entry_equals

Check if two block tree entries are equal. Two block tree entries are equal when they point to the same block.

btck_block_tree_entry_get_ancestor

Return the ancestor of a btck_BlockTreeEntry at the given height.

btck_block_tree_entry_get_block_hash

Return the block hash associated with a block tree entry.

btck_block_tree_entry_get_block_header

Return the btck_BlockHeader associated with this entry.

btck_block_tree_entry_get_height

Return the height of a certain block tree entry.

btck_block_tree_entry_get_previous

Returns the previous block tree entry in the tree, or null if the current block tree entry is the genesis block.

btck_block_validation_state_copy

Copies the btck_BlockValidationState.

btck_block_validation_state_create

Create a new btck_BlockValidationState.

btck_block_validation_state_destroy

Destroy the btck_BlockValidationState.

btck_block_validation_state_get_block_validation_result

Returns the validation result from an opaque btck_BlockValidationState pointer.

btck_block_validation_state_get_validation_mode

Returns the validation mode from an opaque btck_BlockValidationState pointer.

btck_chain_contains

Return true if the passed in chain contains the block tree entry.

btck_chain_get_by_height

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_height

Return the height of the tip of the chain.

btck_chain_parameters_copy

Copy the chain parameters.

btck_chain_parameters_create

Creates a chain parameters struct with default parameters based on the passed in chain type.

btck_chain_parameters_create_signet

Create a signet chain parameters struct with a user‐provided challenge.

btck_chain_parameters_destroy

Destroy the chain parameters.

btck_chain_parameters_get_consensus_params

Get btck_ConsensusParams from btck_ChainParameters. The returned btck_ConsensusParams pointer is valid only for the lifetime of the btck_ChainParameters object and must not be destroyed by the caller.

btck_chainstate_manager_create

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

Returns the best known currently active chain. Its lifetime is dependent on the chainstate manager. It can be thought of as a view on a vector of block tree entries that form the best chain. The returned chain reference always points to the currently active best chain. However, state transitions within the chainstate manager (e.g., processing blocks) will update the chain's contents. 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_best_entry

Get the btck_BlockTreeEntry whose associated btck_BlockHeader has the most known cumulative proof of work.

btck_chainstate_manager_get_block_tree_entry_by_hash

Retrieve a block tree entry by its block hash.

btck_chainstate_manager_import_blocks

Triggers the start of a reindex if the wipe options were previously set for the chainstate manager. Can also import an array of existing block files selected by the user.

btck_chainstate_manager_options_create

Create options for the chainstate manager.

btck_chainstate_manager_options_destroy

Destroy the chainstate manager options.

btck_chainstate_manager_options_set_database_cache_bytes

Set the total database cache used by the chainstate manager.

btck_chainstate_manager_options_set_wipe_dbs

Sets wipe db in the options. In combination with calling 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

Set the number of available worker threads used during validation.

btck_chainstate_manager_options_update_block_tree_db_in_memory

Sets block tree db in memory in the options.

btck_chainstate_manager_options_update_chainstate_db_in_memory

Sets chainstate db in memory in the options.

btck_chainstate_manager_process_block

Process and validate the passed in block with the chainstate manager. Processing first does checks on the block, and if these passed, saves it to disk. It then validates the block against the utxo set. If it is valid, the chain is extended with it. The return value is not indicative of the block's validity. Detailed information on the validity of the block can be retrieved by registering the block_checked callback in the validation interface.

btck_chainstate_manager_process_block_header

Processes and validates the provided btck_BlockHeader.

btck_coin_confirmation_height

Returns the block height where the transaction that created this coin was included in.

btck_coin_copy

Copy a coin.

btck_coin_destroy

Destroy the coin.

btck_coin_get_output

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

Returns whether the containing transaction was a coinbase.

btck_context_copy

Copy the context.

btck_context_create

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

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

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

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

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

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

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. This must not be called while a logging connection already exists.

btck_logging_disable_category

Disable a specific log category for the global internal logger. This changes a global setting and will override settings for all existing btck_LoggingConnection instances.

btck_logging_enable_category

Enable a specific log category for the global internal logger. This changes a global setting and will override settings for all existing btck_LoggingConnection instances.

btck_logging_set_level_category

Set the log level of the global internal logger. This does not enable the selected categories. Use 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 btck_LoggingConnection instances.

btck_logging_set_options

Set some options for the global internal logger. This changes global settings and will override settings for all existing btck_LoggingConnection instances.

btck_precomputed_transaction_data_copy

Copy precomputed transaction data.

btck_precomputed_transaction_data_create

Create precomputed transaction data for script verification.

btck_precomputed_transaction_data_destroy

Destroy the precomputed transaction data.

btck_script_pubkey_copy

Copy a script pubkey.

btck_script_pubkey_create

Create a script pubkey from serialized data.

btck_script_pubkey_destroy

Destroy the script pubkey.

btck_script_pubkey_to_bytes

Serializes the script pubkey through the passed in callback to bytes.

btck_script_pubkey_verify

Verify if the input at input_index of tx_to spends the script pubkey under the constraints specified by flags. If the btck_ScriptVerificationFlags_WITNESS flag is set in the flags bitfield, the amount parameter is used. If the taproot flag is set, the precomputed data must contain the spent outputs.

btck_set_mock_time

Override the current time with a fixed timestamp for testing.

btck_transaction_check

Run context‐free consensus validation on a btck_Transaction.

btck_transaction_copy

Copy a transaction. Transactions are reference counted, so this just increments the reference count.

btck_transaction_count_inputs

Get the number of inputs of a transaction.

btck_transaction_count_outputs

Get the number of outputs of a transaction.

btck_transaction_create

Create a new transaction from the serialized data.

btck_transaction_destroy

Destroy the transaction.

btck_transaction_get_input_at

Get the transaction input at the provided index. The returned transaction input is not owned and depends on the lifetime of the transaction.

btck_transaction_get_locktime

Get a transaction's nLockTime value.

btck_transaction_get_output_at

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_get_txid

Get the txid of a transaction. The returned txid is not owned and depends on the lifetime of the transaction.

btck_transaction_input_copy

Copy a transaction input.

btck_transaction_input_destroy

Destroy the transaction input.

btck_transaction_input_get_out_point

Get the transaction out point. The returned transaction out point is not owned and depends on the lifetime of the transaction.

btck_transaction_input_get_script_sig

Serialize the script sig of a transaction input through the passed in callback.

btck_transaction_input_get_sequence

Get a transaction input's nSequence value.

btck_transaction_input_get_witness_stack

Get the witness stack of a transaction input. The returned witness stack is not owned and depends on the lifetime of the transaction input.

btck_transaction_out_point_copy

Copy a transaction out point.

btck_transaction_out_point_destroy

Destroy the transaction out point.

btck_transaction_out_point_get_index

Get the output position from the transaction out point.

btck_transaction_out_point_get_txid

Get the txid from the transaction out point. The returned txid is not owned and depends on the lifetime of the transaction out point.

btck_transaction_output_copy

Copy a transaction output.

btck_transaction_output_create

Create a transaction output from a script pubkey and an amount.

btck_transaction_output_destroy

Destroy the transaction output.

btck_transaction_output_get_amount

Get the amount in the output.

btck_transaction_output_get_script_pubkey

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

Copy a transaction's spent outputs.

btck_transaction_spent_outputs_count

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

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

Serializes the transaction through the passed in callback to bytes. This is consensus serialization that is also used for the P2P network.

btck_tx_validation_state_create

Create a new btck_TxValidationState.

btck_tx_validation_state_destroy

Destroy the btck_TxValidationState.

btck_tx_validation_state_get_tx_validation_result

Returns the validation result from an opaque btck_TxValidationState pointer.

btck_tx_validation_state_get_validation_mode

Returns the validation mode from an opaque btck_TxValidationState pointer.

btck_txid_copy

Copy a txid.

btck_txid_destroy

Destroy the txid.

btck_txid_equals

Check if two txids are equal.

btck_txid_to_bytes

Serializes the txid to bytes.

btck_witness_stack_copy

Copy a witness stack.

btck_witness_stack_count_items

Return the number of items in a witness stack.

btck_witness_stack_destroy

Destroy the witness stack.

btck_witness_stack_get_item_at

Serialize a witness stack item at a given index through the passed in callback.

count_microseconds

Return the whole‐microsecond count of a microseconds duration.

count_milliseconds

Return the whole‐millisecond count of a milliseconds duration.

count_seconds

Return the whole‐second count of a seconds duration.

htobe16_internal

Converts a 16‐bit value from host byte order to big‐endian byte order.

htobe32_internal

Converts a 32‐bit value from host byte order to big‐endian byte order.

htobe64_internal

Converts a 64‐bit value from host byte order to big‐endian byte order.

htole16_internal

Converts a 16‐bit value from host byte order to little‐endian byte order.

htole32_internal

Converts a 32‐bit value from host byte order to little‐endian byte order.

htole64_internal

Converts a 64‐bit value from host byte order to little‐endian byte order.

inline_assertion_check

Helper for Assert()/Assume().

inline_check_non_fatal

Helper for CHECK_NONFATAL().

internal_bswap_16

Reverses the byte order of a 16‐bit value.

internal_bswap_32

Reverses the byte order of a 32‐bit value.

internal_bswap_64

Reverses the byte order of a 64‐bit value.

le16toh_internal

Converts a 16‐bit value from little‐endian byte order to host byte order.

le32toh_internal

Converts a 32‐bit value from little‐endian byte order to host byte order.

le64toh_internal

Converts a 64‐bit value from little‐endian byte order to host byte order.

make_secure_unique

Constructs an object of type T in secure memory and returns owning pointer.

memory_cleanse

Secure overwrite a buffer (possibly containing secret data) with zero‐bytes. The write operation will not be optimized out by the compiler.

noui_InitMessage

Non‐GUI handler, which only logs a message.

noui_ThreadSafeMessageBox

Non‐GUI handler, which logs and prints messages.

noui_ThreadSafeQuestion

Non‐GUI handler, which logs and prints questions.

noui_connect

Connect all bitcoind signal handlers

noui_reconnect

Reconnects the regular Non‐GUI handlers after having used noui_test_redirect

noui_test_redirect

Redirect all bitcoind signal handlers to LogInfo. Used to check or suppress output during test runs that produce expected errors

operator""_GiB

Conversion of GiB to bytes.

operator""_MiB

Conversion of MiB to bytes.

operator&

Bitwise conjunction operators

operator*

Multiplication operators

operator+

Addition operators

operator‐

Subtraction operators

operator/

Returns the quotient of two big integers.

operator>>

Returns the value shifted right by a number of bits.

operatorˆ

Returns the bitwise XOR of two big integers.

operator|

Bitwise disjunction operators

operator~

Bitwise complement of a single flag name.

ser_readdata16

Read a 16‐bit little‐endian integer from a stream and convert it to host byte order.

ser_readdata32

Read a 32‐bit little‐endian integer from a stream and convert it to host byte order.

ser_readdata32be

Read a 32‐bit big‐endian integer from a stream and convert it to host byte order.

ser_readdata64

Read a 64‐bit little‐endian integer from a stream and convert it to host byte order.

ser_readdata8

Read a byte from a stream.

ser_writedata16

Write a 16‐bit integer to a stream in little‐endian byte order.

ser_writedata32

Write a 32‐bit integer to a stream in little‐endian byte order.

ser_writedata32be

Write a 32‐bit integer to a stream in big‐endian byte order.

ser_writedata64

Write a 64‐bit integer to a stream in little‐endian byte order.

ser_writedata8

Write a byte to a stream.

serviceFlagsToStr

Convert service flags (a bitmask of NODE_*) to human readable strings. It supports unknown service flags which will be returned as "UNKNOWN[...]".

swap

swap overloads

zmqError

Log a ZMQ error together with the underlying libzmq error message.

operator<<

Returns the value shifted left by a number of bits.

operator==

Equality operators

operator<

Less‐than operators

operator<=

Check whether the first feerate is lower than or equal to the second.

operator>

Greater‐than operators

operator>=

Check whether the first feerate is higher than or equal to the second.

operator<=>

Three‐way comparison operators

Variables

Name

Description

ACCEPTABLE_COST

How much linearization cost required for TxGraph clusters to have "acceptable" quality, if they cannot be optimally linearized with less cost.

ADDRMAN_HORIZON

How old addresses can maximally be

ADDRMAN_MAX_FAILURES

How many successive failures are allowed ...

ADDRMAN_MIN_FAIL

... in at least this duration

ADDRMAN_NEW_BUCKETS_PER_ADDRESS

Maximum number of times an address can occur in the new table

ADDRMAN_NEW_BUCKETS_PER_SOURCE_GROUP

Over how many buckets entries with new addresses originating from a single group are spread

ADDRMAN_REPLACEMENT

How recent a successful connection should be before we allow an address to be evicted from tried

ADDRMAN_RETRIES

After how many failed attempts we give up on a new node

ADDRMAN_SET_TRIED_COLLISION_SIZE

The maximum number of tried addr collisions to store

ADDRMAN_TEST_WINDOW

The maximum time we'll spend trying to resolve a tried table collision

ADDRMAN_TRIED_BUCKETS_PER_GROUP

Over how many buckets entries with tried addresses from a single group (/16 for IPv4) are spread

ADDR_CJDNS_SIZE

Size of CJDNS address (in bytes).

ADDR_I2P_SIZE

Size of I2P address (in bytes).

ADDR_INTERNAL_SIZE

Size of "internal" (NET_INTERNAL) address (in bytes).

ADDR_IPV4_SIZE

Size of IPv4 address (in bytes).

ADDR_IPV6_SIZE

Size of IPv6 address (in bytes).

ADDR_PREFIX_IPC

Prefix for unix domain socket addresses (which are local filesystem paths)

ADDR_PREFIX_UNIX

Prefix for unix domain socket addresses (which are local filesystem paths)

ADDR_TORV3_SIZE

Size of TORv3 address (in bytes). This is the length of just the address as used in BIP155, without the checksum and the version byte.

AES256_KEYSIZE

Size of an AES‐256 key, in bytes.

AES_BLOCKSIZE

Size of an AES block, in bytes.

ALL_FEE_ESTIMATE_HORIZONS

All fee estimate horizons, in increasing order of half‐life.

ALL_NET_MESSAGE_TYPES

All known message types (see above). Keep this in the same order as the list of messages above.

ALWAYS_FALSE

Always‐false variable template used to make static_assert dependent on a type.

ANCHOR_BYTES

Witness program for Pay‐to‐Anchor output script type

ANNEX_TAG

Tag for the input annex.

ASMAP_HEALTH_CHECK_INTERVAL

Interval for ASMap Health Check *

BASIC_FILTER_M

Inverse false positive rate M for the basic block filter type.

BASIC_FILTER_P

Golomb‐Rice coding parameter P for the basic block filter type.

BIP0031_VERSION

BIP 0031, pong message, is enabled for all versions AFTER this one

BIP324_SHORTIDS_IMPLEMENTED

Protocol version at which BIP324 short message IDs are implemented.

BIP32_EXTKEY_SIZE

Size in bytes of a BIP32 extended key serialization without the version prefix.

BIP32_EXTKEY_WITH_VERSION_SIZE

Size in bytes of a BIP32 extended key serialization including the version prefix.

BITCOIN_CONF_FILENAME

Default file name of the read‐only configuration file.

BITCOIN_SETTINGS_FILENAME

Default file name of the read‐write settings file.

CACHE_LIFE

Maximum age of a cached fee rate estimate before it is considered stale.

CFCHECKPT_INTERVAL

Interval between compact filter checkpoints. See BIP 157.

CHECKLEVEL_DOC

Documentation for argument 'checklevel'.

CJDNS_PREFIX

All CJDNS addresses start with 0xFC. See https://github.com/cjdelisle/cjdns/blob/master/doc/Whitepaper.md#pulling‐it‐all‐together

CLIENT_VERSION

Numeric client version encoded as 10000_major + 100_minor + build.

CMPCTBLOCKS_VERSION

The compactblocks version we support. See BIP 152.

COIN

The amount of satoshis in one BTC.

COINBASE_MATURITY

Coinbase transaction outputs can only be spent after this number of new blocks (network rule)

CURRENCY_ATOM

One indivisible minimum value unit ("sat").

CURRENCY_UNIT

One formatted currency unit ("BTC").

CaptureMessage

Defaults to CaptureMessageToFile(), but can be overridden by unit tests.

CreateSock

Socket factory. Defaults to CreateSockOS(), but can be overridden by unit tests.

DBCACHE_WARNING_RESERVED_RAM

Reserved non‐dbcache memory usage.

DBWRAPPER_MAX_FILE_SIZE

Maximum size of a single LevelDB SST file.

DBWRAPPER_PREALLOC_KEY_SIZE

Preallocated buffer size, in bytes, for serialized keys.

DBWRAPPER_PREALLOC_VALUE_SIZE

Preallocated buffer size, in bytes, for serialized values.

DEFAULT_ACCEPT_DATACARRIER

Default for ‐datacarrier

DEFAULT_ACCEPT_NON_STD_TXN

Default for ‐acceptnonstdtxn

DEFAULT_ACCEPT_STALE_FEE_ESTIMATES

Whether we allow importing a fee_estimates file older than MAX_FILE_AGE.

DEFAULT_ADDRMAN_CONSISTENCY_CHECKS

Default for ‐checkaddrman

DEFAULT_ANCESTOR_LIMIT

Default for ‐limitancestorcount, max number of in‐mempool ancestors

DEFAULT_BLOCKFILTERINDEX

Default value for the ‐blockfilterindex option (no filter index enabled).

DEFAULT_BLOCKSONLY

Default for blocks only

DEFAULT_BLOCKSONLY_MAX_MEMPOOL_SIZE_MB

Default for ‐maxmempool when blocksonly is set

DEFAULT_BLOCK_MAX_WEIGHT

Default for ‐blockmaxweight, which controls the range of block weights the mining code will create *

DEFAULT_BLOCK_MIN_TX_FEE

Default for ‐blockmintxfee, which sets the minimum feerate for a transaction in blocks created by mining code *

DEFAULT_BLOCK_RECONSTRUCTION_EXTRA_TXN

Default number of non‐mempool transactions to keep around for block reconstruction. Includes orphan, replaced, and rejected transactions.

DEFAULT_BLOCK_RESERVED_WEIGHT

Default for ‐blockreservedweight *

DEFAULT_BYTES_PER_SIGOP

Default for ‐bytespersigop

DEFAULT_CHECKBLOCKS

Default number of blocks to verify at startup (the ‐checkblocks setting).

DEFAULT_CHECKLEVEL

Default depth of block‐verification checks performed at startup (the ‐checklevel setting).

DEFAULT_CLUSTER_LIMIT

Maximum number of transactions per cluster (default)

DEFAULT_CLUSTER_SIZE_LIMIT_KVB

Maximum size of cluster in virtual kilobytes

DEFAULT_COINBASE_OUTPUT_MAX_ADDITIONAL_SIGOPS

Default sigops cost to reserve for coinbase transaction outputs when creating block templates.

DEFAULT_COINSTATSINDEX

Default value for the ‐coinstatsindex option (index disabled).

DEFAULT_CONNECT_TIMEOUT

‐timeout default

DEFAULT_DAEMON

Default value for ‐daemon option

DEFAULT_DAEMONWAIT

Default value for ‐daemonwait option

DEFAULT_DB_CACHE_BATCH

Default LevelDB write batch size

DEFAULT_DEBUGLOGFILE

Default file name for the debug log.

DEFAULT_DESCENDANT_LIMIT

Default for ‐limitdescendantcount, max number of in‐mempool descendants

DEFAULT_DNSSEED

Default for ‐dnsseed: whether to query the DNS seeds when short on peers.

DEFAULT_FIXEDSEEDS

Default for ‐fixedseeds: whether to fall back to the hardcoded seed addresses.

DEFAULT_FORCEDNSSEED

Default for ‐forcednsseed: whether to always query the DNS seeds.

DEFAULT_FULL_RELAY_INBOUND_PCT

Default percentage of inbound connection slots that tx‐relaying peers can use

DEFAULT_HTTP_SERVER_TIMEOUT

The default value for ‐rpcservertimeout, in seconds, before an idle client is disconnected.

DEFAULT_HTTP_THREADS

The default value for ‐rpcthreads. This number of threads will be created at startup.

DEFAULT_HTTP_WORKQUEUE

The default value for ‐rpcworkqueue. This is the maximum depth of the work queue, we don't allocate this number of work queue items upfront.

DEFAULT_INCREMENTAL_RELAY_FEE

Default for ‐incrementalrelayfee, which sets the minimum feerate increase for mempool limiting or replacement *

DEFAULT_KERNEL_CACHE

Suggested default amount of cache reserved for the kernel (bytes)

DEFAULT_LISTEN

‐listen default

DEFAULT_LISTEN_ONION

Whether to listen for incoming connections on a Tor onion service by default.

DEFAULT_LOGIPS

Default for ‐logips: whether to log client IP addresses.

DEFAULT_LOGLEVELALWAYS

Default for ‐loglevelalways: whether to always print the category and level.

DEFAULT_LOGSOURCELOCATIONS

Default for ‐logsourcelocations: whether to include the source location in log lines.

DEFAULT_LOGTHREADNAMES

Default for ‐logthreadnames: whether to include the thread name in log lines.

DEFAULT_LOGTIMEMICROS

Default for ‐logtimemicros: whether to add microsecond precision to timestamps.

DEFAULT_LOGTIMESTAMPS

Default for ‐logtimestamps: whether to prefix log lines with timestamps.

DEFAULT_MAXRECEIVEBUFFER

Default for ‐maxreceivebuffer, in kilobytes.

DEFAULT_MAXSENDBUFFER

Default for ‐maxsendbuffer, in kilobytes.

DEFAULT_MAX_HTTP_CONNECTIONS

Maximum number of connected HTTP clients

DEFAULT_MAX_MEMPOOL_SIZE_MB

Default for ‐maxmempool, maximum megabytes of mempool memory usage

DEFAULT_MAX_PEER_CONNECTIONS

The maximum number of peer connections to maintain.

DEFAULT_MAX_TIP_AGE

Default maximum tip age before the node is considered out of initial block download.

DEFAULT_MAX_TRIES

Default max iterations to try in RPC generatetodescriptor, generatetoaddress, and generateblock.

DEFAULT_MAX_UPLOAD_TARGET

The default for ‐maxuploadtarget. 0 = Unlimited

DEFAULT_MEMPOOL_EXPIRY_HOURS

Default for ‐mempoolexpiry, expiration time for mempool transactions in hours

DEFAULT_MIN_RELAY_TX_FEE

Default for ‐minrelaytxfee, minimum relay fee for transactions

DEFAULT_MISBEHAVING_BANTIME

Default ban duration for a misbehaving peer, in seconds (24 hours).

DEFAULT_NAME_LOOKUP

‐dns default

DEFAULT_NATPMP

Default value for the ‐natpmp option controlling automatic port mapping.

DEFAULT_PEERBLOCKFILTERS

Whether to serve BIP 157 compact block filters to peers by default.

DEFAULT_PEERBLOOMFILTERS

Whether to serve BIP 37 bloom filters to peers by default.

DEFAULT_PEER_CONNECT_TIMEOUT

‐peertimeout default

DEFAULT_PERMIT_BAREMULTISIG

Default for ‐permitbaremultisig

DEFAULT_PERSIST_V1_DAT

Whether to fall back to legacy V1 serialization when writing mempool.dat

DEFAULT_PREVOUTFETCH_THREADS

Default number of worker threads used to prefetch block input prevouts.

DEFAULT_PRIVATE_BROADCAST

Default for ‐privatebroadcast.

DEFAULT_RPC_DOC_CHECK

Whether RPC help documentation is verified at runtime by default.

DEFAULT_SCRIPTCHECK_THREADS

‐par default (number of script‐checking threads, 0 = auto)

DEFAULT_SCRIPT_EXECUTION_CACHE_BYTES

Default size in bytes of the script‐execution result cache.

DEFAULT_SIGNATURE_CACHE_BYTES

Default size in bytes of the ECDSA/Schnorr signature cache.

DEFAULT_TOR_CONTROL

Default host:port address of the Tor control socket.

DEFAULT_TOR_CONTROL_PORT

Default port on which Tor listens for control connections.

DEFAULT_TOR_SOCKS_PORT

Default port on which Tor listens for SOCKS connections.

DEFAULT_TXINDEX

Default value for the ‐txindex option (index disabled).

DEFAULT_TXOSPENDERINDEX

Default value for the ‐txospenderindex option (index disabled).

DEFAULT_TXRECONCILIATION_ENABLE

Whether transaction reconciliation protocol should be enabled by default.

DEFAULT_TX_SEND_RATE

Default maximum per‐second rate for sending transaction inventory to peers.

DEFAULT_V2_TRANSPORT

Default for ‐v2transport: whether to enable BIP324 v2 transport.

DEFAULT_VALIDATION_CACHE_BYTES

Default combined size of the signature and script‐execution validation caches.

DEFAULT_WHITELISTFORCERELAY

Default for ‐whitelistforcerelay.

DEFAULT_WHITELISTRELAY

Default for ‐whitelistrelay.

DUMMY_CHECKER

A signature checker that accepts all signatures

DUMMY_MAXIMUM_SIGNATURE_CREATOR

A signature creator that just produces 72‐byte empty signatures.

DUMMY_SIGNATURE_CREATOR

A signature creator that just produces 71‐byte empty signatures.

DUMMY_SIGNING_PROVIDER

A shared signing provider used where no real keys are available.

DUMP_BANS_INTERVAL

How often to dump banned addresses/subnets to disk.

DUST_RELAY_TX_FEE

Min feerate for defining dust. Changing the dust limit changes which transactions are standard and should be done with care and ideally rarely. It makes sense to only increase the dust limit after prior releases were already not creating outputs below the new threshold

ECDH_SECRET_SIZE

Size of ECDH shared secrets.

EXAMPLE_ADDRESS

Example bech32 addresses for the RPCExamples help documentation. They are intentionally invalid to prevent accidental transactions by users.

EXTRA_BLOCK_RELAY_ONLY_PEER_INTERVAL

Run the extra block‐relay‐only connection loop once every 5 minutes. *

EXTRA_DESCENDANT_TX_SIZE_LIMIT

An extra transaction can be added to a package, as long as it only has one ancestor and is no larger than this. Not really any reason to make this configurable as it doesn't materially change DoS parameters.

FEATURE_VERSION

"feature" message type for feature negotiation starts with this version

FEEFILTER_VERSION

"feefilter" tells peers to filter invs to you by fee starts with this version

FEELER_INTERVAL

Run the feeler connection loop once every 2 minutes. *

FEE_FLUSH_INTERVAL

How often recorded fee estimate data is flushed to disk.

FlushStateModeNames

Human‐readable names for the FlushStateMode values, indexed by enum value.

G_ABORT_ON_FAILED_ASSUME

True when a failed Assume() should abort rather than continue.

G_FUZZING_BUILD

True when the binary is compiled in fuzzing mode.

G_TRANSLATION_FUN

Global translation function, set by the GUI and null when no translation is available.

HASHER_TAPBRANCH

Hasher with tag "TapBranch" pre‐fed to it.

HASHER_TAPLEAF

Hasher with tag "TapLeaf" pre‐fed to it.

HASHER_TAPSIGHASH

Hasher with tag "TapSighash" pre‐fed to it.

I2P_SAM31_PORT

SAM 3.1 and earlier do not support specifying ports and force the port to 0.

INIT_PROTO_VERSION

initial proto version, to be increased after version/verack negotiation

INTERNAL_IN_IPV6_PREFIX

Prefix of an IPv6 address when it contains an embedded "internal" address. Used when (un)serializing addresses in ADDRv1 format (pre‐BIP155). The prefix comes from 0xFD + SHA256("bitcoin")[0:5]. Such dummy IPv6 addresses are guaranteed to not be publicly routable as they fall under RFC4193's fc00::/7 subnet allocated to unique‐local addresses.

INVALID_CB_NO_BAN_VERSION

not banning for invalid compact blocks starts with this version

IPV4_IN_IPV6_PREFIX

Prefix of an IPv6 address when it contains an embedded IPv4 address. Used when (un)serializing addresses in ADDRv1 format (pre‐BIP155).

LOCKTIME_MAX

Maximum nLockTime.

LOCKTIME_THRESHOLD

Threshold for nLockTime.

LOCKTIME_VERIFY_SEQUENCE

Flags for nSequence and nLockTime locks

MANDATORY_SCRIPT_VERIFY_FLAGS

Mandatory script verification flags that all new transactions must comply with for them to be valid.

MAX_ADDNODE_CONNECTIONS

Maximum number of addnode outgoing nodes

MAX_BIP125_RBF_SEQUENCE

Highest input sequence number that still signals opt‐in replace‐by‐fee under BIP 125 (SEQUENCE_FINAL ‐ 2).

MAX_BLOCK_DB_CACHE

Max memory allocated to block tree DB specific cache (bytes)

MAX_BLOCK_RELAY_ONLY_CONNECTIONS

Maximum number of block‐relay‐only outgoing connections

MAX_BLOCK_SERIALIZED_SIZE

The maximum allowed size for a serialized block, in bytes (only for buffer size limits)

MAX_BLOCK_SIGOPS_COST

The maximum allowed number of signature check operations in a block (network rule)

MAX_BLOCK_WEIGHT

The maximum allowed weight for a block, see BIP 141 (network rule)

MAX_BLOOM_FILTER_SIZE

20,000 items with fp rate < 0.1% or 10,000 items and <0.0001%

MAX_CLUSTER_COUNT_LIMIT

Hard upper bound on the per‐cluster transaction count limit a TxGraph may be configured with.

MAX_CMPCTBLOCKS_INFLIGHT_PER_BLOCK

Maximum number of outstanding CMPCTBLOCK requests for the same block.

MAX_COINS_DB_CACHE

Max memory allocated to coin DB specific cache (bytes)

MAX_DBCACHE_BYTES

Maximum total database cache on current architecture (bytes)

MAX_DISCONNECTED_TX_POOL_BYTES

Maximum bytes for transactions to store for processing during reorg

MAX_DUST_OUTPUTS_PER_TX

Maximum number of ephemeral dust outputs allowed.

MAX_FEATUREDATA_LENGTH

Maximum length in bytes of the data payload for a single feature.

MAX_FEATUREID_LENGTH

Maximum length in bytes of a feature identifier in a feature message.

MAX_FEELER_CONNECTIONS

Maximum number of feeler connections

MAX_FILE_AGE

Block policy estimate files that are more than 60 hours (2.5 days) old will not be read, as fee estimates are based on historical data and may be inaccurate if network activity has changed.

MAX_FILE_SIZE_PSBT

Maximum accepted PSBT file size, capped to bound memory use while reading.

MAX_FUTURE_BLOCK_TIME

Maximum amount of time that a block timestamp is allowed to exceed the current time before the block will be accepted.

MAX_HASH_FUNCS

Maximum number of hash functions a bloom filter may use.

MAX_HEADERS_RESULTS

Number of headers sent in one getheaders result. We rely on the assumption that if a peer sends less than this number, we reached its tip. Changing this value is a protocol upgrade.

MAX_MONEY

No amount larger than this (in satoshi) is valid.

MAX_OPCODE

Maximum value that an opcode can take.

MAX_OPS_PER_SCRIPT

Maximum number of non‐push operations per script.

MAX_OP_RETURN_RELAY

Default setting for ‐datacarriersize in vbytes.

MAX_OUTBOUND_FULL_RELAY_CONNECTIONS

Maximum number of automatic outgoing nodes over which we'll relay everything (blocks, tx, addrs, etc)

MAX_P2SH_SIGOPS

Maximum number of signature check operations in an IsStandard() P2SH script

MAX_PACKAGE_COUNT

Default maximum number of transactions in a package.

MAX_PACKAGE_WEIGHT

Default maximum total weight of transactions in a package in weight to allow for context‐less checks. This must allow a superset of sigops weighted vsize limited transactions to not disallow transactions we would have otherwise accepted individually.

MAX_PREVOUTFETCH_THREADS

Maximum number of dedicated threads allowed for prefetching block input prevouts

MAX_PRIVATE_BROADCAST_CONNECTIONS

Maximum number of private broadcast connections

MAX_PROTOCOL_MESSAGE_LENGTH

Maximum length of incoming protocol messages (no message over 4 MB is currently acceptable).

MAX_PUBKEYS_PER_MULTISIG

Maximum number of public keys per multisig.

MAX_PUBKEYS_PER_MULTI_A

The limit of keys in OP_CHECKSIGADD‐based scripts. It is due to the stack limit in BIP342.

MAX_REPLACEMENT_CANDIDATES

Maximum number of unique clusters that can be affected by an RBF (Rule #5); see GetEntriesForConflicts()

MAX_SCRIPTCHECK_THREADS

Maximum number of dedicated script‐checking threads allowed

MAX_SCRIPT_ELEMENT_SIZE

Maximum number of bytes pushable to the stack.

MAX_SCRIPT_SIZE

Maximum script length in bytes.

MAX_SCRIPT_VERIFY_FLAGS

Bit mask with every defined verification flag set.

MAX_SCRIPT_VERIFY_FLAGS_BITS

Number of defined verification flag bits, equal to the value of SCRIPT_VERIFY_END_MARKER.

MAX_SIZE

The maximum size of a serialized object in bytes or number of elements (for eg vectors) when the size is encoded as CompactSize.

MAX_STACK_SIZE

Maximum number of values on the script interpreter stack.

MAX_STANDARD_P2WSH_SCRIPT_SIZE

The maximum size in bytes of a standard witnessScript

MAX_STANDARD_P2WSH_STACK_ITEMS

The maximum number of witness stack items in a standard P2WSH script

MAX_STANDARD_P2WSH_STACK_ITEM_SIZE

The maximum size in bytes of each witness stack item in a standard P2WSH script

MAX_STANDARD_SCRIPTSIG_SIZE

The maximum size of a standard ScriptSig

MAX_STANDARD_TAPSCRIPT_STACK_ITEM_SIZE

The maximum size in bytes of each witness stack item in a standard BIP 342 script (Taproot, leaf version 0xc0)

MAX_STANDARD_TX_SIGOPS_COST

The maximum number of sigops we're willing to relay/mine in a single tx

MAX_STANDARD_TX_WEIGHT

The maximum weight for transactions we're willing to relay/mine

MAX_SUBVERSION_LENGTH

Maximum length of the user agent string in version message

MAX_TIMEWARP

Maximum number of seconds that the timestamp of the first block of a difficulty adjustment period is allowed to be earlier than the last block of the previous period (BIP94).

MAX_TX_LEGACY_SIGOPS

The maximum number of potentially executed legacy signature operations in a single standard tx

MAX_VECTOR_ALLOCATE

Maximum amount of memory (in bytes) to allocate at once when deserializing vectors.

MAX_WAIT_FOR_IO

Maximum time to wait for I/O readiness. It will take up until this time to break off in case of an interruption.

MEMPOOL_FEE_ESTIMATOR_MAX_TARGET

Maximum confirmation target, in blocks, for which the mempool estimator is reliable.

MEMPOOL_HEALTH_WINDOW_BLOCKS

Number of recent mined blocks inspected when assessing mempool health.

MEMPOOL_HEIGHT

Fake height value used in Coin to signify they are only in the memory pool (since 0.8)

MEMPOOL_REPRESENTATION_THRESHOLD

Minimum fraction of block weight that must come from the mempool for it to be well represented.

MESSAGE_MAGIC

Magic string prefixed to a message before hashing, to domain‐separate it from transactions.

MINIMUM_BLOCK_RESERVED_WEIGHT

This accounts for the block header, var_int encoding of the transaction count and a minimally viable coinbase transaction. It adds an additional safety margin, because even with a thorough understanding of block serialization, it's easy to make a costly mistake when trying to squeeze every last byte. Setting a lower value is prevented at startup.

MINIMUM_WITNESS_COMMITMENT

Minimum size of a witness commitment structure. Defined in BIP 141. *

MIN_BLOCKS_TO_KEEP

Block files containing a block‐height within MIN_BLOCKS_TO_KEEP of ActiveChain().Tip() will not be pruned.

MIN_DBCACHE_BYTES

Minimum total database cache (bytes)

MIN_DISK_SPACE_FOR_BLOCK_FILES

Minimum free disk space, in bytes, that a user must allocate for block and undo files.

MIN_PEER_PROTO_VERSION

disconnect from peers older than this proto version

MIN_SERIALIZABLE_TRANSACTION_WEIGHT

Minimum weight of any serializable CTransaction (10 bytes is the lower bound for its serialized size).

MIN_STANDARD_TX_NONWITNESS_SIZE

The minimum non‐witness size for transactions we're willing to relay/mine: one larger than 64

MIN_TRANSACTION_WEIGHT

Minimum weight of a valid serialized CTransaction (60 bytes is the lower bound for its serialized size).

MSG_TYPE_MASK

Mask covering the bits used to encode a getdata/inv message type.

MSG_WITNESS_FLAG

getdata message type flags

MUSIG2_PUBNONCE_SIZE

Size in bytes of a serialized MuSig2 public nonce.

NET_MESSAGE_TYPE_OTHER

Bucket name used to aggregate byte counts for message types not tracked individually.

NET_PERMISSIONS_DOC

Human‐readable descriptions of the available net permission flags, for help output.

NO_WITNESS_COMMITMENT

Index marker for when no witness commitment is present in a coinbase transaction.

NUM_FDS_MESSAGE_CAPTURE

Number of file descriptors required for message capture *

NUM_GETBLOCKSTATS_PERCENTILES

Number of weight percentiles reported by the getblockstats RPC.

OUTPUT_TYPES

The output types that can be produced, excluding UNKNOWN.

PCP_MAP_NONCE_SIZE

Mapping nonce size in bytes (see RFC6887 section 11.1).

POST_CHANGE_COST

How much work we ask TxGraph to do after a mempool change occurs (either due to a changeset being applied, a new block being found, or a reorg).

PROTOCOL_VERSION

network protocol versioning

PSBT_GLOBAL_FALLBACK_LOCKTIME

Global map key type for the fallback locktime.

PSBT_GLOBAL_INPUT_COUNT

Global map key type for the input count.

PSBT_GLOBAL_OUTPUT_COUNT

Global map key type for the output count.

PSBT_GLOBAL_PROPRIETARY

Global map key type for proprietary use.

PSBT_GLOBAL_TX_MODIFIABLE

Global map key type for the transaction‐modifiable flags.

PSBT_GLOBAL_TX_VERSION

Global map key type for the transaction version.

PSBT_GLOBAL_UNSIGNED_TX

Global map key type for the unsigned transaction.

PSBT_GLOBAL_VERSION

Global map key type for the PSBT version number.

PSBT_GLOBAL_XPUB

Global map key type for an extended public key.

PSBT_HIGHEST_VERSION

Highest PSBT version this implementation supports.

PSBT_IN_BIP32_DERIVATION

Input map key type for a BIP32 derivation path.

PSBT_IN_HASH160

Input map key type for a HASH160 preimage.

PSBT_IN_HASH256

Input map key type for a HASH256 preimage.

PSBT_IN_MUSIG2_PARTIAL_SIG

Input map key type for a MuSig2 partial signature.

PSBT_IN_MUSIG2_PARTICIPANT_PUBKEYS

Input map key type for the MuSig2 participant public keys.

PSBT_IN_MUSIG2_PUB_NONCE

Input map key type for a MuSig2 public nonce.

PSBT_IN_NON_WITNESS_UTXO

Input map key type for the non‐witness UTXO.

PSBT_IN_OUTPUT_INDEX

Input map key type for the previous output index.

PSBT_IN_PARTIAL_SIG

Input map key type for a partial signature.

PSBT_IN_PREVIOUS_TXID

Input map key type for the previous transaction id.

PSBT_IN_PROPRIETARY

Input map key type for proprietary use.

PSBT_IN_REDEEMSCRIPT

Input map key type for the redeem script.

PSBT_IN_REQUIRED_HEIGHT_LOCKTIME

Input map key type for the required height‐based locktime.

PSBT_IN_REQUIRED_TIME_LOCKTIME

Input map key type for the required time‐based locktime.

PSBT_IN_RIPEMD160

Input map key type for a RIPEMD160 preimage.

PSBT_IN_SCRIPTSIG

Input map key type for the finalized scriptSig.

PSBT_IN_SCRIPTWITNESS

Input map key type for the finalized script witness.

PSBT_IN_SEQUENCE

Input map key type for the input sequence number.

PSBT_IN_SHA256

Input map key type for a SHA256 preimage.

PSBT_IN_SIGHASH

Input map key type for the sighash type.

PSBT_IN_TAP_BIP32_DERIVATION

Input map key type for a taproot BIP32 derivation path.

PSBT_IN_TAP_INTERNAL_KEY

Input map key type for the taproot internal key.

PSBT_IN_TAP_KEY_SIG

Input map key type for a taproot key‐path signature.

PSBT_IN_TAP_LEAF_SCRIPT

Input map key type for a taproot leaf script.

PSBT_IN_TAP_MERKLE_ROOT

Input map key type for the taproot merkle root.

PSBT_IN_TAP_SCRIPT_SIG

Input map key type for a taproot script‐path signature.

PSBT_IN_WITNESSSCRIPT

Input map key type for the witness script.

PSBT_IN_WITNESS_UTXO

Input map key type for the witness UTXO.

PSBT_MAGIC_BYTES

Magic bytes that prefix every serialized PSBT.

PSBT_OUT_AMOUNT

Output map key type for the output amount.

PSBT_OUT_BIP32_DERIVATION

Output map key type for a BIP32 derivation path.

PSBT_OUT_MUSIG2_PARTICIPANT_PUBKEYS

Output map key type for the MuSig2 participant public keys.

PSBT_OUT_PROPRIETARY

Output map key type for proprietary use.

PSBT_OUT_REDEEMSCRIPT

Output map key type for the redeem script.

PSBT_OUT_SCRIPT

Output map key type for the output script.

PSBT_OUT_TAP_BIP32_DERIVATION

Output map key type for a taproot BIP32 derivation path.

PSBT_OUT_TAP_INTERNAL_KEY

Output map key type for the taproot internal key.

PSBT_OUT_TAP_TREE

Output map key type for the taproot tree.

PSBT_OUT_WITNESSSCRIPT

Output map key type for the witness script.

PSBT_SEPARATOR

Map separator byte, read as a zero‐length key that carries no value.

SCRIPT_VERIFY_NONE

Script verification flags.

SENDHEADERS_VERSION

"sendheaders" message type and announcing blocks with headers starts with this version

SEQ_ID_BEST_CHAIN_FROM_DISK

Init values for CBlockIndex nSequenceId when loaded from disk

SEQ_ID_INIT_FROM_DISK

Init value for CBlockIndex nSequenceId for a block loaded from disk that is not on the best chain.

SHORT_IDS_BLOCKS_VERSION

short‐id‐based block download starts with this version

SNAPSHOT_MAGIC_BYTES

Magic bytes marking the start of a serialized UTXO set snapshot.

STANDARD_LOCKTIME_VERIFY_FLAGS

Used as the flags parameter to sequence and nLocktime checks in non‐consensus code.

STANDARD_NOT_MANDATORY_VERIFY_FLAGS

For convenience, standard but not mandatory verify flags.

STANDARD_SCRIPT_VERIFY_FLAGS

Standard script verification flags that standard transactions will comply with. However we do not ban/disconnect nodes that forward txs violating the additional (non‐mandatory) rules here, to improve forwards and backwards compatibility.

TAPROOT_CONTROL_BASE_SIZE

Fixed prefix size of a Taproot control block (leaf byte + internal key).

TAPROOT_CONTROL_MAX_NODE_COUNT

Maximum number of Merkle branch nodes in a control block.

TAPROOT_CONTROL_MAX_SIZE

Maximum total byte size of a Taproot control block.

TAPROOT_CONTROL_NODE_SIZE

Byte size of one Merkle branch node in a control block.

TAPROOT_LEAF_MASK

Mask isolating the leaf‐version bits of a Taproot control byte.

TAPROOT_LEAF_TAPSCRIPT

Leaf version identifying a BIP342 tapscript.

TEST_OPTIONS_DOC

Names of the recognized values for the ‐test command‐line argument.

TIMEOUT_INTERVAL

Time after which to disconnect, after waiting for a ping response (or inactivity).

TIMESTAMP_WINDOW

Timestamp window used as a grace period by code that compares external timestamps (such as timestamps passed to RPCs, or wallet key creation times) to block timestamps. This should be set at least as high as MAX_FUTURE_BLOCK_TIME.

TORV2_IN_IPV6_PREFIX

Prefix of an IPv6 address when it contains an embedded TORv2 address. Used when (un)serializing addresses in ADDRv1 format (pre‐BIP155). Such dummy IPv6 addresses are guaranteed to not be publicly routable as they fall under RFC4193's fc00::/7 subnet allocated to unique‐local addresses.

TOR_REPLY_OK

Tor control reply code. Ref: https://spec.torproject.org/control‐spec/replies.html

TOR_REPLY_SYNTAX_ERROR

Syntax error in command argument

TOR_REPLY_UNRECOGNIZED

Tor control reply code for an unrecognized command.

TRUC_ANCESTOR_LIMIT

Maximum number of transactions including a TRUC tx and all its mempool ancestors.

TRUC_CHILD_MAX_VSIZE

Maximum sigop‐adjusted virtual size of a tx which spends from an unconfirmed TRUC transaction.

TRUC_CHILD_MAX_WEIGHT

Maximum weight of a TRUC child transaction, derived from TRUC_CHILD_MAX_VSIZE.

TRUC_DESCENDANT_LIMIT

Maximum number of transactions including an unconfirmed tx and its descendants.

TRUC_MAX_VSIZE

Maximum sigop‐adjusted virtual size of all v3 transactions.

TRUC_MAX_WEIGHT

Maximum weight of a TRUC transaction, derived from TRUC_MAX_VSIZE.

TRUC_VERSION

Transaction version that marks a transaction as TRUC (BIP 431).

TXRECONCILIATION_VERSION

Supported transaction reconciliation protocol version

TX_MAX_STANDARD_VERSION

Highest transaction version accepted by standard relay policy.

TX_MIN_STANDARD_VERSION

Lowest transaction version accepted by standard relay policy.

TX_NO_WITNESS

Serialization parameters that omit transaction witness data.

TX_WITH_WITNESS

Serialization parameters that include transaction witness data.

UA_NAME

Base user agent name advertised to peers (for example "Satoshi").

UNIX_EPOCH_TIME

String used to describe UNIX epoch time in documentation, factored out to a constant for consistency.

VALIDATION_WEIGHT_OFFSET

Weight budget added to the witness size (Tapscript only, see BIP 342).

VALIDATION_WEIGHT_PER_SIGOP_PASSED

Validation weight per passing signature (Tapscript only, see BIP 342).

VERSIONBITS_LAST_OLD_BLOCK_VERSION

What block version to use for new blocks (pre versionbits)

VERSIONBITS_NUM_BITS

Total bits available for versionbits (BIP 323)

VERSIONBITS_TOP_BITS

What bits to set in version for versionbits blocks

VERSIONBITS_TOP_MASK

What bitmask determines whether versionbits is in use

VersionBitsDeploymentInfo

Lookup table of deployment info, indexed by version‐bits deployment position.

WITNESS_SCALE_FACTOR

Weight given to non‐witness bytes relative to witness bytes when computing block weight (BIP 141).

WITNESS_V0_KEYHASH_SIZE

Byte length of a witness v0 P2WPKH key hash.

WITNESS_V0_SCRIPTHASH_SIZE

Byte length of a witness v0 P2WSH script hash.

WITNESS_V1_TAPROOT_SIZE

Byte length of a witness v1 Taproot output key.

WTXID_RELAY_VERSION

"wtxidrelay" message type for wtxid‐based relay starts with this version

cs_main

Mutex to guard access to validation specific variables, such as reading or changing the chainstate.

deserialize

Tag instance used to select deserializing constructors.

fDiscover

Whether to discover our own local addresses (‐discover).

fListen

Whether to accept incoming connections (‐listen).

fLogIPs

Whether client IP addresses are included in log output.

fNameLookup

Whether DNS name lookups are allowed, set by the ‐dns option.

gArgs

Global argument manager shared across the application.

g_coin_stats_index

The global UTXO set hash object.

g_detail_test_only_CheckFailuresAreExceptionsNotAborts

When true, failed checks throw an exception instead of aborting (test only).

g_dns_lookup

The DNS resolver used by lookup functions; overridable for tests.

g_enable_dynamic_fuzz_determinism

Runtime toggle that enables fuzz determinism when it is not fixed at compile time.

g_maplocalhost_mutex

Guards access to mapLocalHost.

g_reachable_nets

Global set of networks currently considered reachable.

g_socks5_interrupt

Interrupt SOCKS5 reads or writes.

g_txindex

The global transaction index, used in GetTransaction. May be null.

g_txospenderindex

The global txo spender index. May be null.

g_wallet_init_interface

Global wallet initialization interface, either the real wallet or a stub.

g_zmq_notification_interface

The process‐wide ZMQ notification interface, or nullptr when ZMQ is disabled.

mapLocalHost

Map of our known local addresses to their advertised service info.

nBytesPerSigOp

Bytes‐per‐sigop ratio used to weight signature operations against transaction size in policy checks.

nConnectTimeout

Connection timeout in milliseconds, set by the ‐timeout option.

strSubVersion

Subversion as sent to the P2P network in version messages

tableRPC

The global RPC command dispatch table.

uiInterface

The process‐wide UI signal interface used to communicate with the front end.

Concepts

Name

Description

BasicByte

Satisfied by types whose pointer can be cast to an unsigned char pointer via UCharCast.

ByteType

Constrains a type to a single‐byte type usable as a raw buffer element.

CharNotInt8

Matches char only when it is a distinct type from int8_t, used to forbid serializing char.

ContainsStream

Check if type contains a stream by seeing if has a GetStream() method.

RandomNumberGenerator

A concept for RandomMixin‐based random number generators.

Serializable

If none of the specialized versions above matched, default to calling member function.

StdChronoDuration

A concept for C++ std::chrono durations.

TxidOrWtxid

Satisfied only by the Txid and Wtxid identifier types.

Unserializable

Satisfied by types that provide an Unserialize member function.

Using Declarations

Name

Description

BlockRef

Bring the block reference type into the current namespace.

PSBTError

Alias for the PSBT error type used throughout this header.

Macros

Name

Description

Assert

Identity function. Abort if the value compares equal to zero.

Assume

Assume is the identity function.

CHECK_NONFATAL

Identity function. Throw a NonFatalCheckError when the condition evaluates to false

COPYRIGHT_STR

Copyright string used in Windows .rc files

FORMATTER_METHODS

Implement the Ser and Unser methods needed for implementing a formatter (see Using below).

LIST_CHAIN_NAMES

List of possible chain / network names

MAKE_RANGE_METHOD

Defines a range accessor method method_name over the given size and get functions.

NONFATAL_UNREACHABLE

NONFATAL_UNREACHABLE() is a macro that is used to mark unreachable code. It throws a NonFatalCheckError.

SERIALIZE_METHODS

Implement the Serialize and Unserialize methods by delegating to a single templated static method that takes the to‐be‐(de)serialized object as a parameter. This approach has the advantage that the constness of the object becomes a template parameter, and thus allows a single implementation that sees the object as const for serializing and non‐const for deserializing, without casts.

SER_PARAMS

Formatter methods can retrieve parameters attached to a stream using the SER_PARAMS(type) macro as long as the stream is created directly or indirectly with a parameter of that type. This permits making serialization depend on run‐time context in a type‐safe way.

SER_PARAMS_OPFUNC

Helper macro for SerParams structs

STRINGIZE

Converts the parameter X to a string after macro replacement on X has been performed. Don't merge these into one macro!

WITH_LOCK

Run code while locking a mutex.

btck_BlockCheckFlags_ALL

enable all optional context‐free block checks

btck_BlockCheckFlags_BASE

run the base context‐free block checks only

btck_BlockCheckFlags_MERKLE

verify merkle root (and mutation detection)

btck_BlockCheckFlags_POW

run CheckProofOfWork via CheckBlockHeader

btck_BlockValidationResult_CACHED_INVALID

this block was cached as being invalid and we didn't store the reason why

btck_BlockValidationResult_CONSENSUS

invalid by consensus rules (excluding any below reasons)

btck_BlockValidationResult_HEADER_LOW_WORK

the block header may be on a too‐little‐work chain

btck_BlockValidationResult_INVALID_HEADER

invalid proof of work or time too old

btck_BlockValidationResult_INVALID_PREV

A block this one builds on is invalid

btck_BlockValidationResult_MISSING_PREV

We don't have the previous block the checked one is built on

btck_BlockValidationResult_MUTATED

the block's data didn't match the data committed to by the PoW

btck_BlockValidationResult_TIME_FUTURE

block timestamp was > 2 hours in the future (or our clock is bad)

btck_BlockValidationResult_UNSET

initial value. Block has not yet been rejected

btck_ScriptVerificationFlags_CHECKLOCKTIMEVERIFY

enable CHECKLOCKTIMEVERIFY (BIP65)

btck_ScriptVerificationFlags_CHECKSEQUENCEVERIFY

enable CHECKSEQUENCEVERIFY (BIP112)

btck_ScriptVerificationFlags_DERSIG

enforce strict DER (BIP66) compliance

btck_ScriptVerificationFlags_NULLDUMMY

enforce NULLDUMMY (BIP147)

btck_ScriptVerificationFlags_P2SH

evaluate P2SH (BIP16) subscripts

btck_ScriptVerificationFlags_TAPROOT

enable TAPROOT (BIPs 341 & 342)

btck_ScriptVerificationFlags_WITNESS

enable WITNESS (BIP141)

btck_ScriptVerifyStatus_ERROR_INVALID_FLAGS_COMBINATION

The flags were combined in an invalid way.

btck_ScriptVerifyStatus_ERROR_SPENT_OUTPUTS_REQUIRED

The taproot flag was set, so valid spent_outputs have to be provided.

btck_TxValidationResult_CONFLICT

tx already in mempool or conflicts with a tx in the chain

btck_TxValidationResult_CONSENSUS

invalid by consensus rules

btck_TxValidationResult_INPUTS_NOT_STANDARD

inputs (covered by txid) failed policy rules

btck_TxValidationResult_MEMPOOL_POLICY

violated mempool's fee/size/descendant/RBF/etc limits

btck_TxValidationResult_MISSING_INPUTS

transaction was missing some of its inputs

btck_TxValidationResult_NOT_STANDARD

otherwise didn't meet local policy rules

btck_TxValidationResult_NO_MEMPOOL

this node does not have a mempool so can't validate the transaction

btck_TxValidationResult_PREMATURE_SPEND

transaction spends a coinbase too early, or violates locktime/sequence locks

btck_TxValidationResult_RECONSIDERABLE

fails some policy, but might be acceptable if submitted in a (different) package

btck_TxValidationResult_UNKNOWN

transaction was not validated because package failed

btck_TxValidationResult_UNSET

initial value. Tx has not yet been rejected

btck_TxValidationResult_WITNESS_MUTATED

witness may have been malleated or is prior to SegWit activation

btck_TxValidationResult_WITNESS_STRIPPED

transaction is missing a witness

strprintf

Format arguments and return the string or write to given std::ostream (see tinyformat::format doc for details)

BCLog namespace

Bitcoin Core logging facilities: log categories and their bit flags.

Types

Name

Description

LogRateLimiter

Fixed window rate limiter for logging.

Logger

Central logger that formats entries and writes them to the console, a file and callbacks.

Timer

RAII‐style object that outputs timing information to logs.

Type Aliases

Name

Description

CategoryMask

Bit mask holding a set of BCLog::LogFlags log categories.

Level

Alias for compatibility. Prefer util::log::Level over BCLog::Level in new code.

Enums

Name

Description

LogFlags

Debug logging categories, each a distinct bit in a CategoryMask.

Variables

Name

Description

DEFAULT_LOGRATELIMIT

Default for whether log rate limiting is enabled.

DEFAULT_LOG_LEVEL

Default global log severity level.

DEFAULT_MAX_LOG_BUFFER

buffer up to 1MB of log data prior to StartLogging

RATELIMIT_MAX_BYTES

maximum number of bytes per source location that can be logged within the rate‐limit window

RATELIMIT_WINDOW

time window after which log ratelimit stats are reset

Consensus namespace

Transaction validation functions

Types

Name

Description

BIP9Deployment

Struct for each individual consensus rule change using BIP9.

Params

Parameters that influence chain consensus.

Enums

Name

Description

BuriedDeployment

A buried deployment is one where the height of the activation has been hardcoded into the client implementation long after the consensus change has activated. See BIP 90. Consensus changes for which the new rules are enforced from genesis are not listed here.

DeploymentPos

Identifiers for BIP9 version‐bits deployments.

Functions

Name

Description

CheckTxInputs

Check whether all inputs of this transaction are valid (no double spends and amounts) This does not modify the UTXO set. This does not check scripts and sigs.

ValidDeployment

ValidDeployment overloads

CuckooCache namespace

High‐performance cache primitives.

Types

Name

Description

bit_packed_atomic_flags

bit_packed_atomic_flags implements a container for garbage collection flags that is only thread unsafe on calls to setup. This class bit‐packs collection flags for memory efficiency.

cache

cache implements a cache with properties similar to a cuckoo‐set.

NetMsg namespace

Helpers for constructing serialized network messages.

Functions

Name

Description

Make

Build a serialized network message of the given type from its payload.

NetMsgFeature namespace

Identifiers for individual peer‐negotiated features (BIP 434).

NetMsgType namespace

Bitcoin protocol message types. When adding new message types, don't forget to update ALL_NET_MESSAGE_TYPES below.

Variables

Name

Description

ADDR

The addr (IP address) message relays connection information for peers on the network.

ADDRV2

The addrv2 message relays connection information for peers on the network just like the addr message, but is extended to allow gossiping of longer node addresses (see BIP155).

BLOCK

The block message transmits a single serialized block.

BLOCKTXN

Contains a BlockTransactions. Sent in response to a "getblocktxn" message.

CFCHECKPT

cfcheckpt is a response to a getcfcheckpt request containing a vector of evenly spaced filter headers for blocks on the requested chain.

CFHEADERS

cfheaders is a response to a getcfheaders request containing a filter header and a vector of filter hashes for each subsequent block in the requested range.

CFILTER

cfilter is a response to a getcfilters request containing a single compact filter.

CMPCTBLOCK

Contains a CBlockHeaderAndShortTxIDs object ‐ providing a header and list of "short txids".

FEATURE

BIP 434 Peer feature negotiation

FEEFILTER

The feefilter message tells the receiving peer not to inv us any txs which do not meet the specified min fee rate.

FILTERADD

The filteradd message tells the receiving peer to add a single element to a previously‐set bloom filter, such as a new public key.

FILTERCLEAR

The filterclear message tells the receiving peer to remove a previously‐set bloom filter.

FILTERLOAD

The filterload message tells the receiving peer to filter all relayed transactions and requested merkle blocks through the provided filter.

GETADDR

The getaddr message requests an addr message from the receiving node, preferably one with lots of IP addresses of other receiving nodes.

GETBLOCKS

The getblocks message requests an inv message that provides block header hashes starting from a particular point in the block chain.

GETBLOCKTXN

Contains a BlockTransactionsRequest Peer should respond with "blocktxn" message.

GETCFCHECKPT

getcfcheckpt requests evenly spaced compact filter headers, enabling parallelized download and validation of the headers between them. Only available with service bit NODE_COMPACT_FILTERS as described by BIP 157 & 158.

GETCFHEADERS

getcfheaders requests a compact filter header and the filter hashes for a range of blocks, which can then be used to reconstruct the filter headers for those blocks. Only available with service bit NODE_COMPACT_FILTERS as described by BIP 157 & 158.

GETCFILTERS

getcfilters requests compact filters for a range of blocks. Only available with service bit NODE_COMPACT_FILTERS as described by BIP 157 & 158.

GETDATA

The getdata message requests one or more data objects from another node.

GETHEADERS

The getheaders message requests a headers message that provides block headers starting from a particular point in the block chain.

HEADERS

The headers message sends one or more block headers to a node which previously requested certain headers with a getheaders message.

INV

The inv message (inventory message) transmits one or more inventories of objects known to the transmitting peer.

MEMPOOL

The mempool message requests the TXIDs of transactions that the receiving node has verified as valid but which have not yet appeared in a block.

MERKLEBLOCK

The merkleblock message is a reply to a getdata message which requested a block using the inventory type MSG_MERKLEBLOCK.

NOTFOUND

The notfound message is a reply to a getdata message which requested an object the receiving node does not have available for relay.

PING

The ping message is sent periodically to help confirm that the receiving peer is still connected.

PONG

The pong message replies to a ping message, proving to the pinging node that the ponging node is still alive.

SENDADDRV2

The sendaddrv2 message signals support for receiving ADDRV2 messages (BIP155). It also implies that its sender can encode as ADDRV2 and would send ADDRV2 instead of ADDR to a peer that has signaled ADDRV2 support by sending SENDADDRV2.

SENDCMPCT

Contains a 1‐byte bool and 8‐byte LE version number. Indicates that a node is willing to provide blocks via "cmpctblock" messages. May indicate that a node prefers to receive new block announcements via a "cmpctblock" message rather than an "inv", depending on message contents.

SENDHEADERS

Indicates that a node prefers to receive new block announcements via a "headers" message rather than an "inv".

SENDTXRCNCL

Contains a 4‐byte version number and an 8‐byte salt. The salt is used to compute short txids needed for efficient txreconciliation, as described by BIP 330.

TX

The tx message transmits a single transaction.

VERACK

The verack message acknowledges a previously‐received version message, informing the connecting node that it can begin to send other messages.

VERSION

The version message provides information about the transmitting node to the receiving node at the beginning of a connection.

WTXIDRELAY

Indicates that a node prefers to relay transactions via wtxid, rather than txid.

bech32 namespace

Bech32 and Bech32m string encoding used by newer Bitcoin address types.

Types

Name

Description

DecodeResult

Result of decoding a Bech32(m) string: its encoding, human‐readable part, and payload.

Enums

Name

Description

CharLimit

Character limits for Bech32(m) encoded strings. Character limits are how we provide error location guarantees. These values should never exceed 2ˆ31 ‐ 1 (max value for a 32‐bit int), since there are places where we may need to convert the CharLimit::VALUE to an int. In practice, this should never happen since this CharLimit applies to an address encoding and we would never encode an address with such a massive value

Encoding

Which Bech32 variant a string uses, or that decoding failed.

Functions

Name

Description

Decode

Decode a Bech32 or Bech32m string.

Encode

Encode a Bech32 or Bech32m string. If hrp contains uppercase characters, this will cause an assertion error. Encoding must be one of BECH32 or BECH32M.

LocateErrors

Return the positions of errors in a Bech32 string.

Variables

Name

Description

CHECKSUM_SIZE

Number of trailing checksum characters in a Bech32(m) string.

SEPARATOR

Character separating the human‐readable part from the data section.

bitcoin_http namespace

Constants and error types for the built‐in HTTP server's request parsing.

Types

Name

Description

ContentTooLargeError

Thrown when a request body exceeds MAX_BODY_SIZE (or will exceed, in chunked transfer) so the server can reply with more specific code 413 (content too large) vs general 400 (bad request)

Variables

Name

Description

MAX_BODY_SIZE

Maximum size of an HTTP request body

MAX_HEADERS_SIZE

Maximum size of each headers line in an HTTP request, also the maximum size of all headers total. See https://github.com/bitcoin/bitcoin/pull/6859 And libevent http.c evhttp_parse_headers_()

MIN_REQUEST_LINE_LENGTH

Shortest valid request line, used by libevent in evhttp_parse_request_line()

bitset_detail namespace

Implementation details backing the BitSet alias.

Types

Name

Description

IntBitSet

A bitset implementation backed by a single integer of type I.

MultiIntBitSet

A bitset implementation backed by N integers of type I.

Functions

Name

Description

PopCount

Count the number of bits set in an unsigned integer type.

operator&

Return an object with the binary AND between respective bits from a and b.

operator‐

Return an object with the binary AND NOT between respective bits from a and b.

operatorˆ

Return an object with the binary XOR between respective bits from a and b.

operator|

Return an object with the binary OR between respective bits from a and b.

swap

Swap two bitsets.

operator==

Equality operators

btck namespace

Type‐safe C++ RAII wrapper over the libbitcoinkernel C API.

Types

Name

Description

Block

Owning wrapper over a btck_Block, a full block with its transactions.

BlockHash

Owning wrapper over a btck_BlockHash.

BlockHashApi

CRTP mixin adding block‐hash operations shared by the view and owning types.

BlockHashView

Non‐owning view over a btck_BlockHash.

BlockHeader

Owning wrapper over a btck_BlockHeader.

BlockHeaderApi

CRTP mixin adding block‐header accessors shared by the view and owning types.

BlockHeaderView

Non‐owning view over a btck_BlockHeader.

BlockSpentOutputs

Owning wrapper over a btck_BlockSpentOutputs, the undo data of a whole block.

BlockTreeEntry

Non‐owning view over a btck_BlockTreeEntry, a node in the block index tree.

BlockValidationState

Owning wrapper over a btck_BlockValidationState, holding a block's validation outcome.

BlockValidationStateApi

CRTP mixin adding block‐validation‐state accessors shared by the view and owning types.

BlockValidationStateView

Non‐owning view over a btck_BlockValidationState.

ChainMan

Owning wrapper over a btck_ChainstateManager, the entry point for block processing.

ChainParams

Owning wrapper over btck_ChainParameters, the consensus parameters for a network.

ChainView

Non‐owning view over a btck_Chain, a sequence of block tree entries by height.

ChainstateManagerOptions

Owning wrapper over btck_ChainstateManagerOptions, configuring a ChainMan.

Coin

Owning wrapper over a btck_Coin.

CoinApi

CRTP mixin adding coin accessors shared by the view and owning types.

CoinView

Non‐owning view over a btck_Coin, an unspent transaction output entry.

ConsensusParamsView

Non‐owning view over btck_ConsensusParams, the consensus parameters of a chain.

Context

Owning wrapper over a btck_Context, the top‐level kernel execution context.

ContextOptions

Owning wrapper over btck_ContextOptions, configuring a Context before creation.

Handle

Owning RAII handle for a copyable C object of type CType.

Iterator

Random‐access iterator that lazily materializes views of a collection by index.

KernelNotifications

Base class for receiving kernel notifications; override the handlers you need.

Logger

Connects a user log sink of type T to the kernel logging system.

OutPoint

Owning wrapper over a btck_TransactionOutPoint.

OutPointApi

CRTP mixin adding out‐point accessors shared by the view and owning types.

OutPointView

Non‐owning view over a btck_TransactionOutPoint.

PrecomputedTransactionData

Owning wrapper over btck_PrecomputedTransactionData used to cache signature hashes.

Range

Read‐only random‐access view over an indexed C‐handle collection.

Range

Read‐only random‐access view over an indexed C‐handle collection.

ScriptPubkey

Owning wrapper over a btck_ScriptPubkey output script.

ScriptPubkeyApi

CRTP mixin adding script‐pubkey operations shared by the view and owning types.

ScriptPubkeyView

Non‐owning view over a btck_ScriptPubkey.

Transaction

Owning wrapper over a btck_Transaction.

TransactionApi

CRTP mixin adding transaction accessors shared by the view and owning types.

TransactionInput

Owning wrapper over a btck_TransactionInput.

TransactionInputApi

CRTP mixin adding transaction‐input accessors shared by the view and owning types.

TransactionInputView

Non‐owning view over a btck_TransactionInput.

TransactionOutput

Owning wrapper over a btck_TransactionOutput.

TransactionOutputApi

CRTP mixin adding transaction‐output accessors shared by the view and owning types.

TransactionOutputView

Non‐owning view over a btck_TransactionOutput.

TransactionSpentOutputs

Owning wrapper over a btck_TransactionSpentOutputs, the coins spent by one transaction.

TransactionSpentOutputsApi

CRTP mixin adding accessors over the coins spent by one transaction.

TransactionSpentOutputsView

Non‐owning view over a btck_TransactionSpentOutputs.

TransactionView

Non‐owning view over a btck_Transaction.

TxValidationState

Owning wrapper over a btck_TxValidationState, holding a transaction's validation outcome.

Txid

Owning wrapper over a btck_Txid transaction identifier.

TxidApi

CRTP mixin adding transaction‐id operations shared by the view and owning types.

TxidView

Non‐owning view over a btck_Txid.

UniqueHandle

Owning RAII handle for a non‐copyable C object, backed by std::unique_ptr.

ValidationInterface

Base class for receiving validation events; override the handlers you need.

View

Non‐owning view over a const C handle of type CType.

WitnessStack

Owning wrapper over a btck_WitnessStack.

WitnessStackApi

CRTP mixin adding witness‐stack accessors shared by the view and owning types.

WitnessStackView

Non‐owning view over a btck_WitnessStack.

is_bitmask_enum

Trait marking an enum as a bitmask; specialize to std::true_type to opt in.

Enums

Name

Description

BlockCheckFlags

Selects which block checks to run, mirroring btck_BlockCheckFlags; combinable as a bitmask.

BlockValidationResult

Reason a block failed validation, mirroring btck_BlockValidationResult.

ChainType

Bitcoin network the chain parameters describe, mirroring btck_ChainType.

LogCategory

Logging category, mirroring btck_LogCategory.

LogLevel

Logging verbosity level, mirroring btck_LogLevel.

ScriptVerificationFlags

Script verification flags, mirroring btck_ScriptVerificationFlags; combinable as a bitmask.

ScriptVerifyStatus

Status of a script verification call, mirroring btck_ScriptVerifyStatus.

SynchronizationState

Stage of block synchronization, mirroring btck_SynchronizationState.

TxValidationResult

Reason a transaction failed validation, mirroring btck_TxValidationResult.

ValidationMode

Outcome of a validation operation, mirroring btck_ValidationMode.

Warning

Kernel warning condition, mirroring btck_Warning.

Functions

Name

Description

CheckTransaction

Runs consensus‐level checks on a standalone transaction.

check

Throws if a freshly returned C handle is null, otherwise passes it through.

logging_disable

Disables all kernel logging.

logging_disable_category

Disables logging for a category.

logging_enable_category

Enables logging for a category.

logging_set_level_category

Sets the log level for a single category.

logging_set_options

Applies global logging options.

operator&

Bitwise AND of two bitmask‐enum values.

operator&=

Bitwise AND‐assign for a bitmask‐enum value.

operator+

Returns an iterator advanced by n positions (offset on the left).

operatorˆ

Bitwise XOR of two bitmask‐enum values.

operatorˆ=

Bitwise XOR‐assign for a bitmask‐enum value.

operator|

Bitwise OR of two bitmask‐enum values.

operator|=

Bitwise OR‐assign for a bitmask‐enum value.

operator~

Bitwise complement of a bitmask‐enum value.

set_mock_time

Overrides the kernel's notion of the current time, for testing.

write_bytes

Serializes a C object into a byte vector using its to_bytes callback.

Concepts

Name

Description

BitmaskEnum

Satisfied by enums opted into bitmask operators via is_bitmask_enum.

IndexedContainer

Satisfied when a container exposes a size accessor and an indexed element accessor.

Log

Satisfied by a type exposing LogMessage(std::string_view) returning void.

btcsignals namespace

btcsignals is a simple mechanism for signaling events to multiple subscribers. It is api‐compatible with a minimal subset of boost::signals2.

Types

Name

Description

any_of

A combiner, which checks if at least one callback returned true.

connection

State object representing the liveness of a registered callback. signal::connect() returns an enabled connection which can be held and disabled in the future.

null_value

The default combiner, which only returns void.

scoped_connection

RAII‐style connection management that disconnects on destruction.

signal

Functor for calling zero or more connected callbacks.

cluster_linearize namespace

Algorithms and data structures for ordering (linearizing) clusters of dependent transactions.

Types

Name

Description

DepGraph

Data structure that holds a transaction graph's preprocessed data (fee, size, ancestors, descendants).

SFLDefaultCostModel

A default cost model for SFL for SetType=BitSet<64>, based on benchmarks.

SetInfo

A set of transactions together with their aggregate feerate.

SpanningForestState

Class to represent the internal state of the spanning‐forest linearization (SFL) algorithm.

Type Aliases

Name

Description

DepGraphIndex

Data type to represent transaction indices in DepGraphs and the clusters they represent.

IndexTxOrder

Simple default transaction ordering function for SpanningForestState::GetLinearization() and Linearize(), which just sorts by DepGraphIndex.

Functions

Name

Description

ChunkLinearization

Compute the feerates of the chunks of linearization. Identical to ChunkLinearizationInfo, but only returns the chunk feerates, not the corresponding transaction sets.

ChunkLinearizationInfo

Compute the chunks of linearization as SetInfos.

Linearize

Find or improve a linearization for a cluster.

PostLinearize

Improve a given linearization.

swap

Swap two SetInfo objects.

operator==

Equality operators

Concepts

Name

Description

StrongComparator

Concept for function objects that return std::strong_ordering when invoked with two Args.

common namespace

Shared types used across the node, wallet, and GUI code.

Types

Name

Description

ConfigError

Details about a configuration initialization failure.

PSBTFillOptions

Instructions for how a PSBT should be signed or filled with information.

Settings

Stored settings. This struct combines settings from the command line, a read‐only configuration file, and a read‐write runtime settings file.

SettingsSpan

Accessor for list of settings that skips negated values when iterated over. The last boolean false value in the list and all earlier values are considered negated.

Type Aliases

Name

Description

SettingsAbortFn

Callback function to let the user decide whether to abort loading if settings.json file exists and can't be parsed, or to ignore the error and overwrite the file.

SettingsValue

Settings value type (string/integer/boolean/null variant).

Enums

Name

Description

ConfigStatus

Outcome of reading configuration and initializing the data directory.

PSBTError

Error conditions reported while processing a PSBT.

Functions

Name

Description

AmountErrMsg

Build the error message for an invalid amount value.

AmountHighWarn

Build a warning that a configured amount is unusually high.

FeeModeFromString

Parse a fee estimate mode from its string name.

FeeModeInfo

Format a single fee mode and its description.

FeeModes

List the available fee estimate mode names.

FeeModesDetail

Build the detailed help text describing all fee modes.

FindKey

Map lookup helper.

GetSetting

Get settings value from combined sources: forced settings, command line arguments, runtime read‐write settings, and the read‐only config file.

GetSettingsList

Get combined setting value similar to GetSetting(), except if setting was specified multiple times, return a list of all the values specified.

InitConfig

Read config files, and create datadir and settings.json if they don't exist.

InvalidEstimateModeErrorMessage

Return the error message shown when an invalid estimate mode is given.

InvalidPortErrMsg

Build the error message for an invalid port value.

OnlyHasDefaultSectionSetting

Return true if a setting is set in the default config file section, and not overridden by a higher priority command‐line or network section value.

PSBTErrorString

Return a bilingual message describing a PSBT error.

ReadSettings

Read settings file.

ResolveErrMsg

Build the error message for a failed address resolution.

StringForFeeReason

Return a human‐readable description of a fee reason.

TransactionErrorString

Return a bilingual message describing a transaction error.

WriteSettings

Write settings file.

dbwrapper_private namespace

These should be considered an implementation detail of the specific database.

Functions

Name

Description

GetObfuscation

Work around circular dependency, as well as for testing in dbwrapper_tests. Database obfuscation should be considered an implementation detail of the specific database.

detail namespace

Internal helpers for parsing blobs from hex strings.

Functions

Name

Description

FromHex

Writes the hex string (in reverse byte order) into a new uintN_t object and only returns a value iff all of the checks pass: ‐ Input length is uintN_t::size()*2 ‐ All characters are hex

FromUserHex

Like FromHex(std::string_view str), but allows an "0x" prefix and pads the input with leading zeroes if it is shorter than the expected length of uintN_t::size()*2.

fs namespace

Filesystem operations and types

Types

Name

Description

path

Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path::string() method, which have unsafe and unpredictable behavior on Windows (see implementation note in PathToString for details)

Functions

Name

Description

operator+ [deleted]

Deleted catch‐all overload that forbids unsafe path concatenation via operator+.

operator/ [deleted]

Deleted catch‐all overload that forbids unsafe path append operations via operator/.

fsbridge namespace

Bridge operations to C stdio

Types

Name

Description

FileLock

Advisory lock on a file, released when the object is destroyed.

Type Aliases

Name

Description

FopenFn

Callable type matching fopen, so a custom file opener can be injected.

Functions

Name

Description

AbsPathJoin

Helper function for joining two paths

fopen

Open a file, handling path encoding correctly across platforms.

i2p namespace

Support for connecting to and accepting connections over the I2P network.

Namespaces

Name

Description

sam

Types and helpers for talking to an I2P router over the SAM (v3) protocol.

Types

Name

Description

Connection

An established connection with another peer.

Type Aliases

Name

Description

Binary

Binary data.

i2p::sam namespace

Types and helpers for talking to an I2P router over the SAM (v3) protocol.

Types

Name

Description

Session

I2P SAM session.

Variables

Name

Description

MAX_MSG_SIZE

The maximum size of an incoming message from the I2P SAM proxy (in bytes). Used to avoid a runaway proxy from sending us an "unlimited" amount of data without a terminator. The longest known message is ~1400 bytes, so this is high enough not to be triggered during normal operation, yet low enough to avoid a malicious proxy from filling our memory.

index_util namespace

Shared database key types for blockfilterindex and coinstatsindex.

Types

Name

Description

DBHashKey

Database key for an index entry looked up by block hash.

DBHeightKey

Database key for an index entry looked up by block height.

Functions

Name

Description

CopyHeightIndexToHashIndex

Copy an index entry from the height index to the hash index.

LookUpOne

Look up a single index entry for a block, trying the height index then the hash index.

Variables

Name

Description

DB_BLOCK_HASH

Key prefix byte identifying an entry in the hash index.

DB_BLOCK_HEIGHT

Key prefix byte identifying an entry in the height index.

init namespace

Initialization helpers shared by the node, wallet, and other executables.

Functions

Name

Description

AddLoggingArgs

Registers the logging‐related command‐line options with the argument manager.

LogPackageVersion

Writes the package name and version banner to the log.

SetLoggingCategories

Enables or disables the debug logging categories selected by the arguments.

SetLoggingLevel

Sets the global logging severity level selected by the arguments.

SetLoggingOptions

Applies the general logging options (log file, timestamps, thread names, and similar flags) parsed from the arguments to the global logger.

StartLogging

Opens the debug log file and begins writing buffered log messages.

interfaces namespace

Interfaces between the node and the rest of the application.

Types

Name

Description

BlockAndHeaderTipInfo

Summary of the current block and header tip, returned from initialization.

BlockInfo

Block data sent with blockConnected, blockDisconnected notifications.

BlockRef

A lightweight reference to a block by hash and height.

Chain

Interface giving clients read and write access to the node's chain state.

ChainClient

Interface for a client (such as a wallet) attached to the node.

Init

Interface for process initialization and inter‐process setup.

Mining

Interface exposing block‐template creation to mining clients.

Wallet

Interface to a single wallet exposed to the node.

WalletLoader

Interface for loading and creating wallets.

kernel namespace

Kernel library components for validating blocks and maintaining chain state.

Types

Name

Description

BlockManagerOpts

An options struct for BlockManager, more ergonomically referred to as BlockManager::Options due to the using‐declaration in BlockManager.

BlockTreeDB

Access to the block database (blocks/index/)

CBlockFileInfo

On‐disk statistics describing the contents of one block file.

CCoinsStats

Aggregate statistics computed over the UTXO set.

CacheSizes

Byte budgets for the validation caches, derived from a single total.

ChainstateManagerOpts

An options struct for ChainstateManager, more ergonomically referred to as ChainstateManager::Options due to the using‐declaration in ChainstateManager.

ChainstateRole

Identifies which chainstate (active or background) a notification refers to.

Context

Process‐wide context owning the libbitcoin_kernel global state.

Interrupted

Result type for use with std::variant to indicate that an operation should be interrupted.

MemPoolLimits

Options struct containing limit options for a CTxMemPool. Default constructor populates the struct with sane default values which can be modified.

MemPoolOptions

Tunable options controlling memory‐pool acceptance and limits.

Notifications

A base class defining functions for notifying about certain kernel events.

Type Aliases

Name

Description

InterruptResult

Simple result type for functions that need to propagate an interrupt status and don't have other return values.

Enums

Name

Description

CoinStatsHashType

Selects the hashing scheme used to summarize the UTXO set.

Warning

Categories of node warning raised by the validation kernel.

Functions

Name

Description

ApplyCoinHash

Folds a coin into the running MuHash of the UTXO set.

ComputeUTXOStats

Computes aggregate statistics over the UTXO set.

GetBogoSize

Computes the serialization‐agnostic size measure of an output script.

IsInterrupted

Tests whether a variant result holds the Interrupted alternative.

MakeBlockInfo

Builds block metadata from a block index entry.

RemoveCoinHash

Removes a coin from the running MuHash of the UTXO set.

SanityChecks

Ensure a usable environment with all necessary library support.

operator<<

Writes a human‐readable form of a chainstate role to a stream.

Variables

Name

Description

DEFAULT_XOR_BLOCKSDIR

Default for whether block files are obfuscated (XOR‐ed) on disk.

leveldb namespace

The LevelDB library namespace, forward‐declared to avoid a public dependency.

Types

Name

Description

Env

LevelDB storage environment abstraction.

memusage namespace

Helpers for estimating the dynamic memory usage of common data structures.

Types

Name

Description

list_node

Layout model of a doubly linked list node, used to size std::list.

stl_shared_counter

Layout model of the control block shared by shared_ptr/weak_ptr, used for sizing.

stl_tree_node

Layout model of a libstdc++ red‐black tree node, used to size STL containers.

unordered_node

Layout model of an unordered container node, used to size hashed containers.

Functions

Name

Description

DynamicUsage

DynamicUsage overloads

IncrementalDynamicUsage

IncrementalDynamicUsage overloads

miniscript namespace

Miniscript: a structured representation of Bitcoin Scripts.

Types

Name

Description

Node

A node in a miniscript expression.

Type

This type encapsulates the miniscript type system properties.

Type Aliases

Name

Description

Opcode

A single script opcode together with any immediate data it pushes.

Enums

Name

Description

Availability

Three‐valued result for whether a satisfaction or dissatisfaction is available.

Fragment

The different node types in miniscript.

MiniscriptContext

The script context a Miniscript is used under.

Functions

Name

Description

Compare

Compare two miniscript subtrees, using a non‐recursive algorithm.

ForEachNode

Unordered traversal of a miniscript node tree.

FromScript

Decodes a Miniscript from a Bitcoin Script.

FromString

Parses a Miniscript from its textual (policy‐language) representation.

IsTapscript

Whether the context Tapscript, ensuring the only other possibility is P2WSH.

operator""_mst

The only way to publicly construct a Type is using this literal operator.

node namespace

Full‐node components that run the block, chainstate, and mempool machinery.

Types

Name

Description

BlockAssembler

Generate a new block, without valid proof‐of‐work

BlockCheckOptions

Options controlling which checks a block‐template validity check performs.

BlockCreateOptions

Block template creation options. These override node defaults, but can't exceed node limits (e.g. block_reserved_weight can't exceed max block weight).

BlockManager

Maintains a tree of blocks (stored in m_block_index) which is consulted to determine where the most‐work tip is.

BlockWaitOptions

Options controlling how long a block‐template wait call blocks and when it returns.

BlockfileCursor

Tracks the current block file and how far its undo data has been written.

CBlockIndexHeightOnlyComparator

Orders block indices purely by height, without tie‐breaking.

CBlockIndexWorkComparator

Orders block indices by most accumulated work, for choosing the best tip.

CBlockTemplate

A candidate block together with the per‐transaction data needed to finalize it.

CacheSizes

Cache sizes split between the optional indexes and the kernel (validation) caches.

ChainstateLoadOptions

Options controlling how the chainstate is loaded and verified.

CoinbaseTx

Template containing all coinbase transaction fields that are set by our miner code. Clients are expected to add their own outputs and typically also expand the scriptSig.

ImportMempoolOptions

Options controlling how a persisted mempool file is imported.

IndexCacheSizes

Cache sizes allotted to each optional block‐chain index.

IteratorComparator

Comparator ordering map iterators by their key, for use in ordered sets of iterators.

KernelNotifications

Kernel notification handler that tracks chain state for code above the validation layer.

KernelState

State tracked by the KernelNotifications interface meant to be used by mining code, index code, RPCs, and other code sitting above the validation layer.

MiniMiner

A minimal version of BlockAssembler, using the same ancestor set scoring algorithm. Allows us to run this algorithm on a limited set of transactions (e.g. subset of mempool or transactions that are not yet in mempool) instead of the entire mempool, ignoring consensus rules. Callers may use this to: ‐ Calculate the "bump fee" needed to spend an unconfirmed UTXO at a given feerate ‐ "Linearize" a list of transactions to see the order in which they would be selected for inclusion in a block

MiniMinerMempoolEntry

Container for tracking updates to ancestor feerate as we include ancestors in the "block".

NodeContext

NodeContext struct containing references to chain state and connection state.

PSBTAnalysis

Holds the results of AnalyzePSBT (miscellaneous information about a PSBT)

PSBTInputAnalysis

Holds an analysis of one input from a PSBT

PackageToValidate

A parent/child transaction package queued for joint mempool validation.

PruneLockInfo

Records the oldest block an external component still needs, to guard it from pruning.

RejectedTxTodo

Follow‐up actions returned after a transaction is rejected from the mempool.

SnapshotMetadata

Metadata describing a serialized UTXO snapshot file.

TxDownloadConnectionInfo

Per‐peer connection attributes that affect transaction download scheduling.

TxDownloadManager

Class responsible for deciding what transactions to request and, once downloaded, whether and how to validate them. It is also responsible for deciding what transaction packages to validate and how to resolve orphan transactions. Its data structures include TxRequestTracker for scheduling requests, rolling bloom filters for remembering transactions that have already been {accepted, rejected, confirmed}, an orphanage, and a registry of each peer's transaction relay‐related information.

TxDownloadManagerImpl

Private implementation of TxDownloadManager.

TxDownloadOptions

Options used to construct a TxDownloadManager.

TxOrphanage

A class to track orphan transactions (failed on TX_MISSING_INPUTS) Since we cannot distinguish orphans from bad transactions with non‐existent inputs, we heavily limit the amount of announcements (unique (NodeId, wtxid) pairs), the number of inputs, and size of the orphans stored (both individual and summed). We also try to prevent adversaries from churning this data structure: once global limits are reached, we continuously evict the oldest announcement (sorting non‐reconsiderable orphans before reconsiderable ones) from the most resource‐intensive peer until we are back within limits. ‐ Peers can exceed their individual limits (e.g. because they are very useful transaction relay peers) as long as the global limits are not exceeded. ‐ As long as the orphan has 1 announcer, it remains in the orphanage. ‐ No peer can trigger the eviction of another peer's orphans. ‐ Peers' orphans are effectively protected from eviction as long as they don't exceed their limits. Not thread‐safe. Requires external synchronization.

Warnings

Manages warning messages within a node.

Type Aliases

Name

Description

BlockMap

Map from block hash to its in‐memory block index entry.

ChainstateLoadResult

Chainstate load status code and optional error string.

Enums

Name

Description

BlockfileType

Which kind of chainstate a block file belongs to, used to segment storage.

ChainstateLoadStatus

Chainstate load status. Simple applications can just check for the success case, and treat other cases as errors. More complex applications may want to try reindexing in the generic failure case, and pass an interrupt callback and exit cleanly in the interrupted case.

ReadRawError

Reason a raw block read from disk failed.

TransactionError

Result of attempting to submit or broadcast a transaction.

TxBroadcast

How to broadcast a local transaction. Used to influence BroadcastTransaction() and its callers.

Warning

Categories of node‐level warning shown to the user and over RPC.

Functions

Name

Description

AbortNode

Abort the node in response to a fatal, unrecoverable internal error.

AddMerkleRootAndCoinbase

Insert the coinbase transaction and compute the merkle root of a block.

AnalyzePSBT

Provides helpful miscellaneous information about where a PSBT is in the signing workflow.

ApplyArgsManOptions

ApplyArgsManOptions overloads

BroadcastTransaction

Submit a transaction to the mempool and (optionally) relay it to all P2P peers.

CalculateCacheSizes

Split the configured total database cache across the indexes and kernel caches.

CheckMiningOptions

Check option values for validity. Returns an error for invalid values.

CooldownIfHeadersAhead

Wait while the best known header extends the current chain tip AND at least one block is being added to the tip every 3 seconds. If the tip is sufficiently far behind, allow up to 20 seconds for the next tip update.

DumpMempool

Dump the mempool to a file.

FindAssumeutxoChainstateDir

Return a path to the snapshot‐based chainstate dir, if one exists.

FindCoins

Look up unspent output information. Returns coins in the mempool and in the current chain UTXO set. Iterates through all the keys in the map and populates the values.

FlattenMiningOptions

Replace null optional values with their hardcoded defaults.

GetDefaultDBCache

Return the default total database cache size in bytes.

GetMinimumTime

Get the minimum time a miner should use in the next block. This always accounts for the BIP94 timewarp rule, so does not necessarily reflect the consensus limit.

GetTip

Return the hash and height of the active chain tip.

GetTransaction

Return transaction with a given hash. If mempool is provided and block_index is not provided, check it first for the tx. If ‐txindex is available, check it next for the tx. Finally, if block_index is provided, check for tx by reading entire block from disk.

GetWarningsForRpc

RPC helper function that wraps warnings.GetMessages().

ImportBlocks

Load blocks from the given files and activate the best chain, even if none are imported.

InterruptWait

Interrupt a blocking wait call.

LoadChainstate

This sequence can have 4 types of outcomes:

LoadMempool

Import the file and attempt to add its contents to the mempool.

LogOversizedDbCache

Log a warning when the configured database cache is larger than available RAM allows.

MakeMinisketch32

Wrapper around Minisketch::Minisketch(32, implementation, capacity).

MakeMinisketch32FP

Wrapper around Minisketch::CreateFP.

MakeTxOrphanage

MakeTxOrphanage overloads

MempoolPath

Return the on‐disk path used to load and save the persisted mempool.

MergeMiningOptions

Merge two BlockCreateOptions structs, replacing null values in x with non‐null values from y.

ReadCoinsViewArgs

Read coins‐view database options from the argument manager.

ReadDatabaseArgs

Read database options from the argument manager.

ReadMiningArgs

Read the mining options set in args. Returns an error if one was encountered.

ReadNotificationArgs

Apply notification‐related options from the argument manager.

ReadSnapshotBaseBlockhash

Read the blockhash of the snapshot base block that was used to construct the chainstate.

RegenerateCommitments

Update an old GenerateCoinbaseCommitment from CreateNewBlock after the block txs have changed

ShouldPersistMempool

Determine whether the mempool should be persisted across restarts.

ShouldWarnOversizedDbCache

Report whether the configured database cache is large enough to warrant a warning.

SubmitBlock

Submit a block and capture the validation state via the BlockChecked callback. Returns whether the block was accepted as a new valid block.

UpdateTime

Update a block header's time field and return the new time.

VerifyLoadedChainstate

Verify a chainstate that has already been loaded.

WaitAndCreateNewBlock

Return a new block template when fees rise to a certain threshold or after a new tip; return nullopt if timeout is reached.

WaitTipChanged

Waits for the connected tip to change until timeout has elapsed. During node initialization, this will wait until the tip is connected (regardless of timeout). Returns the current tip, or nullopt if the node is shutting down or interrupt() is called.

WriteSnapshotBaseBlockhash

Write out the blockhash of the snapshot base block that was used to construct this chainstate. This value is read in during subsequent initializations and used to reconstruct snapshot‐based chainstates.

operator<<

Stream insertion operators

Variables

Name

Description

BLOCKFILE_CHUNK_SIZE

The pre‐allocation chunk size for blk?????.dat files (since 0.8)

DEFAULT_MAX_BURN_AMOUNT

Maximum burn value for sendrawtransaction, submitpackage, and testmempoolaccept RPC calls. By default, a transaction with a burn value higher than this will be rejected by these RPCs and the GUI. This can be overridden with the maxburnamount argument.

DEFAULT_MAX_ORPHANAGE_LATENCY_SCORE

Default value for TxOrphanage::m_max_global_latency_score. Helps limit the maximum latency for operations like EraseForBlock and LimitOrphans.

DEFAULT_MAX_RAW_TX_FEE_RATE

Maximum fee rate for sendrawtransaction and testmempoolaccept RPC calls. Also used by the GUI when broadcasting a completed PSBT. By default, a transaction with a fee rate higher than this will be rejected by these RPCs and the GUI. This can be overridden with the maxfeerate argument.

DEFAULT_PERSIST_MEMPOOL

Default for ‐persistmempool, indicating whether the node should attempt to automatically load the mempool on start and save to disk on shutdown

DEFAULT_PRINT_MODIFIED_FEE

Default for whether block templates print each transaction's modified fee.

DEFAULT_RESERVED_ORPHAN_WEIGHT_PER_PEER

Default value for TxOrphanage::m_reserved_usage_per_peer. Helps limit the total amount of memory used by the orphanage.

DEFAULT_STOPATHEIGHT

Default for ‐stopatheight; 0 means never stop at a given height.

GETDATA_TX_INTERVAL

How long to wait before downloading a transaction from an additional peer

MAX_BLOCKFILE_SIZE

The maximum size of a blk?????.dat file (since 0.8)

MAX_PEER_TX_ANNOUNCEMENTS

Maximum number of transactions to consider for requesting, per peer. It provides a reasonable DoS limit to per‐peer memory usage spent on announcements, while covering peers continuously sending INVs at the maximum rate (by our own policy, see DEFAULT_TX_SEND_RATE) for several minutes, while not receiving the actual transaction (from any peer) in response to requests for them.

MAX_PEER_TX_REQUEST_IN_FLIGHT

Maximum number of in‐flight transaction requests from a peer. It is not a hard limit, but the threshold at which point the OVERLOADED_PEER_TX_DELAY kicks in.

NONPREF_PEER_TX_DELAY

How long to delay requesting transactions from non‐preferred peers

OVERLOADED_PEER_TX_DELAY

How long to delay requesting transactions from overloaded peers (see MAX_PEER_TX_REQUEST_IN_FLIGHT).

SNAPSHOT_BLOCKHASH_FILENAME

The file in the snapshot chainstate dir which stores the base blockhash. This is needed to reconstruct snapshot chainstates on init.

SNAPSHOT_CHAINSTATE_SUFFIX

Suffix appended to the chainstate (leveldb) dir when created based upon a snapshot.

STORAGE_HEADER_BYTES

Size of header written by WriteBlock before a serialized CBlock (8 bytes)

TXID_RELAY_DELAY

How long to delay requesting transactions via txids, if we have wtxid‐relaying peers

UNDOFILE_CHUNK_SIZE

The pre‐allocation chunk size for rev?????.dat files (since 0.8)

UNDO_DATA_DISK_OVERHEAD

Total overhead when writing undo data: header (8 bytes) plus checksum (32 bytes)

Using Declarations

Name

Description

BlockTreeDB

Bring the kernel block‐tree database type into the node namespace.

CBlockFileInfo

Bring the kernel block‐file info type into the node namespace.

poly1305_donna namespace

Low‐level Poly1305 routines based on the public domain poly1305‐donna implementation by Andrew Moon (poly1305‐donna‐32.h).

Types

Name

Description

poly1305_context

Incremental state for a Poly1305 one‐time authenticator computation.

Functions

Name

Description

poly1305_finish

Finish a Poly1305 computation and write the 16‐byte authentication tag.

poly1305_init

Initialize a Poly1305 state with a 32‐byte one‐time key.

poly1305_update

Feed message bytes into a Poly1305 state.

script namespace

Helpers for parsing output descriptor strings.

Functions

Name

Description

Const

Parse a constant.

Expr

Extract the expression that sp begins with.

Func

Parse a function call.

sha256_implementation namespace

Runtime selection of the SHA‐256 implementation.

Enums

Name

Description

UseImplementation

Bit flags selecting which CPU‐specific SHA‐256 implementations may be used.

std namespace

Standard library namespace, extended here with a deleted hash specialization.

Types

Name

Description

hash<CTransactionRef>

Disable default std::hash for CTransactionRef to prevent accidentally comparing by pointer. Use CTransactionRefHash or provide a custom hasher.

subprocess namespace

Getting started with reading this source code. The source is mainly divided into four parts: 1. Exception Classes: These are very basic exception classes derived from runtime_error exception. There are two types of exception thrown from subprocess library: OSError and CalledProcessError

Namespaces

Name

Description

util

Low‐level helpers shared by the subprocess implementation (argument quoting, pipes, descriptors).

Types

Name

Description

Buffer

class: Buffer This class is a very thin wrapper around std::vector<char> This is basically used to determine the length of the actual data stored inside the dynamically resized vector.

CalledProcessError

class: CalledProcessError Thrown when there was error executing the command. Check Popen class API's to know when this exception can be thrown.

OSError

class: OSError Thrown when some system call fails to execute or give result. The exception message contains the name of the failed system call with the stringisized errno code. Check Popen class API's to know when this exception would be thrown. Its usual that the API exception specification would have this exception together with CalledProcessError.

Popen

class: Popen This is the single most important class in the whole library and glues together all the helper classes to provide a common interface to the client.

error

Option to specify the error channel for the child process. It can be: 1. An already open file descriptor. 2. A file name. 3. IOTYPE. Usually a PIPE or STDOUT

executable

Option to specify the executable name separately from the args sequence. In this case the cmd args must only contain the options required for this executable.

input

Option to specify the input channel for the child process. It can be: 1. An already open file descriptor. 2. A file name. 3. IOTYPE. Usual a PIPE

output

Option to specify the output channel for the child process. It can be: 1. An already open file descriptor. 2. A file name. 3. IOTYPE. Usually a PIPE.

string_arg

Base class for all arguments involving string value.

Type Aliases

Name

Description

ErrBuffer

Buffer holding the data captured from the child's error descriptor.

OutBuffer

Buffer holding the data captured from the child's output descriptor.

Enums

Name

Description

IOTYPE

Used for redirecting input/output/error

Variables

Name

Description

DEFAULT_BUF_CAP_BYTES

Default buffer capacity for OutBuffer and ErrBuffer, in bytes.

SP_MAX_ERR_BUF_SIZ

Maximum buffer size allocated on the stack when reading an error from a pipe.

subprocess::util namespace

Low‐level helpers shared by the subprocess implementation (argument quoting, pipes, descriptors).

tinyformat namespace

Tiny type‐safe printf‐style string formatting library.

Types

Name

Description

FormatList

List of template arguments format(), held in a type‐opaque way.

FormatStringCheck

Format string wrapper that checks the format at compile time.

RuntimeFormat

Wrapper marking a format string as runtime data, skipping compile‐time checks.

format_error

Exception thrown when formatting fails. Added for Bitcoin Core.

Type Aliases

Name

Description

FormatListRef

Reference to type‐opaque format list for passing to vformat()

Functions

Name

Description

format

format overloads

formatValue

formatValue overloads

makeFormatList

Make type‐agnostic format list from list of template arguments.

printf

Format list of arguments to std::cout, according to the given format string

printfln

Format list of arguments to std::cout, then append a newline.

vformat

Format a list of arguments to a stream according to a format string.

txindex namespace

Database key types and constants for the transaction index.

Types

Name

Description

BlockHashKey

Key for looking up the sequence number assigned to the block with the given hash.

BlockSeqKey

Key for looking up the hash of the block with the given sequence number.

BlockTxPosition

The location of a transaction: the sequence number of the block that contains it and the transaction's serialized byte offset from the start of that block (including the header), so the on‐disk position is simply block_data_pos + tx_offset_in_block.

DBKey

Hashed txindex key: a truncated txid hash prefix plus the block position.

Type Aliases

Name

Description

TxHashKeyPrefix

Integer type holding the truncated txid hash prefix of a key.

Functions

Name

Description

CreateKeyPrefix

Compute the txid‐hash key prefix for a transaction.

LegacyTxKey

Key of a legacy (pre‐hashing) txindex row: the full txid under the 't' prefix.

operator==

Compare two positions for equality by block sequence and offset.

Variables

Name

Description

BLOCK_HEADER_SIZE

Serialized size of a block header, the offset of the first byte after it.

DB_BEST_BLOCK_V2

Key holding the sync locator for the current (v2) index format.

DB_BLOCK_HASH

Key prefix mapping a block hash to its sequence number.

DB_BLOCK_SEQ

Key prefix mapping a block sequence number to its block hash.

DB_NEXT_BLOCK_SEQ

Key holding the next block sequence number to assign.

DB_TXID_HASH_SALT

Key holding the salt used to hash txids.

DB_TXINDEX

Prefix of a legacy (pre‐hashing) txindex row.

DB_TXINDEX_HASHED

Key prefix for a hashed txindex row keyed by txid hash prefix and position.

EMPTY_VALUE

Empty value of a hashed txindex row, whose position is encoded in its key.

HASH_PREFIX_SIZE

Number of leading txid‐hash bytes kept in a hashed txindex key.

txindex_tests namespace

Unit‐test helpers that reach into TxIndex internals.

Types

Name

Description

TxIndexTest

Test fixture granting access to TxIndex private members.

util namespace

Application‐agnostic logging interface shared across Bitcoin Core.

Namespaces

Name

Description

log

Application‐agnostic logging interface shared across Bitcoin Core.

Types

Name

Description

BadExpectedAccess

Exception thrown when the value of an errored util::Expected is accessed.

BilingualFmt

Compile‐time bilingual format string carrying a checked format and its translatable literal.

ConstevalFormatString

A wrapper for a compile‐time partially validated format string

Error

Wraps a failure message used to construct a util::Result in the error state.

Expected

The util::Expected class provides a standard way for low‐level functions to return either error values or result values.

ImmediateTaskRunner

Task runner that processes each callback synchronously on insertion.

LineReader

Reads a character buffer line by line or in fixed‐length chunks.

Overloaded

Overloaded helper for std::visit. This helper and std::visit in general are useful to write code that switches on a variant type. Unlike if/else‐if and switch/case statements, std::visit will trigger compile errors if there are unhandled cases.

Result

The util::Result class provides a standard way for functions to return either error messages or result values.

SignalInterrupt

Helper class that manages an interrupt flag, and allows a thread or signal to interrupt another thread.

TaskRunnerInterface

This header provides an interface and simple implementation for a task runner. Another threaded, serial implementation using a queue is available in the scheduler module's SerialTaskRunner.

TokenBucket

A token bucket rate limiter.

TranslatedLiteral

Compile‐time literal string that can be translated with an optional translation function.

Unexpected

The util::Unexpected class represents an unexpected value stored in util::Expected.

Enums

Name

Description

LockResult

Outcome of trying to acquire a directory lock.

Functions

Name

Description

AnyPtr

Helper function to access the contained object of a std::any instance. Returns a pointer to the object if passed instance has a value and the type matches, nullptr otherwise.

ConstevalHexDigit

consteval version of HexDigit() without the lookup table.

ContainsNoNUL

Check if a string does not contain any embedded NUL (0) characters

ErrorString

Extracts the error message from a result.

ExecVp

Cross‐platform wrapper for POSIX execvp function. Arguments and return value are the same as for POSIX execvp, and the argv array should consist of null terminated strings and be null terminated itself, like the POSIX function.

GetExePath

Return path to current executable assuming it was invoked with argv0. If path could not be determined, returns an empty path.

HasPrefix

Check whether a container begins with the given prefix.

Join

Join overloads

LockDirectory

Acquire an exclusive lock on a directory via a lock file.

MakeUnorderedList

Create an unordered multi‐line list of items.

RemovePrefix

Return a copy of str with the given prefix removed, if present.

RemovePrefixView

Return a view of str with the given prefix removed, if present.

RemoveSuffixView

Return a view of str with the given suffix removed, if present.

ReplaceAll

Replace every occurrence of a substring in place.

Split

Split overloads

SplitString

SplitString overloads

ThreadGetInternalName

Get the thread's internal (in‐memory) name; used e.g. for identification in logging.

ThreadRename

Rename a thread both in terms of an internal (in‐memory) name as well as its system thread name.

ThreadSetInternalName

Set the internal (in‐memory) name of the current thread only.

ToString

Locale‐independent version of std::to_string

TraceThread

A wrapper for do‐something‐once thread functions.

TrimString

Return a copy of str with leading and trailing pattern characters removed.

TrimStringView

Return a view of str with leading and trailing pattern characters removed.

insert

insert overloads

operator""_hex

Compile‐time hex literal returning a std::array<std::byte, N/2>.

operator""_hex_u8

Compile‐time hex literal returning a std::array<uint8_t, N/2>.

operator""_hex_v

Compile‐time hex literal returning a std::vector<std::byte>.

operator""_hex_v_u8

Compile‐time hex literal returning a std::vector<uint8_t>.

operator+

Addition operators

operator<<

Write the translated form of a literal to an output stream.

util::log namespace

Application‐agnostic logging interface shared across Bitcoin Core.

Types

Name

Description

Entry

A single log message together with its metadata.

NoRateLimitTag

Structure and constant for tagging not to rate limit.

Type Aliases

Name

Description

Category

Opaque to util::log; interpreted by consumers (e.g., BCLog::LogFlags).

Enums

Name

Description

Level

Severity level of a log entry.

Functions

Name

Description

Log

Send message to be logged. Applications using the logging library need to provide this.

LogPrintFormatInternal

LogPrintFormatInternal overloads

LogPrintFormatInternal_

Format a log message and forward it to util::log::Log.

ShouldDebugLog

Return whether messages with specified category should be debug logged. Applications using the logging library need to provide this.

ShouldTraceLog

Return whether messages with specified category should be trace logged. Applications using the logging library need to provide this.

Variables

Name

Description

NO_RATE_LIMIT

Tag value passed to logging macros to opt out of rate limiting.

wallet namespace

Wallet subsystem.

Namespaces

Name

Description

DBKeys

Record type prefixes used as keys in the wallet database.

WalletTool

Command‐line wallet tool commands.

feebumper

Helpers for replacing a wallet transaction with a higher‐fee version.

wallet_crypto_tests

Test‐only helpers for exercising the wallet crypto internals.

Types

Name

Description

Balance

Breakdown of a wallet's balance by category.

BerkeleyROBatch

RAII class that provides access to a BerkeleyRODatabase

BerkeleyROCursor

Cursor that iterates over the records of a BerkeleyRODatabase.

BerkeleyRODatabase

A class representing a BerkeleyDB file from which we can only read records. This is used only for migration of legacy to descriptor wallets

BytePrefix

Compares equal to any byte span that begins with the same prefix.

CAddressBookData

Address book data.

CCoinControl

Coin Control Features.

CCrypter

Encryption/decryption context with key information

CHDChain

Simple HD chain data model.

CKeyMetadata

Metadata about a wallet key, such as its creation time and HD derivation info.

CMasterKey

Master key for wallet encryption

CMerkleTx

Legacy class used for deserializing vtxPrev for backwards compatibility. vtxPrev was removed in commit 93a18a3650292afbb441a47d1fa1b94aeb0164e3, but old wallet.dat files may still contain vtxPrev vectors of CMerkleTxs. These need to get deserialized for field alignment when deserializing a CWalletTx, but the deserialized values are discarded.*

COutput

A UTXO under consideration for use in funding a new transaction.

COutputEntry

A single received or sent output belonging to the wallet.

CRecipient

A transaction output target: a destination, an amount, and fee handling.

CWallet

A CWallet maintains a set of transactions and balances, and provides the ability to create new transactions.

CWalletTx

A transaction with a bunch of additional info that only the owner cares about. It includes any unrecorded transactions needed to link it back to the block chain.

CachableAmount

Cachable amount subdivided into avoid reuse and all balances

CoinEligibilityFilter

Parameters for filtering which OutputGroups we may use in coin selection. We start by being very selective and requiring multiple confirmations and then get more permissive if we cannot fund the transaction.

CoinFilterParams

Parameters that filter which coins are considered available for spending.

CoinSelectionParams

Parameters for one iteration of Coin Selection.

CoinsResult

COutputs available for spending, stored by OutputType. This struct is really just a wrapper around OutputType vectors with a convenient method for concatenating and returning all COutputs as one vector.

CreatedTransactionResult

Outcome of building a new transaction, bundling the transaction with its fee details.

DatabaseBatch

RAII class that provides access to a WalletDatabase

DatabaseCursor

Iterates over records stored in a wallet database.

DatabaseOptions

Options controlling how a wallet database is opened or created.

DbTxnListener

Callbacks invoked when a wallet database transaction commits or aborts.

DescriptorScriptPubKeyMan

A ScriptPubKeyMan backed by a single output descriptor.

Groups

A pair of output group collections split by whether they hold only positive‐value UTXOs.

InMemoryWalletDatabase

An in‐memory SQLiteDatabase. Used as a temporary build artifact where no on‐disk persistence is needed.

LegacyDataSPKM

Manages the minimum data needed to load and migrate a legacy wallet.

LegacySigningProvider

SigningProvider wrapper for LegacyDataSPKM that does not provide private keys.

MigrationData

struct containing information needed for migrating legacy wallets to descriptor wallets

MigrationResult

Result of migrating a legacy wallet to descriptor wallets.

MinimumFeeRateResult

Result of resolving the minimum fee rate to use for a transaction.

OutputGroup

A group of UTXOs paid to the same output script.

OutputGroupTypeMap

Stores several 'Groups' whose were mapped by output type.

OutputPtrComparator

Comparator ordering shared pointers to COutput by the pointed‐to output.

PreselectedInput

Holds the user‐supplied details for a single manually selected transaction input.

ReserveDestination

A wrapper to reserve an address from a wallet

SQLiteBatch

RAII class that provides access to a WalletDatabase

SQLiteCursor

RAII class that provides a database cursor

SQLiteDatabase

An instance of this class represents one SQLite3 database.

SQliteExecHandler

Class responsible for executing SQL statements in SQLite databases. Methods are virtual so they can be overridden by unit tests testing unusual database conditions.

ScriptPubKeyMan

A class implementing ScriptPubKeyMan manages some (or all) scriptPubKeys used in a wallet. It contains the scripts and keys related to the scriptPubKeys it manages. A ScriptPubKeyMan will be able to give out scriptPubKeys to be used, as well as marking when a scriptPubKey has been used. It also handles when and how to store a scriptPubKey and its related scripts and keys, including encryption.

SelectionFilter

Pairs a coin eligibility filter with whether mixing output types is allowed.

SelectionResult

The set of inputs chosen by a coin selection algorithm, along with its metrics.

TxSize

Holds the virtual size and weight of a transaction.

TxStateBlockConflicted

State of rejected transaction that conflicts with a confirmed block.

TxStateConfirmed

State of transaction confirmed in a block.

TxStateInMempool

State of transaction added to mempool.

TxStateInactive

State of transaction not confirmed or conflicting with a known block and not in the mempool. May conflict with the mempool, or with an unknown block, or be abandoned, never broadcast, or rejected from the mempool for another reason.

TxStateUnrecognized

State of transaction loaded in an unrecognized state with unexpected hash or index values. Treated as inactive (with serialized hash and index values preserved) by default, but may enter another state if transaction is added to the mempool, or confirmed, or abandoned, or found conflicting.

WalletBatch

Access to the wallet database. Opens the database and provides read and write access to it. Each read and write is its own transaction. Multiple operation transactions can be started using TxnBegin() and committed using TxnCommit() Otherwise the transaction will be committed when the object goes out of scope. Optionally (on by default) it will flush to disk on close. Every 1000 writes will automatically trigger a flush to disk.

WalletContext

WalletContext struct containing references to state shared between CWallet instances, like the reference to the chain interface, and the list of opened wallets.

WalletDatabase

An instance of this class represents one database.

WalletDescInfo

Exportable form of a WalletDescriptor with the descriptor as a string and without its ID or cache.

WalletDescriptor

Descriptor with some wallet metadata

WalletDestination

A destination together with whether it belongs to the internal (change) chain.

WalletError

Wallet‐layer error with both programmatic and user‐facing information.

WalletRescanReserver

RAII object to check and reserve a wallet rescan

WalletStorage

Wallet storage things that ScriptPubKeyMans need in order to be able to store things to the wallet database. It provides access to things that are part of the entire wallet and not specific to a ScriptPubKeyMan such as wallet flags, wallet version, encryption keys, encryption status, and the database itself. This allows a ScriptPubKeyMan to have callbacks into CWallet without causing a circular dependency. WalletStorage should be the same for all ScriptPubKeyMans of a wallet.

WalletTXO

A single wallet transaction output, pairing a wallet transaction with one of its outputs.

WalletTxOrderComparator

Orders wallet transactions by their position in the ordered transaction list.

Type Aliases

Name

Description

BerkeleyROData

Ordered map of raw key/value records read from a BerkeleyDB file.

CKeyingMaterial

Secure byte buffer used to hold sensitive key material in memory.

CryptedKeyMap

Map from key id to its public key and encrypted private key material.

FilteredOutputGroups

Output groups keyed by the eligibility filter that selected them.

KeyMap

Map from key id to its private key.

LoadWalletFn

Callback invoked when a wallet is loaded, receiving the wallet interface.

OutputSet

A set of COutput pointers ordered by the pointed‐to output.

SyncTxState

Subset of states transaction sync logic is implemented to handle.

TxState

All possible CWalletTx states

Enums

Name

Description

AddressPurpose

Address purpose field that has been been stored with wallet sending and receiving addresses since BIP70 payment protocol support was added in https://github.com/bitcoin/bitcoin/pull/2539. This field is not currently used for any logic inside the wallet, but it is still shown in RPC and GUI interfaces and saved for new addresses. It is basically redundant with an address's IsMine() result.

DBErrors

Error statuses for the wallet database. Values are in order of severity. When multiple errors occur, the most severe (highest value) will be returned.

DatabaseFormat

On‐disk format of a wallet database.

DatabaseStatus

Result of opening or creating a wallet database.

SelectionAlgorithm

Identifies which coin selection algorithm produced a result.

WalletErrorCode

Machine‐readable wallet error codes.

WalletFlags

Feature and state flags stored on a wallet.

Functions

Name

Description

AddWallet

Register a loaded wallet with the wallet context.

AddWalletSetting

Add wallet name to persistent configuration so it will be loaded on startup.

AllInputsMine

Returns whether all of the inputs belong to the wallet

AppendLastProcessedBlock

Appends the wallet's last processed block to an RPC result object.

AttemptSelection

Attempt to find a valid input set that preserves privacy by not mixing OutputTypes. ChooseSelectionResult() will be called on each OutputType individually and the best the solution (according to the waste metric) will be chosen. If a valid input cannot be found from any single OutputType, fallback to running ChooseSelectionResult() over all available coins.

AutomaticCoinSelection

Select a set of coins such that nTargetValue is met; never select unconfirmed coins if they are not ours

AvailableCoins

Populate the CoinsResult struct with vectors of available COutputs, organized by OutputType.

BDBDataFile

Returns the path to the Berkeley DB data file for a wallet path.

CachedTxGetAmounts

Splits a wallet transaction into received and sent entries plus its fee.

CachedTxGetChange

Returns the cached change amount of a wallet transaction.

CachedTxGetCredit

Returns the cached total credit of a wallet transaction.

CachedTxGetDebit

Returns the cached total debit of a wallet transaction.

CachedTxIsFromMe

Returns whether a wallet transaction debits from the wallet.

CachedTxIsTrusted

CachedTxIsTrusted overloads

CalculateMaximumSignedInputSize

CalculateMaximumSignedInputSize overloads

CalculateMaximumSignedTxSize

CalculateMaximumSignedTxSize overloads

ChooseSelectionResult

Attempt to find a valid input set that meets the provided eligibility filter and target. Multiple coin selection algorithms will be run and the input set that produces the least waste (according to the waste metric) will be chosen.

CoinGrinder

Select coins using the CoinGrinder deterministic search algorithm.

CreateFromDump

Creates a new wallet database from a previously dumped file.

CreateTransaction

Create a new transaction paying the recipients with a set of coins selected by SelectCoins(); Also create the change output, when needed

CreateWallet

Create a new wallet and load it into the context.

DecryptKey

Decrypts an encrypted private key and validates it against its public key.

DecryptSecret

Decrypts a secret with the master key using the given IV.

DiscourageFeeSniping

Set a height‐based locktime for new transactions (uses the height of the current chain tip unless we are not synced with the current chain

DumpWallet

Dumps the records of a wallet database to a human‐readable file.

EncryptSecret

Encrypts a secret with the master key using the given IV.

EnsureUniqueWalletName

Ensures that a wallet name is specified across the endpoint and wallet_name. Throws RPC_INVALID_PARAMETER if none or different wallet names are specified.

EnsureWalletContext

Retrieves the WalletContext stored in an RPC context, throwing if absent.

EnsureWalletIsUnlocked

Throws an RPC error if the wallet is locked.

ExportDescriptors

Export the descriptors from a wallet so that they can be imported elsewhere

ExportWatchOnlyWallet

Make a new watchonly wallet file containing the public descriptors from this wallet The exported watchonly wallet file will be named and placed at the path specified in 'destination'

FetchSelectedInputs

Fetch and validate coin control selected inputs. Coins could be internal (from the wallet) or external.

FindNonChangeParentOutput

Find non‐change parent output.

FundTransaction

Insert additional inputs into the transaction by calling CreateTransaction();

GenerateChangeTarget

Choose a random change target for each transaction to make it harder to fingerprint the Core wallet based on the change output values of transactions it creates. Change target covers at least change fees and adds a random value on top of it. The random value is between 50ksat and min(2 * payment_value, 1milsat) When payment_value <= 25ksat, the value is just 50ksat.

GenerateWalletDescriptor

Builds a new wallet descriptor for the given key and output type.

GetAddressBalances

Returns the confirmed balance held at each of the wallet's addresses.

GetAddressGroupings

Groups addresses that are believed to share a common owner.

GetAlgorithmName

Return the human‐readable name of a selection algorithm.

GetAvoidReuseFlag

Resolves the effective avoid‐reuse flag from a request parameter.

GetBalance

Computes the wallet's balance broken down by category.

GetDefaultWallet

Return the default wallet and report how many wallets are loaded.

GetDiscardRate

Return the maximum feerate for discarding change.

GetMinimumFee

Return the minimum fee for this size given a fee rate result.

GetMinimumFeeRate

Estimate the minimum fee rate considering user set parameters and the required fee

GetRequiredFee

Return the minimum required absolute fee for this size based on the required fee rate

GetRequiredFeeRate

Return the minimum required feerate taking into account the minimum relay feerate and user set minimum transaction feerate

GetWallet

Look up a loaded wallet by name.

GetWalletDir

Get the path of the wallet directory.

GetWalletForJSONRPCRequest

Figures out what wallet, if any, to use for a JSONRPCRequest.

GetWalletNameFromJSONRPCRequest

Extracts the wallet name encoded in a JSON‐RPC request endpoint, if any.

GetWalletPath

Determine the path that the wallet is stored in

GetWalletRPCCommands

Returns the RPC commands provided by the wallet component.

GetWallets

Return all wallets currently loaded in the context.

GroupOutputs

Group coins by the provided filters.

HandleLoadWallet

Register a callback invoked whenever a wallet is loaded.

HandleWalletError

Translates a wallet loading result into the appropriate RPC error.

HasLegacyRecords

HasLegacyRecords overloads

InputIsMine

Returns whether the output spent by an input belongs to the wallet.

IsBDBFile

Returns whether the file at the path is a Berkeley DB file.

IsSQLiteFile

Returns whether the file at the path is a SQLite file.

KnapsackSolver

Select coins using the original Knapsack approximation, used as a fallback.

LabelFromValue

Validates and extracts an address label from an RPC value.

ListCoins

Return list of available coins and locked coins grouped by non‐change output address.

ListDatabases

Recursively list database paths in directory.

LoadCryptedKey

Loads an encrypted key from a database record into the wallet.

LoadEncryptionKey

Loads a master encryption key from a database record into the wallet.

LoadHDChain

Loads HD chain data from a database record into the wallet.

LoadKey

Loads an unencrypted key from a database record into the wallet.

LoadWallet

Load an existing wallet from disk into the context.

LoadWallets

Load wallet databases.

LogDBInfo

Logs information about the database, including available engines, features, and other capabilities.

MakeBerkeleyRODatabase

Return object giving access to Berkeley Read Only database at specified path.

MakeDatabase

Creates or opens a wallet database at the given path.

MakeInMemoryWalletDatabase

Create a new in‐memory wallet database.

MakeSQLiteDatabase

Open or create a SQLite wallet database at the given path.

MakeWalletDatabase

Open the database backend for a wallet.

MaybeResendWalletTxs

Called periodically by the schedule thread. Prompts individual wallets to resend their transactions. Actual rebroadcast schedule is managed by the wallets themselves.

MigrateLegacyToDescriptor

MigrateLegacyToDescriptor overloads

NotifyWalletLoaded

Fire the load‐wallet callbacks for a newly loaded wallet.

OutputGetChange

Returns the change amount an output contributes.

OutputGetCredit

Returns the credit an output contributes if it belongs to the wallet.

OutputIsChange

Returns whether an output is a change output of the wallet.

PurposeFromString

Parse an address purpose from its serialized string form.

PurposeToString

Convert an address purpose to its serialized string form.

PushParentDescriptors

Fetch parent descriptors of this scriptPubKey.

ReadDatabaseArgs

Fills database options from command‐line arguments.

RemoveWallet

Remove a wallet from the wallet context and optionally update its load‐on‐startup setting.

RemoveWalletSetting

Remove wallet name from persistent configuration so it will not be loaded on startup.

RestoreWallet

Restore a wallet from a backup file.

RunWithinTxn

Executes the provided function 'func' within a database transaction context.

SQLiteDataFile

Returns the path to the SQLite data file for a wallet path.

SQLiteDatabaseVersion

Return the version of the SQLite library in use.

ScriptIsChange

Returns whether a script is a change output of the wallet.

SelectCoins

Select all coins from coin_control, and if coin_control 'm_allow_other_inputs=true', call 'AutomaticCoinSelection' to select a set of coins such that nTargetValue ‐ pre_set_inputs.total_amount is met.

SelectCoinsBnB

Select coins using the Branch and Bound algorithm to find a changeless solution.

SelectCoinsSRD

Select coins by Single Random Draw (SRD). SRD selects eligible OutputGroups from a shuffled ordering until the effective value of the input set suffices to create the recipient outputs and a change output with an amount of at least CHANGE_LOWER. While the maximum selection weight is exceeded during selection, the OutputGroup with the lowest effective value is dropped from the selection before additional OutputGroups are selected. Due to this greedy approach, SRD can fail to discover possible solutions in pathological cases.

StartWallets

Complete startup of wallets.

TxGetChange

Returns the total change amount of a transaction.

TxGetCredit

Returns the total credit of a transaction's outputs owned by the wallet.

TxStateString

Return TxState or SyncTxState as a string for logging or debugging.

UnloadWallets

Stop and unload all wallets held by the context.

VerifyWallets

Responsible for reading and validating the ‐wallet arguments and verifying the wallet database.

WaitForDeleteWallet

Explicitly delete the wallet. Blocks the current thread until the wallet is destructed.

operator<

Less‐than operators

Variables

Name

Description

CHANGE_LOWER

lower bound for randomly‐chosen target change amount

CHANGE_UPPER

upper bound for randomly‐chosen target change amount

DEFAULT_ADDRESS_TYPE

Default for ‐addresstype

DEFAULT_AVOIDPARTIALSPENDS

Default for ‐avoidpartialspends

DEFAULT_CONSOLIDATE_FEERATE

‐consolidatefeerate default

DEFAULT_DISABLE_WALLET

‐disablewallet default

DEFAULT_DISCARD_FEE

‐discardfee default

DEFAULT_FALLBACK_FEE

‐fallbackfee default

DEFAULT_KEYPOOL_SIZE

Default for ‐keypool

DEFAULT_MAX_AVOIDPARTIALSPEND_FEE

maximum fee increase allowed to do partial spend avoidance, even for nodes with this feature disabled by default

DEFAULT_MAX_DEPTH

Default maximum chain depth for a coin to be considered available.

DEFAULT_MIN_DEPTH

Default minimum chain depth for a coin to be considered available.

DEFAULT_SPEND_ZEROCONF_CHANGE

Default for ‐spendzeroconfchange

DEFAULT_TRANSACTION_MAXFEE

‐maxtxfee default

DEFAULT_TRANSACTION_MINFEE

‐mintxfee default

DEFAULT_TX_CONFIRM_TARGET

‐txconfirmtarget default

DEFAULT_WALLETBROADCAST

‐walletbroadcast default

DEFAULT_WALLETCROSSCHAIN

‐walletcrosschain default

DEFAULT_WALLET_RBF

‐walletrbf default

DEFAULT_WALLET_REJECT_LONG_CHAINS

Default for ‐walletrejectlongchains

DEFAULT_WALLET_TX_VERSION

Default transaction version used when building wallet transactions.

DUMMY_NESTED_P2WPKH_INPUT_SIZE

Pre‐calculated constants for input size estimation in virtual size

HELP_REQUIRING_PASSPHRASE

Help text appended to RPC methods that require the wallet passphrase.

HIGH_APS_FEE

discourage APS fee higher than this amount

HIGH_MAX_TX_FEE

‐maxtxfee will warn if called with a higher fee than this amount (in satoshis)

HIGH_TX_FEE_PER_KB

Discourage users to set fees higher than this amount (in satoshis) per kB

KNOWN_WALLET_FLAGS

Bitmask of all wallet flags recognized by this version.

LEGACY_OUTPUT_TYPES

Output types associated with LegacyDataSPKM.

MUTABLE_WALLET_FLAGS

Bitmask of wallet flags that may be changed after wallet creation.

RESULT_LAST_PROCESSED_BLOCK

RPC result describing the block a piece of wallet information was generated on.

STRING_TO_WALLET_FLAG

Maps each wallet flag string name back to its flag value.

UNKNOWN_TIME

Constant representing an unknown spkm creation time

WALLET_CRYPTO_IV_SIZE

Size in bytes of the AES initialization vector.

WALLET_CRYPTO_KEY_SIZE

Size in bytes of the AES‐256 encryption key derived for the wallet.

WALLET_CRYPTO_SALT_SIZE

Size in bytes of the salt mixed into the passphrase during key derivation.

WALLET_FLAG_TO_STRING

Maps each wallet flag to its serialized string name.

WALLET_INCREMENTAL_RELAY_FEE

minimum recommended increment for replacement txs

wallet::DBKeys namespace

Record type prefixes used as keys in the wallet database.

Variables

Name

Description

ACENTRY

Legacy accounting entry record.

ACTIVEEXTERNALSPK

Active external ScriptPubKeyMan record.

ACTIVEINTERNALSPK

Active internal ScriptPubKeyMan record.

BESTBLOCK

Best block locator scanned by the wallet.

BESTBLOCK_NOMERKLE

Best block locator without a merkle branch.

CRYPTED_KEY

Encrypted private key record.

CSCRIPT

Watch‐only script record.

DEFAULTKEY

Legacy default key record.

DESTDATA

Destination metadata record.

FLAGS

Wallet flags record.

HDCHAIN

HD chain data record.

KEY

Unencrypted private key record.

KEYMETA

Key metadata record.

LEGACY_TYPES

Keys in this set pertain only to legacy wallets and are removed during migration to descriptors.

LOCKED_UTXO

Locked UTXO record.

MASTER_KEY

Master key record used to encrypt other keys.

MINVERSION

Minimum client version required to read the wallet.

NAME

Address book label record.

OLD_KEY

Legacy wallet key record.

ORDERPOSNEXT

Next transaction ordering position record.

POOL

Key pool entry record.

PURPOSE

Address purpose record.

SETTINGS

Wallet settings record.

TX

Wallet transaction record.

VERSION

Wallet format version record.

WALLETDESCRIPTOR

Wallet descriptor record.

WALLETDESCRIPTORCKEY

Encrypted descriptor private key record.

WALLETDESCRIPTORKEY

Descriptor private key record.

WATCHMETA

Watch‐only key metadata record.

WATCHS

Watch‐only script record.

WTX_VARIANT

Wallet transaction variant record.

wallet::WalletTool namespace

Command‐line wallet tool commands.

Functions

Name

Description

ExecuteWalletToolFunc

Runs a wallet‐tool command such as create, info, or dump.

wallet::feebumper namespace

Helpers for replacing a wallet transaction with a higher‐fee version.

Types

Name

Description

SignatureWeightChecker

Signature checker that records the weight of every valid signature it verifies.

SignatureWeights

Accumulates signature counts and weights to estimate transaction size.

Enums

Name

Description

Result

Outcome of a fee‐bumping operation.

Functions

Name

Description

CommitTransaction

Commit the bumpfee transaction.

CreateRateBumpTransaction

Create bumpfee transaction based on feerate estimates.

SignTransaction

Sign the new transaction,

TransactionCanBeBumped

Return whether transaction can be bumped.

wallet::wallet_crypto_tests namespace

Test‐only helpers for exercising the wallet crypto internals.

Types

Name

Description

TestCrypter

Test fixture granting access to CCrypter internals.

Created with MrDocs