1.0.3 • Published 2 years ago

web3sign v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Web3Sign

The purpose of this tiny class is to enable user interactions and experience on Ethereum-based websites.

Description

The advent of Web3 and the complexity of published libraries and the lack of transparent documentation in this area have made it difficult for newcomers to the Web3 world, including the web3js and Etherjs libraries. On the other hand, in some projects, Web3 features are used only for authentication, such as login and registration pages. All in all, this class contains several classes that you can use in your project easily.

Features

  • Checking the global variables on browsers (window.ethereum)
  • Force users to use MetaMask & Checking MetaMask that is it lock or not
  • Send sign request and get users' accounts

Install

npm i web3sign

How to use

    import Web3Sign from "web3sign";
    const web3sign = new Web3Sign()
    
    try {
        web3sign.getAccount().then((response) => {
            console.log(response)
            // More code here
        })
    
    } catch (e) {
        console.error(e)
    }

Output

Output of web3sign, web3