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

# Foundational API Quickstart

> Learn how to integrate GoldRush APIs into your application in minutes. Get started with our TypeScript SDK to access multichain blockchain data.

## Introduction

This quickstart guide walks through using the [GoldRush TypeScript SDK](./goldrush-sdks) to quickly build with multichain data leveraging the powerful GoldRush APIs.

## Prerequisites

Using any of the GoldRush developer tools requires an API key.

<CardGroup cols={2}>
  <Card icon="wand-magic-sparkles" title="Vibe Coders" href="https://goldrush.dev/platform/auth/register/?plan=vibe">
    \$10/mo - Built for solo builders and AI-native workflows.
  </Card>

  <Card icon="users" title="Teams" href="https://goldrush.dev/platform/auth/register/?plan=professional">
    \$250/mo - Production-grade with 50 RPS and priority support.
  </Card>
</CardGroup>

## Supported Chains

GoldRush can be used with any of the supported chains. See the full list, including chain categorization, at [Supported Chains](https://goldrush.dev/chains/).

<Note>
  Some data enrichments such as internal transactions and historical balance fetches are only available for Foundational Chains.
</Note>

## Using the GoldRush TypeScript SDK

The GoldRush TypeScript SDK is the fastest way to integrate the GoldRush APIs for working with blockchain data. The SDK works with all supported chains including Mainnets and Testnets.

<Note>
  This SDK requires NodeJS v18 or above.
</Note>

### Step 1. Install the SDK

<CodeGroup>
  ```bash npm theme={null}
  npm install @covalenthq/client-sdk
  ```

  ```bash yarn theme={null}
  yarn add @covalenthq/client-sdk
  ```
</CodeGroup>

See the package on [npmjs](https://www.npmjs.com/package/@covalenthq/client-sdk) for more details.

### Step 2. Import the Client

The `GoldRushClient` class provides typesafe, easy-to-use helper functions and classes to use the GoldRush APIs.

```typescript theme={null}
import { GoldRushClient } from "@covalenthq/client-sdk";
```

### Step 3. Initialize the Client

```typescript theme={null}
import { GoldRushClient } from "@covalenthq/client-sdk";

const ApiServices = async () => {
    const client = new GoldRushClient("<GOLDRUSH_API_KEY>"); 
};
```

### Step 4. Invoke the Service

In this quickstart, we use the `BalanceService` and `getTokenBalancesForWalletAddress()` function to fetch all token balances held by an address. This function takes a chain name and wallet address as required arguments.

<Note>
  ENS resolution is supported for `eth-mainnet`.
</Note>

```typescript theme={null}
import { GoldRushClient } from "@covalenthq/client-sdk";

const ApiServices = async () => {
    // Replace with your GoldRush API key
    const client = new GoldRushClient("<GOLDRUSH_API_KEY>"); 
    const response = await client.BalanceService.getTokenBalancesForWalletAddress("eth-mainnet", "demo.eth"); 
    
    if (!response.error) {
        console.log(response.data);
    } else {
        console.log(response.error_message);
    }
};

ApiServices();
```

Example response:

```json theme={null}
{
    "address": "0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de",
    "chain_id": 1,
    "chain_name": "eth-mainnet",
    "quote_currency": "USD",
    "updated_at": "2024-11-05T22:18:41.522Z",
    "items": [
        {
            "contract_decimals": 6,
            "contract_name": "Tether USD",
            "contract_ticker_symbol": "USDT",
            "contract_address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
            "contract_display_name": "Tether USD",
            "supports_erc": [],
            "logo_url": "https://logos.covalenthq.com/tokens/1/0xdac17f958d2ee523a2206206994597c13d831ec7.png",
            "last_transferred_at": "2024-08-28T12:43:35.000Z",
            "native_token": false,
            "type": "stablecoin",
            "is_spam": false,
            "balance": "3007173042",
            "balance_24h": "3007173042",
            "quote_rate": 1,
            "quote_rate_24h": 0.9992,
            "quote": 3007.173,
            "quote_24h": 3004.7673,
            "pretty_quote": "$3,007.17",
            "pretty_quote_24h": "$3,004.77",
            "logo_urls": {},
            "protocol_metadata": null,
            "nft_data": null
        }
    ]
}
```
