Inside Bitcoin
Opening the selected file…
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
1// Copyright (c) 2010-present The Bitcoin Core developers2// Distributed under the MIT software license, see the accompanying3// file COPYING or http://www.opensource.org/licenses/mit-license.php.5//! @file common/types.h is a home for simple enum and struct type definitions6//! that can be used internally by functions in the libbitcoin_common library,7//! but also used externally by node, wallet, and GUI code.8//!9//! This file is intended to define only simple types that do not have external10//! dependencies. More complicated types should be defined in dedicated header11//! files.13#ifndef BITCOIN_COMMON_TYPES_H14#define BITCOIN_COMMON_TYPES_H16#include <optional>18namespace common {19enum class PSBTError {20MISSING_INPUTS,21SIGHASH_MISMATCH,22EXTERNAL_SIGNER_NOT_FOUND,23EXTERNAL_SIGNER_FAILED,24UNSUPPORTED,25INCOMPLETE,26INVALID_TX,27};28/**29* Instructions for how a PSBT should be signed or filled with information.30*/31struct PSBTFillOptions {32/**33* Whether to sign or not.34*/35bool sign{true};37/**38* The sighash type to use when signing (if PSBT does not specify).39*/40std::optional<int> sighash_type{std::nullopt};42/**43* Whether to create the final scriptSig or scriptWitness if possible.44*/45bool finalize{true};47/**48* Whether to fill in bip32 derivation information if available.49*/50bool bip32_derivs{true};51};53} // namespace common55#endif // BITCOIN_COMMON_TYPES_H