ODIM allows users to manage the identifiers that they have created to use Decentralized Applications (DApps). Such identifiers, e. g. wallet addresses or Decentralized Identifiers (DIDs), form the unique decentralized identity of users. Therefore, ODIM is world's first On-chain Decentralized Identity Manager, enabling users to manage their decentralized identity efficiently while DApps can rely on ODIM's decentralized identity registry for interoperability of decentralized processes, such as the issuance and verification of verifiable credentials (see more for why using ODIM).
View this video for an introduction to ODIM.
- How to set up ODIM:
- open terminal and run
npm installwhile in root folder (NOTE: nodeJS version 20.8.1 was used to build this repo!) - generate babyjubjub based key pair which must be added as new verification method of the DID that should be added to decentralized identity managable through ODIM:
- set up zokrates-pycrypto following its installation description which includes:
- cloning
zokrates-pycrypto - creating virtual environment, named
venv, by runningpy -m venv venv - activating virtual environment by running
venv\Scripts\activate.batin cmd terminal - running
pip install -r requirements.txtin active virtual env to install dependencies - running
pip install py-multibase cbor2as additional dependencies
- cloning
- add files of folder
zokrates-pycrypto-codeinto the cloned repo of zokrate'spycrypto - run
python createBabyJubJubKeyPair.pyin active virtual environment, which outputs babyjubjub based key pair inbabyJubJubKeyPair.txt
- open terminal and run
- How to test ODIM: open terminal and run
npx hardhat testwhile in root folder (runREPORT_GAS=true npx hardhat testif gas report should be printed out) - How to use ODIM locally:
- copy the
main.zokinzokrates-circuitsfolder and paste the file into Remix IDE with zokrates plugin installed - using zokrates plugin...
- compile
main.zokin Remix - compute wittness by inputting...
- the babyjubjub based public key coordinates for variable
pk, starting withxand theny - the private key of the babyjubjub based public key for variable
sk - click on
Compute
- the babyjubjub based public key coordinates for variable
- Run Setup
- generate proof of wittness and copy the output which is the proof and the input needed by ODIM to verify the ownership of the babyjubjub based key pair
- copy
ODIM.solin foldercontractsand paste it into Remix IDE inside foldercontracts - verify
ODIM.solcontract in Remix - Deploy
ODIM.solcontract while having selectedDev - Hardhat Provideras environment (Note: this requires runnningnpx hardhat nodeinside the terminal while in root folder of the ODIM repo) - Under
deployed contracts, Remix now provides a simple user interface for interacting with ODIM. Here a quick overview about ODIM's funtions:
addIdentity: Adds a new identity to the circular linked list of the sender's decentralized identity (Note: this function requires the Zokrates based ZKP of control over the to be added identity which is inserted as inputs:proofandìnput)removeIdentity: Removes an identity from the circular linked list of the sender's decentralized identity.getNextIdentity:Gets the next identity in the circular linked list of the sender's decentralized identity.verifyTx: Verifies the Zokrates based ZKP of control over a babyjubjub based keypair (Note: this function is called by the functionaddIdentityand is available so that one can test the verification of the ZKP before inserting it inaddIdentityfunction.)
- copy the
- programatically query decentralized identity of users via ODIM: see function
getDecentralizedIdentityFromOdiminODIM.jsinside foldertest
- Countering fragmentation of users' identity in web 3, i.e. one user often has multiple DIDs and wallet addresses
- Seamless interaction with Issuers, and Verifiers of VCs as well as DApps in general
- Interoperability between SSI systems
- Transfer of DID-specific properties to other DIDs can occur when, for example, owners of did:ebsi identifiers - trusted by the EU - use ODIM to link their identifiers with other DIDs, effectively extending the trust associated with did:ebsi to those additional DIDs
- Enhanced security due to back up DIDs that may be useful for DID revocery (Future Work: DID revovery with ODIM)
- ODIM additionally acts as public registry of DIDs and wallet addresses (Future Work: ODIM based decentralized public key infrastructure)
This repo uses the following GitHub Actions:
- On push of every commit the tests in folder
testare run.
- Enhance privacy