Help & Support

Covalent

The Goldrush API from Covalent provides a unified API to query data points across multiple networks, including Lens Testnet.

To start using SimpleHash, you'll need an API key, which you can generate by signing up at GoldRush. Once you have your API key, you can explore integration options:

Wallet Balances Example

To fetch all token balances (ERC20, ERC721, ERC1155, and native tokens) for a wallet on the lens-sepolia-testnet, use the following API request:

curl --request GET \     --url 'https://api.simplehash.com/api/v0/native_tokens/balances?chains=lens-sepolia&wallet_addresses=0x81EdcF8e0a72c3300087891Bb3E992FAf285b2FC' \     --header 'X-API-KEY: INSERT_API_KEY_HERE' \     --header 'accept: application/json'

or integrate into JavaScript application, with API key stored in .env file, and the @covalenthq/client-sdk package installed with pacakge manager of your choice:

const {GoldRushClient} = require("@covalenthq/client-sdk");
const client = new GoldRushClient("INSERT_API_KEY_HERE");
const fetchBalances = async (walletAddress) => {  try {    const balanceResp = await client.BalanceService.getTokenBalancesForWalletAddress(      "lens-sepolia-testnet",      walletAddress    );
    if (balanceResp.error) {      throw balanceResp;    }
    console.log(balanceResp.data);  } catch (error) {    console.error(error);  }};
fetchBalances("0x81EdcF8e0a72c3300087891Bb3E992FAf285b2FC");

Transactions Example

To fetch token balances for a wallet on Lens Testnet, use the following API request:

curl --request GET \     --url 'https://api.simplehash.com/api/v0/native_tokens/balances?chains=lens-sepolia&wallet_addresses=0x81EdcF8e0a72c3300087891Bb3E992FAf285b2FC' \     --header 'X-API-KEY: INSERT_API_KEY_HERE' \     --header 'accept: application/json'

or integrate into JavaScript application, with API key stored in .env file, and the @covalenthq/client-sdk package installed with pacakge manager of your choice:

const {GoldRushClient} = require("@covalenthq/client-sdk");
const client = new GoldRushClient("INSERT_API_KEY_HERE");
const fetchTransactions = async (walletAddress) => {  try {    const balanceResp = await client.TransactionService.getAllTransactionsForAddressByPage(      "lens-sepolia-testnet",      walletAddress    );
    if (balanceResp.error) {      throw balanceResp;    }
    console.log(balanceResp.data);  } catch (error) {    console.error(error);  }};
fetchTransactions("0x81EdcF8e0a72c3300087891Bb3E992FAf285b2FC");