Skip to content
On this page

Withdraw Rewards Cosmos

The withdrawRewards namespace contains method used for sending transactions on delegation. The unique method to the withdrawRewards namespace is:

  • withdrawRewards(address): Withdraw user rewards.

Withdraw Rewards Code Example

ts
// Import SDK
import { Cosmos } from '@everstake/wallet-sdk';

// User wallet address.
const address = 'examplecosmos1hgmhc4hajlh8u47wmmls6ze4yrfekhs';

// Your source identificator
const sourceID = '99'

// reward - return transaction
const reward = await Cosmos.withdrawRewards(address, sourceID);
console.log(reward); // { result: { address, msg, fee, memo } }