5 #ifndef PIVX_SAPLING_SAPLING_OPERATION_H
6 #define PIVX_SAPLING_SAPLING_OPERATION_H
int64_t CAmount
Amount in PIV (Can be negative)
A reference to a CKey: the Hash160 of its serialized public key.
A key allocated from the key pool.
Serialized script, used inside transaction inputs and outputs.
The basic transaction that is broadcasted on the network and contained in blocks.
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,...
FromAddress(const CTxDestination &_fromTaddr)
FromAddress(const libzcash::SaplingPaymentAddress &_fromSapaddr)
bool isFromTAddress() const
bool isFromSapAddress() const
Optional< libzcash::SaplingPaymentAddress > fromSapAddr
std::vector< SaplingNoteEntry > shieldedInputs
const CCoinControl * coinControl
SaplingOperation(const Consensus::Params &consensusParams, CWallet *_wallet)
CTransaction getFinalTx()
TransactionBuilder txBuilder
OperationResult loadUnspentNotes(TxValues &txValues, uint256 &ovk)
OperationResult loadUtxos(TxValues &values)
OperationResult checkTxValues(TxValues &txValues, bool isFromtAddress, bool isFromShielded)
SaplingOperation * setSelectShieldedCoins(const bool select)
SaplingOperation * setCoinControl(const CCoinControl *_coinControl)
void setFromAddress(const CTxDestination &)
std::vector< COutput > transInputs
OperationResult send(std::string &retTxHash)
SaplingOperation * setRecipients(std::vector< SendManyRecipient > &vec)
SaplingOperation * setMinDepth(int _mindepth)
std::vector< SendManyRecipient > recipients
OperationResult buildAndSend(std::string &retTxHash)
SaplingOperation * setFee(CAmount _fee)
SaplingOperation * setSelectTransparentCoins(const bool select, const bool _fIncludeDelegated=false)
CTransactionRef getFinalTxRef()
SaplingOperation * setTransparentKeyChange(CReserveKey *reserveKey)
std::string getMemo() const override
bool isTransparent() const override
ShieldedRecipient(const libzcash::SaplingPaymentAddress &_address, const CAmount &_amount, const std::string &_memo, bool _fSubtractFeeFromAmount)
const libzcash::SaplingPaymentAddress address
Optional< libzcash::SaplingPaymentAddress > getSapPaymentAddr() const override
bool IsValidDestination(const CWDestination &address)
boost::optional< T > Optional
Substitute for C++17 std::optional.
OperationResult GetMemoFromString(const std::string &s, std::array< unsigned char, ZC_MEMO_SIZE > &memoRet)
OperationResult CheckTransactionSize(std::vector< SendManyRecipient > &recipients, bool fromTaddr)
CScript GetScriptForOpReturn(const uint256 &message)
Generate an OP_RETURN output script with the given data.
CScript GetScriptForStakeDelegation(const CKeyID &stakingKey, const CKeyID &spendingKey)
Generate a P2CS script for the given staker and owner keys.
CScript GetScriptForMultisig(int nRequired, const std::vector< CPubKey > &keys)
Generate a multisig script.
CScript GetScriptForStakeDelegationLOF(const CKeyID &stakingKey, const CKeyID &spendingKey)
CScript GetScriptForDestination(const CTxDestination &dest)
Generate a PIVX scriptPubKey for the given CTxDestination.
boost::variant< CNoDestination, CKeyID, CScriptID, CExchangeKeyID > CTxDestination
A txout script template with a specific destination.
Parameters that influence chain consensus.
std::string getMemo() const
libzcash::SaplingPaymentAddress getSapPaymentAddr() const
CAmount getAmount() const
CScript getScript() const
SendManyRecipient(const CTxDestination &dest, const CAmount &amount, bool fSubtractFeeFromAmount)
SendManyRecipient(int nRequired, const std::vector< CPubKey > &keys, const CAmount &amount)
bool IsSubtractFee() const
bool IsTransparent() const
const std::shared_ptr< CRecipientBase > recipient
SendManyRecipient(const libzcash::SaplingPaymentAddress &address, const CAmount &amount, const std::string &memo, bool fSubtractFeeFromAmount)
SendManyRecipient(const CKeyID &ownerKey, const CKeyID &stakerKey, const CAmount &amount, bool fV6Enforced)
SendManyRecipient(const uint256 &message)
SendManyRecipient()=delete
std::shared_ptr< const CTransaction > CTransactionRef