1.0.4 • Published 9 months ago

@covalenthq/goldrush-kit v1.0.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
9 months ago

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

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

NameDescription
TypeScript SDKThe fastest way to integrate the GoldRush API for working with blockchain data.
GoldRush KitBeautifully designed React components for your dApp frontend.
GoldRush Block ExplorerA cross chain block explorer kit that can be customized.
GoldRush DecoderDecode unstructured, raw event logs into structured data with a simple API.
GoldRush RevokeHubOne-stop platform for managing your digital assets securely and efficiently.
GoldRush Airdrop AssistEffortlessly 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.

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

10 months ago

0.6.3

1 year ago

0.6.2

1 year ago

0.6.5

1 year ago

0.6.4

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.5.6

1 year ago

0.5.5

1 year ago

0.5.4

1 year ago

0.5.3

1 year ago

0.5.2

1 year ago

0.5.1

1 year ago

0.5.0

1 year ago

0.4.7

1 year ago

0.4.6

1 year ago

0.4.5

1 year ago

0.4.4

1 year ago

0.4.3

1 year ago

0.4.1

1 year ago

0.4.2

1 year ago

0.4.0

1 year ago

0.3.9

1 year ago

0.3.8

1 year ago

0.3.6

1 year ago

0.3.5

1 year ago

0.3.7

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago

0.3.2

2 years ago

0.3.0

2 years ago

0.2.9

2 years ago

0.2.8

2 years ago

0.3.1

2 years ago

0.2.7

2 years ago

0.2.6

2 years ago

0.2.5

2 years ago

0.2.3

2 years ago

0.2.4

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.2.2

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.8

2 years ago

0.0.9

2 years ago

0.1.7

2 years ago

0.0.8

2 years ago

0.1.9

2 years ago

0.1.4

2 years ago

0.0.5

2 years ago

0.1.3

2 years ago

0.1.6

2 years ago

0.0.7

2 years ago

0.1.5

2 years ago

0.0.6

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago