Struct ledger_mob_apdu::tx::TxSummaryAddTxIn
source · pub struct TxSummaryAddTxIn {
pub flags: AddTxInFlags,
pub index: u8,
pub reserved: [u8; 2],
pub pseudo_output_commitment: CompressedCommitment,
pub unmasked_value: u64,
pub token_id: u64,
pub blinding: Scalar,
pub input_rules_digest: [u8; 32],
}
Expand description
Add TxInSummary for a transaction
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 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ PSEUDO_OUTPUT_COMMITMENT /
/ (32-byte Compressed Ristretto Point) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| UNMASKED_VALUE |
| (u64, 8-byte) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TOKEN_ID |
| (u64, 8-byte) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ BLINDING /
/ (32-byte Ristretto Scalar) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ INPUT_RULES_DIGEST (optional, see HAS_INPUT_RULES) /
/ (32-byte Input Rules Digest) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Fields§
§flags: AddTxInFlags
§index: u8
TxIn index for idempotency
reserved: [u8; 2]
§pseudo_output_commitment: CompressedCommitment
§unmasked_value: u64
UnmaskedAmount.value
token_id: u64
§blinding: Scalar
§input_rules_digest: [u8; 32]
Digest of input rules per MCIP 52 if has_input_rules is set
Implementations§
source§impl TxSummaryAddTxIn
impl TxSummaryAddTxIn
sourcepub fn new(
index: u8,
pseudo_output_commitment: CompressedCommitment,
unmasked_amount: UnmaskedAmount,
input_rules_digest: Option<&[u8; 32]>
) -> Self
pub fn new( index: u8, pseudo_output_commitment: CompressedCommitment, unmasked_amount: UnmaskedAmount, input_rules_digest: Option<&[u8; 32]> ) -> Self
Create a new TxSummaryAddTxIn APDU
sourcepub fn unmasked_amount(&self) -> UnmaskedAmount
pub fn unmasked_amount(&self) -> UnmaskedAmount
Fetch the [UnmaskedAmount] from a TxSummaryAddTxIn object
sourcepub fn hash(&self) -> [u8; 32]
pub fn hash(&self) -> [u8; 32]
Compute hash for TxSummaryAddTxIn
Trait Implementations§
source§impl ApduStatic for TxSummaryAddTxIn
impl ApduStatic for TxSummaryAddTxIn
source§impl Clone for TxSummaryAddTxIn
impl Clone for TxSummaryAddTxIn
source§fn clone(&self) -> TxSummaryAddTxIn
fn clone(&self) -> TxSummaryAddTxIn
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 TxSummaryAddTxIn
impl Debug for TxSummaryAddTxIn
source§impl<'dec> Decode<'dec> for TxSummaryAddTxIn
impl<'dec> Decode<'dec> for TxSummaryAddTxIn
source§impl Encode for TxSummaryAddTxIn
impl Encode for TxSummaryAddTxIn
source§impl PartialEq<TxSummaryAddTxIn> for TxSummaryAddTxIn
impl PartialEq<TxSummaryAddTxIn> for TxSummaryAddTxIn
source§fn eq(&self, other: &TxSummaryAddTxIn) -> bool
fn eq(&self, other: &TxSummaryAddTxIn) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for TxSummaryAddTxIn
Auto Trait Implementations§
impl RefUnwindSafe for TxSummaryAddTxIn
impl Send for TxSummaryAddTxIn
impl Sync for TxSummaryAddTxIn
impl Unpin for TxSummaryAddTxIn
impl UnwindSafe for TxSummaryAddTxIn
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