Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
320 changes: 11 additions & 309 deletions docs/get-started/tooling/data-indexers/covalent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,319 +3,21 @@ title: Covalent
image: /img/socialCards/covalent.jpg
---

[GoldRush](https://goldrush.dev/?utm_source=linea&utm_medium=partner-docs),
powered by Covalent, is a set of data tools that support web3 development across
[200+ supported blockchains](https://goldrush.dev/docs/networks/?utm_source=linea&utm_medium=partner-docs),
including Linea Mainnet and Linea Sepolia. The mission of GoldRush is to improve
the lives of developers by providing structured onchain data for dapps.
GoldRush (powered by Covalent) offers the most comprehensive Blockchain Data API suite for developers, analysts, and enterprises. Whether you are building a DeFi dashboard, a wallet, a trading bot, an AI agent or a compliance platform, the Data APIs provide fast, accurate, and developer-friendly access to the essential on-chain data you need.

Developers can utilize GoldRush via SDKs, APIs, UI Kits, human-readable
transactions and pre-built templates for multiple web3 use cases. The GoldRush
suite is powered by Covalent, which is decentralized and cryptographically
secure.
GoldRush consists of the following self-serve products that can be used independently or together to power your application:

With GoldRush, you have access to:
| **Product Name** | **Description** | **Key Data Feeds** | **Use Cases** |
| --- | --- | --- | --- |
| **Foundational API** | Access structured historical blockchain data across 100+ chains via REST APIs | <ul><li>Token balances (spot & historical)</li><li>Token transfers</li><li>Token holders (spot & historical)</li><li>Token prices (onchain)</li><li>Wallet transactions</li><li>Get logs</li></ul> |<ul><li>Wallets</li><li>Portfolio trackers</li><li>Crypto accounting & tax tools</li><li>DeFi dashboards</li><li>Activity feeds</li></ul> |
| **Streaming API** | Subscribe to real-time blockchain events with sub-second latency using GraphQL over WebSockets | <ul><li>OHLCV tokens & pairs</li><li>New & updated DEX pairs</li><li>Wallet activity</li><li>Token balances</li></ul> | <ul><li>Trading dashboards</li><li>Sniper bots</li><li>Gaming</li><li>Agentic workflows</li></ul> |

- Every wallet's token balances
- Full transaction histories
- Every contract log event
- All NFTs including assets and metadata

**Use GoldRush if you need:**
The **[GoldRush TypeScript SDK](https://www.npmjs.com/package/@covalenthq/client-sdk)** is the fastest way to integrate the GoldRush APIs. Install with:

- Wallet, Transactions, NFT, DEX, Staking or core blockchain data (i.e. log
events, blocks, gas)
- Normalized, aggregated and enhanced multichain data, beyond what you get from
RPC providers
```bash
npm install @covalenthq/client-sdk
```
Learn more about GoldRush's integration with Polygon [here](https://goldrush.dev/docs/chains/linea?utm_source=linea&utm_medium=partner-docs) .

> [Sign up to start building on Linea](https://goldrush.dev/platform/?utm_source=linea&utm_medium=partner-docs)

## APIs

The GoldRush APIs enables developers to quickly and easily access structured
onchain data. This means consistent response schemas that are blockchain
agnostic. Available APIs and corresponding use cases include:

### Wallet API

- **Features:** All token balances (ERC20, 721, 1155, native), token transfers
and prices (spot and historical) for a wallet.
- **Use cases:** [Wallets, portfolio trackers](https://goldrush-wallet-portfolio-ui.vercel.app/?utm_source=linea&utm_medium=partner-docs),
token gating, airdrop snapshots.

### Transactions API

- **Features:** All historical transactions with human-readable log events.
Includes gas usage/spend summaries.
- **Use cases:** [Accounting and tax tools](https://bit.ly/crypto-tax-tool),
branded in-app [transaction receipts](https://goldrush-dfk-tx-receipt-ui.vercel.app/tx/defi-kingdoms-mainnet/0x4e5c0af28b2cea27d06677fae1f573572e0ff863c43ae42d2959ca67b90c4390/?utm_source=linea&utm_medium=partner-docs).

### NFT API

- **Features:** Media assets, metadata, sales, owners, trait & attribute
filters, thumbnails, and previews.
- **Use cases:** [NFT galleries and marketplaces](https://goldrush-nft-gallery-ui.vercel.app/?utm_source=linea&utm_medium=partner-docs),
real world asset (RWA) tracking, token gating.

### Cross-Chain Activity API

- **Features:** Single API call to fetch a list of active chains and the latest
transaction date on each for an address.
- **Use cases:** [App onboarding](https://goldrush-wallet-portfolio-ui.vercel.app/activity/0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de/?utm_source=linea&utm_medium=partner-docs).

### Security API

- **Features:** NFT and ERC20 token allowances, including value-at-risk.
- **Use cases:** [Revoke features](https://goldrush-revokehub.vercel.app/?utm_source=linea&utm_medium=partner-docs)
in wallets, security applications.

### Blockchain API

- **Features:** Block details, log events by contract address or topic hash, gas
prices, token prices and holders.
- **Use cases:** [Custom block explorers](https://goldrush-block-explorer-ui.vercel.app/?utm_source=linea&utm_medium=partner-docs).

## Developer Tools

There are four primary developer tools for using the APIs:

1. [GoldRush API](https://goldrush.dev/docs/api/?utm_source=linea&utm_medium=partner-docs) -
REST API with endpoints to use with any programming language. Switch
blockchains with one path parameter.

```bash
curl -X GET https://api.covalenthq.com/v1/linea-mainnet/address/0xc882b111a75c0c657fc507c04fbfcd2cc984f071/balances_v2/ \
-H 'Content-Type: application/json' \
-u YOUR_API_KEY:
```

2. [GoldRush SDKs](https://goldrush.dev/docs/unified-api/sdk/?utm_source=linea&utm_medium=partner-docs) -
official client libraries including TypeScript, Python, Go and Viem.

```jsx
npm install @covalenthq/client-sdk
```


```jsx
import { CovalentClient } from "@covalenthq/client-sdk";

(async () => {
try {
const client = new CovalentClient("YOUR_API_KEY");
const transactions = client.TransactionService.getAllTransactionsForAddress("linea-mainnet", "0xc882b111a75c0c657fc507c04fbfcd2cc984f071");

for await (const tx of transactions) {
console.log("tx", tx);
}
} catch (error) {
console.log(error.message);
}
})();
```

3. [GoldRush UI Kit](https://github.com/covalenthq/goldrush-kit/?utm_source=linea&utm_medium=partner-docs) -
React components for your dApp frontend.

[![GoldRush Component Example](https://datocms-assets.com/86369/1711147954-goldrush_wallet_ui_example.png)](https://goldrush-wallet-portfolio-ui.vercel.app/dashboard/balance/0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de/transfers/eth-mainnet/0xf8c3527cc04340b208c854e985240c02f7b7793f)

4. [GoldRush Decoder](https://github.com/covalenthq/goldrush-decoder/?utm_source=linea&utm_medium=partner-docs) -
decode any raw event logs into human-readable structured data.

**Request:**
```bash
curl -X POST http://localhost:8080/api/v1/tx/decode \
-H 'Content-Type: application/json' \
-d '{
"chain_name": "linea-mainnet",
"tx_hash": "0xfb6277bb32b5c5fb9c84925a42406ff47e65efd3b0eeea526f8d270429c9e453"
}'
```

**Custom decoded response:**
```json
{
"success": true,
"events": [
{
"action": "Transferred",
"category": "Token",
"name": "Transfer",
"protocol": {
"logo": "https://logos.covalenthq.com/tokens/59144/0xc1061a8315095945d83650a1ba28cd026d64cdb0.png",
"name": "SLToken1"
},
"details": [
{
"heading": "From",
"value": "0xb5c6a0625E6F01CAbF9DDBdf64AaAbd1B178e1E2",
"type": "address"
},
{
"heading": "To",
"value": "0xf081470f5C6FBCCF48cC4e5B82Dd926409DcdD67",
"type": "address"
}
],
"tokens": [
{
"decimals": 18,
"heading": "Token Amount",
"pretty_quote": "$0.00",
"ticker_logo": "https://logos.covalenthq.com/tokens/59144/0xc1061a8315095945d83650a1ba28cd026d64cdb0.png",
"ticker_symbol": "SLTT1",
"value": "1000"
}
]
},
{
"action": "Transferred",
"category": "Token",
"name": "Transfer",
"protocol": {
"logo": "https://logos.covalenthq.com/tokens/59144/0xc1061a8315095945d83650a1ba28cd026d64cdb0.png",
"name": "SLToken1"
},
"details": [
{
"heading": "From",
"value": "0xf081470f5C6FBCCF48cC4e5B82Dd926409DcdD67",
"type": "address"
},
{
"heading": "To",
"value": "0x7160570BB153Edd0Ea1775EC2b2Ac9b65F1aB61B",
"type": "address"
}
],
"tokens": [
{
"decimals": 18,
"heading": "Token Amount",
"pretty_quote": "$0.00",
"ticker_logo": "https://logos.covalenthq.com/tokens/59144/0xc1061a8315095945d83650a1ba28cd026d64cdb0.png",
"ticker_symbol": "SLTT1",
"value": "1000"
}
]
},
{
"action": "Transferred",
"category": "Token",
"name": "Transfer",
"protocol": {
"logo": "https://logos.covalenthq.com/tokens/59144/0xfe3b40b2d513b8e7ab3c7b6c758df3f00a2772dd.png",
"name": "SLToken5"
},
"details": [
{
"heading": "From",
"value": "0x7160570BB153Edd0Ea1775EC2b2Ac9b65F1aB61B",
"type": "address"
},
{
"heading": "To",
"value": "0xf081470f5C6FBCCF48cC4e5B82Dd926409DcdD67",
"type": "address"
}
],
"tokens": [
{
"decimals": 18,
"heading": "Token Amount",
"pretty_quote": "$0.00",
"ticker_logo": "https://logos.covalenthq.com/tokens/59144/0xfe3b40b2d513b8e7ab3c7b6c758df3f00a2772dd.png",
"ticker_symbol": "SLTT5",
"value": "989"
}
]
},
{
"action": "Transferred",
"category": "Token",
"name": "Transfer",
"protocol": {
"logo": "https://logos.covalenthq.com/tokens/59144/0xfe3b40b2d513b8e7ab3c7b6c758df3f00a2772dd.png",
"name": "SLToken5"
},
"details": [
{
"heading": "From",
"value": "0xf081470f5C6FBCCF48cC4e5B82Dd926409DcdD67",
"type": "address"
},
{
"heading": "To",
"value": "0xb5c6a0625E6F01CAbF9DDBdf64AaAbd1B178e1E2",
"type": "address"
}
],
"tokens": [
{
"decimals": 18,
"heading": "Token Amount",
"pretty_quote": "$0.00",
"ticker_logo": "https://logos.covalenthq.com/tokens/59144/0xfe3b40b2d513b8e7ab3c7b6c758df3f00a2772dd.png",
"ticker_symbol": "SLTT5",
"value": "988"
}
]
},
{
"action": "Account Abstraction Transaction",
"category": "Others",
"name": "User Operation Event",
"protocol": {
"logo": "https://logos.covalenthq.com/tokens/59144/0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789.png",
"name": "4337 Entry Point"
},
"details": [
{
"heading": "Gas Cost",
"value": "25590122985514",
"type": "text"
},
{
"heading": "Gas Used",
"value": "426502",
"type": "text"
},
{
"heading": "Paymaster",
"value": "0x0000000000000000000000000000000000000000",
"type": "address"
},
{
"heading": "Sender",
"value": "0xb5c6a0625E6F01CAbF9DDBdf64AaAbd1B178e1E2",
"type": "address"
},
{
"heading": "User Operation Hash",
"value": "0xfce86b467cae9f1375483acc23edaf5ead45f1fcff1939f06e00b28b2f776f94",
"type": "address"
}
]
}
],
"tx_metadata": {
...
},
"explorers": [
{
"label": null,
"url": "https://lineascan.build/tx/0xfb6277bb32b5c5fb9c84925a42406ff47e65efd3b0eeea526f8d270429c9e453"
}
]
}
}
```

## Get started

- [API Key](https://goldrush.dev/platform/auth/register/?utm_source=linea&utm_medium=partner-docs) -
sign up for free
- [Docs](https://goldrush.dev/docs/unified-api/?utm_source=linea&utm_medium=partner-docs) -
comprehensive knowledge base for all things GoldRush
- [Guides](https://goldrush.dev/docs/unified-api/guides/?utm_source=linea&utm_medium=partner-docs) -
learn how to build for various use cases and expand your onchain knowledge