Struct holochain_keystore::MetaLairClient
source · pub struct MetaLairClient(/* private fields */);
Expand description
Abstraction around runtime switching/upgrade of lair keystore / client.
Implementations§
source§impl MetaLairClient
impl MetaLairClient
sourcepub fn lair_client(&self) -> LairClient
pub fn lair_client(&self) -> LairClient
Get the raw underlying lair client instance.
sourcepub fn shutdown(&self) -> impl Future<Output = LairResult<()>> + 'static + Send
pub fn shutdown(&self) -> impl Future<Output = LairResult<()>> + 'static + Send
Shutdown this keystore client
sourcepub fn new_sign_keypair_random(
&self
) -> impl Future<Output = LairResult<AgentPubKey>> + 'static + Send
pub fn new_sign_keypair_random( &self ) -> impl Future<Output = LairResult<AgentPubKey>> + 'static + Send
Construct a new randomized signature keypair
sourcepub fn sign(
&self,
pub_key: AgentPubKey,
data: Arc<[u8]>
) -> impl Future<Output = LairResult<Signature>> + 'static + Send
pub fn sign( &self, pub_key: AgentPubKey, data: Arc<[u8]> ) -> impl Future<Output = LairResult<Signature>> + 'static + Send
Generate a new signature for given keypair / data
Construct a new randomized shared secret, associated with given tag
Export a shared secret identified by tag
using box encryption.
sourcepub fn list_public_keys(
&self
) -> impl Future<Output = LairResult<Vec<AgentPubKey>>> + 'static + Send
pub fn list_public_keys( &self ) -> impl Future<Output = LairResult<Vec<AgentPubKey>>> + 'static + Send
Retrieve a list of the AgentPubKey values which are stored in the keystore available for use.
Import a shared secret to be indentified by tag
using box decryption.
Encrypt using a shared secret / xsalsa20poly1305 secretbox.
Decrypt using a shared secret / xsalsa20poly1305 secretbox.
sourcepub fn new_x25519_keypair_random(
&self
) -> impl Future<Output = LairResult<X25519PubKey>> + 'static + Send
pub fn new_x25519_keypair_random( &self ) -> impl Future<Output = LairResult<X25519PubKey>> + 'static + Send
Construct a new randomized encryption keypair
sourcepub fn crypto_box_xsalsa(
&self,
sender_pub_key: X25519PubKey,
recipient_pub_key: X25519PubKey,
data: Arc<[u8]>
) -> impl Future<Output = LairResult<([u8; 24], Arc<[u8]>)>> + 'static + Send
pub fn crypto_box_xsalsa( &self, sender_pub_key: X25519PubKey, recipient_pub_key: X25519PubKey, data: Arc<[u8]> ) -> impl Future<Output = LairResult<([u8; 24], Arc<[u8]>)>> + 'static + Send
Encrypt an authenticated “box“ed message to a specific recipient.
sourcepub fn crypto_box_xsalsa_open(
&self,
sender_pub_key: X25519PubKey,
recipient_pub_key: X25519PubKey,
nonce: [u8; 24],
data: Arc<[u8]>
) -> impl Future<Output = LairResult<Arc<[u8]>>> + 'static + Send
pub fn crypto_box_xsalsa_open( &self, sender_pub_key: X25519PubKey, recipient_pub_key: X25519PubKey, nonce: [u8; 24], data: Arc<[u8]> ) -> impl Future<Output = LairResult<Arc<[u8]>>> + 'static + Send
Decrypt an authenticated “box“ed message from a specific sender.
sourcepub fn get_or_create_tls_cert_by_tag(
&self,
tag: Arc<str>
) -> impl Future<Output = LairResult<(CertDigest, Arc<[u8]>, BufRead)>> + 'static + Send
pub fn get_or_create_tls_cert_by_tag( &self, tag: Arc<str> ) -> impl Future<Output = LairResult<(CertDigest, Arc<[u8]>, BufRead)>> + 'static + Send
Get a tls cert from lair for use in conductor
Trait Implementations§
source§impl Clone for MetaLairClient
impl Clone for MetaLairClient
source§fn clone(&self) -> MetaLairClient
fn clone(&self) -> MetaLairClient
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for MetaLairClient
impl Send for MetaLairClient
impl Sync for MetaLairClient
impl Unpin for MetaLairClient
impl !UnwindSafe for MetaLairClient
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.