Struct ledger_mob_apdu::tx::TxAddTxOut
source · pub struct TxAddTxOut {
pub ring_index: u8,
pub public_key: CompressedRistrettoPublic,
pub target_key: CompressedRistrettoPublic,
pub commitment: CompressedRistrettoPublic,
/* private fields */
}
Expand description
Add a TxOut to a ring signing operation
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| RING_INDEX | RESERVED |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ TXOUT_PUBLIC_KEY /
/ (32-byte Compressed Ristretto Public Key) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ TXOUT_TARGET_KEY /
/ (32-byte Compressed Ristretto Public Key) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
/ COMMITMENT /
/ (32-byte Compressed Ristretto Point) /
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Fields§
§ring_index: u8
The tx_out index in the ring
public_key: CompressedRistrettoPublic
The tx_out.public_key field
target_key: CompressedRistrettoPublic
The tx_out.target_key field
commitment: CompressedRistrettoPublic
The tx_out.masked_amount.commitment field
Implementations§
source§impl TxAddTxOut
impl TxAddTxOut
sourcepub fn new(
ring_index: u8,
public_key: CompressedRistrettoPublic,
target_key: CompressedRistrettoPublic,
commitment: CompressedRistrettoPublic
) -> Self
pub fn new( ring_index: u8, public_key: CompressedRistrettoPublic, target_key: CompressedRistrettoPublic, commitment: CompressedRistrettoPublic ) -> Self
Create a new add tx out request
sourcepub fn tx_out(&self) -> ReducedTxOut
pub fn tx_out(&self) -> ReducedTxOut
Build [ReducedTxOut] from TxAddTxOut object
sourcepub fn hash(&self) -> [u8; 32]
pub fn hash(&self) -> [u8; 32]
Compute hash of TxAddTxOut object
Trait Implementations§
source§impl ApduStatic for TxAddTxOut
impl ApduStatic for TxAddTxOut
source§impl Clone for TxAddTxOut
impl Clone for TxAddTxOut
source§fn clone(&self) -> TxAddTxOut
fn clone(&self) -> TxAddTxOut
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 TxAddTxOut
impl Debug for TxAddTxOut
source§impl<'dec> Decode<'dec> for TxAddTxOut
impl<'dec> Decode<'dec> for TxAddTxOut
source§impl Encode for TxAddTxOut
impl Encode for TxAddTxOut
source§impl PartialEq<TxAddTxOut> for TxAddTxOut
impl PartialEq<TxAddTxOut> for TxAddTxOut
source§fn eq(&self, other: &TxAddTxOut) -> bool
fn eq(&self, other: &TxAddTxOut) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for TxAddTxOut
Auto Trait Implementations§
impl RefUnwindSafe for TxAddTxOut
impl Send for TxAddTxOut
impl Sync for TxAddTxOut
impl Unpin for TxAddTxOut
impl UnwindSafe for TxAddTxOut
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