pub struct LightningReceiveAttestation { /* private fields */ }Expand description
Attestation for proving ownership of a VTXO when claiming a Lightning receive.
This attestation commits to a payment hash and the input VTXO ID to create a unique signature proving the user controls the input VTXO and is authorised as a mitigation against liquidity denial-of-service attacks.
Implementations§
Source§impl LightningReceiveAttestation
impl LightningReceiveAttestation
Sourcepub fn new(
payment_hash: PaymentHash,
vtxo_id: VtxoId,
vtxo_keypair: &Keypair,
) -> Self
pub fn new( payment_hash: PaymentHash, vtxo_id: VtxoId, vtxo_keypair: &Keypair, ) -> Self
Create a new attestation by signing with the provided keypair
Trait Implementations§
Source§impl Clone for LightningReceiveAttestation
impl Clone for LightningReceiveAttestation
Source§fn clone(&self) -> LightningReceiveAttestation
fn clone(&self) -> LightningReceiveAttestation
Returns a duplicate 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 LightningReceiveAttestation
impl Debug for LightningReceiveAttestation
Source§impl<'de> Deserialize<'de> for LightningReceiveAttestation
impl<'de> Deserialize<'de> for LightningReceiveAttestation
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for LightningReceiveAttestation
impl Hash for LightningReceiveAttestation
Source§impl Ord for LightningReceiveAttestation
impl Ord for LightningReceiveAttestation
Source§fn cmp(&self, other: &LightningReceiveAttestation) -> Ordering
fn cmp(&self, other: &LightningReceiveAttestation) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for LightningReceiveAttestation
impl PartialOrd for LightningReceiveAttestation
Source§impl ProtocolEncoding for LightningReceiveAttestation
impl ProtocolEncoding for LightningReceiveAttestation
Source§fn encode<W: Write + ?Sized>(&self, writer: &mut W) -> Result<(), Error>
fn encode<W: Write + ?Sized>(&self, writer: &mut W) -> Result<(), Error>
Encode the object into the writer.
Source§fn decode<R: Read + ?Sized>(
reader: &mut R,
) -> Result<Self, ProtocolDecodingError>
fn decode<R: Read + ?Sized>( reader: &mut R, ) -> Result<Self, ProtocolDecodingError>
Decode the object from the writer.
Source§fn deserialize(byte_slice: &[u8]) -> Result<Self, ProtocolDecodingError>
fn deserialize(byte_slice: &[u8]) -> Result<Self, ProtocolDecodingError>
Deserialize object from the given byte slice.
Source§fn serialize_hex(&self) -> String
fn serialize_hex(&self) -> String
Serialize the object to a lowercase hex string.
Source§fn deserialize_hex(hex_str: &str) -> Result<Self, ProtocolDecodingError>
fn deserialize_hex(hex_str: &str) -> Result<Self, ProtocolDecodingError>
Deserialize object from hex slice.
impl Copy for LightningReceiveAttestation
impl Eq for LightningReceiveAttestation
impl StructuralPartialEq for LightningReceiveAttestation
Auto Trait Implementations§
impl Freeze for LightningReceiveAttestation
impl RefUnwindSafe for LightningReceiveAttestation
impl Send for LightningReceiveAttestation
impl Sync for LightningReceiveAttestation
impl Unpin for LightningReceiveAttestation
impl UnsafeUnpin for LightningReceiveAttestation
impl UnwindSafe for LightningReceiveAttestation
Blanket Implementations§
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