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

# Using Go SDK

export const LearnButtons = ({primary, secondaries}) => {
  return <div className="flex flex-row gap-2 not-prose">
      {primary && <a href={primary.href} className="flex items-center justify-center gap-2 bg-primary-dark dark:bg-primary-light dark:text-gray-900 text-white rounded-full px-4 py-1 hover:opacity-[0.9]">
          <Icon icon={primary.icon} color="white" iconType="solid" />
          <span className="font-semibold">{primary.title}</span>
        </a>}
      {secondaries && secondaries.map(secondary => <a href={secondary.href} className="flex items-center justify-center gap-2 bg-gray-100 hover:bg-gray-200 dark:bg-white/5 dark:hover:bg-white/10 text-gray-800 dark:text-white rounded-full px-4 py-1 hover:opacity-[0.9]">
          <Icon icon={secondary.icon} color="currentColor" iconType="solid" />
          <span className="font-semibold">{secondary.title}</span>
        </a>)}
    </div>;
};

export const Tags = ({tags, className}) => {
  if (!tags || !Array.isArray(tags)) {
    return null;
  }
  return <div className={`mt-5 mb-5 flex flex-row flex-wrap gap-2 ${className}`}>
      {tags.map((tag, index) => <span key={index} className="text-sm text-[#733E00] dark:text-yellow-500 bg-[#FFFCF1] dark:bg-yellow-500/10 font-semibold px-2 py-1 rounded-lg">{tag}</span>)}
    </div>;
};

<LearnButtons
  secondaries={[
  { title: 'GitHub', href: 'https://github.com/ProfMoo/coinbase-staking-demo', icon: "github" }
]}
/>

<Tags tags={['Staking']} />

<Frame>
  <img src="https://mintcdn.com/coinbase-prod/cCGVQ8zMGF76EFDn/get-started/demo-apps/images/staking-demo-app.svg?fit=max&auto=format&n=cCGVQ8zMGF76EFDn&q=85&s=496b9023f0dc7ebbf47dd8c4e73f30bf" width="900px" data-path="get-started/demo-apps/images/staking-demo-app.svg" />
</Frame>

## Coinbase Staking Demo

This repository is an example of how to stake from any Solana wallet in minutes. This codebase uses the [CDP Golang SDK](https://github.com/coinbase/coinbase-sdk-go).

Please check out [our docs](/staking/staking-api/introduction/welcome) to learn more! Also check out our [demo video](https://www.loom.com/share/1be3b9bb536d4edead9345b841d1fee4) of this repository for more details!

> **NOTE: This example is for demonstration purposes only.**
> Make sure to persist your private keys in a secure fashion.

**In production, you should [IP whitelist your API key](/get-started/authentication/security-best-practices) for increased security.**

## Feature requests

If there is specific functionality you'd like to see in the CDP Staking API that is missing, we would love your feedback!

The best way to contact us is in the **#staking** channel of the [CDP Discord](https://discord.com/invite/cdp).

## Set Up

1. Clone this repository:

   ```bash theme={null}
   git clone https://github.com/ProfMoo/coinbase-staking-demo
   ```

2. Provision a [CDP API Key](/api-reference/v2/authentication#secret-api-key).

3. Set the following environment variables via an `export` shell command:

   ```bash theme={null}
   export CDP_API_KEY_PATH="<path_to_my_cdp_key>"
   export SOLANA_PRIVATE_KEY_PATH="<path_to_my_solana_private_key>"
   export SOLANA_ADDRESS="<my_solana_wallet>"
   ```

4. Run the example application:

   ```bash theme={null}
   go mod tidy && go run main.go
   ```
