Struct ledger_mob_apdu::tx::TxSummaryAddTxOutUnblinding
source · pub struct TxSummaryAddTxOutUnblinding {
pub flags: AddTxOutUnblindingFlags,
pub index: u8,
pub fog_id: FogId,
pub reserved: u8,
pub unmasked_value: u64,
pub token_id: u64,
pub blinding: Scalar,
pub address_spend_public: SubaddressSpendPublic,
pub address_view_public: SubaddressViewPublic,
pub tx_private_key: TxPrivateKey,
pub fog_authority_sig: [u8; 64],
}
Expand description
Add TxOutSummaryUnblinding to the summary
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 | FOG_ID | RESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| UNMASKED_VALUE |
| (u64, 8-byte) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TOKEN_ID |
| (u64, 8-byte) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ BLINDING /
/ (32-byte Ristretto Scalar) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ TARGET_SPEND_PUBLIC_KEY (Optional, see HAS_ADDRESS) /
/ (32-byte Ristretto Public Key) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ TARGET_VIEW_PUBLIC_KEY (Optional, see HAS_ADDRESS) /
/ (32-byte Ristretto Public Key) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ TXOUT_TARGET_KEY /
/ (32-byte Compressed Ristretto Public Key) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ TXOUT_PRIVATE_KEY (optional, see HAS_PRIVATE_KEY) /
/ (32-byte Compressed Ristretto Private Key) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ FOG_AUTHORITY_SIG (optional, see HAS_FOG_AUTHORITY_SIG) /
/ (64-byte Fog Authority Signature) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Fields§
§flags: AddTxOutUnblindingFlags
AddTxOutUnblinding flags
index: u8
TxOut index for idempotency
fog_id: FogId
Fog ID for address if available
reserved: u8
§unmasked_value: u64
UnmaskedAmount.value
token_id: u64
§blinding: Scalar
§address_spend_public: SubaddressSpendPublic
§address_view_public: SubaddressViewPublic
§tx_private_key: TxPrivateKey
Implementations§
source§impl TxSummaryAddTxOutUnblinding
impl TxSummaryAddTxOutUnblinding
sourcepub fn new(
index: u8,
unmasked_amount: &UnmaskedAmount,
address: Option<(impl RingCtAddress, ShortAddressHash)>,
fog_info: Option<(&str, [u8; 64])>,
tx_private_key: Option<TxPrivateKey>
) -> Result<Self, ApduError>
pub fn new( index: u8, unmasked_amount: &UnmaskedAmount, address: Option<(impl RingCtAddress, ShortAddressHash)>, fog_info: Option<(&str, [u8; 64])>, tx_private_key: Option<TxPrivateKey> ) -> Result<Self, ApduError>
Create a new TxSummaryAddTxOutUnblinding APDU
pub fn flags(&self) -> AddTxOutUnblindingFlags
pub fn unmasked_amount(&self) -> UnmaskedAmount
pub fn tx_private_key(&self) -> Option<&TxPrivateKey>
pub fn address(&self) -> Option<PublicSubaddress>
pub fn fog_info(&self) -> Option<(FogId, [u8; 64])>
sourcepub fn hash(&self) -> [u8; 32]
pub fn hash(&self) -> [u8; 32]
Compute hash for TxSummaryAddTxOutUnblinding
Trait Implementations§
source§impl Clone for TxSummaryAddTxOutUnblinding
impl Clone for TxSummaryAddTxOutUnblinding
source§fn clone(&self) -> TxSummaryAddTxOutUnblinding
fn clone(&self) -> TxSummaryAddTxOutUnblinding
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 TxSummaryAddTxOutUnblinding
impl Debug for TxSummaryAddTxOutUnblinding
source§impl<'dec> Decode<'dec> for TxSummaryAddTxOutUnblinding
impl<'dec> Decode<'dec> for TxSummaryAddTxOutUnblinding
§type Output = TxSummaryAddTxOutUnblinding
type Output = TxSummaryAddTxOutUnblinding
Output type (allows attaching lifetime bounds where required)
source§impl Encode for TxSummaryAddTxOutUnblinding
impl Encode for TxSummaryAddTxOutUnblinding
source§impl PartialEq<TxSummaryAddTxOutUnblinding> for TxSummaryAddTxOutUnblinding
impl PartialEq<TxSummaryAddTxOutUnblinding> for TxSummaryAddTxOutUnblinding
source§fn eq(&self, other: &TxSummaryAddTxOutUnblinding) -> bool
fn eq(&self, other: &TxSummaryAddTxOutUnblinding) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for TxSummaryAddTxOutUnblinding
Auto Trait Implementations§
impl RefUnwindSafe for TxSummaryAddTxOutUnblinding
impl Send for TxSummaryAddTxOutUnblinding
impl Sync for TxSummaryAddTxOutUnblinding
impl Unpin for TxSummaryAddTxOutUnblinding
impl UnwindSafe for TxSummaryAddTxOutUnblinding
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