mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
add a method to SignedWalletTransaction to return binary message
This commit is contained in:
parent
631977bac2
commit
350c759618
2 changed files with 7 additions and 2 deletions
|
@ -32,7 +32,7 @@ SignedWalletTransaction::SignedWalletTransaction(const QUuid& destinationUUID, q
|
|||
|
||||
}
|
||||
|
||||
QByteArray SignedWalletTransaction::hexMessage() {
|
||||
QByteArray SignedWalletTransaction::binaryMessage() {
|
||||
// build the message using the components of this transaction
|
||||
|
||||
// UUID, source UUID, destination UUID, message timestamp, expiry delta, amount
|
||||
|
@ -49,7 +49,11 @@ QByteArray SignedWalletTransaction::hexMessage() {
|
|||
|
||||
messageBinary.append(reinterpret_cast<const char*>(&_amount), sizeof(_amount));
|
||||
|
||||
return messageBinary.toHex();
|
||||
return messageBinary;
|
||||
}
|
||||
|
||||
QByteArray SignedWalletTransaction::hexMessage() {
|
||||
return binaryMessage().toHex();
|
||||
}
|
||||
|
||||
QByteArray SignedWalletTransaction::messageDigest() {
|
||||
|
|
|
@ -19,6 +19,7 @@ class SignedWalletTransaction : public WalletTransaction {
|
|||
public:
|
||||
SignedWalletTransaction(const QUuid& destinationUUID, qint64 amount, qint64 messageTimestamp, qint64 expiryDelta);
|
||||
|
||||
QByteArray binaryMessage();
|
||||
QByteArray hexMessage();
|
||||
QByteArray messageDigest();
|
||||
QByteArray signedMessageDigest();
|
||||
|
|
Loading…
Reference in a new issue