Skip to main content

NoteInterface

Trait NoteInterface 

Source
pub trait NoteInterface: OutputInterface {
    type ZcashNote;
    type Nullifier: Copy;

    const SHIELDED_PROTOCOL: ShieldedProtocol;

    // Required methods
    fn note(&self) -> &Self::ZcashNote;
    fn nullifier(&self) -> Option<Self::Nullifier>;
    fn position(&self) -> Option<Position>;
    fn memo(&self) -> &Memo;
    fn refetch_nullifier_ranges(&self) -> &[Range<BlockHeight>];
}
Expand description

Provides a common API for all shielded output types.

Required Associated Constants§

Source

const SHIELDED_PROTOCOL: ShieldedProtocol

Note’s associated shielded protocol.

Required Associated Types§

Source

type ZcashNote

Decrypted note type.

Source

type Nullifier: Copy

Nullifier type.

Required Methods§

Source

fn note(&self) -> &Self::ZcashNote

Decrypted note with recipient and value

Source

fn nullifier(&self) -> Option<Self::Nullifier>

Derived nullifier

Source

fn position(&self) -> Option<Position>

Commitment tree leaf position

Source

fn memo(&self) -> &Memo

Memo

Source

fn refetch_nullifier_ranges(&self) -> &[Range<BlockHeight>]

List of block ranges where the nullifiers must be re-fetched to guarantee the note has not been spent. These scan ranges were marked ScannedWithoutMapping or RefetchingNullifiers priority before this note was scanned, meaning the nullifiers were discarded due to memory constraints and will be re-fetched later in the sync process.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§