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

turbulent

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

turbulent

Blockchain Interface Hook Library

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Turbulent

turbulent is a React.js/Next.js hook library for blockchain interface, it is a wrapper around web3Modal library to provide a shared gloabl hook for sharing the connection status, addresses, providers and much more.

Installation

Use the package manager npm to install turbulent.

npm install turbulent

Usage

# Importing the hooks
import { web3Modal, useContract } from 'turbulent';

# Extracting the features from the 'useWeb3Modal' hook
const { connect, connected, address, balance, chainId } = useWeb3Modal();

# Use 'connect' function
<button onClick={connect}> Connect </button>

# use 'useContract' hook to call methods from the contract
const Contract = useContract(contractAddress, contractABI);
const balance = await Contract.methods.balanceOf(address).call();

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Keywords

FAQs

Package last updated on 29 Jan 2022

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