diff --git a/zingolib/src/wallet/keys/ledger.rs b/zingolib/src/wallet/keys/ledger.rs index 3569f07bf..71650f3e4 100644 --- a/zingolib/src/wallet/keys/ledger.rs +++ b/zingolib/src/wallet/keys/ledger.rs @@ -6,6 +6,8 @@ use std::io; use secp256k1::{PublicKey, Secp256k1, SecretKey}; use crate::wallet::traits::ReadableWriteable; +use super::unified::InternalCapability; + /// Holds ledger things #[derive(Debug)] pub struct LedgerKeys { @@ -82,4 +84,64 @@ impl ReadableWriteable for LedgerKeys { Ok(()) } +} + +impl InternalCapability for LedgerKeys { + fn get_ua_from_contained_transparent_receiver( + &self, + capability: super::unified::WalletCapability, + receiver: &zcash_primitives::legacy::TransparentAddress, + ) -> Option { + todo!() + } + + fn addresses(&self, capability: super::unified::WalletCapability) -> &append_only_vec::AppendOnlyVec { + todo!() + } + + fn transparent_child_addresses( + &self, + capability: super::unified::WalletCapability + ) -> &std::sync::Arc> { + todo!() + } + + fn new_address( + &self, + capability: super::unified::WalletCapability, + desired_receivers: super::unified::ReceiverSelection, + legacy_key: bool, + ) -> Result { + todo!() + } + + fn generate_transparent_receiver( + &self, + capability: super::unified::WalletCapability, + // this should only be `true` when generating transparent addresses while loading from legacy keys (pre wallet version 29) + // legacy transparent keys are already derived to the external scope so setting `legacy_key` to `true` will skip this scope derivation + legacy_key: bool, + ) -> Result, bip32::Error> { + todo!() + } + + fn get_taddr_to_secretkey_map( + &self, + capability: super::unified::WalletCapability, + chain: &crate::config::ChainType, + ) -> Result, crate::wallet::error::KeyError> { + todo!() + } + + fn first_sapling_address(&self, capability: super::unified::WalletCapability) -> sapling_crypto::PaymentAddress { + todo!() + } + + fn get_trees_witness_trees(&self, capability: super::unified::WalletCapability) -> Option { + todo!() + } + + fn can_view(&self, capability: super::unified::WalletCapability) -> super::unified::ReceiverSelection { + todo!() + } } \ No newline at end of file diff --git a/zingolib/src/wallet/keys/unified.rs b/zingolib/src/wallet/keys/unified.rs index dedab5f3f..c3e5f03cb 100644 --- a/zingolib/src/wallet/keys/unified.rs +++ b/zingolib/src/wallet/keys/unified.rs @@ -239,6 +239,7 @@ pub struct WalletCapability { /// Cache of unified_addresses unified_addresses: append_only_vec::AppendOnlyVec, addresses_write_lock: AtomicBool, + capability: InternalCapability, } impl Default for WalletCapability { fn default() -> Self {