New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rarimo/auth-zkp-iden3

Package Overview
Dependencies
Maintainers
5
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rarimo/auth-zkp-iden3

Tools that authenticate a zero-knowledge proof and provide verifiable credentials from it.

2.0.0-rc.34
latest
Source
npm
Version published
Maintainers
5
Created
Source

@rarimo/auth-zkp-iden3

Tools that authenticate a zero-knowledge proof and provide verifiable credentials from it.

version (scoped package) types tree-shaking checks

Getting Started

Installing

yarn add @rarimo/auth-zkp-iden3

Usage

import { AuthZkp } from '@rarimo/auth-zkp-iden3'
import { type Identity } from '@rarimo/identity-gen-iden3'

/**
 * define type with variable to proof,
 * verifiableCredentials response will keep this variable in credentialSubject
 */
type QueryVariableName = { isNatural: number }

const getVerifiableCredentials = async (identity: Identity) => {
  /**
   * Setup config is necessary to let AuthZkp works properly
   */
  AuthZkp.setConfig({
    // rpc url where statev2 contract is deployed
    RPC_URL: 'https://matic-mumbai.chainstacklabs.com',
    // statev2 contract address
    STATE_V2_ADDRESS: '0x134B1BE34911E39A8397ec6289782989729807a4',
    // api url of issuer svc
    ISSUER_API_URL: 'http://127.0.0.1:8000/',
  })
  const authProof = new AuthZkp<QueryVariableName>(identity)

  const verifiableCredentials = await authProof.getVerifiableCredentials()
}

Known Issues

Read here

License

This project is licensed under the MIT License - see the LICENSE.md file for details

FAQs

Package last updated on 05 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts