@dapperlabs/dappauth
@dapperlabs/dappauth
npm i @dapperlabs/dappauth
@dapperlabs/dappauth

@dapperlabs/dappauth

A Javascript util for ERC-1654

by dapperlabs

2.0.5 (see all)License:MITTypeScript:Not Found
npm i @dapperlabs/dappauth
Readme

Build Status Coverage Status

dappauth.js

Usage

  const Web3 = require('web3');
  const DappAuth = require('@dapperlabs/dappauth');

  const dappAuth = new DappAuth(new Web3.providers.HttpProvider('http://localhost:8545'));

  async function debug() {
    const challenge = 'foo';
    const signature =
      '0x33838c6f4e621982c2009f9b93ecb854a4b122538159623abc87d2e4c5bd6d2e33591f443b419b3bd2790e455ba6d625f2ca14b822c5cef824ef7e9021443bed1c';
    const address = '0x86aa354fc865925f945b803ceae0b3f9d856b269';

    try {
      const isAuthorizedSigner = await dappAuth.isAuthorizedSigner(
        challenge,
        signature,
        address,
      );

      console.log(isAuthorizedSigner); // true
    }
    } catch (e) {
      console.log(e);
    }

  }

Downloads/wk

35

GitHub Stars

18

LAST COMMIT

2yrs ago

MAINTAINERS

4

CONTRIBUTORS

4

OPEN ISSUES

2

OPEN PRs

1
VersionTagPublished
2.0.5
latest
3yrs ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate