TransactionBuilder: Add change output to transaction

This commit is contained in:
Jack Grigg
2018-07-30 12:36:42 +01:00
parent 3466b4677e
commit 45c0d1ec84
3 changed files with 154 additions and 4 deletions

View File

@@ -64,6 +64,9 @@ private:
std::vector<OutputDescriptionInfo> outputs;
std::vector<TransparentInputInfo> tIns;
boost::optional<std::pair<libzcash::SaplingFullViewingKey, libzcash::SaplingPaymentAddress>> zChangeAddr;
boost::optional<CTxDestination> tChangeAddr;
public:
TransactionBuilder(const Consensus::Params& consensusParams, int nHeight, CKeyStore* keyStore = nullptr);
@@ -86,6 +89,10 @@ public:
bool AddTransparentOutput(CTxDestination& to, CAmount value);
void SendChangeTo(libzcash::SaplingPaymentAddress changeAddr, libzcash::SaplingFullViewingKey fvkOut);
bool SendChangeTo(CTxDestination& changeAddr);
boost::optional<CTransaction> Build();
};