Add various bits of documentation
This commit is contained in:
parent
98ab4bcadb
commit
3e3ee1bf3b
|
@ -252,6 +252,10 @@ bool CBasicKeyStore::GetSproutViewingKey(
|
|||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
// Sapling Keys
|
||||
//
|
||||
|
||||
bool CBasicKeyStore::GetSaplingFullViewingKey(
|
||||
const libzcash::SaplingIncomingViewingKey &ivk,
|
||||
libzcash::SaplingExtendedFullViewingKey &extfvkOut) const
|
||||
|
|
|
@ -725,8 +725,9 @@ WalletUAGenerationResult CWallet::GenerateUnifiedAddress(
|
|||
assert(mapUfvkAddressMetadata[ufvkid].SetReceivers(address.second, receiverTypes));
|
||||
if (hasTransparent) {
|
||||
// We must construct and add the transparent spending key associated
|
||||
// with the external transparent child address to the transparent
|
||||
// keystore.
|
||||
// with the external and internal transparent child addresses to the
|
||||
// transparent keystore. This call to `value` will succeed because
|
||||
// this key must have been previously generated.
|
||||
auto usk = GenerateUnifiedSpendingKeyForAccount(accountId).value();
|
||||
auto accountKey = usk.GetTransparentKey();
|
||||
// this .value is known to be safe from the earlier check
|
||||
|
@ -6425,6 +6426,9 @@ std::optional<libzcash::ViewingKey> GetViewingKeyForPaymentAddress::operator()(
|
|||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
// GetViewingKeyForPaymentAddress visitor
|
||||
|
||||
std::optional<libzcash::ViewingKey> GetViewingKeyForPaymentAddress::operator()(
|
||||
const libzcash::SproutPaymentAddress &zaddr) const
|
||||
{
|
||||
|
|
|
@ -1816,6 +1816,7 @@ public:
|
|||
// Shielded key and address generalizations
|
||||
//
|
||||
|
||||
// PaymentAddressBelongsToWallet visitor :: (CWallet&, PaymentAddress) -> bool
|
||||
class PaymentAddressBelongsToWallet
|
||||
{
|
||||
private:
|
||||
|
@ -1830,6 +1831,7 @@ public:
|
|||
bool operator()(const libzcash::UnifiedAddress &uaddr) const;
|
||||
};
|
||||
|
||||
// GetViewingKeyForPaymentAddress visitor :: (CWallet&, PaymentAddress) -> std::optional<ViewingKey>
|
||||
class GetViewingKeyForPaymentAddress
|
||||
{
|
||||
private:
|
||||
|
@ -1853,6 +1855,7 @@ enum class PaymentAddressSource {
|
|||
AddressNotFound,
|
||||
};
|
||||
|
||||
// GetSourceForPaymentAddress visitor :: (CWallet&, PaymentAddress) -> PaymentAddressSource
|
||||
class GetSourceForPaymentAddress
|
||||
{
|
||||
private:
|
||||
|
@ -1876,6 +1879,7 @@ enum KeyAddResult {
|
|||
KeyNotAdded,
|
||||
};
|
||||
|
||||
// AddViewingKeyToWallet visitor :: (CWallet&, ViewingKey) -> KeyAddResult
|
||||
class AddViewingKeyToWallet
|
||||
{
|
||||
private:
|
||||
|
@ -1889,6 +1893,8 @@ public:
|
|||
KeyAddResult operator()(const libzcash::UnifiedFullViewingKey &sk) const;
|
||||
};
|
||||
|
||||
// AddSpendingKeyToWallet visitor ::
|
||||
// (CWallet&, Consensus::Params, ..., ViewingKey) -> KeyAddResult
|
||||
class AddSpendingKeyToWallet
|
||||
{
|
||||
private:
|
||||
|
@ -1917,6 +1923,7 @@ public:
|
|||
KeyAddResult operator()(const libzcash::SaplingExtendedSpendingKey &sk) const;
|
||||
};
|
||||
|
||||
// UFVKForReceiver :: (CWallet&, Receiver) -> std::optional<ZcashdUnifiedFullViewingKey>
|
||||
class UFVKForReceiver {
|
||||
private:
|
||||
const CWallet& wallet;
|
||||
|
@ -1930,6 +1937,7 @@ public:
|
|||
std::optional<libzcash::ZcashdUnifiedFullViewingKey> operator()(const libzcash::UnknownReceiver& receiver) const;
|
||||
};
|
||||
|
||||
// UnifiedAddressForReceiver :: (CWallet&, Receiver) -> std::optional<UnifiedAddress>
|
||||
class UnifiedAddressForReceiver {
|
||||
private:
|
||||
const CWallet& wallet;
|
||||
|
|
|
@ -295,4 +295,4 @@ bool IsInternalKeyPath(uint32_t purpose, uint32_t coinType, const std::string& k
|
|||
}
|
||||
}
|
||||
|
||||
};
|
||||
} //namespace libzcash
|
||||
|
|
Loading…
Reference in New Issue