PIVX Core  5.6.99
P2P Digital Currency
utiltest.h
Go to the documentation of this file.
1 // Copyright (c) 2016-2020 The Zcash developers
2 // Copyright (c) 2020-2021 The PIVX Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or https://www.opensource.org/licenses/mit-license.php .
5 
6 #ifndef PIVX_TEST_LIBRUST_UTILTEST_H
7 #define PIVX_TEST_LIBRUST_UTILTEST_H
8 
9 #include "sapling/address.h"
11 #include "sapling/note.h"
12 #include "sapling/noteencryption.h"
13 #include "wallet/wallet.h"
14 
18 };
19 
23 };
24 
29 };
30 
31 
33 
34 CKey AddTestCKeyToKeyStore(CBasicKeyStore& keyStore, bool genNewKey = false);
35 CKey AddTestCKeyToWallet(CWallet& wallet, bool genNewKey = false);
36 
41 
46 
47 
52  CBasicKeyStore& keyStoreFrom,
53  std::vector<TransparentInput> vIn,
54  std::vector<ShieldedDestination> vDest,
55  const CWallet* pwalletIn = nullptr);
56 
61  CWallet& keyStoreFrom,
62  CAmount inputAmount,
63  std::vector<ShieldedDestination> vDest,
64  bool genNewKey = false,
65  const CWallet* pwalletIn = nullptr);
66 
71  CWallet& keyStore,
73  CAmount value,
74  bool genNewKey = false,
75  const CWallet* pwalletIn = nullptr);
76 
77 #endif // PIVX_TEST_LIBRUST_UTILTEST_H
int64_t CAmount
Amount in PIV (Can be negative)
Definition: amount.h:13
Basic key store, that keeps keys in an address->secret map.
Definition: keystore.h:99
An encapsulated private key.
Definition: key.h:30
An outpoint - a combination of a transaction hash and an index n into its vout.
Definition: transaction.h:72
Serialized script, used inside transaction inputs and outputs.
Definition: script.h:381
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,...
Definition: wallet.h:577
A transaction with a bunch of additional info that only the owner cares about.
Definition: wallet.h:325
Sapling functions.
Definition: address.h:30
Parameters that influence chain consensus.
Definition: params.h:171
const libzcash::SaplingExtendedSpendingKey & sk
Definition: utiltest.h:21
SaplingMerkleTree tree
Definition: utiltest.h:17
libzcash::SaplingNote note
Definition: utiltest.h:16
CScript scriptPubKey
Definition: utiltest.h:27
CAmount amount
Definition: utiltest.h:28
COutPoint outPoint
Definition: utiltest.h:26
TestSaplingNote GetTestSaplingNote(const libzcash::SaplingPaymentAddress &pa, CAmount value)
Generate a dummy SaplingNote and a SaplingMerkleTree with that note's commitment.
Definition: utiltest.cpp:41
CKey AddTestCKeyToWallet(CWallet &wallet, bool genNewKey=false)
Definition: utiltest.cpp:36
libzcash::SaplingExtendedSpendingKey GetTestMasterSaplingSpendingKey()
Definition: utiltest.cpp:16
CScript CreateDummyDestinationScript()
Generates a dummy destination script.
Definition: utiltest.cpp:112
CKey AddTestCKeyToKeyStore(CBasicKeyStore &keyStore, bool genNewKey=false)
Definition: utiltest.cpp:30
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: utiltest.cpp:50