pub struct StakingClient { /* private fields */ }Expand description
Client for staking operations.
Implementations§
Source§impl StakingClient
impl StakingClient
pub fn new(client: Client) -> Self
Sourcepub async fn list_stakes(
&self,
query: Option<ListStakesQuery>,
) -> Result<ListStakesResponse, Error>
pub async fn list_stakes( &self, query: Option<ListStakesQuery>, ) -> Result<ListStakesResponse, Error>
Retrieve the list of stakes.
Sourcepub async fn create_stake(
&self,
body: CreateStakeRequest,
) -> Result<CreateStakeResponse, Error>
pub async fn create_stake( &self, body: CreateStakeRequest, ) -> Result<CreateStakeResponse, Error>
Create a new stake.
Sourcepub async fn list_stake_actions(
&self,
stake_id: String,
query: Option<ListStakeActionsQuery>,
) -> Result<ListStakeActionsResponse, Error>
pub async fn list_stake_actions( &self, stake_id: String, query: Option<ListStakeActionsQuery>, ) -> Result<ListStakeActionsResponse, Error>
Retrieve the list of actions for a specific stake.
Sourcepub async fn create_stake_action(
&self,
stake_id: String,
body: CreateStakeActionRequest,
) -> Result<CreateStakeActionResponse, Error>
pub async fn create_stake_action( &self, stake_id: String, body: CreateStakeActionRequest, ) -> Result<CreateStakeActionResponse, Error>
Create a new action for an existing stake.
Sourcepub async fn get_stakes(
&self,
stake_id: String,
query: Option<GetStakesQuery>,
) -> Result<GetStakesResponse, Error>
pub async fn get_stakes( &self, stake_id: String, query: Option<GetStakesQuery>, ) -> Result<GetStakesResponse, Error>
Retrieve the details of a specific stake.
Sourcepub async fn get_stake_rewards(
&self,
stake_id: String,
) -> Result<GetStakeRewardsResponse, Error>
pub async fn get_stake_rewards( &self, stake_id: String, ) -> Result<GetStakeRewardsResponse, Error>
Retrieves the rewards linked to a specific stake.
Trait Implementations§
Source§impl Clone for StakingClient
impl Clone for StakingClient
Source§fn clone(&self) -> StakingClient
fn clone(&self) -> StakingClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 !RefUnwindSafe for StakingClient
impl !UnwindSafe for StakingClient
impl Freeze for StakingClient
impl Send for StakingClient
impl Sync for StakingClient
impl Unpin for StakingClient
impl UnsafeUnpin for StakingClient
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