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.
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.
ENS resolution is supported for eth-mainnet.
Copy
Ask AI
import { GoldRushClient } from "@covalenthq/client-sdk";const ApiServices = async () => { // Replace with your GoldRush API key const client = new GoldRushClient("YOUR_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();