80 std::vector<unsigned char>
key;
81 std::vector<unsigned char>
value;
93template<
typename Stream,
typename...
X>
103template<
typename Stream,
typename...
X>
107 size_t remaining_before =
s.size();
109 size_t remaining_after =
s.size();
110 if (remaining_after + expected_size != remaining_before) {
111 throw std::ios_base::failure(
"Size of value was not the stated size");
116template<
typename Stream>
120 if (length % 4 || length == 0) {
121 throw std::ios_base::failure(
"Invalid length for HD key path");
126 for (
unsigned int i = 4; i < length; i +=
sizeof(uint32_t)) {
129 hd_keypath.
path.push_back(index);
135template<
typename Stream>
142template<
typename Stream>
143void DeserializeHDKeypaths(Stream&
s,
const std::vector<unsigned char>& key, std::map<CPubKey, KeyOriginInfo>& hd_keypaths)
147 throw std::ios_base::failure(
"Size of key was not the expected size for the type BIP32 keypath");
150 CPubKey pubkey(key.begin() + 1, key.end());
152 throw std::ios_base::failure(
"Invalid pubkey");
154 if (hd_keypaths.count(pubkey) > 0) {
155 throw std::ios_base::failure(
"Duplicate Key, pubkey derivation path already provided");
162 hd_keypaths.emplace(pubkey, std::move(keypath));
166template<
typename Stream>
170 for (
const auto& path : hd_keypath.
path) {
176template<
typename Stream>
184template<
typename Stream>
187 for (
const auto& keypath_pair : hd_keypaths) {
188 if (!keypath_pair.first.IsValid()) {
189 throw std::ios_base::failure(
"Invalid CPubKey being serialized");
220 std::map<std::vector<unsigned char>, std::vector<unsigned char>>
unknown;
230 template <
typename Stream>
246 s << sig_pair.second.second;
302 const auto& [xonly, leaf_hash] = pubkey_leaf;
309 const auto& [
script, leaf_ver] = leaf;
310 for (
const auto& control_block : control_blocks) {
312 std::vector<unsigned char> value_v(
script.begin(),
script.end());
313 value_v.push_back((uint8_t)leaf_ver);
320 const auto& [leaf_hashes, origin] = leaf_origin;
322 std::vector<unsigned char> value;
324 s_value << leaf_hashes;
369 template <
typename Stream>
372 std::set<std::vector<unsigned char>> key_lookup;
375 bool found_sep =
false;
378 std::vector<unsigned char> key;
396 if (!key_lookup.emplace(key).second) {
397 throw std::ios_base::failure(
"Duplicate Key, input non-witness utxo already provided");
398 }
else if (key.size() != 1) {
399 throw std::ios_base::failure(
"Non-witness utxo key is more than one byte type");
406 if (!key_lookup.emplace(key).second) {
407 throw std::ios_base::failure(
"Duplicate Key, input witness utxo already provided");
408 }
else if (key.size() != 1) {
409 throw std::ios_base::failure(
"Witness utxo key is more than one byte type");
417 throw std::ios_base::failure(
"Size of key was not the expected size for the type partial signature pubkey");
420 CPubKey pubkey(key.begin() + 1, key.end());
422 throw std::ios_base::failure(
"Invalid pubkey");
425 throw std::ios_base::failure(
"Duplicate Key, input partial signature for pubkey already provided");
429 std::vector<unsigned char> sig;
437 if (!key_lookup.emplace(key).second) {
438 throw std::ios_base::failure(
"Duplicate Key, input sighash type already provided");
439 }
else if (key.size() != 1) {
440 throw std::ios_base::failure(
"Sighash type key is more than one byte type");
448 if (!key_lookup.emplace(key).second) {
449 throw std::ios_base::failure(
"Duplicate Key, input redeemScript already provided");
450 }
else if (key.size() != 1) {
451 throw std::ios_base::failure(
"Input redeemScript key is more than one byte type");
458 if (!key_lookup.emplace(key).second) {
459 throw std::ios_base::failure(
"Duplicate Key, input witnessScript already provided");
460 }
else if (key.size() != 1) {
461 throw std::ios_base::failure(
"Input witnessScript key is more than one byte type");
473 if (!key_lookup.emplace(key).second) {
474 throw std::ios_base::failure(
"Duplicate Key, input final scriptSig already provided");
475 }
else if (key.size() != 1) {
476 throw std::ios_base::failure(
"Final scriptSig key is more than one byte type");
483 if (!key_lookup.emplace(key).second) {
484 throw std::ios_base::failure(
"Duplicate Key, input final scriptWitness already provided");
485 }
else if (key.size() != 1) {
486 throw std::ios_base::failure(
"Final scriptWitness key is more than one byte type");
495 throw std::ios_base::failure(
"Size of key was not the expected size for the type ripemd160 preimage");
498 std::vector<unsigned char> hash_vec(key.begin() + 1, key.end());
501 throw std::ios_base::failure(
"Duplicate Key, input ripemd160 preimage already provided");
505 std::vector<unsigned char> preimage;
516 throw std::ios_base::failure(
"Size of key was not the expected size for the type sha256 preimage");
519 std::vector<unsigned char> hash_vec(key.begin() + 1, key.end());
522 throw std::ios_base::failure(
"Duplicate Key, input sha256 preimage already provided");
526 std::vector<unsigned char> preimage;
537 throw std::ios_base::failure(
"Size of key was not the expected size for the type hash160 preimage");
540 std::vector<unsigned char> hash_vec(key.begin() + 1, key.end());
543 throw std::ios_base::failure(
"Duplicate Key, input hash160 preimage already provided");
547 std::vector<unsigned char> preimage;
558 throw std::ios_base::failure(
"Size of key was not the expected size for the type hash256 preimage");
561 std::vector<unsigned char> hash_vec(key.begin() + 1, key.end());
564 throw std::ios_base::failure(
"Duplicate Key, input hash256 preimage already provided");
568 std::vector<unsigned char> preimage;
577 if (!key_lookup.emplace(key).second) {
578 throw std::ios_base::failure(
"Duplicate Key, input Taproot key signature already provided");
579 }
else if (key.size() != 1) {
580 throw std::ios_base::failure(
"Input Taproot key signature key is more than one byte type");
584 throw std::ios_base::failure(
"Input Taproot key path signature is shorter than 64 bytes");
586 throw std::ios_base::failure(
"Input Taproot key path signature is longer than 65 bytes");
592 if (!key_lookup.emplace(key).second) {
593 throw std::ios_base::failure(
"Duplicate Key, input Taproot script signature already provided");
594 }
else if (key.size() != 65) {
595 throw std::ios_base::failure(
"Input Taproot script signature key is not 65 bytes");
602 std::vector<unsigned char> sig;
604 if (sig.size() < 64) {
605 throw std::ios_base::failure(
"Input Taproot script path signature is shorter than 64 bytes");
606 }
else if (sig.size() > 65) {
607 throw std::ios_base::failure(
"Input Taproot script path signature is longer than 65 bytes");
614 if (!key_lookup.emplace(key).second) {
615 throw std::ios_base::failure(
"Duplicate Key, input Taproot leaf script already provided");
616 }
else if (key.size() < 34) {
617 throw std::ios_base::failure(
"Taproot leaf script key is not at least 34 bytes");
618 }
else if ((key.size() - 2) % 32 != 0) {
619 throw std::ios_base::failure(
"Input Taproot leaf script key's control block size is not valid");
621 std::vector<unsigned char> script_v;
623 if (script_v.empty()) {
624 throw std::ios_base::failure(
"Input Taproot leaf script must be at least 1 byte");
626 uint8_t leaf_ver = script_v.back();
628 const auto leaf_script = std::make_pair(script_v, (
int)leaf_ver);
629 m_tap_scripts[leaf_script].insert(std::vector<unsigned char>(key.begin() + 1, key.end()));
634 if (!key_lookup.emplace(key).second) {
635 throw std::ios_base::failure(
"Duplicate Key, input Taproot BIP32 keypath already provided");
636 }
else if (key.size() != 33) {
637 throw std::ios_base::failure(
"Input Taproot BIP32 keypath key is not at 33 bytes");
642 std::set<uint256> leaf_hashes;
644 size_t before_hashes =
s.size();
646 size_t after_hashes =
s.size();
647 size_t hashes_len = before_hashes - after_hashes;
648 if (hashes_len > value_len) {
649 throw std::ios_base::failure(
"Input Taproot BIP32 keypath has an invalid length");
651 size_t origin_len = value_len - hashes_len;
657 if (!key_lookup.emplace(key).second) {
658 throw std::ios_base::failure(
"Duplicate Key, input Taproot internal key already provided");
659 }
else if (key.size() != 1) {
660 throw std::ios_base::failure(
"Input Taproot internal key key is more than one byte type");
667 if (!key_lookup.emplace(key).second) {
668 throw std::ios_base::failure(
"Duplicate Key, input Taproot merkle root already provided");
669 }
else if (key.size() != 1) {
670 throw std::ios_base::failure(
"Input Taproot merkle root key is more than one byte type");
683 throw std::ios_base::failure(
"Duplicate Key, proprietary key already found");
692 throw std::ios_base::failure(
"Duplicate Key, key for unknown value already provided");
695 std::vector<unsigned char> val_bytes;
697 unknown.emplace(std::move(key), std::move(val_bytes));
703 throw std::ios_base::failure(
"Separator is missing at the end of an input map");
707 template <
typename Stream>
720 std::vector<std::tuple<uint8_t, uint8_t, std::vector<unsigned char>>>
m_tap_tree;
722 std::map<std::vector<unsigned char>, std::vector<unsigned char>>
unknown;
731 template <
typename Stream>
763 std::vector<unsigned char> value;
775 const auto& [leaf_hashes, origin] = leaf;
777 std::vector<unsigned char> value;
779 s_value << leaf_hashes;
794 template <
typename Stream>
797 std::set<std::vector<unsigned char>> key_lookup;
800 bool found_sep =
false;
803 std::vector<unsigned char> key;
821 if (!key_lookup.emplace(key).second) {
822 throw std::ios_base::failure(
"Duplicate Key, output redeemScript already provided");
823 }
else if (key.size() != 1) {
824 throw std::ios_base::failure(
"Output redeemScript key is more than one byte type");
831 if (!key_lookup.emplace(key).second) {
832 throw std::ios_base::failure(
"Duplicate Key, output witnessScript already provided");
833 }
else if (key.size() != 1) {
834 throw std::ios_base::failure(
"Output witnessScript key is more than one byte type");
846 if (!key_lookup.emplace(key).second) {
847 throw std::ios_base::failure(
"Duplicate Key, output Taproot internal key already provided");
848 }
else if (key.size() != 1) {
849 throw std::ios_base::failure(
"Output Taproot internal key key is more than one byte type");
856 if (!key_lookup.emplace(key).second) {
857 throw std::ios_base::failure(
"Duplicate Key, output Taproot tree already provided");
858 }
else if (key.size() != 1) {
859 throw std::ios_base::failure(
"Output Taproot tree key is more than one byte type");
861 std::vector<unsigned char> tree_v;
864 if (s_tree.empty()) {
865 throw std::ios_base::failure(
"Output Taproot tree must not be empty");
868 while (!s_tree.empty()) {
871 std::vector<unsigned char>
script;
876 throw std::ios_base::failure(
"Output Taproot tree has as leaf greater than Taproot maximum depth");
879 throw std::ios_base::failure(
"Output Taproot tree has a leaf with an invalid leaf version");
882 builder.
Add((
int)depth,
script, (
int)leaf_ver,
true);
885 throw std::ios_base::failure(
"Output Taproot tree is malformed");
891 if (!key_lookup.emplace(key).second) {
892 throw std::ios_base::failure(
"Duplicate Key, output Taproot BIP32 keypath already provided");
893 }
else if (key.size() != 33) {
894 throw std::ios_base::failure(
"Output Taproot BIP32 keypath key is not at 33 bytes");
897 std::set<uint256> leaf_hashes;
899 size_t before_hashes =
s.size();
901 size_t after_hashes =
s.size();
902 size_t hashes_len = before_hashes - after_hashes;
903 if (hashes_len > value_len) {
904 throw std::ios_base::failure(
"Output Taproot BIP32 keypath has an invalid length");
906 size_t origin_len = value_len - hashes_len;
918 throw std::ios_base::failure(
"Duplicate Key, proprietary key already found");
927 throw std::ios_base::failure(
"Duplicate Key, key for unknown value already provided");
930 std::vector<unsigned char> val_bytes;
932 unknown.emplace(std::move(key), std::move(val_bytes));
939 throw std::ios_base::failure(
"Separator is missing at the end of an output map");
943 template <
typename Stream>
952 std::optional<CMutableTransaction>
tx;
955 std::map<KeyOriginInfo, std::set<CExtPubKey>>
m_xpubs;
958 std::map<std::vector<unsigned char>, std::vector<unsigned char>>
unknown;
981 template <
typename Stream>
994 for (
const auto& xpub_pair :
m_xpubs) {
995 for (
const auto& xpub : xpub_pair.second) {
997 xpub.EncodeWithVersion(ser_xpub);
1037 template <
typename Stream>
1043 throw std::ios_base::failure(
"Invalid PSBT magic bytes");
1047 std::set<std::vector<unsigned char>> key_lookup;
1050 std::set<CExtPubKey> global_xpubs;
1053 bool found_sep =
false;
1056 std::vector<unsigned char> key;
1074 if (!key_lookup.emplace(key).second) {
1075 throw std::ios_base::failure(
"Duplicate Key, unsigned tx already provided");
1076 }
else if (key.size() != 1) {
1077 throw std::ios_base::failure(
"Global unsigned tx key is more than one byte type");
1082 tx = std::move(mtx);
1084 for (
const CTxIn& txin :
tx->vin) {
1086 throw std::ios_base::failure(
"Unsigned tx does not have empty scriptSigs and scriptWitnesses.");
1094 throw std::ios_base::failure(
"Size of key was not the expected size for the type global xpub");
1100 throw std::ios_base::failure(
"Invalid pubkey");
1102 if (global_xpubs.count(xpub) > 0) {
1103 throw std::ios_base::failure(
"Duplicate key, global xpub already provided");
1105 global_xpubs.insert(xpub);
1112 if (
m_xpubs.count(keypath) == 0) {
1117 m_xpubs[keypath].insert(xpub);
1124 throw std::ios_base::failure(
"Duplicate Key, version already provided");
1125 }
else if (key.size() != 1) {
1126 throw std::ios_base::failure(
"Global version key is more than one byte type");
1132 throw std::ios_base::failure(
"Unsupported version number");
1141 this_prop.
key = key;
1144 throw std::ios_base::failure(
"Duplicate Key, proprietary key already found");
1153 throw std::ios_base::failure(
"Duplicate Key, key for unknown value already provided");
1156 std::vector<unsigned char> val_bytes;
1158 unknown.emplace(std::move(key), std::move(val_bytes));
1164 throw std::ios_base::failure(
"Separator is missing at the end of the global map");
1169 throw std::ios_base::failure(
"No unsigned transaction was provided");
1174 while (!
s.empty() && i < tx->vin.size()) {
1182 throw std::ios_base::failure(
"Non-witness UTXO does not match outpoint hash");
1185 throw std::ios_base::failure(
"Input specifies output index that does not exist");
1191 if (
inputs.size() !=
tx->vin.size()) {
1192 throw std::ios_base::failure(
"Inputs provided does not match the number of inputs in transaction.");
1197 while (!
s.empty() && i < tx->vout.size()) {
1204 if (
outputs.size() !=
tx->vout.size()) {
1205 throw std::ios_base::failure(
"Outputs provided does not match the number of outputs in transaction.");
1209 template <
typename Stream>
static const size_t OUTPUT_SIZE
static const size_t OUTPUT_SIZE
An encapsulated public key.
CKeyID GetID() const
Get the KeyID of this public key (hash of its serialization)
static constexpr unsigned int COMPRESSED_SIZE
static constexpr unsigned int SIZE
secp256k1:
bool IsFullyValid() const
fully validate whether this is a valid public key (more expensive than IsValid())
static const size_t OUTPUT_SIZE
static const size_t OUTPUT_SIZE
Serialized script, used inside transaction inputs and outputs.
An input of a transaction.
CScriptWitness scriptWitness
Only serialized through CTransaction.
An output of a transaction.
An interface to be implemented by keystores that support signing.
A Span is an object that can refer to a contiguous sequence of objects.
CONSTEXPR_IF_NOT_DEBUG Span< C > subspan(std::size_t offset) const noexcept
CONSTEXPR_IF_NOT_DEBUG Span< C > first(std::size_t count) const noexcept
Minimal stream for reading from an existing byte array by Span.
Utility class to construct Taproot outputs from internal key and script tree.
bool IsComplete() const
Return whether there were either no leaves, or the leaves form a Huffman tree.
TaprootBuilder & Add(int depth, Span< const unsigned char > script, int leaf_version, bool track=true)
Add a new script at a certain depth in the tree.
bool IsNull() const
Test whether this is the 0 key (the result of default construction).
constexpr bool IsNull() const
static constexpr uint8_t TAPROOT_LEAF_MASK
static constexpr size_t TAPROOT_CONTROL_MAX_NODE_COUNT
static constexpr TransactionSerParams TX_NO_WITNESS
static constexpr TransactionSerParams TX_WITH_WITNESS
std::shared_ptr< const CTransaction > CTransactionRef
void SerializeToVector(Stream &s, const X &... args)
static constexpr uint8_t PSBT_IN_RIPEMD160
void UpdatePSBTOutput(const SigningProvider &provider, PartiallySignedTransaction &psbt, int index)
Updates a PSBTOutput with information from provider.
static constexpr uint8_t PSBT_IN_HASH256
static constexpr uint8_t PSBT_GLOBAL_UNSIGNED_TX
static constexpr uint8_t PSBT_IN_NON_WITNESS_UTXO
bool PSBTInputSignedAndVerified(const PartiallySignedTransaction psbt, unsigned int input_index, const PrecomputedTransactionData *txdata)
Checks whether a PSBTInput is already signed by doing script verification using final fields.
static constexpr uint8_t PSBT_IN_TAP_KEY_SIG
void UnserializeFromVector(Stream &s, X &&... args)
static constexpr uint8_t PSBT_IN_SCRIPTSIG
static constexpr uint8_t PSBT_IN_WITNESSSCRIPT
std::string PSBTRoleName(PSBTRole role)
static constexpr uint8_t PSBT_OUT_REDEEMSCRIPT
static constexpr uint8_t PSBT_GLOBAL_VERSION
static constexpr uint8_t PSBT_IN_TAP_LEAF_SCRIPT
bool CombinePSBTs(PartiallySignedTransaction &out, const std::vector< PartiallySignedTransaction > &psbtxs)
Combines PSBTs with the same underlying transaction, resulting in a single PSBT with all partial sign...
static constexpr uint8_t PSBT_OUT_PROPRIETARY
static constexpr uint8_t PSBT_MAGIC_BYTES[5]
static constexpr uint32_t PSBT_HIGHEST_VERSION
static constexpr uint8_t PSBT_SEPARATOR
static constexpr uint8_t PSBT_IN_BIP32_DERIVATION
static constexpr uint8_t PSBT_IN_SCRIPTWITNESS
static constexpr uint8_t PSBT_OUT_TAP_TREE
static constexpr uint8_t PSBT_OUT_BIP32_DERIVATION
static constexpr uint8_t PSBT_GLOBAL_PROPRIETARY
bool DecodeRawPSBT(PartiallySignedTransaction &decoded_psbt, Span< const std::byte > raw_psbt, std::string &error)
Decode a raw (binary blob) PSBT into a PartiallySignedTransaction.
static constexpr uint8_t PSBT_IN_PROPRIETARY
KeyOriginInfo DeserializeKeyOrigin(Stream &s, uint64_t length)
static constexpr uint8_t PSBT_IN_TAP_SCRIPT_SIG
void SerializeHDKeypaths(Stream &s, const std::map< CPubKey, KeyOriginInfo > &hd_keypaths, CompactSizeWriter type)
static constexpr uint8_t PSBT_IN_TAP_BIP32_DERIVATION
static constexpr uint8_t PSBT_IN_HASH160
static constexpr uint8_t PSBT_IN_REDEEMSCRIPT
bool DecodeBase64PSBT(PartiallySignedTransaction &decoded_psbt, const std::string &base64_psbt, std::string &error)
Decode a base64ed PSBT into a PartiallySignedTransaction.
static constexpr uint8_t PSBT_OUT_WITNESSSCRIPT
static constexpr uint8_t PSBT_GLOBAL_XPUB
bool SignPSBTInput(const SigningProvider &provider, PartiallySignedTransaction &psbt, int index, const PrecomputedTransactionData *txdata, int sighash=SIGHASH_ALL, SignatureData *out_sigdata=nullptr, bool finalize=true)
Signs a PSBTInput, verifying that all provided data matches what is being signed.
static constexpr uint8_t PSBT_OUT_TAP_BIP32_DERIVATION
static constexpr uint8_t PSBT_IN_PARTIAL_SIG
static constexpr uint8_t PSBT_IN_TAP_INTERNAL_KEY
size_t CountPSBTUnsignedInputs(const PartiallySignedTransaction &psbt)
Counts the unsigned inputs of a PSBT.
bool FinalizeAndExtractPSBT(PartiallySignedTransaction &psbtx, CMutableTransaction &result)
Finalizes a PSBT if possible, and extracts it to a CMutableTransaction if it could be finalized.
static constexpr uint8_t PSBT_OUT_TAP_INTERNAL_KEY
void RemoveUnnecessaryTransactions(PartiallySignedTransaction &psbtx, const int &sighash_type)
Reduces the size of the PSBT by dropping unnecessary non_witness_utxos (i.e.
static constexpr uint8_t PSBT_IN_TAP_MERKLE_ROOT
void SerializeKeyOrigin(Stream &s, KeyOriginInfo hd_keypath)
void DeserializeHDKeypaths(Stream &s, const std::vector< unsigned char > &key, std::map< CPubKey, KeyOriginInfo > &hd_keypaths)
static constexpr uint8_t PSBT_IN_SIGHASH
bool PSBTInputSigned(const PSBTInput &input)
Checks whether a PSBTInput is already signed by checking for non-null finalized fields.
void SerializeHDKeypath(Stream &s, KeyOriginInfo hd_keypath)
PrecomputedTransactionData PrecomputePSBTData(const PartiallySignedTransaction &psbt)
Compute a PrecomputedTransactionData object from a psbt.
void DeserializeHDKeypath(Stream &s, KeyOriginInfo &hd_keypath)
bool FinalizePSBT(PartiallySignedTransaction &psbtx)
Finalizes a PSBT if possible, combining partial signatures.
const std::streamsize MAX_FILE_SIZE_PSBT
static constexpr uint8_t PSBT_IN_WITNESS_UTXO
static constexpr uint8_t PSBT_IN_SHA256
const unsigned int BIP32_EXTKEY_WITH_VERSION_SIZE
std::vector< unsigned char > ToByteVector(const T &in)
void SerializeMany(Stream &s, const Args &... args)
Support for (un)serializing many things at once.
void UnserializeMany(Stream &s, Args &&... args)
void WriteCompactSize(SizeComputer &os, uint64_t nSize)
uint64_t ReadCompactSize(Stream &is, bool range_check=true)
Decode a CompactSize-encoded variable-length integer.
std::pair< CPubKey, std::vector< unsigned char > > SigPair
void DecodeWithVersion(const unsigned char code[BIP32_EXTKEY_WITH_VERSION_SIZE])
A mutable version of CTransaction.
std::vector< std::vector< unsigned char > > stack
unsigned char fingerprint[4]
First 32 bits of the Hash160 of the public key at the root of the path.
std::vector< uint32_t > path
A structure for PSBTs which contains per output information.
XOnlyPubKey m_tap_internal_key
std::map< XOnlyPubKey, std::pair< std::set< uint256 >, KeyOriginInfo > > m_tap_bip32_paths
void Merge(const PSBTOutput &output)
std::set< PSBTProprietary > m_proprietary
void Serialize(Stream &s) const
PSBTOutput(deserialize_type, Stream &s)
std::map< CPubKey, KeyOriginInfo > hd_keypaths
std::vector< std::tuple< uint8_t, uint8_t, std::vector< unsigned char > > > m_tap_tree
void Unserialize(Stream &s)
std::map< std::vector< unsigned char >, std::vector< unsigned char > > unknown
void FillSignatureData(SignatureData &sigdata) const
void FromSignatureData(const SignatureData &sigdata)
A structure for PSBT proprietary types.
std::vector< unsigned char > value
bool operator<(const PSBTProprietary &b) const
std::vector< unsigned char > identifier
std::vector< unsigned char > key
bool operator==(const PSBTProprietary &b) const
A version of CTransaction with the PSBT format.
uint32_t GetVersion() const
bool Merge(const PartiallySignedTransaction &psbt)
Merge psbt into this.
std::map< KeyOriginInfo, std::set< CExtPubKey > > m_xpubs
std::optional< uint32_t > m_version
bool GetInputUTXO(CTxOut &utxo, int input_index) const
Finds the UTXO for a given input index.
std::map< std::vector< unsigned char >, std::vector< unsigned char > > unknown
bool AddOutput(const CTxOut &txout, const PSBTOutput &psbtout)
std::vector< PSBTInput > inputs
PartiallySignedTransaction()=default
std::optional< CMutableTransaction > tx
bool AddInput(const CTxIn &txin, PSBTInput &psbtin)
std::vector< PSBTOutput > outputs
std::set< PSBTProprietary > m_proprietary
void Serialize(Stream &s) const
PartiallySignedTransaction(deserialize_type, Stream &s)
void Unserialize(Stream &s)
Dummy data type to identify deserializing constructors.