Struct breez_sdk_liquid::lightning_invoice::PayeePubKey
pub struct PayeePubKey(pub PublicKey);
Expand description
Payee public key
Tuple Fields§
§0: PublicKey
Methods from Deref<Target = PublicKey>§
pub fn as_ptr(&self) -> *const PublicKey
pub fn as_ptr(&self) -> *const PublicKey
Obtains a raw const pointer suitable for use with FFI functions.
pub fn serialize(&self) -> [u8; 33]
pub fn serialize(&self) -> [u8; 33]
Serializes the key as a byte-encoded pair of values. In compressed form the y-coordinate is represented by only a single bit, as x determines it up to one bit.
pub fn serialize_uncompressed(&self) -> [u8; 65]
pub fn serialize_uncompressed(&self) -> [u8; 65]
Serializes the key as a byte-encoded pair of values, in uncompressed form.
pub fn combine(&self, other: &PublicKey) -> Result<PublicKey, Error>
pub fn combine(&self, other: &PublicKey) -> Result<PublicKey, Error>
Adds a second key to this one, returning the sum.
§Errors
If the result would be the point at infinity, i.e. adding this point to its own negation.
§Examples
use secp256k1::{rand, Secp256k1};
let secp = Secp256k1::new();
let mut rng = rand::thread_rng();
let (_, pk1) = secp.generate_keypair(&mut rng);
let (_, pk2) = secp.generate_keypair(&mut rng);
let sum = pk1.combine(&pk2).expect("It's improbable to fail for 2 random public keys");
pub fn x_only_public_key(&self) -> (XOnlyPublicKey, Parity)
pub fn x_only_public_key(&self) -> (XOnlyPublicKey, Parity)
Returns the XOnlyPublicKey
(and it’s Parity
) for this PublicKey
.
Trait Implementations§
§impl Base32Len for PayeePubKey
impl Base32Len for PayeePubKey
§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
Calculate the base32 serialized length
§impl Clone for PayeePubKey
impl Clone for PayeePubKey
§fn clone(&self) -> PayeePubKey
fn clone(&self) -> PayeePubKey
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 more§impl Debug for PayeePubKey
impl Debug for PayeePubKey
§impl Deref for PayeePubKey
impl Deref for PayeePubKey
§impl From<PublicKey> for PayeePubKey
impl From<PublicKey> for PayeePubKey
§fn from(pk: PublicKey) -> PayeePubKey
fn from(pk: PublicKey) -> PayeePubKey
Converts to this type from the input type.
§impl FromBase32 for PayeePubKey
impl FromBase32 for PayeePubKey
§type Err = Bolt11ParseError
type Err = Bolt11ParseError
The associated error which can be returned from parsing (e.g. because of bad padding).
§fn from_base32(field_data: &[u5]) -> Result<PayeePubKey, Bolt11ParseError>
fn from_base32(field_data: &[u5]) -> Result<PayeePubKey, Bolt11ParseError>
Convert a base32 slice to
Self
.§impl Hash for PayeePubKey
impl Hash for PayeePubKey
§impl Ord for PayeePubKey
impl Ord for PayeePubKey
§impl PartialEq for PayeePubKey
impl PartialEq for PayeePubKey
§impl PartialOrd for PayeePubKey
impl PartialOrd for PayeePubKey
§impl ToBase32 for PayeePubKey
impl ToBase32 for PayeePubKey
§fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where
W: WriteBase32,
fn write_base32<W>(&self, writer: &mut W) -> Result<(), <W as WriteBase32>::Err>where
W: WriteBase32,
Encode as base32 and write it to the supplied writer
Implementations shouldn’t allocate.
impl Eq for PayeePubKey
impl StructuralPartialEq for PayeePubKey
Auto Trait Implementations§
impl Freeze for PayeePubKey
impl RefUnwindSafe for PayeePubKey
impl Send for PayeePubKey
impl Sync for PayeePubKey
impl Unpin for PayeePubKey
impl UnwindSafe for PayeePubKey
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request