Struct zaino_proto::proto::compact_formats::CompactTx
source · pub struct CompactTx {
pub index: u64,
pub hash: Vec<u8>,
pub fee: u32,
pub spends: Vec<CompactSaplingSpend>,
pub outputs: Vec<CompactSaplingOutput>,
pub actions: Vec<CompactOrchardAction>,
}
Expand description
A compact representation of the shielded data in a Zcash transaction.
CompactTx contains the minimum information for a wallet to know if this transaction is relevant to it (either pays to it or spends from it) via shielded elements only. This message will not encode a transparent-to-transparent transaction.
Fields§
§index: u64
Index and hash will allow the receiver to call out to chain explorers or other data structures to retrieve more information about this transaction.
the index within the full block
hash: Vec<u8>
the ID (hash) of this transaction, same as in block explorers
fee: u32
The transaction fee: present if server can provide. In the case of a stateless server and a transaction with transparent inputs, this will be unset because the calculation requires reference to prior transactions. If there are no transparent inputs, the fee will be calculable as: valueBalanceSapling + valueBalanceOrchard + sum(vPubNew) - sum(vPubOld) - sum(tOut)
spends: Vec<CompactSaplingSpend>
§outputs: Vec<CompactSaplingOutput>
§actions: Vec<CompactOrchardAction>
Trait Implementations§
source§impl Message for CompactTx
impl Message for CompactTx
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for CompactTx
impl PartialEq for CompactTx
impl StructuralPartialEq for CompactTx
Auto Trait Implementations§
impl Freeze for CompactTx
impl RefUnwindSafe for CompactTx
impl Send for CompactTx
impl Sync for CompactTx
impl Unpin for CompactTx
impl UnwindSafe for CompactTx
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request