6 #ifndef PIVX_SAPLING_TRANSACTION_BUILDER_H
7 #define PIVX_SAPLING_TRANSACTION_BUILDER_H
39 std::array<unsigned char, ZC_MEMO_SIZE>
memo;
44 const std::array<unsigned char, ZC_MEMO_SIZE>& _memo):
91 std::vector<SpendDescriptionInfo>
spends;
92 std::vector<OutputDescriptionInfo>
outputs;
93 std::vector<TransparentInputInfo>
tIns;
119 const std::array<unsigned char, ZC_MEMO_SIZE>& memo);
126 const std::array<unsigned char, ZC_MEMO_SIZE> memo = {{0xF6}};
int64_t CAmount
Amount in PIV (Can be negative)
A virtual base class for key stores.
An outpoint - a combination of a transaction hash and an index n into its vout.
Serialized script, used inside transaction inputs and outputs.
The basic transaction that is broadcasted on the network and contained in blocks.
An output of a transaction.
A shielded output to a transaction.
std::array< unsigned char, BINDINGSIG_SIZE > binding_sig_t
A shielded input to a transaction.
std::vector< OutputDescriptionInfo > outputs
void AddTransparentOutput(const CTxOut &out)
void SetFee(CAmount _fee)
std::vector< TransparentInputInfo > tIns
void AddSaplingSpend(const libzcash::SaplingExpandedSpendingKey &expsk, const libzcash::SaplingNote ¬e, const uint256 &anchor, const SaplingWitness &witness)
void AddSaplingOutput(const uint256 &ovk, const libzcash::SaplingPaymentAddress &to, CAmount value)
TransactionBuilderResult AddDummySignatures()
TransactionBuilderResult Build(bool fDummySig=false)
void ClearProofsAndSignatures()
void AddSaplingOutput(const uint256 &ovk, const libzcash::SaplingPaymentAddress &to, CAmount value, const std::array< unsigned char, ZC_MEMO_SIZE > &memo)
Consensus::Params consensusParams
TransactionBuilderResult ProveAndSign()
const CKeyStore * keystore
std::vector< SpendDescriptionInfo > spends
void AddTransparentInput(const COutPoint &utxo, const CScript &scriptPubKey, CAmount value)
TransactionBuilder(const Consensus::Params &consensusParams, CKeyStore *keyStore=nullptr)
void SendChangeTo(const libzcash::SaplingPaymentAddress &changeAddr, const uint256 &ovk)
Optional< CTxDestination > tChangeAddr
Optional< std::pair< uint256, libzcash::SaplingPaymentAddress > > saplingChangeAddr
TransactionBuilderResult()=delete
Optional< CTransaction > GetTx()
Optional< CTransaction > maybeTx
Optional< std::string > maybeError
CTransaction GetTxOrThrow()
boost::optional< T > Optional
Substitute for C++17 std::optional.
boost::variant< CNoDestination, CKeyID, CScriptID, CExchangeKeyID > CTxDestination
A txout script template with a specific destination.
A mutable version of CTransaction.
Parameters that influence chain consensus.
std::array< unsigned char, ZC_MEMO_SIZE > memo
OutputDescriptionInfo(const uint256 &_ovk, const libzcash::SaplingNote &_note, const std::array< unsigned char, ZC_MEMO_SIZE > &_memo)
Optional< OutputDescription > Build(void *ctx)
libzcash::SaplingNote note
libzcash::SaplingNote note
SpendDescriptionInfo(const libzcash::SaplingExpandedSpendingKey &_expsk, const libzcash::SaplingNote &_note, const uint256 &_anchor, const SaplingWitness &_witness)
libzcash::SaplingExpandedSpendingKey expsk
bool error(const char *fmt, const Args &... args)
const SaplingTxData::binding_sig_t DUMMY_SHIELD_BINDSIG
const SpendDescription DUMMY_SHIELD_SPEND
const OutputDescription DUMMY_SHIELD_OUT