32 #ifndef LEDGER_CORE_TEZOSLIKETRANSACTIONAPI_H 33 #define LEDGER_CORE_TEZOSLIKETRANSACTIONAPI_H 35 #include <wallet/common/api_impl/OperationApi.h> 36 #include <wallet/tezos/api_impl/TezosLikeBlockApi.h> 37 #include <api/TezosLikeTransaction.hpp> 38 #include <api/Amount.hpp> 39 #include <api/Currency.hpp> 40 #include <math/BigInt.h> 41 #include <api/TezosOperationTag.hpp> 48 const std::string &protocolUpdate);
51 const std::string &protocolUpdate);
53 api::TezosOperationTag
getType()
override;
57 std::shared_ptr<api::Amount>
getFees()
override;
59 std::shared_ptr<api::TezosLikeAddress>
getReceiver()
override;
61 std::shared_ptr<api::TezosLikeAddress>
getSender()
override;
63 std::shared_ptr<api::Amount>
getValue()
override;
65 std::vector<uint8_t>
serialize()
override;
66 std::vector<uint8_t> serializeWithType(api::TezosOperationTag type);
68 std::chrono::system_clock::time_point
getDate()
override;
70 std::shared_ptr<api::BigInt> getCounter()
override;
72 std::shared_ptr<api::Amount> getGasLimit()
override ;
74 std::shared_ptr<api::BigInt> getStorageLimit()
override;
78 void setSignature(
const std::vector<uint8_t> &signature)
override;
88 TezosLikeTransactionApi &setSender(
const std::shared_ptr<api::TezosLikeAddress> &sender, api::TezosCurve curve = api::TezosCurve::ED25519);
90 TezosLikeTransactionApi &setReceiver(
const std::shared_ptr<api::TezosLikeAddress> &receiver, api::TezosCurve curve = api::TezosCurve::ED25519);
109 std::string getManagerAddress()
const;
114 bool toReveal()
const;
116 std::chrono::system_clock::time_point _time;
117 std::shared_ptr<TezosLikeBlockApi> _block;
120 std::shared_ptr<api::Amount> _fees;
121 std::shared_ptr<api::Amount> _gasLimit;
122 std::shared_ptr<BigInt> _storage;
123 std::shared_ptr<BigInt> _counter;
124 std::shared_ptr<api::Amount> _value;
125 std::shared_ptr<api::TezosLikeAddress> _receiver;
126 api::TezosCurve _receiverCurve;
127 std::shared_ptr<api::TezosLikeAddress> _sender;
128 api::TezosCurve _senderCurve;
129 std::vector<uint8_t> _signature;
130 std::vector<uint8_t> _signingPubKey;
131 api::TezosOperationTag _type;
132 std::string _revealedPubKey;
134 std::string _protocolUpdate;
135 std::string _managerAddress;
136 api::TezosCurve _managerCurve;
137 std::vector<uint8_t> _rawTx;
143 #endif //LEDGER_CORE_TEZOSLIKETRANSACTIONAPI_H void setSignature(const std::vector< uint8_t > &signature) override
Definition: TezosLikeTransactionApi.cpp:150
std::shared_ptr< api::Amount > getValue() override
Definition: TezosLikeTransactionApi.cpp:113
std::shared_ptr< api::Amount > getFees() override
Definition: TezosLikeTransactionApi.cpp:96
std::vector< uint8_t > getSigningPubKey() override
Definition: TezosLikeTransactionApi.cpp:143
Definition: TezosLikeTransactionApi.h:45
int32_t getStatus() override
Definition: TezosLikeTransactionApi.cpp:147
api::TezosOperationTag getType() override
Definition: TezosLikeTransactionApi.cpp:88
std::shared_ptr< api::TezosLikeAddress > getReceiver() override
Definition: TezosLikeTransactionApi.cpp:105
Definition: Currency.hpp:23
std::string getHash() override
Definition: TezosLikeTransactionApi.cpp:92
std::chrono::system_clock::time_point getDate() override
Definition: TezosLikeTransactionApi.cpp:117
std::experimental::optional< std::string > getBlockHash() override
Definition: TezosLikeTransactionApi.cpp:139
Definition: Account.cpp:8
Definition: TezosLikeTransaction.hpp:29
std::shared_ptr< api::TezosLikeAddress > getSender() override
Definition: TezosLikeTransactionApi.cpp:109
std::vector< uint8_t > serialize() override
Definition: TezosLikeTransactionApi.cpp:159