> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getpara.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Claim Staking Rewards

> Claim accumulated staking rewards from delegated validators

> [!NOTE]
>
> You're viewing the 2.0 (LTS) docs. [View the current 3.0 version of this page](https://docs.getpara.com/v3/react-native/guides/web3-operations/cosmos/claim-rewards.md).

Withdraw your accumulated staking rewards from validators on Cosmos chains using CosmJS in React Native.

## Prerequisites

## [Setup CosmJS Libraries](https://docs.getpara.com/v2/react-native/guides/web3-operations/cosmos/setup-libraries.md)

Configure CosmJS with Para SDK first

## Claim Rewards

```typescript theme={null}
import { useMemo } from 'react';
import { View, Text, Button } from 'react-native';
import { useParaCosmjsProtoSigner, useParaCosmjsSignAndBroadcast } from '@getpara/react-native-wallet/cosmos';
import { SigningStargateClient, coins } from '@cosmjs/stargate';
import { MsgWithdrawDelegatorReward } from 'cosmjs-types/cosmos/distribution/v1beta1/tx';

const RPC_URL = 'https://rpc.cosmos.directory/cosmoshub';

function ClaimRewards() {
  const { protoSigner, isLoading } = useParaCosmjsProtoSigner();

  const address = protoSigner?.address;

  const client = useMemo(
    () => protoSigner ? SigningStargateClient.connectWithSigner(RPC_URL, protoSigner) : undefined,
    [protoSigner]
  );

  const { signAndBroadcastAsync, isPending } = useParaCosmjsSignAndBroadcast(protoSigner, client);

  const claimStakingRewards = async () => {
    if (!protoSigner || !address) return;

    const validator = 'cosmosvaloper1...';

    const msgWithdrawReward = {
      typeUrl: '/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward',
      value: MsgWithdrawDelegatorReward.fromPartial({
        delegatorAddress: address,
        validatorAddress: validator,
      }),
    };

    const fee = {
      amount: coins(5000, 'uatom'),
      gas: '200000',
    };

    try {
      const result = await signAndBroadcastAsync({
        messages: [msgWithdrawReward],
        fee,
        memo: 'Claiming rewards via Para',
      });

      console.log('Rewards claimed:', result.transactionHash);
      console.log('Gas used:', result.gasUsed);
    } catch (error) {
      console.error('Failed to claim rewards:', error);
    }
  };

  if (isLoading) return <Text>Loading...</Text>;

  return (
    <View>
      <Text>Delegator: {address}</Text>
      <Button
        title={isPending ? 'Claiming...' : 'Claim Rewards'}
        onPress={claimStakingRewards}
        disabled={isPending}
      />
    </View>
  );
}
```

## Next Steps

## [Stake Tokens](https://docs.getpara.com/v2/react-native/guides/web3-operations/cosmos/stake-tokens.md)

Delegate more tokens to validators

## [Query Validators](https://docs.getpara.com/v2/react-native/guides/web3-operations/cosmos/query-validators.md)

Check validator performance

## [Query Balances](https://docs.getpara.com/v2/react-native/guides/web3-operations/cosmos/query-balances.md)

Check your rewards balance


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.