Struct ledger_mob_apdu::tx::TxSummaryAddTxOut
source · pub struct TxSummaryAddTxOut {
pub flags: AddTxOutFlags,
pub index: u8,
pub reserved: [u8; 2],
pub masked_value: u64,
pub masked_token_id: [u8; 8],
pub commitment: CompressedCommitment,
pub target_key: CompressedRistrettoPublic,
pub public_key: CompressedRistrettoPublic,
}
Expand description
Add TxOutSummary to the summary
See [mc_transaction_core::tx_summary::TxOutSummary] for an equivalent MobileCoin core object.
Encoding:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FLAGS | INDEX | RESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| MASKED_VALUE |
| (u64, 8-byte) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| MASKED_TOKEN_ID |
| (u64, 8-byte) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ COMMITMENT /
/ (32-byte Compressed Ristretto Point) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ TXOUT_TARGET_KEY /
/ (32-byte Compressed Ristretto Public Key) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ PUBLIC_KEY /
/ (32-byte Compressed Ristretto Public Key) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Fields§
§flags: AddTxOutFlags
AddTxOut flags
index: u8
TxOut index for idempotency
reserved: [u8; 2]
§masked_value: u64
MaskedAmountV2.masked_value
masked_token_id: [u8; 8]
MaskedAmountV2.masked_token_id
commitment: CompressedCommitment
MaskedAmountV2.commitment
target_key: CompressedRistrettoPublic
The one-time public address of this output.
public_key: CompressedRistrettoPublic
The per output tx public key
Implementations§
source§impl TxSummaryAddTxOut
impl TxSummaryAddTxOut
sourcepub fn new(
index: u8,
masked_amount: Option<&MaskedAmount>,
target_key: CompressedRistrettoPublic,
public_key: CompressedRistrettoPublic,
associated_to_input_rules: bool
) -> Self
pub fn new( index: u8, masked_amount: Option<&MaskedAmount>, target_key: CompressedRistrettoPublic, public_key: CompressedRistrettoPublic, associated_to_input_rules: bool ) -> Self
Create a new TxSummaryAddTxOut APDU
(requires alloc
feature due to [MaskedAmount])
sourcepub fn flags(&self) -> AddTxOutFlags
pub fn flags(&self) -> AddTxOutFlags
Fetch flags
sourcepub fn masked_amount(&self) -> Option<MaskedAmount>
pub fn masked_amount(&self) -> Option<MaskedAmount>
Fetch masked amount if included
sourcepub fn hash(&self) -> [u8; 32]
pub fn hash(&self) -> [u8; 32]
Compute hash for TxSummaryAddTxOut
Trait Implementations§
source§impl ApduStatic for TxSummaryAddTxOut
impl ApduStatic for TxSummaryAddTxOut
source§impl Clone for TxSummaryAddTxOut
impl Clone for TxSummaryAddTxOut
source§fn clone(&self) -> TxSummaryAddTxOut
fn clone(&self) -> TxSummaryAddTxOut
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TxSummaryAddTxOut
impl Debug for TxSummaryAddTxOut
source§impl<'dec> Decode<'dec> for TxSummaryAddTxOut
impl<'dec> Decode<'dec> for TxSummaryAddTxOut
source§impl Encode for TxSummaryAddTxOut
impl Encode for TxSummaryAddTxOut
source§impl PartialEq<TxSummaryAddTxOut> for TxSummaryAddTxOut
impl PartialEq<TxSummaryAddTxOut> for TxSummaryAddTxOut
source§fn eq(&self, other: &TxSummaryAddTxOut) -> bool
fn eq(&self, other: &TxSummaryAddTxOut) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for TxSummaryAddTxOut
Auto Trait Implementations§
impl RefUnwindSafe for TxSummaryAddTxOut
impl Send for TxSummaryAddTxOut
impl Sync for TxSummaryAddTxOut
impl Unpin for TxSummaryAddTxOut
impl UnwindSafe for TxSummaryAddTxOut
Blanket Implementations§
§impl<'a, T> ApduReq<'a> for Twhere
T: EncDec<'a, ApduError> + ApduStatic,
impl<'a, T> ApduReq<'a> for Twhere T: EncDec<'a, ApduError> + ApduStatic,
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
Mutably borrows from an owned value. Read more
§impl<'a, T> DecodeExt<'a> for Twhere
T: Decode<'a>,
impl<'a, T> DecodeExt<'a> for Twhere T: Decode<'a>,
§fn decode_iter(buff: &'a [u8]) -> DecodeIter<'a, Self::Output>
fn decode_iter(buff: &'a [u8]) -> DecodeIter<'a, Self::Output>
Helper to iterate over decodable objects in a sized buffer. Read more