Changeset View
Changeset View
Standalone View
Standalone View
src/psbt.cpp
Show First 20 Lines • Show All 291 Lines • ▼ Show 20 Lines | if (!out.IsSane()) { | ||||
return TransactionError::INVALID_PSBT; | return TransactionError::INVALID_PSBT; | ||||
} | } | ||||
return TransactionError::OK; | return TransactionError::OK; | ||||
} | } | ||||
std::string PSBTRoleName(const PSBTRole role) { | std::string PSBTRoleName(const PSBTRole role) { | ||||
switch (role) { | switch (role) { | ||||
case PSBTRole::CREATOR: | |||||
return "creator"; | |||||
case PSBTRole::UPDATER: | case PSBTRole::UPDATER: | ||||
return "updater"; | return "updater"; | ||||
case PSBTRole::SIGNER: | case PSBTRole::SIGNER: | ||||
return "signer"; | return "signer"; | ||||
case PSBTRole::FINALIZER: | case PSBTRole::FINALIZER: | ||||
return "finalizer"; | return "finalizer"; | ||||
case PSBTRole::EXTRACTOR: | case PSBTRole::EXTRACTOR: | ||||
return "extractor"; | return "extractor"; | ||||
// no default case, so the compiler can warn about missing cases | |||||
} | } | ||||
assert(false); | assert(false); | ||||
} | } | ||||
bool DecodeBase64PSBT(PartiallySignedTransaction &psbt, | bool DecodeBase64PSBT(PartiallySignedTransaction &psbt, | ||||
const std::string &base64_tx, std::string &error) { | const std::string &base64_tx, std::string &error) { | ||||
bool invalid; | bool invalid; | ||||
std::string tx_data = DecodeBase64(base64_tx, &invalid); | std::string tx_data = DecodeBase64(base64_tx, &invalid); | ||||
Show All 23 Lines |