Skip to content

Identity APIs to used to generate DID documents for entities based on external identifiers.

Notifications You must be signed in to change notification settings

TechManTejas/identity

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Identity API

This API is used to generate and decentralized identity documents for all entities that are stored in a registry.

These documents contain the ID of the entity they describe, as well as the assertion or verification methods used by the entity to sign and verify credentials or presentations (respectively) generated or issued by them.

An example document is given below:

{
	// The schema this JSON-LD document follows.
	"@context": [
		"https://www.w3.org/ns/did/v1",
		"https://w3id.org/security/suites/ed25519-2020/v1"
	],

	// The DID for the subject. Here, the subject of the document is an entity
	// with the ID 0adcea7457d79d3e.
	"id": "did:web:registry.io:entity:0adcea7457d79d3e",

	// The keys used by the entity to sign a credential/presentation.
	"verificationMethod": [
		{
			"id": "did:web:registry.io:entity:0adcea7457d79d3e#signing-key",
			"type": "Ed25519VerificationKey2020",
			"publicKeyMultibase": "zEYJrMxWigf9boyeJMTRN4Ern8DJMoCXaLK77pzQmxVjf",
			"privateKeyMultibase": "z4E7Q4neNHwv3pXUNzUjzc6TTYspqn9Aw6vakpRKpbVrCzwKWD4hQDHnxuhfrTaMjnR8BTp9NeUvJiwJoSUM6xHAZ"
		}
	],
	"assertionMethod": [
		{
			"id": "did:web:registry.io:entity:0adcea7457d79d3e#signing-key",
			"type": "Ed25519VerificationKey2020",
			"publicKeyMultibase": "zEYJrMxWigf9boyeJMTRN4Ern8DJMoCXaLK77pzQmxVjf",
			"privateKeyMultibase": "z4E7Q4neNHwv3pXUNzUjzc6TTYspqn9Aw6vakpRKpbVrCzwKWD4hQDHnxuhfrTaMjnR8BTp9NeUvJiwJoSUM6xHAZ"
		}
	]
}

To create such a document, an entity must provide an external identifier (such as their email address or phone number) to the Identity API, which will then return a DID document similar to the one above.

Once you receive the document, you must store it securely - you will need it to issue/sign credentials or presentations - and also store it (without the private key fields) in a registry, so that others can verify credentials or presentations signed with your public key.

About

Identity APIs to used to generate DID documents for entities based on external identifiers.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 97.9%
  • Dockerfile 2.1%