pub struct Account { /* private fields */ }Expand description
Farcaster account holds account keypair and Merkle v2 API token
Implementations§
Source§impl Account
impl Account
Sourcepub async fn from_mnemonic(
mnemonic_phrase: &str,
token_duration: Option<i64>,
) -> Result<Self, Box<dyn Error>>
pub async fn from_mnemonic( mnemonic_phrase: &str, token_duration: Option<i64>, ) -> Result<Self, Box<dyn Error>>
Sourcepub async fn from_private_key(
key: &str,
token_duration: Option<i64>,
) -> Result<Self, Box<dyn Error>>
pub async fn from_private_key( key: &str, token_duration: Option<i64>, ) -> Result<Self, Box<dyn Error>>
Sourcepub async fn regen_session_token(
&mut self,
token_duration: Option<i64>,
) -> Result<(), Box<dyn Error>>
pub async fn regen_session_token( &mut self, token_duration: Option<i64>, ) -> Result<(), Box<dyn Error>>
Function to regenete your session token. Ideal for bots. Regenerate every hour to secure your token.
Sourcepub async fn revoke_auth_token(
&mut self,
) -> Result<RevokedKeyRoot, Box<dyn Error>>
pub async fn revoke_auth_token( &mut self, ) -> Result<RevokedKeyRoot, Box<dyn Error>>
Revokes a specific session token
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Account
impl RefUnwindSafe for Account
impl Send for Account
impl Sync for Account
impl Unpin for Account
impl UnwindSafe for Account
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> 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>
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