Skip to main content

OutgoingNoteInterface

Trait OutgoingNoteInterface 

Source
pub trait OutgoingNoteInterface: Sized {
    type ZcashNote;
    type Address: Clone + Copy + Debug + PartialEq + Eq;
    type Error: Debug + Error;

    const SHIELDED_PROTOCOL: ShieldedProtocol;

    // Required methods
    fn output_id(&self) -> OutputId;
    fn key_id(&self) -> KeyId;
    fn value(&self) -> u64;
    fn note(&self) -> &Self::ZcashNote;
    fn memo(&self) -> &Memo;
    fn recipient(&self) -> Self::Address;
    fn recipient_full_unified_address(&self) -> Option<&UnifiedAddress>;
    fn encoded_recipient<P>(
        &self,
        parameters: &P,
    ) -> Result<String, Self::Error>
       where P: Parameters + NetworkConstants;
    fn encoded_recipient_full_unified_address<P>(
        &self,
        consensus_parameters: &P,
    ) -> Option<String>
       where P: Parameters + NetworkConstants;
    fn transaction_outgoing_notes(transaction: &WalletTransaction) -> &[Self];
}
Expand description

Provides a common API for all outgoing note 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 Address: Clone + Copy + Debug + PartialEq + Eq

Address type.

Source

type Error: Debug + Error

Encoding error

Required Methods§

Source

fn output_id(&self) -> OutputId

Output ID.

Source

fn key_id(&self) -> KeyId

Identifier for key used to decrypt outgoing note.

Source

fn value(&self) -> u64

Note value.

Source

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

Decrypted note with recipient and value.

Source

fn memo(&self) -> &Memo

Memo.

Source

fn recipient(&self) -> Self::Address

Recipient address.

Source

fn recipient_full_unified_address(&self) -> Option<&UnifiedAddress>

Recipient unified address as given by recipient and recorded in an encoded memo (all original receivers).

Source

fn encoded_recipient<P>(&self, parameters: &P) -> Result<String, Self::Error>

Encoded recipient address recorded in note on chain (single receiver).

Source

fn encoded_recipient_full_unified_address<P>( &self, consensus_parameters: &P, ) -> Option<String>

Encoded recipient unified address as given by recipient and recorded in an encoded memo (all original receivers).

Source

fn transaction_outgoing_notes(transaction: &WalletTransaction) -> &[Self]

Outgoing notes within transaction.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§