Struct ledger_zcash::ZcashApp
source · [−]pub struct ZcashApp<E> { /* private fields */ }
Expand description
Ledger App
Implementations
sourceimpl<E> ZcashApp<E> where
E: Exchange + Send + Sync,
E::Error: Error,
Self: AppExt<E>,
impl<E> ZcashApp<E> where
E: Exchange + Send + Sync,
E::Error: Error,
Self: AppExt<E>,
sourcepub async fn get_version(&self) -> Result<Version, LedgerAppError<E::Error>>
pub async fn get_version(&self) -> Result<Version, LedgerAppError<E::Error>>
Retrieve the app version
sourcepub async fn get_app_info(&self) -> Result<AppInfo, LedgerAppError<E::Error>>
pub async fn get_app_info(&self) -> Result<AppInfo, LedgerAppError<E::Error>>
Retrieve the app info
sourcepub async fn get_device_info(
&self
) -> Result<DeviceInfo, LedgerAppError<E::Error>>
pub async fn get_device_info(
&self
) -> Result<DeviceInfo, LedgerAppError<E::Error>>
Retrieve the device info
sourcepub async fn init_tx(
&self,
data: InitData
) -> Result<[u8; 32], LedgerAppError<E::Error>>
pub async fn init_tx(
&self,
data: InitData
) -> Result<[u8; 32], LedgerAppError<E::Error>>
Initiates a transaction in the ledger
sourcepub async fn checkandsign(
&self,
data: HsmTxData
) -> Result<[u8; 32], LedgerAppError<E::Error>>
pub async fn checkandsign(
&self,
data: HsmTxData
) -> Result<[u8; 32], LedgerAppError<E::Error>>
Initiates a transaction in the ledger
sourcepub async fn do_transaction<P: Parameters + Send + Sync>(
&self,
input: DataInput,
parameters: P,
branch: BranchId
) -> Result<(Transaction, TransactionMetadata), LedgerAppError<E::Error>>
pub async fn do_transaction<P: Parameters + Send + Sync>(
&self,
input: DataInput,
parameters: P,
branch: BranchId
) -> Result<(Transaction, TransactionMetadata), LedgerAppError<E::Error>>
Does a complete transaction in the ledger
sourceimpl<E> ZcashApp<E> where
E: Exchange,
E::Error: Error,
impl<E> ZcashApp<E> where
E: Exchange,
E::Error: Error,
sourcepub async fn get_address_unshielded(
&self,
path: &BIP44Path,
require_confirmation: bool
) -> Result<AddressUnshielded, LedgerAppError<E::Error>>
pub async fn get_address_unshielded(
&self,
path: &BIP44Path,
require_confirmation: bool
) -> Result<AddressUnshielded, LedgerAppError<E::Error>>
Retrieves an unshielded public key and address
sourcepub async fn get_address_shielded(
&self,
path: u32,
require_confirmation: bool
) -> Result<AddressShielded, LedgerAppError<E::Error>>
pub async fn get_address_shielded(
&self,
path: u32,
require_confirmation: bool
) -> Result<AddressShielded, LedgerAppError<E::Error>>
Retrieves a shielded public key and address
sourcepub async fn get_div_list(
&self,
path: u32,
index: &[u8; 11]
) -> Result<[u8; 220], LedgerAppError<E::Error>>
pub async fn get_div_list(
&self,
path: u32,
index: &[u8; 11]
) -> Result<[u8; 220], LedgerAppError<E::Error>>
Get list of diversifiers
sourcepub async fn get_address_shielded_with_div(
&self,
path: u32,
div: &[u8; 11],
require_confirmation: bool
) -> Result<AddressShielded, LedgerAppError<E::Error>>
pub async fn get_address_shielded_with_div(
&self,
path: u32,
div: &[u8; 11],
require_confirmation: bool
) -> Result<AddressShielded, LedgerAppError<E::Error>>
Retrieves a shielded public key and address using a specific diversifier
sourcepub async fn get_ovk(
&self,
path: u32
) -> Result<OutgoingViewingKey, LedgerAppError<E::Error>>
pub async fn get_ovk(
&self,
path: u32
) -> Result<OutgoingViewingKey, LedgerAppError<E::Error>>
Retrieves a outgoing viewing key of a sapling key
sourcepub async fn get_ivk(&self, path: u32) -> Result<Fr, LedgerAppError<E::Error>>
pub async fn get_ivk(&self, path: u32) -> Result<Fr, LedgerAppError<E::Error>>
Retrieves a incoming viewing key of a sapling key
sourcepub async fn get_spendinfo(
&self
) -> Result<(ProofGenerationKey, Fr, Fr), LedgerAppError<E::Error>>
pub async fn get_spendinfo(
&self
) -> Result<(ProofGenerationKey, Fr, Fr), LedgerAppError<E::Error>>
Get the information needed from ledger to make a shielded spend
sourcepub async fn get_outputinfo(
&self
) -> Result<(Fr, Rseed, Option<HashSeed>), LedgerAppError<E::Error>>
pub async fn get_outputinfo(
&self
) -> Result<(Fr, Rseed, Option<HashSeed>), LedgerAppError<E::Error>>
Get the information needed from ledger to make a shielded output
sourcepub async fn get_transparent_signature(
&self
) -> Result<Signature, LedgerAppError<E::Error>>
pub async fn get_transparent_signature(
&self
) -> Result<Signature, LedgerAppError<E::Error>>
Get a transparent signature from the ledger
sourcepub async fn get_spend_signature(
&self
) -> Result<Signature, LedgerAppError<E::Error>>
pub async fn get_spend_signature(
&self
) -> Result<Signature, LedgerAppError<E::Error>>
Get a shielded spend signature from the ledger
Trait Implementations
Auto Trait Implementations
impl<E> RefUnwindSafe for ZcashApp<E> where
E: RefUnwindSafe,
impl<E> Send for ZcashApp<E> where
E: Send,
impl<E> Sync for ZcashApp<E> where
E: Sync,
impl<E> Unpin for ZcashApp<E> where
E: Unpin,
impl<E> UnwindSafe for ZcashApp<E> where
E: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> FmtForward for T
impl<T> FmtForward for T
fn fmt_binary(self) -> FmtBinary<Self> where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self> where
Self: Binary,
Causes self
to use its Binary
implementation when Debug
-formatted.
fn fmt_display(self) -> FmtDisplay<Self> where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self> where
Self: Display,
Causes self
to use its Display
implementation when
Debug
-formatted. Read more
fn fmt_lower_exp(self) -> FmtLowerExp<Self> where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self> where
Self: LowerExp,
Causes self
to use its LowerExp
implementation when
Debug
-formatted. Read more
fn fmt_lower_hex(self) -> FmtLowerHex<Self> where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self> where
Self: LowerHex,
Causes self
to use its LowerHex
implementation when
Debug
-formatted. Read more
fn fmt_octal(self) -> FmtOctal<Self> where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self> where
Self: Octal,
Causes self
to use its Octal
implementation when Debug
-formatted.
fn fmt_pointer(self) -> FmtPointer<Self> where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self> where
Self: Pointer,
Causes self
to use its Pointer
implementation when
Debug
-formatted. Read more
fn fmt_upper_exp(self) -> FmtUpperExp<Self> where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self> where
Self: UpperExp,
Causes self
to use its UpperExp
implementation when
Debug
-formatted. Read more
fn fmt_upper_hex(self) -> FmtUpperHex<Self> where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self> where
Self: UpperHex,
Causes self
to use its UpperHex
implementation when
Debug
-formatted. Read more
impl<T> PipeAsRef for T
impl<T> PipeAsRef for T
fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
T: 'a,
R: 'a,
fn pipe_as_ref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: AsRef<T>,
T: 'a,
R: 'a,
Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more
fn pipe_as_mut<'a, T, R>(&'a mut self, func: impl FnOnce(&'a mut T) -> R) -> R where
Self: AsMut<T>,
T: 'a,
R: 'a,
fn pipe_as_mut<'a, T, R>(&'a mut self, func: impl FnOnce(&'a mut T) -> R) -> R where
Self: AsMut<T>,
T: 'a,
R: 'a,
Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more
impl<T> PipeBorrow for T
impl<T> PipeBorrow for T
fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
T: 'a,
R: 'a,
fn pipe_borrow<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R where
Self: Borrow<T>,
T: 'a,
R: 'a,
Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more
fn pipe_borrow_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: BorrowMut<T>,
T: 'a,
R: 'a,
fn pipe_borrow_mut<'a, T, R>(
&'a mut self,
func: impl FnOnce(&'a mut T) -> R
) -> R where
Self: BorrowMut<T>,
T: 'a,
R: 'a,
Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more
impl<T> PipeDeref for T
impl<T> PipeDeref for T
fn pipe_deref<'a, R>(&'a self, func: impl FnOnce(&'a Self::Target) -> R) -> R where
Self: Deref,
R: 'a,
fn pipe_deref<'a, R>(&'a self, func: impl FnOnce(&'a Self::Target) -> R) -> R where
Self: Deref,
R: 'a,
Pipes a dereference into a function that cannot normally be called in suffix position. Read more
fn pipe_deref_mut<'a, R>(
&'a mut self,
func: impl FnOnce(&'a mut Self::Target) -> R
) -> R where
Self: DerefMut,
R: 'a,
fn pipe_deref_mut<'a, R>(
&'a mut self,
func: impl FnOnce(&'a mut Self::Target) -> R
) -> R where
Self: DerefMut,
R: 'a,
Pipes a mutable dereference into a function that cannot normally be called in suffix position. Read more
impl<T> PipeRef for T
impl<T> PipeRef for T
impl<T> Tap for T
impl<T> Tap for T
fn tap<F, R>(self, func: F) -> Self where
F: FnOnce(&Self) -> R,
fn tap<F, R>(self, func: F) -> Self where
F: FnOnce(&Self) -> R,
Provides immutable access for inspection. Read more
fn tap_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&Self) -> R,
fn tap_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&Self) -> R,
Calls tap
in debug builds, and does nothing in release builds.
fn tap_mut<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
fn tap_mut<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
Provides mutable access for modification. Read more
fn tap_mut_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
fn tap_mut_dbg<F, R>(self, func: F) -> Self where
F: FnOnce(&mut Self) -> R,
Calls tap_mut
in debug builds, and does nothing in release builds.
impl<T, U> TapAsRef<U> for T where
U: ?Sized,
impl<T, U> TapAsRef<U> for T where
U: ?Sized,
fn tap_ref<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
fn tap_ref<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
Provides immutable access to the reference for inspection.
fn tap_ref_dbg<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
fn tap_ref_dbg<F, R>(self, func: F) -> Self where
Self: AsRef<T>,
F: FnOnce(&T) -> R,
Calls tap_ref
in debug builds, and does nothing in release builds.
fn tap_ref_mut<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_ref_mut<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
Provides mutable access to the reference for modification.
fn tap_ref_mut_dbg<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_ref_mut_dbg<F, R>(self, func: F) -> Self where
Self: AsMut<T>,
F: FnOnce(&mut T) -> R,
Calls tap_ref_mut
in debug builds, and does nothing in release builds.
impl<T, U> TapBorrow<U> for T where
U: ?Sized,
impl<T, U> TapBorrow<U> for T where
U: ?Sized,
fn tap_borrow<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
fn tap_borrow<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
Provides immutable access to the borrow for inspection. Read more
fn tap_borrow_dbg<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
fn tap_borrow_dbg<F, R>(self, func: F) -> Self where
Self: Borrow<T>,
F: FnOnce(&T) -> R,
Calls tap_borrow
in debug builds, and does nothing in release builds.
fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_borrow_mut<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Provides mutable access to the borrow for modification.
fn tap_borrow_mut_dbg<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
fn tap_borrow_mut_dbg<F, R>(self, func: F) -> Self where
Self: BorrowMut<T>,
F: FnOnce(&mut T) -> R,
Calls tap_borrow_mut
in debug builds, and does nothing in release
builds. Read more
impl<T> TapDeref for T
impl<T> TapDeref for T
fn tap_deref<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
fn tap_deref<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
Immutably dereferences self
for inspection.
fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
fn tap_deref_dbg<F, R>(self, func: F) -> Self where
Self: Deref,
F: FnOnce(&Self::Target) -> R,
Calls tap_deref
in debug builds, and does nothing in release builds.
fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
fn tap_deref_mut<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Mutably dereferences self
for modification.
fn tap_deref_mut_dbg<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
fn tap_deref_mut_dbg<F, R>(self, func: F) -> Self where
Self: DerefMut,
F: FnOnce(&mut Self::Target) -> R,
Calls tap_deref_mut
in debug builds, and does nothing in release
builds. Read more