{"id":23225860,"url":"https://github.com/credential-handler/vc-examples","last_synced_at":"2025-08-19T13:32:08.976Z","repository":{"id":62002619,"uuid":"532953070","full_name":"credential-handler/vc-examples","owner":"credential-handler","description":"Verifiable Credentials for the CHAPI Playground","archived":false,"fork":false,"pushed_at":"2023-11-08T16:51:37.000Z","size":1436,"stargazers_count":3,"open_issues_count":6,"forks_count":4,"subscribers_count":10,"default_branch":"main","last_synced_at":"2024-05-09T07:33:29.321Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/credential-handler.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-05T15:13:35.000Z","updated_at":"2024-05-29T21:46:31.202Z","dependencies_parsed_at":"2023-10-30T14:37:38.073Z","dependency_job_id":"e58f03cb-e05d-45ac-94e6-c5036c4e1766","html_url":"https://github.com/credential-handler/vc-examples","commit_stats":{"total_commits":50,"total_committers":4,"mean_commits":12.5,"dds":0.38,"last_synced_commit":"fa9642f9c53e6b71076c1561df2399cf98003cea"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/credential-handler%2Fvc-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/credential-handler%2Fvc-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/credential-handler%2Fvc-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/credential-handler%2Fvc-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/credential-handler","download_url":"https://codeload.github.com/credential-handler/vc-examples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230355790,"owners_count":18213534,"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-12-19T00:01:50.703Z","updated_at":"2024-12-19T00:02:12.934Z","avatar_url":"https://github.com/credential-handler.png","language":"HTML","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Example Verifiable Credentials _(@credential-handler/vc-examples)_\n\nExample Verifiable Credentials. Beyond being useful for general testing, these\nare also in use on the [Verifiable Credential Playground](https://vcplayground.org/).\n\n\u003e [!WARNING]\n\u003e The Verifiable Credentials in this repository are primarily created for the\n\u003e [Verifiable Credentials Playground](https://vcplayground.org/). Consequently,\n\u003e they should _not_ be considered production ready credentials and they may be\n\u003e missing many necessary production and stability focused features. Please only\n\u003e use them for experimentation.\n\n## Table of Contents\n\n- [Background](#background)\n- [Install](#install)\n- [Usage](#usage)\n- [Contribute](#contribute)\n- [License](#license)\n\n## Background\n\nCredentials added to this package are used on the [VC Playground's Issuer](https://vcplayground.org/issuer)\ntool.\n\n## Install\n\n- Node.js 18+ is required.\n\n### Development\n\nTo install locally (for development):\n\n```\ngit clone https://github.com/credential-handler/vc-examples.git\ncd vc-examples\nnpm install\n```\n\nTo run test:\n\n```\nnpm test\n```\n\nTo check credentials against local (and remote) contexts:\n\n```sh\nnpm run check\n```\n\nThis uses [jsonld.js](https://github.com/digitalbazaar/jsonld.js)'s\n\"[Safe Mode](https://github.com/digitalbazaar/jsonld.js?tab=readme-ov-file#safe-mode)\"\nto to check for missing terms.\n\nAll local example context files are added as static contexts mapped to their\nfuture publication URLs via\n[jsonld-document-loader](https://github.com/digitalbazaar/jsonld-document-loader).\n\n## Usage\n\n### Add / Update a Verifiable Credential\n\nTo add or update credentials in the `./credentials` directory:\n\n1. Within the `./credentials` directory, create a new directory for the\ncredential. Make sure to use kebab case for the directory name.\n2. Inside the newly created credential directory, add a `credential.json` file.\nThis file should contain all the necessary information for the credential,\nincluding the issuer, credential subject, and other relevant data, for example\n`./credentials/movie-ticket/credential.json`. The credential MUST be conformant\nto [VC Data Model 1.1](https://www.w3.org/TR/vc-data-model#credentials).\n3. Additionally, place a logo `image` file for the credential in the\ncorresponding directory. The image file should be in either `JPG` or `PNG`\nformat, for example `./credentials/movie-ticket/image.png`.\n\n### Add / Update a Credential Context\n\nTo optionally add or update contexts in the `./contexts` directory:\n\n1. If you wish to include a context for a credential, create a new directory\nfor the context in the `./contexts` directory. Make sure to use kebab case for\nthe directory name. It should contain a file `v1.json` that should contain the\nJSON-LD context definition for the credential, for example\n`./contexts/movie-ticket/v1.json`. The context MUST be conformant\nto [VC Data Model 1.1](https://www.w3.org/TR/vc-data-model/#contexts).\n2. Please note that once a context is created, it becomes locked and cannot be\nmodified. If you want to update or make changes to a context, you must create a\nnew context file with a new version within the context directory. For instance,\nif you want to update the context for the \"Alumni\" credential, create a new file\nnamed `v2.json` containing the updated JSON-LD context definition within\n`./contexts/alumni`. The previous version,`v1.json`, should be retained in the\ndirectory without any modifications.\n3. Please make sure that the context URLs for the contexts created in the\n`./contexts` directory follow the format:\n`https://contexts.vcplayground.org/examples/foo-bar/v1.json`.\n4. In case you need to add a custom vocabulary documentation, you can include a\n`vocab` directory within your `./contexts/foo-bar` context directory. Inside the\n`./contexts/foo-bar/vocab` directory, you can define the vocabularies within an\n`index.html` file.\n\n### Get the path to credentials directory\n```\nimport {credentialsDir} from '@credential-handler/vc-examples';\n```\n\n### Get the path to contexts directory\n```\nimport {contextsDir} from '@credential-handler/vc-examples';\n```\n\n## Tools\n\nTo generate a JSON array of context URLs used in these examples, run the\nfollowing command:\n\n```sh\n$ npm -s run extract\n```\n\n## Contribute\n\nSee [the contribute file](https://github.com/digitalbazaar/bedrock/blob/master/CONTRIBUTING.md)!\n\nPRs accepted.\n\nIf editing the Readme, please conform to the\n[standard-readme](https://github.com/RichardLitt/standard-readme) specification.\n\n## License\n\n[New BSD License (3-clause)](LICENSE) © Digital Bazaar\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcredential-handler%2Fvc-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcredential-handler%2Fvc-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcredential-handler%2Fvc-examples/lists"}