pub struct NodePkProof { /* private fields */ }Expand description
A Proof-of-Key-Possession for a given NodePk.
Used to ensure a user’s signup request contains a NodePk actually owned
by the user.
Like the outer UserSignupRequestWire, this PoP is vulnerable to replay
attacks in the general case.
Implementations§
Source§impl NodePkProof
impl NodePkProof
Sourcepub fn sign(node_key_pair: &Keypair) -> Self
pub fn sign(node_key_pair: &Keypair) -> Self
Given a secp256k1::Keypair, sign a new NodePkProof
Proof-of-Key-Possession for your key pair.
Sourcepub fn verify(&self) -> Result<&NodePk, InvalidNodePkProofSignature>
pub fn verify(&self) -> Result<&NodePk, InvalidNodePkProofSignature>
Verify a NodePkProof, getting the verified NodePk contained
inside on success.
Sourcepub fn to_hex_string(&self) -> String
pub fn to_hex_string(&self) -> String
Dump this NodePkProof to a hex-encoded string. Please don’t use this.
Trait Implementations§
Source§impl Clone for NodePkProof
impl Clone for NodePkProof
Source§fn clone(&self) -> NodePkProof
fn clone(&self) -> NodePkProof
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 NodePkProof
impl Debug for NodePkProof
Source§impl<'de> Deserialize<'de> for NodePkProof
impl<'de> Deserialize<'de> for NodePkProof
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 PartialEq for NodePkProof
impl PartialEq for NodePkProof
Source§impl Serialize for NodePkProof
impl Serialize for NodePkProof
Source§impl Signable for NodePkProof
impl Signable for NodePkProof
Source§const DOMAIN_SEPARATOR: [u8; 32]
const DOMAIN_SEPARATOR: [u8; 32]
Implementors will only need to fill in this value. An example is
array::pad(*b"LEXE-REALM::RootSeed"), used in the RootSeed.impl Eq for NodePkProof
impl StructuralPartialEq for NodePkProof
Auto Trait Implementations§
impl Freeze for NodePkProof
impl RefUnwindSafe for NodePkProof
impl Send for NodePkProof
impl Sync for NodePkProof
impl Unpin for NodePkProof
impl UnsafeUnpin for NodePkProof
impl UnwindSafe for NodePkProof
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