6 #ifndef PIVX_SAPLING_SAPLING_TRANSACTION_H
7 #define PIVX_SAPLING_SAPLING_TRANSACTION_H
17 #include <boost/variant.hpp>
20 #define CTXIN_SPEND_DUST_SIZE 149
21 #define CTXOUT_REGULAR_SIZE 34
25 #define OUTPUTDESCRIPTION_SIZE 948
26 #define SPENDDESCRIPTION_SIZE 384
27 #define BINDINGSIG_SIZE 64
30 static constexpr
size_t GROTH_PROOF_SIZE = (
35 typedef std::array<unsigned char, GROTH_PROOF_SIZE>
GrothProof;
128 [](
const unsigned char& c){ return c != 0; });
int64_t CAmount
Amount in PIV (Can be negative)
A shielded output to a transaction.
uint256 cmu
The u-coordinate of the note commitment for the output note.
friend bool operator==(const OutputDescription &a, const OutputDescription &b)
libzcash::SaplingOutCiphertext outCiphertext
A ciphertext component for the encrypted output note.
libzcash::GrothProof zkproof
A zero-knowledge proof using the output circuit.
SERIALIZE_METHODS(OutputDescription, obj)
friend bool operator!=(const OutputDescription &a, const OutputDescription &b)
libzcash::SaplingEncCiphertext encCiphertext
A ciphertext component for the encrypted output note.
uint256 cv
A value commitment to the value of the output note.
uint256 ephemeralKey
A Jubjub public key.
SaplingTxData(const SaplingTxData &from)
bool hasBindingSig() const
std::array< unsigned char, BINDINGSIG_SIZE > binding_sig_t
SERIALIZE_METHODS(SaplingTxData, obj)
std::vector< OutputDescription > vShieldedOutput
std::vector< SpendDescription > vShieldedSpend
A shielded input to a transaction.
spend_auth_sig_t spendAuthSig
A signature authorizing this spend.
std::array< unsigned char, 64 > spend_auth_sig_t
uint256 cv
A value commitment to the value of the input note.
friend bool operator!=(const SpendDescription &a, const SpendDescription &b)
libzcash::GrothProof zkproof
A zero-knowledge proof using the spend circuit.
friend bool operator==(const SpendDescription &a, const SpendDescription &b)
uint256 anchor
A Merkle root of the Sapling note commitment tree at some block height in the past.
uint256 rk
The randomized public key for spendAuthSig.
SERIALIZE_METHODS(SpendDescription, obj)
uint256 nullifier
The nullifier of the input note.
std::array< unsigned char, GROTH_PROOF_SIZE > GrothProof
std::array< unsigned char, ZC_SAPLING_ENCCIPHERTEXT_SIZE > SaplingEncCiphertext
std::array< unsigned char, ZC_SAPLING_OUTCIPHERTEXT_SIZE > SaplingOutCiphertext
const uint256 UINT256_ZERO
constant uint256 instances