ledger-core
BitcoinLikeTransactionBuilder.hpp
1 // AUTOGENERATED FILE - DO NOT MODIFY!
2 // This file generated by Djinni from bitcoin_like_wallet.djinni
3 
4 #ifndef DJINNI_GENERATED_BITCOINLIKETRANSACTIONBUILDER_HPP
5 #define DJINNI_GENERATED_BITCOINLIKETRANSACTIONBUILDER_HPP
6 
7 #include "../utils/optional.hpp"
8 #include <cstdint>
9 #include <memory>
10 #include <string>
11 #include <vector>
12 #ifndef LIBCORE_EXPORT
13  #if defined(_MSC_VER)
14  #include <libcore_export.h>
15  #else
16  #define LIBCORE_EXPORT
17  #endif
18 #endif
19 
20 namespace ledger { namespace core { namespace api {
21 
22 class Amount;
23 class BitcoinLikeScript;
24 class BitcoinLikeTransaction;
25 class BitcoinLikeTransactionCallback;
26 enum class BitcoinLikePickingStrategy;
27 struct Currency;
28 
29 class LIBCORE_EXPORT BitcoinLikeTransactionBuilder {
30 public:
31  virtual ~BitcoinLikeTransactionBuilder() {}
32 
40  virtual std::shared_ptr<BitcoinLikeTransactionBuilder> addInput(const std::string & transactionHash, int32_t index, int32_t sequence) = 0;
41 
46  virtual std::shared_ptr<BitcoinLikeTransactionBuilder> addOutput(const std::shared_ptr<Amount> & amount, const std::shared_ptr<BitcoinLikeScript> & script) = 0;
47 
52  virtual std::shared_ptr<BitcoinLikeTransactionBuilder> addChangePath(const std::string & path) = 0;
53 
61  virtual std::shared_ptr<BitcoinLikeTransactionBuilder> excludeUtxo(const std::string & transactionHash, int32_t outputIndex) = 0;
62 
67  virtual std::shared_ptr<BitcoinLikeTransactionBuilder> setNumberOfChangeAddresses(int32_t count) = 0;
68 
73  virtual std::shared_ptr<BitcoinLikeTransactionBuilder> setMaxAmountOnChange(const std::shared_ptr<Amount> & amount) = 0;
74 
79  virtual std::shared_ptr<BitcoinLikeTransactionBuilder> setMinAmountOnChange(const std::shared_ptr<Amount> & amount) = 0;
80 
88  virtual std::shared_ptr<BitcoinLikeTransactionBuilder> pickInputs(BitcoinLikePickingStrategy strategy, int32_t sequence) = 0;
89 
96  virtual std::shared_ptr<BitcoinLikeTransactionBuilder> sendToAddress(const std::shared_ptr<Amount> & amount, const std::string & address) = 0;
97 
103  virtual std::shared_ptr<BitcoinLikeTransactionBuilder> wipeToAddress(const std::string & address) = 0;
104 
109  virtual std::shared_ptr<BitcoinLikeTransactionBuilder> setFeesPerByte(const std::shared_ptr<Amount> & fees) = 0;
110 
112  virtual void build(const std::shared_ptr<BitcoinLikeTransactionCallback> & callback) = 0;
113 
118  virtual std::shared_ptr<BitcoinLikeTransactionBuilder> clone() = 0;
119 
121  virtual void reset() = 0;
122 
127  static std::shared_ptr<BitcoinLikeTransaction> parseRawUnsignedTransaction(const Currency & currency, const std::vector<uint8_t> & rawTransaction, std::experimental::optional<int32_t> currentBlockHeight);
128 };
129 
130 } } } // namespace ledger::core::api
131 #endif //DJINNI_GENERATED_BITCOINLIKETRANSACTIONBUILDER_HPP
Definition: BitcoinLikeTransactionBuilder.hpp:29
Definition: Currency.hpp:23
Definition: Account.cpp:8