add hex() and txKey() to PendingTransaction

This commit is contained in:
dsc 2023-12-30 16:12:24 +02:00 committed by wowario
parent ea1ff89671
commit 269fd51d34
No known key found for this signature in database
GPG Key ID: 793504B449C69220
3 changed files with 20 additions and 0 deletions

View File

@ -79,6 +79,22 @@ std::vector<std::string> PendingTransactionImpl::txid() const
return txid; return txid;
} }
std::vector<std::string> PendingTransactionImpl::hex() const
{
std::vector<std::string> hexs;
for (const auto &pt: m_pending_tx)
hexs.push_back(epee::string_tools::buff_to_hex_nodelimer(cryptonote::tx_to_blob(pt.tx)));
return hexs;
}
std::vector<std::string> PendingTransactionImpl::txKey() const
{
std::vector<std::string> keys;
for (const auto& pt: m_pending_tx)
keys.push_back(epee::string_tools::pod_to_hex(pt.tx_key));
return keys;
}
bool PendingTransactionImpl::commit(const std::string &filename, bool overwrite) bool PendingTransactionImpl::commit(const std::string &filename, bool overwrite)
{ {

View File

@ -66,6 +66,8 @@ public:
std::string multisigSignData() override; std::string multisigSignData() override;
void signMultisigTx() override; void signMultisigTx() override;
std::vector<std::string> signersKeys() const override; std::vector<std::string> signersKeys() const override;
std::vector<std::string> hex() const override;
std::vector<std::string> txKey() const override;
private: private:
friend class WalletImpl; friend class WalletImpl;

View File

@ -174,6 +174,8 @@ struct PendingTransaction
* @return vector of base58-encoded signers' public keys * @return vector of base58-encoded signers' public keys
*/ */
virtual std::vector<std::string> signersKeys() const = 0; virtual std::vector<std::string> signersKeys() const = 0;
virtual std::vector<std::string> hex() const = 0;
virtual std::vector<std::string> txKey() const = 0;
}; };
/** /**