Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@covalenthq/goldrush-kit

covalenthq469Apache-2.01.0.5TypeScript support: included

Beautifully designed React components for web3 dApp frontend. Easily fetch data from 200+ blockchains. Open-source. Customizable.

frontend, blockchain, cryptocurrency, web3, blockexplorer, dapps-development, blockchain-data, blockchain-transactions, nft-gallery, blockchain-data-access

readme


NPM npm downloads Apache-2.0

GoldRush Kit

Beautifully designed React components for your dApp frontend. 200+ Chains. Open-source. Customizable.


Explore the docs »

Setup

Install goldrush-kit using npm:

npm install @covalenthq/goldrush-kit

Implementation

  1. Import GoldRushProvider

     import { GoldRushProvider } from "@covalenthq/goldrush-kit";
  2. Wrap GoldRushProvider around the application.

  3. Configure the provider and add it to the apikey props with your GoldRush API key. You can register for a free key on GoldRush's website.

    Note: You should always keep your API key private, never put it directly into your code, especially front end code. Instead, use an environment variable to inject the key into your code.

     <GoldRushProvider apikey="<YOUR_API_KEY>">{children}</GoldRushProvider>
  4. Add the stylesheet to your application.

     import "@covalenthq/goldrush-kit/styles.css";
  5. Add desired components.

    Note: If you're using next.js versions ^13.0 with the app router, make sure you have use client; at the top of the file to disable Next's server component modules. Visit GoldRush's component documentation for more information.

     import {
         GoldRushProvider,
         NFTWalletCollectionList,
         TokenBalancesList,
         TokenTransfersList,
         AddressActivityList,
     } from "@covalenthq/goldrush-kit";

Ready-to-go React Component example

Here's a full example to get you started.

Be sure to secure your apikey to prevent unauthorized use in the GoldRush platform by restricting usage to specific URLs.

import {
    GoldRushProvider,
    NFTWalletCollectionList,
    TokenBalancesList,
    TokenTransfersList,
    AddressActivityList,
} from "@covalenthq/goldrush-kit";
import "@covalenthq/goldrush-kit/styles.css";

const GoldRushExample = () => {
    return (
        <GoldRushProvider
            apikey={process.env.NEXT_PUBLIC_API_KEY}
            theme={{
                borderRadius: 6,
                colors: {
                    dark: {
                        primary: "#FF4C8B",
                        background: "#000426",
                        foreground: "#FFFFFF",
                        secondary: "#868E96",
                    },
                    light: {
                        primary: "#00D8D5",
                        background: "#FFFFFF",
                        foreground: "#1C2024",
                        secondary: "#868E96",
                    },
                },
                mode: "dark",
            }}
        >
            <TokenBalancesList
                chain_names={[
                    "eth-mainnet",
                    "matic-mainnet",
                    "bsc-mainnet",
                    "avalanche-mainnet",
                    "optimism-mainnet",
                ]}
                hide_small_balances
                address="0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de"
            />

            <TokenTransfersList
                chain_name="eth-mainnet"
                address="0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de"
                contract_address="0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
            />

            <AddressActivityList address="0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de" />

            <NFTWalletCollectionList
                address="0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de"
                chain_name="eth-mainnet"
            />
        </GoldRushProvider>
    );
};

export default GoldRushExample;

GoldRush Repositories

Name Description
TypeScript SDK The fastest way to integrate the GoldRush API for working with blockchain data.
GoldRush Kit Beautifully designed React components for your dApp frontend.
GoldRush Block Explorer A cross chain block explorer kit that can be customized.
GoldRush Decoder Decode unstructured, raw event logs into structured data with a simple API.
GoldRush RevokeHub One-stop platform for managing your digital assets securely and efficiently.
GoldRush Airdrop Assist Effortlessly filter and find all valid addresses for your next airdrop.

Build and customize with Storybook

The components used above are built with ReactJS and TailwindCSS, using TypeScript. You can preview and customize the components using Storybook.

  1. Setup Environmental Variables: Create and add a .env file to the root directory of your project and the listed values from .env.example following to the file.

     STORYBOOK_GOLDRUSH_API_KEY = "<YOUR_API_KEY>"
  2. Start development server

     npm run dev
  3. Build/Bundle Component Library

     npm run build:library
  4. Build/Bundle Storybook

     npm run build:storybook

Contributing

Contributions, issues and feature requests are welcome! Feel free to check issues page.

Show your support

Give a ⭐️ if this project helped you!

License

This project is Apache-2.0 licensed.

changelog

Changelog for GoldRush Kit

1.0.5

Fixes

  • GasCard units precision
  • Actionables types
  • Use latest for LatestBlocks

Features

  • Added TransactionRawLogs component
  • Added on_page_change function to BlocksList
  • ChainSelector now bifurcates between the chains priority

1.0.4

Fixes

  • Button UI in AddressActivityList
  • Remove different UIs for lists of transactions
  • actionables in list of transactions
  • Misc console errors
  • Gas prices in Gwei throughout
  • A typo in LatestTransactions

Features

  • Added in/outs for all list of transactions

1.0.3

Fixes

  • Use latest for LatestTransactions
  • timestampParser now comes from the SDK

Features

  • Added actionables for LatestBlocks and LatestTransactions
  • Added prop changeSelectedChain in AddressActivityList to optionally change the selected chain on clicking

1.0.2

Fixes

  • Build issues caused by cva

1.0.1

Fixes

  • Gas Card active state
  • Build issues caused by cva

1.0.0

Features

  • Rebranded to GoldRush APIs
  • Updated README.md, LICENSE, and more documents
  • Upgraded to latest changes from the GoldRush TS SDK
  • Pruned dead theme code
  • Pruned deprecated endpoints

0.6.5

Features

  • Exported types of the entire project
  • Removed deprecated exports
  • Update AddressAvatar render options for its usage
  • Update TokenAvatar for clearer usage
  • Update NFTWalletCollectionList UI
  • Added autodocs for stories

Fixes

  • Fix value parsing in multiple places
  • Fix theme colors in TokenAvatar
  • Fix table wrapping
  • Fix toasts
  • Create AddressAvatar types enum
  • actionables of multiple components
  • Misc DX fixes
  • Misc HTML element nesting
  • Prune unnecessary static assets

0.6.4

Features

  • Updated GasCard UI
  • Added optional TokenAvatar to Address
  • Added Chain logo to ChainSelector
  • Revoke functionality for Approvals list

Fixes

  • Default theme colors
  • Misc UI/UX involving usage of Cards, padding, borders, colors, Badges
  • Dynamic Timestamp lag on switch
  • Empty chain_options for ChainSelector
  • Theme based Scrollbar CSS
  • Unnecessary element nesting in tables
  • Misc responsiveness

0.6.3

Features

  • Added dynamic property to Timestamp
  • Updated GasCard UI

Fixes

  • Removed Table Header Sorting for Approvals List
  • Value calculation in multiple places
  • actions for BlocksList and LatestBlocks

0.6.2

Features

  • Added actions for interlinking components

0.6.1

Features

  • Added TokenApprovalList and NFTApprovalList Molecules
  • Added BlocksList and TransactionsList Molecules
  • ChainSelector now accepts ChainsIDs alongside ChainNames
  • Updated UI for LatestBlocks and LatestTransactions

Fixes

  • TransactionList misaligned props
  • Timestamp UI
  • Address and AddressCard utilization

0.6.0

Features

  • All the Organisms have been broken down to properly grouped molecules
  • Added Timestamp Atom

Fixes

  • Responsiveness of multiple components
  • Visual uniformity
  • DRY Code

0.5.6

Features

  • Added LatestTransactions for a chain

Fixes

  • Responsiveness of multiple components
  • Added visual uniformity
    • Created for CardDetail for all heading-value based data pairs
    • Created TableList for all the tables
    • Refactored for pagination in TableList to improve visual similarity
  • Fixed build for Storybook
  • Fixed columns in all the tables
  • Improved TypeScript support

0.5.5

Features

  • Added LatestPrice for native token molecule
  • Added custom_avatar for Address
  • Updated UI for GasCard

Fixes

  • Initial state of ChainSelector
  • AddressDetails token holdings dropdown height
  • CSS in AddressDetails, BlockDetails and TransactionDetails
  • Loading state for list of transactions
  • Misc CSS

0.5.4

Fixes

  • Migrated AddressDetails as a Molecule instead of an Organism
  • Removed ChainSelector from AddressDetails
  • Fixed LatestBlocks for height parameter and improve CSS

Features

  • Added chain_options for ChainSelector to limit options as per need
  • Added a loader skeleton for ChainSelector

0.5.3

Fixes

  • Fixed themeing and CSS inconsistencies across all components
  • Pruned dead code and dependencies
  • Fixed Typescript and linting warnings at multiple places

Features

  • Updated all dependencies like eslint, storybook, shadcn and more
  • Added chromatic for internal UI auditing
  • Added LatestBlocks component
  • Added TransactionDetails component

0.5.2

Fixes

  • Fixed bundle size
  • Fixed logic of selection of theme to be applied
  • Updated dependencies and remove dead packages
  • Fixed GitHub Actions workflow conditions

Features

  • Added BlockTransactions Organism
  • Deprecated TransactionsList with AddressTransactions

0.5.1

Fixes

  • Fixed search function exported from useGoldRush
  • Updated TypeScript Client SDK
  • Fixed exported components TypeScript support for props
  • Fixed prettyToken implementation

0.5.0

Fixes

  • Fixed image_512 null check error
  • Fixed TypeScript types - remove use of any type
  • Fixed exported components for the library

Features

  • Updated themeing to a new implementation

0.4.7

Fixes

  • Fixed transactions receipt responsiveness
  • Fixed copy toast for address copy

Features

  • Added block details v2

0.4.6

Fixes

  • Types and Props exports for components
  • Transaction receipt token image by handling svg or png
  • Token detail error checks
  • Delta display on no price change

0.4.5

Fixes

  • Refactored GoldRush Provider
  • Fixed quote_rate being 0 on TokenPoolList
  • Fixed swap exchange logic

Features

0.4.4

Fixes

  • Fixed decoder api body
  • Detailed keys for Decoder

Features

0.4.3

Fixes

  • Mobile on_click fix

Features

  • Components
    • Block Details
    • Chain Selector
    • Transactions List
  • Additions
    • on clicks added to transaction list components that returns row data.
      • on_transfer_click - When user clicks the transaction label, the function returns the row data
      • on_goldrush_receipt_click - Renders button on row, the function returns the row data
      • on_native_explorer_click - Renders button on row, the function returns the row data

0.4.2

Fixes

Features

  • Add transfer clicks to labels on list views
    • PoolList
    • TokenList
    • TokenPoolList
    • WalletPoolList
    • WalletPositions

0.4.1

Fixes

Features

  • Add chain_name to the object when on_transfer_click function is ran on the TokenBalanceListView component.

0.4.0

Fixes

  • Fix hydration error for Transactions Receipt

Features

  • Added Address Detail View component

0.3.9

Fixes

  • Forward apikey in context for transactions receipt fix
  • Fix skeleton for transactions receipt

Features

  • Added new gas card

0.3.8

Fixes

  • Fixed image in README
  • Added user agent
  • Remove unnecessary checkboxes in list components

Features

Block Explorer Components

  • Transactions receipt

0.3.7

Fixes

  • Added pagination to token list and pool list views
  • Cache SVGs for token icons
  • Consistent stories

Features

XYK Components

  • Wallet positions

0.3.6

Fixes

  • Added pagination to token list and pool list views
  • Cache SVGs for token icons
  • Consistent stories

Features

XYK Components

  • Token list
  • Pool list
  • Token transactions
  • Pool transactions
  • Wallet transactions
  • Token detail
  • Pool detail