> ## Documentation Index
> Fetch the complete documentation index at: https://crossmint-wallets-docs-2-5.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Generate Yield

> Generate yield from your wallet's tokens

<Note>
  Staking is available under private access. [Contact us](https://www.crossmint.com/contact/sales) if you need access
</Note>

## Prerequisites

* Ensure you have a wallet created.
* **API Key**: Ensure you have an API key with the scopes: `wallets:transactions.create`.

## Listing yields

List available yield opportunities for a wallet.

<Tabs>
  <Tab title="React">
    ```typescript theme={null}
    import { useWallet } from '@crossmint/client-sdk-react-ui';

    const { wallet } = useWallet();

    const yields = await wallet.experimental_yields(tokens);
    ```

    ### Parameters

    <ParamField path="tokens" type="string[]">
      The tokens to generate yield for.
    </ParamField>

    ### Returns

    <ParamField path="yields" type="Yield[]">
      The yields.
    </ParamField>
  </Tab>

  <Tab title="Node.js">
    ```typescript theme={null}
    const wallet = await crossmintWallets.getWallet(walletLocator);

    const yields = await wallet.experimental_yields(tokens);
    ```

    ### Parameters

    <ParamField path="tokens" type="string[]">
      The tokens to generate yield for.
    </ParamField>

    ### Returns

    <ParamField path="yields" type="Yield[]">
      The yields.
    </ParamField>
  </Tab>

  <Tab title="React Native">
    ```typescript theme={null}
    import { useWallet } from '@crossmint/client-sdk-react-native-ui';

    const { wallet } = useWallet();

    const yields = await wallet.experimental_yields(tokens);
    ```

    ### Parameters

    <ParamField path="tokens" type="string[]">
      The tokens to generate yield for.
    </ParamField>
  </Tab>
</Tabs>

## Staking

Stake to earn yield.

<Tabs>
  <Tab title="React">
    ```typescript theme={null}
    import { useWallet } from '@crossmint/client-sdk-react-ui';

    const { wallet } = useWallet();

    const { hash, explorerLink } = await wallet.experimental_stake(tokenLocator, amount);
    ```

    ### Parameters

    <ParamField path="tokenLocator" type="string">
      The token locator to stake.
    </ParamField>

    <ParamField path="amount" type="string">
      The amount to stake.
    </ParamField>

    ### Returns

    <ParamField path="hash" type="string">
      The hash of the transaction.
    </ParamField>

    <ParamField path="explorerLink" type="string">
      The explorer link of the transaction.
    </ParamField>
  </Tab>

  <Tab title="Node.js">
    ```typescript theme={null}
    const wallet = await crossmintWallets.getWallet(walletLocator);

    const { hash, explorerLink } = await wallet.experimental_stake(tokenLocator, amount);
    ```

    ### Parameters

    <ParamField path="tokenLocator" type="string">
      The token locator to stake.
    </ParamField>

    <ParamField path="amount" type="string">
      The amount to stake.
    </ParamField>

    ### Returns

    <ParamField path="hash" type="string">
      The hash of the transaction.
    </ParamField>

    <ParamField path="explorerLink" type="string">
      The explorer link of the transaction.
    </ParamField>
  </Tab>

  <Tab title="React Native">
    ```typescript theme={null}
    import { useWallet } from '@crossmint/client-sdk-react-native-ui';

    const { wallet } = useWallet();

    const { hash, explorerLink } = await wallet.experimental_stake(tokenLocator, amount);
    ```

    ### Parameters

    <ParamField path="tokenLocator" type="string">
      The token locator to stake.
    </ParamField>

    <ParamField path="amount" type="string">
      The amount to stake.
    </ParamField>

    ### Returns

    <ParamField path="hash" type="string">
      The hash of the transaction.
    </ParamField>

    <ParamField path="explorerLink" type="string">
      The explorer link of the transaction.
    </ParamField>
  </Tab>
</Tabs>

## Unstaking

Unstake from the yield.

<Tabs>
  <Tab title="React">
    ```typescript theme={null}
    import { useWallet } from '@crossmint/client-sdk-react-ui';

    const { wallet } = useWallet();

    const { hash, explorerLink } = await wallet.experimental_unstake(tokenLocator, amount);
    ```

    ### Parameters

    <ParamField path="tokenLocator" type="string">
      The token locator to unstake.
    </ParamField>

    <ParamField path="amount" type="string">
      The amount to unstake.
    </ParamField>

    ### Returns

    <ParamField path="hash" type="string">
      The hash of the transaction.
    </ParamField>

    <ParamField path="explorerLink" type="string">
      The explorer link of the transaction.
    </ParamField>
  </Tab>

  <Tab title="Node.js">
    ```typescript theme={null}
    const wallet = await crossmintWallets.getWallet(walletLocator);

    const { hash, explorerLink } = await wallet.experimental_unstake(tokenLocator, amount);
    ```
  </Tab>

  <Tab title="React Native">
    ```typescript theme={null}
    import { useWallet } from '@crossmint/client-sdk-react-native-ui';

    const { wallet } = useWallet();

    const { hash, explorerLink } = await wallet.experimental_unstake(tokenLocator, amount);
    ```

    ### Parameters

    <ParamField path="tokenLocator" type="string">
      The token locator to unstake.
    </ParamField>

    <ParamField path="amount" type="string">
      The amount to unstake.
    </ParamField>

    ### Returns

    <ParamField path="hash" type="string">
      The hash of the transaction.
    </ParamField>

    <ParamField path="explorerLink" type="string">
      The explorer link of the transaction.
    </ParamField>
  </Tab>
</Tabs>
