32typedef std::vector<unsigned char>
valtype;
44enum class IsMineSigVersion
56enum class IsMineResult
71 for (
const valtype& pubkey : pubkeys) {
89 IsMineResult
ret = IsMineResult::NO;
105 return IsMineResult::INVALID;
108 ret = std::max(
ret, IsMineResult::SPENDABLE);
113 if (
sigversion == IsMineSigVersion::WITNESS_V0) {
115 return IsMineResult::INVALID;
131 return IsMineResult::INVALID;
135 ret = std::max(
ret, IsMineResult::SPENDABLE);
142 return IsMineResult::INVALID;
153 if (
sigversion == IsMineSigVersion::WITNESS_V0) {
155 return IsMineResult::INVALID;
182 for (
size_t i = 0; i <
keys.size(); i++) {
183 if (
keys[i].size() != 33) {
184 return IsMineResult::INVALID;
189 ret = std::max(
ret, IsMineResult::SPENDABLE);
195 if (
ret == IsMineResult::NO &&
keystore.HaveWatchOnly(scriptPubKey)) {
196 ret = std::max(
ret, IsMineResult::WATCH_ONLY);
206 case IsMineResult::INVALID:
207 case IsMineResult::NO:
209 case IsMineResult::WATCH_ONLY:
210 case IsMineResult::SPENDABLE:
246 LogWarning(
"The wallet is probably corrupted: Some keys decrypt but not all.");
247 throw std::runtime_error(
"Error unlocking wallet: some keys decrypt but not all. Your wallet file may be corrupt.");
258 return std::make_unique<LegacySigningProvider>(*
this);
264 if (
ismine == IsMineResult::SPENDABLE ||
ismine == IsMineResult::WATCH_ONLY) {
355 std::vector<std::vector<unsigned char>>
solutions;
424 if (
meta.has_key_origin) {
436 WatchKeyMap::const_iterator it =
mapWatchKeys.find(address);
478 for (
const auto& [
_, key] :
mapKeys) {
515 std::unordered_set<CScript, SaltedSipHasher>
spks;
528 std::unordered_set<CScript, SaltedSipHasher>
spks;
562 if (
meta.hdKeypath ==
"s" ||
meta.hdKeypath ==
"m") {
576 LogWarning(
"Error generating descriptors for migration, cannot initialize db transaction");
591 creation_time = it->second.nCreateTime;
624 std::set<CHDChain>
chains;
634 if (chain.seed_id.IsNull())
continue;
649 for (
int i = 0; i < 2; ++i) {
657 std::string
desc_str =
"combo(" +
xpub +
"/0h/" + ToString(i) +
"h/*h)";
690 for (
auto it =
spks.begin(); it !=
spks.end();) {
697 creation_time =
mit->second.nCreateTime;
706 std::string
desc_str = desc->ToString();
718 std::vector<CScript> scripts;
733 out.watch_descs.emplace_back(desc->ToString(), creation_time);
777 if (!
script.IsPayToScriptHash() && !
script.IsPayToWitnessScriptHash()) {
792 creation_time = it->second.nCreateTime;
797 if (!desc->IsSolvable()) {
806 std::string
desc_str = desc->ToString();
815 out.solvable_descs.emplace_back(desc->ToString(), creation_time);
820 LogWarning(
"Error generating descriptors for migration, cannot commit db transaction");
859 throw std::runtime_error(
"Wallet contains both unencrypted and encrypted keys");
880 throw std::runtime_error(std::string(
__func__) +
": writing descriptor master private key failed");
883 throw std::runtime_error(std::string(
__func__) +
": writing descriptor failed");
887 if (
spkm->m_storage.HasEncryptionKeys()) {
888 spkm->m_decryption_thoroughly_checked =
true;
892 spkm->TopUpWithDB(batch);
894 spkm->m_storage.UnsetBlankWalletFlag(batch);
946 throw std::runtime_error(std::string(
__func__) +
": Types are inconsistent. Stored type does not match type of newly generated address");
956 return util::Error{
_(
"Error: Keypool ran out, please call keypoolrefill first")};
960 return util::Error{
_(
"Error: Keypool ran out, please call keypoolrefill first")};
965 return util::Error{
_(
"Error: Cannot extract destination from the generated scriptpubkey")};
1001 LogWarning(
"The wallet is probably corrupted: Some keys decrypt but not all.");
1002 throw std::runtime_error(
"Error unlocking wallet: some keys decrypt but not all. Your wallet file may be corrupt.");
1040 .on_abort = [] {}});
1093 return std::nullopt;
1095 const std::vector<unsigned char>&
crypted_secret = it->second.second;
1098 return DecryptKey(encryption_key, crypted_secret, it->second.first, key);
1100 return std::nullopt;
1106 return std::nullopt;
1114 if (!batch.
TxnBegin())
return false;
1136 if (
target_end <= std::numeric_limits<int32_t>::max()) {
1174 throw std::runtime_error(std::string(
__func__) +
": writing cache items failed");
1191 std::vector<WalletDestination> result;
1195 WalletLogPrintf(
"%s: Detected a used keypool item at index %d, mark all keypool items up to this item as used",
__func__, index);
1196 auto out_keys = std::make_unique<FlatSigningProvider>();
1200 throw std::runtime_error(std::string(
__func__) +
": Unable to expand descriptor from cache");
1204 result.push_back({dest, std::nullopt});
1235 return EncryptSecret(encryption_key, secret, pubkey.GetHash(), crypted_secret);
1320 if (!out->HaveKey(pubkey.
GetID())) {
1330 std::unique_ptr<FlatSigningProvider>
out_keys = std::make_unique<FlatSigningProvider>();
1370 std::unique_ptr<FlatSigningProvider>
keys = std::make_unique<FlatSigningProvider>();
1379 return ::SignTransaction(tx,
keys.get(), coins, {.sighash_type = sighash},
input_errors);
1405 for (
unsigned int i = 0; i <
psbtx.inputs.size(); ++i) {
1418 return PSBTError::MISSING_INPUTS;
1426 std::unique_ptr<FlatSigningProvider>
keys = std::make_unique<FlatSigningProvider>();
1432 std::vector<CPubKey> pubkeys;
1437 pubkeys.push_back(pk);
1441 std::vector<std::vector<unsigned char>>
sols;
1443 sols[0].insert(
sols[0].begin(), 0x02);
1444 pubkeys.emplace_back(
sols[0]);
1446 pubkeys.emplace_back(
sols[0]);
1452 for (
unsigned char prefix : {0x02, 0x03}) {
1453 unsigned char b[33] = {
prefix};
1454 std::copy(pubkey.
begin(), pubkey.
end(), b + 1);
1461 for (
const auto& pubkey : pubkeys) {
1484 for (
unsigned int i = 0; i <
psbtx.outputs.size(); ++i) {
1503 std::unique_ptr<CKeyMetadata>
meta = std::make_unique<CKeyMetadata>();
1505 meta->has_key_origin =
true;
1526 throw std::runtime_error(
"Error: Unable to expand wallet descriptor from cache");
1562 throw std::runtime_error(std::string(
__func__) +
": writing descriptor failed");
1629 throw std::runtime_error(
"Unable to expand descriptor");
1635 throw std::runtime_error(std::string(
__func__) +
": writing cache items failed");
1663 const CKey& key = entry.second;
1665 throw std::runtime_error(std::string(
__func__) +
": writing descriptor private key failed");
1671 throw std::runtime_error(
"Could not top up scriptPubKeys");
1679 error =
"can only update matching descriptor";
1691 error =
strprintf(
"new range must include current range = [%d,%d]",
bool ExtractDestination(const CScript &scriptPubKey, CTxDestination &addressRet)
Parse a scriptPubKey for the destination.
CScript GetScriptForDestination(const CTxDestination &dest)
Generate a Bitcoin scriptPubKey for the given CTxDestination.
CKeyID ToKeyID(const PKHash &key_hash)
std::variant< CNoDestination, PubKeyDestination, PKHash, ScriptHash, WitnessV0ScriptHash, WitnessV0KeyHash, WitnessV1Taproot, PayToAnchor, WitnessUnknown > CTxDestination
A txout script categorized into standard templates.
std::string FormatHDKeypath(const std::vector< uint32_t > &path, bool apostrophe)
#define CHECK_NONFATAL(condition)
Identity function.
#define Assert(val)
Identity function.
#define STR_INTERNAL_BUG(msg)
#define Assume(val)
Assume is the identity function.
An encapsulated private key.
const std::byte * begin() const
CPrivKey GetPrivKey() const
Convert the private key to a CPrivKey (serialized OpenSSL private key data).
CPubKey GetPubKey() const
Compute the public key from a private key.
const std::byte * end() const
A reference to a CKey: the Hash160 of its serialized public key.
An encapsulated public key.
bool IsCompressed() const
Check whether this is a compressed public key.
CKeyID GetID() const
Get the KeyID of this public key (hash of its serialization)
uint256 GetHash() const
Get the 256-bit hash of this public key.
void Set(const T pbegin, const T pend)
Initialize a public key using begin/end iterators to byte data.
Serialized script, used inside transaction inputs and outputs.
A reference to a CScript: the Hash160 of its serialization.
Cache for single descriptor's derived extended pubkeys.
DescriptorCache MergeAndDiff(const DescriptorCache &other)
Combine another DescriptorCache into this one.
virtual bool AddKeyPubKey(const CKey &key, const CPubKey &pubkey)
virtual bool GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const override
virtual bool GetKey(const CKeyID &address, CKey &keyOut) const override
virtual bool AddCScript(const CScript &redeemScript)
void ImplicitlyLearnRelatedKeyScripts(const CPubKey &pubkey) EXCLUSIVE_LOCKS_REQUIRED(cs_KeyStore)
RecursiveMutex cs_KeyStore
virtual bool HaveKey(const CKeyID &address) const override
A version of CTransaction with the PSBT format.
const unsigned char * end() const
const unsigned char * begin() const
constexpr bool IsNull() const
static constexpr int VERSION_HD_CHAIN_SPLIT
CKeyID seed_id
seed hash160
bool IsMine(const CScript &script) const override
KeyMap GetKeys() const EXCLUSIVE_LOCKS_REQUIRED(cs_desc_man)
bool GetDescriptorString(std::string &out, bool priv) const
std::map< int32_t, FlatSigningProvider > m_map_signing_providers
bool CanProvide(const CScript &script, SignatureData &sigdata) override
Whether this ScriptPubKeyMan can provide a SigningProvider (via GetSolvingProvider) that,...
void UpgradeDescriptorCache()
void SetRangeEnd(int32_t end) EXCLUSIVE_LOCKS_REQUIRED(cs_desc_man)
bool SignTransaction(CMutableTransaction &tx, const std::map< COutPoint, Coin > &coins, int sighash, std::map< int, bilingual_str > &input_errors) const override
Creates new signatures and adds them to the transaction.
std::unordered_set< CScript, SaltedSipHasher > GetScriptPubKeys() const override
Returns a set of all the scriptPubKeys that this ScriptPubKeyMan watches.
WalletDescriptor GetWalletDescriptor() const EXCLUSIVE_LOCKS_REQUIRED(cs_desc_man)
std::optional< CKey > GetKey(const CKeyID &keyid) const EXCLUSIVE_LOCKS_REQUIRED(cs_desc_man)
Retrieve the particular key if it is available. Returns nullopt if the key is not in the wallet,...
util::Result< CTxDestination > GetReservedDestination(OutputType type, bool internal, int64_t &index) override
bool TopUp(unsigned int size=0) override
Fills internal address pool.
bool m_decryption_thoroughly_checked
keeps track of whether Unlock has run a thorough check before
static std::unique_ptr< DescriptorScriptPubKeyMan > LoadFromStorage(WalletStorage &storage, const uint256 &id, WalletDescriptor &descriptor, int64_t keypool_size, const KeyMap &keys, const CryptedKeyMap &ckeys)
unsigned int GetKeyPoolSize() const override
int64_t GetTimeFirstKey() const override
std::unique_ptr< FlatSigningProvider > GetSigningProvider(const CScript &script, bool include_private=false) const
static std::unique_ptr< DescriptorScriptPubKeyMan > CreateFromImport(WalletStorage &storage, WalletDescriptor &descriptor, int64_t keypool_size, const FlatSigningProvider &provider)
void UpdateWithSigningProvider(WalletBatch &batch, const FlatSigningProvider &signing_provider) EXCLUSIVE_LOCKS_REQUIRED(cs_desc_man)
bool HaveCryptedKeys() const override
DescriptorScriptPubKeyMan(WalletStorage &storage, const uint256 &id, WalletDescriptor &descriptor, int64_t keypool_size, const KeyMap &keys, const CryptedKeyMap &ckeys)
Create a DescriptorScriptPubKeyMan from existing data (i.e. during loading)
int32_t GetEndRange() const
bool CheckDecryptionKey(const CKeyingMaterial &master_key) override
Check that the given decryption key is valid for this ScriptPubKeyMan, i.e. it decrypts all of the ke...
bool CanGetAddresses(bool internal=false) const override
void DecIndex() EXCLUSIVE_LOCKS_REQUIRED(cs_desc_man)
bool CanUpdateToWalletDescriptor(const WalletDescriptor &descriptor, std::string &error)
std::unique_ptr< CKeyMetadata > GetMetadata(const CTxDestination &dest) const override
std::unique_ptr< SigningProvider > GetSolvingProvider(const CScript &script) const override
void IncIndex() EXCLUSIVE_LOCKS_REQUIRED(cs_desc_man)
bool HavePrivateKeys() const override
bool TopUpWithDB(WalletBatch &batch, unsigned int size=0)
Same as 'TopUp' but designed for use within a batch transaction context.
void ReturnDestination(int64_t index, bool internal, const CTxDestination &addr) override
std::vector< WalletDestination > MarkUnusedAddresses(const CScript &script) override
Mark unused addresses as being used Affects all keys up to and including the one determined by provid...
static std::unique_ptr< DescriptorScriptPubKeyMan > CreateFromMigration(WalletStorage &storage, WalletBatch &batch, WalletDescriptor &descriptor, int64_t keypool_size, const FlatSigningProvider &provider)
bool AddDescriptorKeyWithDB(WalletBatch &batch, const CKey &key, const CPubKey &pubkey) EXCLUSIVE_LOCKS_REQUIRED(cs_desc_man)
bool HasWalletDescriptor(const WalletDescriptor &desc) const
int32_t m_max_cached_index
RecursiveMutex cs_desc_man
SigningResult SignMessage(const std::string &message, const PKHash &pkhash, std::string &str_sig) const override
Sign a message with the given script.
std::optional< common::PSBTError > FillPSBT(PartiallySignedTransaction &psbt, const PrecomputedTransactionData &txdata, const common::PSBTFillOptions &options, int *n_signed=nullptr) const override
Adds script and derivation path information to a PSBT, and optionally signs it.
util::Result< CTxDestination > GetNewDestination(OutputType type) override
bool IsHDEnabled() const override
std::map< uint256, MuSig2SecNonce > m_musig2_secnonces
Map of a session id to MuSig2 secnonce.
bool HasPrivKey(const CKeyID &keyid) const EXCLUSIVE_LOCKS_REQUIRED(cs_desc_man)
util::Result< void > UpdateWalletDescriptor(WalletDescriptor &descriptor, const FlatSigningProvider &provider)
static std::unique_ptr< DescriptorScriptPubKeyMan > GenerateNewSingleSig(WalletStorage &storage, WalletBatch &batch, int64_t keypool_size, const CExtKey &master_key, OutputType addr_type, bool internal)
bool Encrypt(const CKeyingMaterial &master_key, WalletBatch *batch) override
Encrypt keys and write them to a batch with an active transaction. Update in-memory keys only after t...
uint256 GetID() const override
bool DeleteRecordsWithDB(WalletBatch &batch)
Delete the legacy wallet records from disk.
std::optional< MigrationData > MigrateToDescriptor()
Get the DescriptorScriptPubKeyMans (with private keys) that have the same scriptPubKeys as this Legac...
virtual bool AddKeyPubKeyInner(const CKey &key, const CPubKey &pubkey)
std::unordered_set< CScript, SaltedSipHasher > GetCandidateScriptPubKeys() const
virtual void LoadKeyMetadata(const CKeyID &keyID, const CKeyMetadata &metadata)
Load metadata (used by LoadWallet)
bool LoadCryptedKey(const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret, bool checksum_valid)
Adds an encrypted key to the store, without saving it to disk (used by LoadWallet)
void AddInactiveHDChain(const CHDChain &chain)
bool HaveWatchOnly(const CScript &dest) const
Returns whether the watch-only script is in the wallet.
bool fDecryptionThoroughlyChecked
keeps track of whether Unlock has run a thorough check before
bool GetKeyOrigin(const CKeyID &keyid, KeyOriginInfo &info) const override
bool GetPubKey(const CKeyID &address, CPubKey &vchPubKeyOut) const override
std::unordered_set< CScript, SaltedSipHasher > GetScriptPubKeys() const override
Returns a set of all the scriptPubKeys that this ScriptPubKeyMan watches.
std::unordered_set< CScript, SaltedSipHasher > GetNotMineScriptPubKeys() const
Retrieves scripts that were imported by bugs into the legacy spkm and are simply invalid,...
bool LoadKey(const CKey &key, const CPubKey &pubkey)
Adds a key to the store, without saving it to disk (used by LoadWallet)
bool AddWatchOnlyInMem(const CScript &dest)
bool GetWatchPubKey(const CKeyID &address, CPubKey &pubkey_out) const
Fetches a pubkey from mapWatchKeys if it exists there.
bool CheckDecryptionKey(const CKeyingMaterial &master_key) override
Check that the given decryption key is valid for this ScriptPubKeyMan, i.e. it decrypts all of the ke...
bool GetKey(const CKeyID &address, CKey &keyOut) const override
bool LoadCScript(const CScript &redeemScript)
Adds a CScript to the store.
bool IsMine(const CScript &script) const override
virtual void LoadScriptMetadata(const CScriptID &script_id, const CKeyMetadata &metadata)
std::unique_ptr< SigningProvider > GetSolvingProvider(const CScript &script) const override
bool CanProvide(const CScript &script, SignatureData &sigdata) override
Whether this ScriptPubKeyMan can provide a SigningProvider (via GetSolvingProvider) that,...
std::unordered_map< CKeyID, CHDChain, SaltedSipHasher > m_inactive_hd_chains
bool AddCryptedKeyInner(const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret)
bool LoadWatchOnly(const CScript &dest)
Adds a watch-only address to the store, without saving it to disk (used by LoadWallet)
bool HaveKey(const CKeyID &address) const override
void LoadHDChain(const CHDChain &chain)
Load a HD chain model (used by LoadWallet)
void WalletLogPrintf(util::log::FormatString< sizeof...(Params)> wallet_fmt, const Params &... params) const
Prepends the wallet name in logging output to ease debugging in multi-wallet use cases.
btcsignals::signal< void()> NotifyCanGetAddressesChanged
Keypool has new keys.
btcsignals::signal< void(const ScriptPubKeyMan *spkm, int64_t new_birth_time)> NotifyFirstKeyTimeChanged
Birth time changed.
WalletStorage & m_storage
Access to the wallet database.
bool WriteDescriptor(const uint256 &desc_id, const WalletDescriptor &descriptor)
bool WriteDescriptorCacheItems(const uint256 &desc_id, const DescriptorCache &cache)
bool TxnBegin()
Begin a new transaction.
bool TxnCommit()
Commit current transaction.
bool EraseRecords(const std::unordered_set< std::string > &types)
Delete records of the given types.
bool WriteCryptedKey(const CPubKey &vchPubKey, const std::vector< unsigned char > &vchCryptedSecret, const CKeyMetadata &keyMeta)
void RegisterTxnListener(DbTxnListener l)
Registers db txn callback functions.
bool WriteCryptedDescriptorKey(const uint256 &desc_id, const CPubKey &pubkey, const std::vector< unsigned char > &secret)
bool WriteDescriptorKey(const uint256 &desc_id, const CPubKey &pubkey, const CPrivKey &privkey)
Descriptor with some wallet metadata.
const std::shared_ptr< const Descriptor > descriptor
virtual bool IsWalletFlagSet(uint64_t) const =0
virtual void TopUpCallback(const std::set< CScript > &, ScriptPubKeyMan *)=0
Callback function for after TopUp completes containing any scripts that were added by a SPKMan.
virtual std::string LogName() const =0
virtual WalletDatabase & GetDatabase() const =0
virtual bool IsLocked() const =0
virtual bool HasEncryptionKeys() const =0
virtual bool WithEncryptionKey(std::function< bool(const CKeyingMaterial &)> cb) const =0
Pass the encryption key to cb().
static UniValue Parse(std::string_view raw, ParamFormat format=ParamFormat::JSON)
Parse string to UniValue or throw runtime_error if string contains invalid JSON.
bool MessageSign(const CKey &privkey, const std::string &message, std::string &signature)
Sign a message.
uint160 RIPEMD160(std::span< const unsigned char > data)
Compute the 160-bit RIPEMD-160 hash of an array.
std::string HexStr(const std::span< const uint8_t > s)
Convert a span of bytes to a lower-case hexadecimal string.
@ WITNESS_V0
Witness v0 (P2WPKH and P2WSH); see BIP 141.
std::string EncodeDestination(const CTxDestination &dest)
std::string EncodeExtPubKey(const CExtPubKey &key)
std::string ToString(const T &t)
Locale-independent version of std::to_string.
const std::unordered_set< std::string > LEGACY_TYPES
std::vector< unsigned char > valtype
std::vector< unsigned char, secure_allocator< unsigned char > > CKeyingMaterial
std::map< CKeyID, std::pair< CPubKey, std::vector< unsigned char > > > CryptedKeyMap
bool DecryptKey(const CKeyingMaterial &master_key, const std::span< const unsigned char > crypted_secret, const CPubKey &pub_key, CKey &key)
static bool ExtractPubKey(const CScript &dest, CPubKey &pubKeyOut)
bool EncryptSecret(const CKeyingMaterial &vMasterKey, const CKeyingMaterial &vchPlaintext, const uint256 &nIV, std::vector< unsigned char > &vchCiphertext)
@ WALLET_FLAG_LAST_HARDENED_XPUB_CACHED
@ WALLET_FLAG_DESCRIPTORS
Indicate that this wallet supports DescriptorScriptPubKeyMan.
@ WALLET_FLAG_DISABLE_PRIVATE_KEYS
std::map< CKeyID, CKey > KeyMap
WalletDescriptor GenerateWalletDescriptor(const CExtPubKey &master_key, const OutputType &addr_type, bool internal)
is a home for public enum and struct type definitions that are used internally by node code,...
util::Expected< void, PSBTError > SignPSBTInput(const SigningProvider &provider, PartiallySignedTransaction &psbt, int index, const PrecomputedTransactionData *txdata, const common::PSBTFillOptions &options, SignatureData *out_sigdata)
Signs a PSBTInput, verifying that all provided data matches what is being signed.
void UpdatePSBTOutput(const SigningProvider &provider, PartiallySignedTransaction &psbt, int index)
Updates a PSBTOutput with information from provider.
bool PSBTInputSigned(const PSBTInput &input)
Checks whether a PSBTInput is already signed by checking for non-null finalized fields.
std::unique_ptr< Descriptor > InferDescriptor(const CScript &script, const SigningProvider &provider)
Find a descriptor for the specified script, using information from provider where possible.
constexpr unsigned int MAX_SCRIPT_ELEMENT_SIZE
bool ProduceSignature(const SigningProvider &provider, const BaseSignatureCreator &creator, const CScript &fromPubKey, SignatureData &sigdata)
Produce a script signature using a generic signature creator.
const BaseSignatureCreator & DUMMY_SIGNATURE_CREATOR
A signature creator that just produces 71-byte empty signatures.
const SigningProvider & DUMMY_SIGNING_PROVIDER
CKeyID GetKeyForDestination(const SigningProvider &store, const CTxDestination &dest)
Return the CKeyID of the key involved in a script (if there is a unique one).
@ PRIVATE_KEY_NOT_AVAILABLE
TxoutType Solver(const CScript &scriptPubKey, std::vector< std::vector< unsigned char > > &vSolutionsRet)
Parse a scriptPubKey and identify script type for standard scripts.
CScript GetScriptForRawPubKey(const CPubKey &pubKey)
Generate a P2PK script for the given pubkey.
@ WITNESS_UNKNOWN
Only for Witness versions not already defined above.
@ ANCHOR
anyone can spend script
@ NULL_DATA
unspendable OP_RETURN script that carries data
unsigned char * UCharCast(char *c)
CExtPubKey Neuter() const
void SetSeed(std::span< const std::byte > seed)
A mutable version of CTransaction.
std::map< CKeyID, CKey > keys
KeyFingerprint fingerprint
First 32 bits of the Hash160 of the public key at the root of the path.
std::vector< uint32_t > path
std::map< CKeyID, SigPair > signatures
BIP 174 style partial signatures for the input. May contain all signatures necessary for producing a ...
Instructions for how a PSBT should be signed or filled with information.
bool bip32_derivs
Whether to fill in bip32 derivation information if available.
bool sign
Whether to sign or not.
struct containing information needed for migrating legacy wallets to descriptor wallets
#define AssertLockHeld(cs)
std::vector< uint16_t > keys
FuzzedDataProvider provider
consteval auto _(util::TranslatedLiteral str)
bilingual_str Untranslated(std::string original)
Mark a bilingual_str as untranslated.
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.