Quickstart
Introduction
This quickstart guide walks through using the GoldRush TypeScript SDK and GoldRush UI Kit to quickly build with multichain data leveraging the powerful GoldRush APIs.
Prerequisites
Using any of the GoldRush developer tools requires an API key.
Get Started
Sign up for a free API key to get started with GoldRush.
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.
This SDK requires the use of
NodeJS v18
or above.
Step 1. Install the SDK
or
See the package on npm for more details: https://www.npmjs.com/package/@covalenthq/client-sdk
Step 2. Import the client
The GoldRushClient
class provides typesafe, easy-to-use helper functions and classes to use the GoldRush APIs.
Step 3. Initialize the client with the GoldRush API key
Step 4. Invoke the service and function
In this quickstart, we use the BalanceService
and getTokenBalancesForWalletAddress()
function to fetch all the token balances held by an address. This function takes a chain name and wallet address as required arguments. Note that ENS resolution is supported for eth-mainnet
.
which gives an output that looks similar to:
Using the GoldRush UI Kit
The GoldRush UI Kit consists of beautifully designed React components for your dapp frontend. The Kit is open source and customizable.
This UI Kit requires the use of
React 18
.
See the open source repo on GitHub: https://github.com/covalenthq/goldrush-kit
The components used above are built with ReactJS and TailwindCSS, using TypeScript. You can preview and customize the components using Storybook.
Step 1. Install the GoldRush UI Kit
or
Step 2. Import the provider
Step 3. Wrap the provider around the application and set the GoldRush API key props
Step 4. Add the stylesheet and custom theme
Step 5. Add the desired components
Using this component should render a component that looks similar to: