semethid
v0.7.0
Published
A simple JS library to create Semaphore identity by deriving the EdDSA keys from an Ethereum account.
Readme
Table of Contents
Install
npm or yarn
You can install the semithid package with npm:
npm i semethid --saveor with yarn:
yarn add semethidUsage
# semethid(sign: (message: string) => Promise, groupId: string, nonce?: number): Identity
import semethid from "semethid"
import { Identity } from "semaphore-identity-lib"
import detectEthereumProvider from "@metamask/detect-provider"
import { ethers } from "ethers"
const ethereumProvider = await detectEthereumProvider() as any
const provider = new ethers.providers.Web3Provider(ethereumProvider)
const signer = provider.getSigner()
function sign(message: string) {
return signer.signMessage(message)
}
const identity: Identity = await semethid(sign, "groupId")
*/Contacts
Developers
- e-mail : [email protected]
- github : @cedoor
- website : https://cedoor.dev
