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

@node-real/greenfield-uploadkit

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@node-real/greenfield-uploadkit

Greenfield UploadKit is a React component library for easily uploading objects to BNB Greenfield.

  • 0.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Greenfield UploadKit

Greenfield UploadKit is a React component library for easily uploading objects to BNB Greenfield.

Features

  • 💡 Typescript — Get types straight out of the box.
  • 🌱 Ecosystem Standards — Built on top of @bnb-chain/greenfield-js-sdk, wagmi and viem.
  • 🎨 Customization — Easily customizing themes.

Documentation

For full documentation, visit here.

Examples

The following examples are provided in the examples folder of this repo.

Installation

npm i wagmi viem @node-real/greenfield-uploadkit @bnb-chain/greenfield-js-sdk @bnb-chain/greenfield-cosmos-types @bnb-chain/reed-solomon

Usage

Before using Greenfield UploadKit, you need to switch your network to the BNB Greenfield Chain. We recommend using @node-real/walletkit to connect your wallet and manage the network. This integration will ensure a seamless experience when working with Greenfield UploadKit.

import { WagmiConfig, createConfig } from 'wagmi';
import {
  SwitchNetworkModal,
  WalletKitButton,
  WalletKitOptions,
  WalletKitProvider,
  getDefaultConfig,
} from '@node-real/walletkit';
import { trustWallet, metaMask, walletConnect } from '@node-real/walletkit/wallets';
import { UploadKitButton, UploadKitOptions, UploadKitProvider } from '@node-real/greenfield-uploadkit';
import { chains } from './chains';
import { client } from './client';

import '@node-real/greenfield-uploadkit/styles.css';
import '@node-real/walletkit/styles.css';

const config = createConfig(
  getDefaultConfig({
    autoConnect: true,
    appName: 'WalletKit',

    /* WC 2.0 requires a project ID (get one here: https://cloud.walletconnect.com/sign-in) */
    walletConnectProjectId: '22d482af814af0b8d5ba3d394a28c5fc',

    chains,
    connectors: [trustWallet(), metaMask(), walletConnect()],
  }),
);

const options: WalletKitOptions = {
  initialChainId: 5600,
};

const uploadKitOptions: UploadKitOptions = {
  client: client,
};

export default function App({ Component, pageProps }: AppProps) {
  return (
    <WagmiConfig config={config}>
      <WalletKitProvider options={options} mode="light">
        <UploadKitProvider options={uploadKitOptions} mode="light">
          <WalletKitButton />
          <UploadKitButton />
          <Component {...pageProps} />
          <SwitchNetworkModal />
        </UploadKitProvider>
      </WalletKitProvider>
    </WagmiConfig>
  );
}

Contributing

Please follow our Greenfield UploadKit Contribution Guide.

License

See LICENSE for more information.

Keywords

FAQs

Package last updated on 26 Feb 2024

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