Skip to main content

ReceivedShieldedOutput

Trait ReceivedShieldedOutput 

Source
pub trait ReceivedShieldedOutput {
    type AccountId;
    type Note;
    type Nullifier;

    // Required methods
    fn index(&self) -> usize;
    fn account_id(&self) -> Self::AccountId;
    fn note(&self) -> &Self::Note;
    fn to_wallet_note(&self) -> Note;
    fn memo(&self) -> Option<&MemoBytes>;
    fn transfer_type(&self) -> TransferType;
    fn is_change(&self) -> bool;
    fn nullifier(&self) -> Option<&Self::Nullifier>;
    fn note_commitment_tree_position(&self) -> Option<Position>;
    fn recipient_key_scope(&self) -> Option<Scope>;
}
Expand description

This trait provides a generalization over output representations.

Required Associated Types§

Required Methods§

Source

fn index(&self) -> usize

Returns the index of the output within its corresponding bundle.

Source

fn account_id(&self) -> Self::AccountId

Returns the account ID for the account that received this output.

Source

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

Returns the note.

Source

fn to_wallet_note(&self) -> Note

Returns the received note, as a Note.

Source

fn memo(&self) -> Option<&MemoBytes>

Returns any memo associated with the output.

Source

fn transfer_type(&self) -> TransferType

Returns a TransferType value that is determined based upon what type of key was used to decrypt the transaction.

Source

fn is_change(&self) -> bool

Returns whether or not the received output is counted as wallet-internal change, for the purpose of display.

Source

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

Returns the nullifier that will be revealed when the note is spent, if the output was observed using a key that provides the capability for nullifier computation.

Source

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

Returns the position of the note in the note commitment tree, if the transaction that produced the output has been mined.

Source

fn recipient_key_scope(&self) -> Option<Scope>

Returns the HD derivation scope of the viewing key that decrypted the note, if known.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<AccountId: Copy> ReceivedShieldedOutput for DecryptedOutput<(Note, ValuePool), AccountId>

Available on crate feature orchard only.
Source§

type AccountId = AccountId

Source§

type Note = Note

Source§

type Nullifier = Nullifier

Source§

impl<AccountId: Copy> ReceivedShieldedOutput for DecryptedOutput<Note, AccountId>

Source§

type AccountId = AccountId

Source§

type Note = Note

Source§

type Nullifier = Nullifier

Source§

impl<AccountId: Copy> ReceivedShieldedOutput for WalletOrchardOutput<AccountId>

Available on crate feature orchard only.
Source§

type AccountId = AccountId

Source§

type Note = Note

Source§

type Nullifier = Nullifier

Source§

impl<AccountId: Copy> ReceivedShieldedOutput for WalletSaplingOutput<AccountId>

Source§

type AccountId = AccountId

Source§

type Note = Note

Source§

type Nullifier = Nullifier