Skip to content

sorol25/Decentralized-Identity-Management-System-main

Repository files navigation

Decentralized Identity (DID) Management System

A blockchain-based DID management system built using Ethereum smart contracts and Hardhat.
paper

Understanding DID Identifiers

The system uses two types of identifiers:

  1. DID Address (Private)

    • This is your Ethereum wallet address
    • Keep this private - it's like your password
    • Used for managing your DID (updates, deactivation)
    • Never share this with others
  2. Public ID (Shareable)

    • A short, readable identifier (e.g., "a1b2c3d4")
    • Generated when you create your DID
    • Share this with others so they can view your public information
    • Safe to share publicly

Think of it like a house:

  • DID Address = Your house key (keep private)
  • Public ID = Your house number (share publicly)

Setup

  1. Install dependencies:
npm install
  1. Start local Hardhat node:
npx hardhat node
  1. Deploy contract and set up environment:
npx hardhat run scripts/set_contract.js --network localhost

DID Management Workflow

1. Create DID

npx hardhat run scripts/create_did.js --network localhost
  • Enter your credentials (name, email, organization, role)
  • System generates your Public ID
  • Save both your DID Address and Public ID
  • Share only your Public ID with others

2. View DID Information

Public View (for everyone):

npx hardhat run scripts/view_did.js --network localhost
  • Choose option 1 (Public View)
  • Enter the Public ID
  • Shows:
    • Name
    • Organization
    • Active Status

Private View (only for DID owner):

npx hardhat run scripts/view_did.js --network localhost
  • Choose option 2 (Private View)
  • Shows all information:
    • Name, Email, Organization, Role
    • Creation and Update dates
    • Public ID
    • Status

3. Update DID

npx hardhat run scripts/update_did.js --network localhost
  1. Enter your DID Address (not Public ID)
  2. Verify ownership with current credentials
  3. Enter new information (press Enter to keep current values)
  4. Confirm changes

4. Deactivate DID

npx hardhat run scripts/deactivate_did.js --network localhost
  1. Enter your DID Address (not Public ID)
  2. Verify ownership with current credentials
  3. Review DID information
  4. Confirm deactivation (this action cannot be undone)

Privacy Levels

Public Information (visible to anyone with Public ID)

  • Name
  • Organization
  • Active Status

Private Information (only visible to DID owner)

  • Email
  • Role
  • Creation Date
  • Last Update Date
  • All other DID details

Security Features

  • Two-level identification system (DID Address and Public ID)
  • Credential verification required for updates and deactivation
  • Private information only accessible to DID owner
  • Confirmation required for important actions
  • Active status verification
  • Timestamp tracking for all changes

Project Structure

  • contracts/ - Smart contract implementation
  • scripts/ - Management scripts for DID operations
    • create_did.js - DID creation
    • view_did.js - View DID information (public/private)
    • update_did.js - Update DID credentials
    • deactivate_did.js - Deactivate DID
    • deploy.js - Local deployment
    • set_contract.js - Contract setup

👤 Author

Yeamine Alam Sorol
🎓 BSc in Computer Science & Engineering
💻 Full-Stack Web Developer | Blockchain Enthusiast

🔗 LinkedIn: https://www.linkedin.com/in/yeamine-alam-sorol-746831347/

📘 Facebook: https://www.facebook.com/sorol.meh


© 2026 Yeamine Alam Sorol. All rights reserved.

About

A blockchain-based Decentralized Identity (DID) Management System built with Ethereum smart contracts and Hardhat. It enables secure creation, verification, updating, and deactivation of digital identities using a dual-identifier system (private DID address and shareable Public ID), ensuring privacy, security, and user-controlled identity

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors