Skip to content

A tiny class to enabling user interactions and experience on Ethereum-based web sites.

Notifications You must be signed in to change notification settings

web3senior/web3sign

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub issues GitHub forks GitHub stars GitHub license GitHub commit checks state GitHub last commit Twitter

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