All Projects → talentlessguy → use-onboard

talentlessguy / use-onboard

Licence: MIT License
🛹 React Web3 wallet hook for the Onboard.js library.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to use-onboard

Wallet3
A secure mobile wallet for web3
Stars: ✭ 13 (-69.05%)
Mutual labels:  web3
spectrum
💠 Full Gamut Ethereum Lightsuite
Stars: ✭ 56 (+33.33%)
Mutual labels:  web3
trust-api
No description or website provided.
Stars: ✭ 20 (-52.38%)
Mutual labels:  web3
aragon.js
(Aragon 1) A monorepo of JavaScript libraries for interacting with Aragon
Stars: ✭ 84 (+100%)
Mutual labels:  web3
solana-web3-demo
a quick demo for solana web3
Stars: ✭ 93 (+121.43%)
Mutual labels:  web3
borg
Client-server stack for Web3! Turn your Raspberry Pi to a BAS server in minutes and enjoy the freedom of decentralized Web with a superior user experience!
Stars: ✭ 25 (-40.48%)
Mutual labels:  web3
ocean.js
🦑 Ocean Protocol JavaScript library to privately & securely publish, exchange, and consume data.
Stars: ✭ 77 (+83.33%)
Mutual labels:  web3
Skill-Tree
Skill tree for the Freshman Track at LearnWeb3DAO
Stars: ✭ 57 (+35.71%)
Mutual labels:  web3
expo-solana-wallet
Cross-Platform Solana Wallet built with Expo and Solana/web3.js
Stars: ✭ 122 (+190.48%)
Mutual labels:  web3
pancakeswap-lottery
🥞 A Python client for accessing PancakeSwap Lottery smart contract information through Web3.py
Stars: ✭ 30 (-28.57%)
Mutual labels:  web3
web3-is-going-great
A timeline of some of the greatest hits in cryptocurrencies, NFTs, and other web3 projects since the beginning of 2021
Stars: ✭ 334 (+695.24%)
Mutual labels:  web3
foundation
for the Great Civilization
Stars: ✭ 54 (+28.57%)
Mutual labels:  web3
nina
a self-publishing protocol for musicians - on solana
Stars: ✭ 27 (-35.71%)
Mutual labels:  web3
babel-preset-react-native-web3
deprecated: babel preset for react native, web3 and babel 6
Stars: ✭ 22 (-47.62%)
Mutual labels:  web3
add-to-web3
⁂ Github Action to upload your website to web3.storage
Stars: ✭ 22 (-47.62%)
Mutual labels:  web3
ethjs-extras
All your dApp / App essentials for working with Ethereum.
Stars: ✭ 17 (-59.52%)
Mutual labels:  web3
synthetic-loot-viewer
browse synthetic loot
Stars: ✭ 21 (-50%)
Mutual labels:  web3
0x-tracker-api
NodeJS API built for 0x Tracker which exposes 0x protocol data and metrics for consumption by the 0x Tracker Client application.
Stars: ✭ 19 (-54.76%)
Mutual labels:  web3
awesome-waves
Curated list of awesome things for development on Waves blockchain.
Stars: ✭ 60 (+42.86%)
Mutual labels:  web3
go-ethutil
Ethereum utility functions for Go.
Stars: ✭ 17 (-59.52%)
Mutual labels:  web3

useOnboard()




NPM NPM Bundle size

A React Web3 wallet hook for Onboard.js library.


Features

  • Fully configurable as much as Onboard itself
  • selectWallet and disconnectWallet functions to manage wallet state
  • Optional initialData to pass for initial address and balance values while wallet is loading

Install

pnpm i use-onboard

Example

CodeSandbox

import React from 'react'
import { useOnboard } from 'use-onboard'

const App = ({ initialData }) => {
  // in case you are authorized before this won't ask to login from the wallet
  const { selectWallet, address, isWalletSelected, disconnectWallet, balance } = useOnboard({
    options: {
      dappId: process.env.DAPP_ID, // optional API key
      networkId: 1 // Ethereum network ID
    },
    initialData // optional initial to data to pass while wallet is loading
  })

  return (
    <div>
      {
        <button
          onClick={async () => {
            if (isWalletSelected) disconnectWallet()
            else await selectWallet()
          }}>
          {isWalletSelected ? 'Disconnect' : 'Connect'}
        </button>
      }
      <p>Address: {address}</p>
      <p>Balance: {balance} ETH</p>
    </div>
  )
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].