> ## 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

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

## Prerequisites

<Card title="Setup CosmJS Libraries" description="Configure CosmJS with Para SDK first" href="/v3/react-native/guides/web3-operations/cosmos/setup-libraries" icon="gear" horizontal />

## 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

<CardGroup cols={3}>
  <Card title="Stake Tokens" description="Delegate more tokens to validators" href="/v3/react-native/guides/web3-operations/cosmos/stake-tokens" icon="lock" />

  <Card title="Query Validators" description="Check validator performance" href="/v3/react-native/guides/web3-operations/cosmos/query-validators" icon="shield-check" />

  <Card title="Query Balances" description="Check your rewards balance" href="/v3/react-native/guides/web3-operations/cosmos/query-balances" icon="wallet" />
</CardGroup>
