pub struct XmtpInstallationCredential(/* private fields */);Expand description
The credential for an XMTP Installation an XMTP Installation often refers to one specific device, and is an ed25519 key
Implementations§
Source§impl XmtpInstallationCredential
impl XmtpInstallationCredential
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new XmtpInstallationCredential with [rand_chacha::ChaCha20Rng]
Sourcepub fn verifying_key(&self) -> VerifyingKey
pub fn verifying_key(&self) -> VerifyingKey
Get a reference to the public [ed25519_dalek::VerifyingKey]
Can be used to verify signatures
Sourcepub fn public_bytes(&self) -> &[u8; 32]
pub fn public_bytes(&self) -> &[u8; 32]
View the public [ed25519_dalek::VerifyingKey] as constant-sized bytes
Sourcepub fn public_slice(&self) -> &[u8] ⓘ
pub fn public_slice(&self) -> &[u8] ⓘ
View the public [ed25519_dalek::VerifyingKey] as a slice
pub fn with_context<'k, 'v>( &'k self, context: &'v [u8], ) -> Result<Context<'k, 'v, SigningKey>, SignatureError>
Sourcepub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, SignatureError>
pub fn from_bytes(bytes: &[u8; 32]) -> Result<Self, SignatureError>
Alias for [ed25519_dalek::SigningKey::from_bytes]
Trait Implementations§
Source§impl Clone for XmtpInstallationCredential
impl Clone for XmtpInstallationCredential
Source§fn clone(&self) -> XmtpInstallationCredential
fn clone(&self) -> XmtpInstallationCredential
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 XmtpInstallationCredential
impl Debug for XmtpInstallationCredential
Source§impl Default for XmtpInstallationCredential
impl Default for XmtpInstallationCredential
Source§impl<'de> Deserialize<'de> for XmtpInstallationCredential
impl<'de> Deserialize<'de> for XmtpInstallationCredential
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 Deserialize for XmtpInstallationCredential
impl Deserialize for XmtpInstallationCredential
Source§fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>where
Self: Sized,
fn tls_deserialize<R: Read>(bytes: &mut R) -> Result<Self, Error>where
Self: Sized,
This function deserializes the
bytes from the provided a std::io::Read
and returns the populated struct. Read moreSource§impl<'a> From<&'a SigningKey> for XmtpInstallationCredential
impl<'a> From<&'a SigningKey> for XmtpInstallationCredential
Source§impl<'a> From<&'a XmtpInstallationCredential> for SignatureKeyPair
impl<'a> From<&'a XmtpInstallationCredential> for SignatureKeyPair
Source§fn from(key: &'a XmtpInstallationCredential) -> SignatureKeyPair
fn from(key: &'a XmtpInstallationCredential) -> SignatureKeyPair
Converts to this type from the input type.
Source§impl From<SigningKey> for XmtpInstallationCredential
impl From<SigningKey> for XmtpInstallationCredential
Source§impl From<XmtpInstallationCredential> for SignatureKeyPair
impl From<XmtpInstallationCredential> for SignatureKeyPair
Source§fn from(key: XmtpInstallationCredential) -> SignatureKeyPair
fn from(key: XmtpInstallationCredential) -> SignatureKeyPair
Converts to this type from the input type.
Source§impl From<XmtpInstallationCredential> for SignaturePublicKey
impl From<XmtpInstallationCredential> for SignaturePublicKey
Source§fn from(value: XmtpInstallationCredential) -> Self
fn from(value: XmtpInstallationCredential) -> Self
Converts to this type from the input type.
Source§impl Serialize for XmtpInstallationCredential
impl Serialize for XmtpInstallationCredential
Source§impl Signer for &XmtpInstallationCredential
impl Signer for &XmtpInstallationCredential
Source§impl Signer for XmtpInstallationCredential
The signer here must maintain compatibility with SignatureKeyPair
impl Signer for XmtpInstallationCredential
The signer here must maintain compatibility with SignatureKeyPair
Source§impl Size for XmtpInstallationCredential
impl Size for XmtpInstallationCredential
fn tls_serialized_len(&self) -> usize
Auto Trait Implementations§
impl Freeze for XmtpInstallationCredential
impl RefUnwindSafe for XmtpInstallationCredential
impl Send for XmtpInstallationCredential
impl Sync for XmtpInstallationCredential
impl Unpin for XmtpInstallationCredential
impl UnsafeUnpin for XmtpInstallationCredential
impl UnwindSafe for XmtpInstallationCredential
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
§impl<T> Classify for T
impl<T> Classify for T
type Classified = T
fn classify(self) -> T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Declassify for T
impl<T> Declassify for T
type Declassified = T
fn declassify(self) -> T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more