GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Dentity-Development/ens-client: A JavaScript library that fetches Dentity's Proof of Personhood and Social Credentials linked to an ENS profile

BranchesTags
Open more actions menu

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
examples
examples
 
 
src
src
 
 
tests
tests
 
 
.czrc
.czrc
 
 
.eslintrc.json
.eslintrc.json
 
 
.gitignore
.gitignore
 
 
.npmignore
.npmignore
 
 
.prettierrc
.prettierrc
 
 
.releaserc
.releaserc
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
eslint.config.mjs
eslint.config.mjs
 
 
global.d.ts
global.d.ts
 
 
jest.config.ts
jest.config.ts
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 
tsconfig.spec.json
tsconfig.spec.json
 
 
tsup.config.ts
tsup.config.ts
 
 
yarn.lock
yarn.lock
 
 

Repository files navigation

@dentity/ens-client

A combination of Dentity and ENS domains to verify basic information for ENS domain owners.


Install

npm i @dentity/ens-client

Getting started

The simplest example is to get all verifcations shared by Dentity users with their ENS domain. You can easily get all those verifications by initially add to their ENS domain.

import { EnsPublicClient, createEnsPublicClient } from '@ensdomains/ensjs';
import { CredentialTemplate, EnsDentityClient } from '@dentity/ens-client';
import { http } from 'viem';
import { mainnet } from 'viem/chains';

const client = createEnsPublicClient({
  chain: mainnet,
  // Configure your faucet url here
  transport: http(''),
}) as EnsPublicClient;

EnsDentityClient.initialize(client as any, 'alice.eth').then((ensClient) => {
  
  // Get ethereum address of this ENS domain 
  const address = ensClient.getEthAddress();
  console.log('ENS Address:', address);

  // Get all Dentity verifications of this ENS domain
  const verifications = ensClient.getVerifications();
  console.log('verifications:', verifications);
  
});

Currently Dentity is supporting sharing a number of verification types for ENS domain. You can specifically get any verification by passing in a specific credential template. You can then verify the correctness of that verification.

import { EnsPublicClient, createEnsPublicClient } from '@ensdomains/ensjs';
import { CredentialTemplate, DentityEnsClient } from '@dentity/ens-client';
import { http } from 'viem';
import { mainnet } from 'viem/chains';

const client = createEnsPublicClient({
  chain: mainnet,
  // Provider url here
  transport: http(''),
}) as EnsPublicClient;

DentityEnsClient.initialize(client as any, 'alice.eth').then((ensClient) => {
  // Get ethereum address
  const address = ensClient.getEthAddress();
  console.log('ENS Address:', address);

  const verifications = ensClient.getVerifications();
  console.log('verifications:', verifications);
  // Get credential based on credential template type
  const discordVerification = ensClient.getSpecificVerification(
    CredentialTemplate.Discord,
  );
  console.log('discordVerification', discordVerification);

  DentityEnsClient.verifyVerification(discordVerification).then(
    (verifyVerificationResult) => {
      console.log('verifyVerificationResult', verifyVerificationResult);
    },
  );
});

We currently support some of the following CredentialTemplates:

Template Description
Discord The information is shared from Discord.
X The information is shared from X.
Email Email of this ENS domain.
Telegram The information is shared from Telegram.
Personhood The state or fact of ENS domain owner of being an individual or having human characteristics.

Run the Sample

We have 2 examples for both ReactJS and NodeJS applications. You can go to examples folder to see and know the basic concept and how to use it.

Contribution

We welcome issue reports if any and pull requests for further improvement.

License

MIT License

About

A JavaScript library that fetches Dentity's Proof of Personhood and Social Credentials linked to an ENS profile

www.dentity.com/

Topics

credentialsdentityensidentityphcverifiable

Resources

Readme
MIT license
Activity
Custom properties

Stars

7 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.