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

onboard-react

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onboard-react

A wrapper context around Blocknative's Onboard

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

Onboard-React

JavaScript library providing a wrapper around Blocknative's Onboard as a React context to easily store and update user's wallet state.

Install

npm install onboard-react

Quick Start

import OnboardProvider from 'onboard-react'

// head to blocknative.com to create a key
const BLOCKNATIVE_KEY = 'blocknative-api-key'

// the network id that your dapp runs on
const NETWORK_ID = 1

// construct the initialisation object to be given to Onboard
// see: https://docs.blocknative.com/onboard#options
const initialisation = {
  dappId: BLOCKNATIVE_KEY,
  networkId: NETWORK_ID,
}

class App extends Component {
  render() {
    return (
      <OnboardProvider initialisation={initialisation}>
        {....}
      </OnboardProvider>
    )
  }
}

The OnboardProvider then gives its children access to (among others) the useOnboard hook which returns the Onboard object.

Documentation

For detailed documentation on Onboard head to docs.blocknative.com

Keywords

FAQs

Package last updated on 07 Feb 2020

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