{"id":19967620,"url":"https://github.com/ceramicstudio/verifiablecredentialdemo","last_synced_at":"2025-07-09T05:03:38.373Z","repository":{"id":195730158,"uuid":"693537074","full_name":"ceramicstudio/VerifiableCredentialDemo","owner":"ceramicstudio","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-20T16:17:23.000Z","size":36,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-12T08:44:12.125Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ceramicstudio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-19T08:16:31.000Z","updated_at":"2023-10-04T08:02:31.000Z","dependencies_parsed_at":"2023-09-19T11:28:14.686Z","dependency_job_id":null,"html_url":"https://github.com/ceramicstudio/VerifiableCredentialDemo","commit_stats":null,"previous_names":["ceramicstudio/verifiablecredentialdemo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceramicstudio%2FVerifiableCredentialDemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceramicstudio%2FVerifiableCredentialDemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceramicstudio%2FVerifiableCredentialDemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceramicstudio%2FVerifiableCredentialDemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ceramicstudio","download_url":"https://codeload.github.com/ceramicstudio/VerifiableCredentialDemo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241404202,"owners_count":19957650,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T02:43:06.469Z","updated_at":"2025-03-01T17:41:20.504Z","avatar_url":"https://github.com/ceramicstudio.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview of approaches to storing Verifiable Credentials on Ceramic\n\n## Model design\n\nExamples are included here of ComposeDB models that are as close as possible to a Verifiable Credential example.\n\n## Challenges\n\nThe specifications for graphql and verifiable credentials have some small incompatibilities:\n - graphql does not allow fields starting with '@'\n - graphql does not allow fields named \"id\"\n\nAlso, some verifiable credential formats include a large amount of boilerplate that it may be desireable not to store in each instance.  Further, the verifiable credential spec may allow highly flexible field choices that may be hard to replicate in fixed models without further logic. (For example, the proof field is not always called 'jws' depending on the verification method) \n\nFor these reasons, a transformation of the raw graphql is necessary, and possibly desireable.  Two types of transformations are possible:\n\n## Client-side transformation\n\nAn npm library may be provided for transforming the query results back into a valid signed verifiable credential.\n\n\n## Server-side transformation\n\nThe server may provide a custom non-graphql endpoint before returning them to the client.  This will require changes on the js-ceramic side, and may be implemented in the future.\n\nResolvers can replace fields using graphql, but we would still run into the problem of the incompatible fields\nSee https://www.apollographql.com/docs/apollo-server/data/resolvers/\n\nExamples of both approachers are contained in this repo.\n\n## Schema choices\n\nBecause ComposeDB supports indexing on the primary fields of a model rather than the subtypes, we have chosen relational models with one for the core fields about the attestation, and one for the fields required to reassemble into a valid Verifiable Credential.  Note that we may implement this same pattern for Ethereum Attestation Service objects.\n\nWe have further choices to follow tightly the exact verifiable credential fields, or assume that some logic may transform them and leave out any static ones to be added by the transformer.\n\nThe two approaches can be seen under [./schemas](./schemas)\n\n## Validation\n\nSome of the example code uses the Digital Bazaar libraries for validation.  Note that these may not perform strict checking. (see https://github.com/digitalbazaar/vc)\n\nindependent validation may be performed at https://univerifier.io/\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceramicstudio%2Fverifiablecredentialdemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fceramicstudio%2Fverifiablecredentialdemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceramicstudio%2Fverifiablecredentialdemo/lists"}