0.5.5 • Published 4 days ago

@covalenthq/goldrush-kit v0.5.5

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 days ago

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 React Component example

Here's a full example to get you 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.

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.

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

"use client";
import "@covalenthq/goldrush-kit/styles.css";
import {
    GoldRushProvider,
    NFTWalletTokenListView,
    TokenBalancesListView,
    TokenTransfersListView,
    AddressActivityListView,
} from "@covalenthq/goldrush-kit";

export default function GoldRushExample() {
    return (
        <main className="">
            <GoldRushProvider
                apikey={process.env.NEXT_PUBLIC_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_names={[
                        "eth-mainnet",
                        "matic-mainnet",
                        "bsc-mainnet",
                        "avalanche-mainnet",
                        "optimism-mainnet",
                    ]}
                />
            </GoldRushProvider>
        </main>
    );
}

GoldRush Templates

TemplateDescriptionLink
Wallet & Portfolio UIDisplay your tokens and NFTs across multiple chains.https://github.com/covalenthq/goldrush-wallet-portfolio-ui
NFT Collection Gallery & Analytics UIDisplay NFTs by collection and see their details.https://github.com/covalenthq/goldrush-nft-gallery-ui
Uniswap-like Analytics UIDisplay Uniswap-like analytics for the dex of your choice.https://github.com/covalenthq/goldrush-uniswap-dex-dashboard
Transaction Receipt ViewA beautifully designed view for blockchain transactions.https://github.com/covalenthq/goldrush-tx-receipt-ui

HIGHLIGHT: GoldRush Transaction Receipt View

Designed to transform cluttered blockchain transaction data into meaningful summaries useful to the user. Receipts are fully extensible and enhance the clarity and understanding of various blockchain activities. Imagine a transaction view that shows Game-Fi quest achievements, swap pool position data, or even staking impact on network security—this is all possible with GoldRush-Kit.

https://goldrush-tx-receipt-ui.vercel.app/

https://github.com/covalenthq/goldrush-tx-receipt-ui

GoldRush Decoder

Decode transaction log events to display them in a human-readable format. Useful for understanding the data that is emitted from smart contracts and is a critical component of any dApp. Works in tandem with GoldRush-Kit to provide a seamless experience for developers and users alike.

https://github.com/covalenthq/goldrush-decoder

Build and customize with Storybook

The components used above are built React, Tailwind, and TypeScript. You can preview and customize the components using Storybook.

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.

Storybook 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

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.

0.5.5

4 days ago

0.5.4

11 days ago

0.5.3

17 days ago

0.5.2

23 days ago

0.5.1

1 month ago

0.5.0

1 month ago

0.4.7

2 months ago

0.4.6

2 months ago

0.4.5

2 months ago

0.4.4

2 months ago

0.4.3

3 months ago

0.4.1

3 months ago

0.4.2

3 months ago

0.4.0

3 months ago

0.3.9

3 months ago

0.3.8

3 months ago

0.3.6

3 months ago

0.3.5

3 months ago

0.3.7

3 months ago

0.3.4

3 months ago

0.3.3

4 months ago

0.3.2

4 months ago

0.3.0

5 months ago

0.2.9

5 months ago

0.2.8

5 months ago

0.3.1

5 months ago

0.2.7

5 months ago

0.2.6

5 months ago

0.2.5

5 months ago

0.2.3

5 months ago

0.2.4

5 months ago

0.2.1

5 months ago

0.2.0

5 months ago

0.2.2

5 months ago

0.1.2

5 months ago

0.1.1

5 months ago

0.1.8

5 months ago

0.0.9

5 months ago

0.1.7

5 months ago

0.0.8

5 months ago

0.1.9

5 months ago

0.1.4

5 months ago

0.0.5

5 months ago

0.1.3

5 months ago

0.1.6

5 months ago

0.0.7

5 months ago

0.1.5

5 months ago

0.0.6

5 months ago

0.0.4

6 months ago

0.0.3

6 months ago

0.0.2

6 months ago

0.0.1

6 months ago