Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@covalenthq/goldrush-kit

Package Overview
Dependencies
Maintainers
4
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@covalenthq/goldrush-kit

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

  • 0.1.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

goldrush-kit

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

Setup

Install goldrush-kit using npm:

npm install @covalenthq/goldrush-kit

or yarn:

yarn add @covalenthq/goldrush-kit

Implementation

  1. Import GoldRushProvider
import { GoldRushProvider } from "@covalenthq/goldrush-kit";
  1. Wrap GoldRushProvider around the application.
  2. Configure the provider and add it to the apikey props with your Covalent API key. You can register for a free key on Covalent's website.
<GoldRushProvider apikey="<YOUR_API_KEY>">{children}</GoldRushProvider>
  1. Add the stylesheet to your application.
import "@covalenthq/goldrush-kit/styles.css";
  1. Add desired components. If you're using next.js versions ^13.0 and are using 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,
    NFTWalletTokenListView,
    TokenBalancesListView,
    TokenTransfersListView,
    AddressActivityListView,
} from "@covalenthq/goldrush-kit";

Ready-to-go example

Here's a full example that you can copy-paste to get started. If you're using next.js versions ^13.0 and are using app router, make sure you have use client; at the top of the file to disable Next's server component modules.

// 'use client'; 
// If using Next.js
<GoldRushProvider apikey="<YOUR_API_KEY>" mode="dark" color="emerald">
    <TokenBalancesListView
        chain_names={[
            "eth-mainnet",
            "matic-mainnet",
            "bsc-mainnet",
            "avalanche-mainnet",
            "optimism-mainnet",
        ]}
        hide_small_balances
        address="0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de"
    />
    <TokenTransfersListView
        chain_name="eth-mainnet"
        address="0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de"
        contract_address="0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
    />
    <AddressActivityListView address="0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de" />
    <NFTWalletTokenListView
        address="0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de"
        chain_name="eth-mainnet"
    />
</GoldRushProvider>

Build and customize with Storybook

The components used above are built using Storybook, React, Tailwind, and TypeScript.

Storybook provides developers with a way to quickly prototype and develop components in isolation, while React provides the tools to quickly build out a web application. Tailwind provides a library of pre-built UI components and utility classes, while TypeScript adds type safety and autocompletion to the development process. Together, these tools provide developers with the tools they need to quickly and easily build complex, modern web applications.

Environmental Variable

Create and add a .env file to the root directory of your project and the following to the file.

STORYBOOK_COVALENT_API_KEY = "<YOUR_API_KEY>"

Start

npm run dev

Build/Bundle Component Library

npm run build:library

Build/Bundle Storybook For Deployment

npm run build:storybook

FAQs

Package last updated on 28 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc