npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@cyberlab/social-verifier

v2.0.1

Published

`Social Verifier` helps user to implement social verify process easily. (Twitter and Github supported).

Downloads

54

Readme

social-verifier

Social Verifier helps user to implement social verify process easily. (Twitter and Github supported).

You can check the list of verified mappings in Connect List repo.

Also, you can use our CyberConnect API to check an identity Twitter account.

Getting started

Installation

npm install @cyberlab/social-verifier
or
yarn add @cyberlab/social-verifier

Use the Verifier


Twitter:

Twitter Verifier uses a 3 step process for linking an Ethereum address to a Twitter account.

  1. Users use their Ethereum private key to sign a message with their Twitter handle to get a message which contains the generated signature.
  2. Users post a tweet with this message so others can view.
  3. Users send a verify request to our server with their wallet address. Our server will recover the signer address from the signature found in the tweet and write the verified inforamtion into Connect List if the signer address is the same as the address in the request.

Signing Data

Using twitterAuthorize to get signature message.

import { twitterAuthorize } from "@cyberlab/social-verifier";

const sig = twitterAuthorize(provider, address, handle);
  • provider - An ETH provider which should implement one of the following methods: send, sendAsync, request.
  • address - The Ethereum address that you want to link with your Twitter account.
  • handle - The handle of your Twitter account.

Posting message

You can customize your tweet text, but the text should include the signature message from the Signing Data step.

const text = `Verifying my Web3 identity on @cyberconnecthq: %23LetsCyberConnect %0A ${sig}`;

window.open(`https://twitter.com/intent/tweet?text=${text}`, "_blank");

Verifying

After posting the tweet, you can call twitterVerify to link your address with your Twitter account. You can check the list of verified mappings in Connect List repo.

import { twitterVerify } from "@cyberlab/social-verifier";

try {
  await twitterVerify(address, handle, namespace);
  console.log("Verify Success!");
} catch (e) {
  console.log("Error: ", e.message);
}
  • address - The Ethereum address that you want to link with your Twitter account.
  • handle - The handle of your Twitter account.
  • namespace - (optional) Your applciation name.

Github:

Github Verifier uses a 3 step process for linking an Ethereum address to a Github account.

  1. Users use their Ethereum private key to sign a message with their Github username to get a message which contains the generated signature.
  2. Users create a Github gist with this message.
  3. Users send a verify request to our server with their wallet address and the gist id. Our server will recover the signer address from the signature found in the gist and write the verified inforamtion into Connect List if the signer address is the same as the address in the request.

Signing Data

Using githubAuthorize to get signature message.

import { githubAuthorize } from "@cyberlab/social-verifier";

const sig = githubAuthorize(provider, address, username);
  • provider - An ETH provider which should implement one of the following methods: send, sendAsync, request.
  • address - The Ethereum address that you want to link with your Github account.
  • username - The username of your Github account.

Posting message

You need to create a gist in your Github. You can customize your gist text, but the text should include the signature message from the Signing Data step

Verifying

After posting the gist, you can call githubVerify to link your address with your Github account. You can check the list of verified mappings in Connect List repo.

import { githubVerify } from "@cyberlab/social-verifier";

try {
  await githubVerify(address, gistId, namespace);
  console.log("Verify Success!");
} catch (e) {
  console.log("Error: ", e.message);
}
  • address - The Ethereum address that you want to link with your Github account.
  • gistId - The id of your Github gist. It's the last part of your gist url.
  • namespace - (optional) Your applciation name.

Contributing

We are happy to accept any contributions, feel free to make a suggestion or submit a pull request.