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 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.
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 account_id(&self) -> &AccountId
fn account_id(&self) -> &AccountId
Source§impl<D: Domain, AccountId: Send + Sync, Nf> ScanningKeyOps<D, AccountId, Nf> for Box<dyn ScanningKeyOps<D, AccountId, Nf> + Send + Sync>
impl<D: Domain, AccountId: Send + Sync, Nf> ScanningKeyOps<D, AccountId, Nf> for Box<dyn ScanningKeyOps<D, AccountId, Nf> + Send + Sync>
Source§fn account_id(&self) -> &AccountId
fn account_id(&self) -> &AccountId
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
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, 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
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: Send + Sync, Nf> ScanningKeyOps<D, AccountId, Nf> for Box<dyn ScanningKeyOps<D, AccountId, Nf> + Send + Sync>
impl<D: Domain, AccountId: Send + Sync, Nf> ScanningKeyOps<D, AccountId, Nf> for Box<dyn ScanningKeyOps<D, AccountId, Nf> + Send + Sync>
Implementors§
impl<AccountId> ScanningKeyOps<NoteEncryptionDomain<IronwoodVersion>, AccountId, Nullifier> for ScanningKey<IncomingViewingKey, FullViewingKey, AccountId>
orchard only.An Orchard viewing key trial-decrypts Ironwood outputs under the Ironwood note-encryption domain. The key material is the same as for Orchard; only the domain (and thus the accepted note plaintext version) differs.
impl<AccountId> ScanningKeyOps<NoteEncryptionDomain<OrchardVersion>, AccountId, Nullifier> for ScanningKey<IncomingViewingKey, FullViewingKey, AccountId>
orchard only.