An example app built with IDX.
- Ceramic HTTP Client: Provides access to the Ceramic Network via a remote node running Ceramic (and IPFS).
- 3ID Connect: Provides authentication to a DID (used by Ceramic) from a blockchain wallet, and stores a link from this blockchain account to your DID in IDX.
- IDX: Provides a way to create identity records for a DID. Records are stored on Ceramic and can represent links to blockchain accounts or other user data.
Install dependencies:
npm ci
Start the development server:
npm start
Install Ceramic and IDX:
npm install -g @ceramicnetwork/cli @ceramicstudio/idx-cli
Run the Ceramic daemon:
ceramic daemon
Create a developer DID used to author the schema and definition:
idx did:create --label=local
Publish the schema (can be found below):
idx schema:publish local '{"$schema":"http://json-schema.org/draft-07/schema#"...'
Create the definition:
idx definition:create local --schema=<schema-url-from-above> --name="Secret Notes" --description="Seret notes for myself and others"
Open the src/idx.ts
file and edit the aliases variable secretNotes
to the DocID returned by the previous command.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "SecretNotes",
"properties": {
"notes": {
"type": "array",
"items": { "$ref": "#/definitions/NoteJWE" }
}
},
"additionalProperties": false,
"required": [ "notes" ],
"definitions": {
"NoteJWE": {
"type": "object",
"properties": {
"protected": { "type": "string" },
"iv": { "type": "string" },
"ciphertext": { "type": "string" },
"tag": { "type": "string" },
"aad": { "type": "string" },
"recipients": {
"type": "array",
"items": {
"type": "object",
"properties": {
"header": { "type": "object" },
"encrypted_key": { "type": "string" }
},
"required": [ "header", "encrypted_key" ]
}
}
},
"required": [ "protected", "iv", "ciphertext", "tag" ]
}
}
}
Apache-2.0 OR MIT