pub trait ScanningKeyOps<D: Domain, AccountId, Nf> {
// Required methods
fn prepare(&self) -> D::IncomingViewingKey;
fn account_id(&self) -> &AccountId;
fn key_scope(&self) -> Option<Scope>;
fn nf(&self, note: &D::Note, note_position: Position) -> Option<Nf>;
}Expand description
A key that can be used to perform trial decryption and nullifier
computation for a CompactSaplingOutput or CompactOrchardAction.
The purpose of this trait is to enable scan_block
and related methods to be used with either incoming viewing keys
or full viewing keys, with the data returned from trial decryption
being dependent upon the type of key used. In the case that an
incoming viewing key is used, only the note and payment address
will be returned; in the case of a full viewing key, the
nullifier for the note can also be obtained.
Required Methods§
Sourcefn prepare(&self) -> D::IncomingViewingKey
fn prepare(&self) -> D::IncomingViewingKey
Prepare the key for use in batch trial decryption.
Sourcefn account_id(&self) -> &AccountId
fn account_id(&self) -> &AccountId
Returns the account identifier for this key. An account identifier corresponds to at most a single unified spending key’s worth of spend authority, such that both received notes and change spendable by that spending authority will be interpreted as belonging to that account.
Sourcefn key_scope(&self) -> Option<Scope>
fn key_scope(&self) -> Option<Scope>
Returns the zip32::Scope for which this key was derived, if known.
Trait Implementations§
Source§impl<D: Domain, AccountId, Nf> ScanningKeyOps<D, AccountId, Nf> for Box<dyn ScanningKeyOps<D, AccountId, Nf>>
impl<D: Domain, AccountId, Nf> ScanningKeyOps<D, AccountId, Nf> for Box<dyn ScanningKeyOps<D, AccountId, Nf>>
Source§fn prepare(&self) -> D::IncomingViewingKey
fn prepare(&self) -> D::IncomingViewingKey
Source§fn account_id(&self) -> &AccountId
fn account_id(&self) -> &AccountId
Implementations on Foreign Types§
Source§impl<AccountId> ScanningKeyOps<SaplingDomain, AccountId, Nullifier> for (AccountId, SaplingIvk)
impl<AccountId> ScanningKeyOps<SaplingDomain, AccountId, Nullifier> for (AccountId, SaplingIvk)
Source§impl<D: Domain, AccountId, Nf> ScanningKeyOps<D, AccountId, Nf> for Box<dyn ScanningKeyOps<D, AccountId, Nf>>
impl<D: Domain, AccountId, Nf> ScanningKeyOps<D, AccountId, Nf> for Box<dyn ScanningKeyOps<D, AccountId, Nf>>
Source§impl<D: Domain, AccountId, Nf, K: ScanningKeyOps<D, AccountId, Nf>> ScanningKeyOps<D, AccountId, Nf> for &K
impl<D: Domain, AccountId, Nf, K: ScanningKeyOps<D, AccountId, Nf>> ScanningKeyOps<D, AccountId, Nf> for &K
Implementors§
impl<AccountId> ScanningKeyOps<OrchardDomain, AccountId, Nullifier> for ScanningKey<IncomingViewingKey, FullViewingKey, AccountId>
orchard only.