pub struct Auth { /* private fields */ }Expand description
Auth namespace for API key management operations
Implementations§
Source§impl Auth
impl Auth
Sourcepub fn create_api_key(&self, nonce: u32) -> Request<ApiKeyResponse>
pub fn create_api_key(&self, nonce: u32) -> Request<ApiKeyResponse>
Create a new API key (L1 auth)
Sourcepub fn derive_api_key(&self, nonce: u32) -> Request<ApiKeyResponse>
pub fn derive_api_key(&self, nonce: u32) -> Request<ApiKeyResponse>
Derive an existing API key (L1 auth)
Sourcepub fn list_api_keys(&self) -> Request<Vec<ApiKeyInfo>>
pub fn list_api_keys(&self) -> Request<Vec<ApiKeyInfo>>
List all API keys (L2 auth)
Sourcepub fn delete_api_key(&self) -> Request<Value>
pub fn delete_api_key(&self) -> Request<Value>
Delete the current API key (L2 auth)
Sourcepub fn create_readonly_key(&self, nonce: u32) -> Request<ReadonlyApiKeyResponse>
pub fn create_readonly_key(&self, nonce: u32) -> Request<ReadonlyApiKeyResponse>
Create a new read-only API key (L1 auth)
Sourcepub fn list_readonly_keys(&self) -> Request<Vec<ReadonlyApiKeyResponse>>
pub fn list_readonly_keys(&self) -> Request<Vec<ReadonlyApiKeyResponse>>
List all read-only API keys (L2 auth)
Sourcepub async fn delete_readonly_key(
&self,
key: impl Into<String>,
) -> Result<Value, ClobError>
pub async fn delete_readonly_key( &self, key: impl Into<String>, ) -> Result<Value, ClobError>
Delete a read-only API key (L2 auth)
Sourcepub fn validate_readonly_key(
&self,
address: impl Into<String>,
key: impl Into<String>,
) -> Request<ValidateKeyResponse>
pub fn validate_readonly_key( &self, address: impl Into<String>, key: impl Into<String>, ) -> Request<ValidateKeyResponse>
Validate a read-only API key (no auth)
Sourcepub fn create_builder_key(&self, nonce: u32) -> Request<ApiKeyResponse>
pub fn create_builder_key(&self, nonce: u32) -> Request<ApiKeyResponse>
Create a new builder API key (L1 auth)
Sourcepub fn list_builder_keys(&self) -> Request<Vec<ApiKeyInfo>>
pub fn list_builder_keys(&self) -> Request<Vec<ApiKeyInfo>>
List all builder API keys (L2 auth)
Sourcepub fn delete_builder_key(&self) -> Request<Value>
pub fn delete_builder_key(&self) -> Request<Value>
Delete the current builder API key (L2 auth)
Sourcepub fn closed_only_status(&self) -> Request<ClosedOnlyResponse>
pub fn closed_only_status(&self) -> Request<ClosedOnlyResponse>
Check if the account is in closed-only mode
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Auth
impl !RefUnwindSafe for Auth
impl Send for Auth
impl Sync for Auth
impl Unpin for Auth
impl UnsafeUnpin for Auth
impl !UnwindSafe for Auth
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> 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