Struct ledger_mob_apdu::tx::TxMemoSign
source · pub struct TxMemoSign {
pub kind: [u8; 2],
pub payload_len: u8,
pub reserved: u8,
pub subaddress_index: u64,
pub tx_public_key: TxOutPublic,
pub target_view_public: SubaddressViewPublic,
pub payload: [u8; 48],
}
Expand description
Memo HMAC signing request
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| MEMO_KIND | PAYLOAD_LEN | RESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ SUBADDRESS_INDEX /
/ (u64 subaddress for memo signing) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ TX_PUBLIC_KEY /
/ (32-byte Ristretto Public Key) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ TARGET_VIEW_PUBLIC_KEY /
/ (32-byte Ristretto Public Key) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ PAYLOAD /
/ (48-byte memo body) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Fields§
§kind: [u8; 2]
Memo type
payload_len: u8
Payload length, always 48 bytes (included for future expansion)
reserved: u8
Reserved for future use, must be 0 (ensures 32-bit alignment)
subaddress_index: u64
Signing subaddress index
tx_public_key: TxOutPublic
TxOut public key
target_view_public: SubaddressViewPublic
Target view public subaddress
payload: [u8; 48]
Memo payload
Implementations§
source§impl TxMemoSign
impl TxMemoSign
Trait Implementations§
source§impl ApduStatic for TxMemoSign
impl ApduStatic for TxMemoSign
source§impl Clone for TxMemoSign
impl Clone for TxMemoSign
source§fn clone(&self) -> TxMemoSign
fn clone(&self) -> TxMemoSign
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 TxMemoSign
impl Debug for TxMemoSign
source§impl<'dec> Decode<'dec> for TxMemoSign
impl<'dec> Decode<'dec> for TxMemoSign
source§impl Encode for TxMemoSign
impl Encode for TxMemoSign
source§impl PartialEq<TxMemoSign> for TxMemoSign
impl PartialEq<TxMemoSign> for TxMemoSign
source§fn eq(&self, other: &TxMemoSign) -> bool
fn eq(&self, other: &TxMemoSign) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for TxMemoSign
Auto Trait Implementations§
impl RefUnwindSafe for TxMemoSign
impl Send for TxMemoSign
impl Sync for TxMemoSign
impl Unpin for TxMemoSign
impl UnwindSafe for TxMemoSign
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