pub struct FirebaseWallet {
pub principal: Option<String>,
pub firebase: FirebaseService,
pub private_key: Option<String>,
pub public_key: Option<Vec<u8>>,
pub pkcs8: Option<Vec<u8>>,
pub email: Option<String>,
pub name: Option<String>,
pub photo_url: Option<String>,
}Fields§
§principal: Option<String>§firebase: FirebaseService§private_key: Option<String>§public_key: Option<Vec<u8>>§pkcs8: Option<Vec<u8>>§email: Option<String>§name: Option<String>§photo_url: Option<String>Implementations§
Source§impl FirebaseWallet
impl FirebaseWallet
pub fn new( api_key: String, auth_domain: String, project_id: String, storage_bucket: String, messaging_sender_id: String, app_id: String, measurement_id: String, ) -> Self
pub fn get_login(&self) -> bool
pub fn get_principal(&self) -> String
pub fn get_user_info(&self) -> Option<(String, String, String)>
pub fn try_setup_from_storage(&mut self) -> Option<String>
pub fn logout(&mut self)
pub async fn request_wallet_with_google( &mut self, ) -> Result<WalletEvent, String>
pub fn sign(&self, msg: &str) -> Option<Signature>
pub fn public_key(&self) -> Option<Vec<u8>>
pub fn try_setup_from_private_key( &mut self, private_key: String, ) -> Option<String>
pub fn init_or_get_identity( &mut self, pkcs8: Option<&[u8]>, ) -> Option<Ed25519KeyPair>
pub fn get_identity(&self) -> Option<Ed25519KeyPair>
Trait Implementations§
Source§impl Clone for FirebaseWallet
impl Clone for FirebaseWallet
Source§fn clone(&self) -> FirebaseWallet
fn clone(&self) -> FirebaseWallet
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 moreAuto Trait Implementations§
impl Freeze for FirebaseWallet
impl RefUnwindSafe for FirebaseWallet
impl Send for FirebaseWallet
impl Sync for FirebaseWallet
impl Unpin for FirebaseWallet
impl UnwindSafe for FirebaseWallet
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
Source§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<Ret> SpawnIfAsync<(), Ret> for Ret
impl<Ret> SpawnIfAsync<(), Ret> for Ret
Source§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
Source§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
Source§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
Source§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.