@heapup/smartkit

0.2.9 • Public • Published

SmartKit

SmartKit is a react library that allows your dapp to connect to the sui network in a simple way.

Quick Start

Manual install npm packages to your dapp project

# recommend
pnpm i @heapup/smartkit @heapup/smartkit-hooks @mysten/sui.js

# or
yarn i @heapup/smartkit @heapup/smartkit-hooks @mysten/sui.js

# or
npm i @heapup/smartkit @heapup/smartkit-hooks @mysten/sui.js

Config providers

import '@heapup/smartkit/styles.css'
import { SmartKitProvider } from '@heapup/smartkit'
import { SmartKitClientProvider, createConfig } from '@heapup/smartkit-hooks'
import { getFullnodeUrl, SuiClient } from '@mysten/sui.js/client'

const client = new SuiClient({
  url: getFullnodeUrl('mainnet')
})

const config = createConfig({
  suiClient: client
})

export default function Providers({ children }: React.PropsWithChildren) {
  return (
    <SmartKitClientProvider config={config}>
      <SmartKitProvider theme="default" mode="auto">
        {children}
      </SmartKitProvider>
    </SmartKitClientProvider>
  )
}

add ConnectButton component to your sui dapp

<ConnectButton label="Try it out" showAvatar showBalance />

Package Sidebar

Install

npm i @heapup/smartkit

Weekly Downloads

1

Version

0.2.9

License

MIT

Unpacked Size

164 kB

Total Files

102

Last publish

Collaborators

  • gwanbit