pub struct PolymarketSessionKeyClient { /* private fields */ }Expand description
Owner-operated authorization, inspection, and revocation for a Deposit Wallet.
Implementations§
Source§impl PolymarketSessionKeyClient
impl PolymarketSessionKeyClient
Sourcepub fn new(config: PolymarketSessionKeyClientConfig) -> Result<Self>
pub fn new(config: PolymarketSessionKeyClientConfig) -> Result<Self>
Creates an administration client with explicit credentials.
§Errors
Returns an error if keys, wallet address, proxy, or HTTP configuration are invalid.
Sourcepub async fn list_session_keys(&self) -> Result<Vec<PolymarketSessionKey>>
pub async fn list_session_keys(&self) -> Result<Vec<PolymarketSessionKey>>
Lists the wallet’s active, unexpired session authorizations using owner CLOB credentials.
§Errors
Returns an error if authentication fails, data is malformed, or the response wallet differs.
Authorizes a public session address for CLOB trading.
Returns only after on-chain confirmation and matching registry visibility. The caller generates and stores the session private key separately.
§Errors
Returns an error if the request is rejected, confirmation fails, a timeout occurs, or the submission outcome is unknown.
Sourcepub async fn revoke_session_key(&self, address: &str) -> Result<()>
pub async fn revoke_session_key(&self, address: &str) -> Result<()>
Revokes a session and waits for on-chain confirmation and removal from the active registry.
§Errors
Returns an error if the request is rejected, a timeout occurs, or the submission outcome is unknown. Repeat the same operation on this client to resume an unresolved request.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for PolymarketSessionKeyClient
impl !RefUnwindSafe for PolymarketSessionKeyClient
impl !UnwindSafe for PolymarketSessionKeyClient
impl Send for PolymarketSessionKeyClient
impl Sync for PolymarketSessionKeyClient
impl Unpin for PolymarketSessionKeyClient
impl UnsafeUnpin for PolymarketSessionKeyClient
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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