1
// Copyright © 2017-2020 Trust Wallet.
2
//
3
// This file is part of Trust. The full Trust copyright notice, including
4
// terms governing use, modification, and redistribution, is contained in the
5
// file LICENSE at the root of the source code distribution tree.
6

7
#pragma once
8

9
#include "Address.h"
10
#include "../Data.h"
11
#include "../proto/Algorand.pb.h"
12

13
namespace TW::Algorand {
14

15 1
class Transaction {
16
  public:
17
    Address from;
18
    Address to;
19
    uint64_t fee;
20
    uint64_t amount;
21
    uint64_t firstRound;
22
    uint64_t lastRound;
23
    Data note;
24
    std::string type;
25

26
    std::string genesisId;
27
    Data genesisHash;
28

29 1
    Transaction(Address &from, Address &to, uint64_t fee, uint64_t amount, uint64_t firstRound,
30
                uint64_t lastRound, Data& note, std::string type, std::string& genesisIdg, Data& genesisHash)
31 1
        : from(from) , to(to)
32 1
        , fee(fee), amount(amount)
33 1
        , firstRound(firstRound), lastRound(lastRound)
34 1
        , note(note), type(type)
35 1
        , genesisId(genesisIdg), genesisHash(genesisHash) {}
36

37
  public:
38
    Data serialize() const;
39
    Data serialize(Data& signature) const;
40
};
41

42
} // namespace TW::Algorand

Read our documentation on viewing source code .

Loading