PIVX Core  5.6.99
P2P Digital Currency
Classes | Functions
utiltest.h File Reference
#include "sapling/address.h"
#include "sapling/incrementalmerkletree.h"
#include "sapling/note.h"
#include "sapling/noteencryption.h"
#include "wallet/wallet.h"
Include dependency graph for utiltest.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TestSaplingNote
 
struct  ShieldedDestination
 
struct  TransparentInput
 

Functions

libzcash::SaplingExtendedSpendingKey GetTestMasterSaplingSpendingKey ()
 
CKey AddTestCKeyToKeyStore (CBasicKeyStore &keyStore, bool genNewKey=false)
 
CKey AddTestCKeyToWallet (CWallet &wallet, bool genNewKey=false)
 
CScript CreateDummyDestinationScript ()
 Generates a dummy destination script. More...
 
TestSaplingNote GetTestSaplingNote (const libzcash::SaplingPaymentAddress &pa, CAmount value)
 Generate a dummy SaplingNote and a SaplingMerkleTree with that note's commitment. More...
 
CWalletTx GetValidSaplingReceive (const Consensus::Params &consensusParams, CBasicKeyStore &keyStoreFrom, std::vector< TransparentInput > vIn, std::vector< ShieldedDestination > vDest, const CWallet *pwalletIn=nullptr)
 One or many inputs from keyStoreFrom, one or many shielded outputs to pwalletIn (if not nullptr). More...
 
CWalletTx GetValidSaplingReceive (const Consensus::Params &consensusParams, CWallet &keyStoreFrom, CAmount inputAmount, std::vector< ShieldedDestination > vDest, bool genNewKey=false, const CWallet *pwalletIn=nullptr)
 Single dummy input, one or many shielded outputs. More...
 
CWalletTx GetValidSaplingReceive (const Consensus::Params &consensusParams, CWallet &keyStore, const libzcash::SaplingExtendedSpendingKey &sk, CAmount value, bool genNewKey=false, const CWallet *pwalletIn=nullptr)
 Single dummy input, single shielded output to sk default address. More...
 

Function Documentation

◆ AddTestCKeyToKeyStore()

CKey AddTestCKeyToKeyStore ( CBasicKeyStore keyStore,
bool  genNewKey = false 
)

Definition at line 30 of file utiltest.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddTestCKeyToWallet()

CKey AddTestCKeyToWallet ( CWallet wallet,
bool  genNewKey = false 
)

Definition at line 36 of file utiltest.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ CreateDummyDestinationScript()

CScript CreateDummyDestinationScript ( )

Generates a dummy destination script.

Definition at line 112 of file utiltest.cpp.

Here is the call graph for this function:

◆ GetTestMasterSaplingSpendingKey()

libzcash::SaplingExtendedSpendingKey GetTestMasterSaplingSpendingKey ( )

Definition at line 16 of file utiltest.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTestSaplingNote()

TestSaplingNote GetTestSaplingNote ( const libzcash::SaplingPaymentAddress pa,
CAmount  value 
)

Generate a dummy SaplingNote and a SaplingMerkleTree with that note's commitment.

Definition at line 41 of file utiltest.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetValidSaplingReceive() [1/3]

CWalletTx GetValidSaplingReceive ( const Consensus::Params consensusParams,
CBasicKeyStore keyStoreFrom,
std::vector< TransparentInput vIn,
std::vector< ShieldedDestination vDest,
const CWallet pwalletIn = nullptr 
)

One or many inputs from keyStoreFrom, one or many shielded outputs to pwalletIn (if not nullptr).

Definition at line 50 of file utiltest.cpp.

Here is the caller graph for this function:

◆ GetValidSaplingReceive() [2/3]

CWalletTx GetValidSaplingReceive ( const Consensus::Params consensusParams,
CWallet keyStore,
const libzcash::SaplingExtendedSpendingKey sk,
CAmount  value,
bool  genNewKey = false,
const CWallet pwalletIn = nullptr 
)

Single dummy input, single shielded output to sk default address.

Definition at line 94 of file utiltest.cpp.

Here is the call graph for this function:

◆ GetValidSaplingReceive() [3/3]

CWalletTx GetValidSaplingReceive ( const Consensus::Params consensusParams,
CWallet keyStoreFrom,
CAmount  inputAmount,
std::vector< ShieldedDestination vDest,
bool  genNewKey = false,
const CWallet pwalletIn = nullptr 
)

Single dummy input, one or many shielded outputs.

Definition at line 77 of file utiltest.cpp.

Here is the call graph for this function: