{"id":18264063,"url":"https://github.com/biggaji/vc-govern","last_synced_at":"2025-04-09T01:29:17.122Z","repository":{"id":215952006,"uuid":"740113566","full_name":"biggaji/vc-govern","owner":"biggaji","description":"Web5 verifiable credentials manager","archived":false,"fork":false,"pushed_at":"2024-01-15T12:52:55.000Z","size":210,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-15T14:22:49.815Z","etag":null,"topics":["biggaji","did","oxwware","tbdev","vcjwt","verifiable-credentials","web5"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/vc-govern","language":"TypeScript","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/biggaji.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-07T15:11:56.000Z","updated_at":"2024-02-26T09:17:39.000Z","dependencies_parsed_at":"2024-01-14T18:49:30.342Z","dependency_job_id":"39c9ed2c-bcd6-48d9-8ec6-7b2e4258b3f2","html_url":"https://github.com/biggaji/vc-govern","commit_stats":null,"previous_names":["biggaji/vc-govern"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biggaji%2Fvc-govern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biggaji%2Fvc-govern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biggaji%2Fvc-govern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/biggaji%2Fvc-govern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/biggaji","download_url":"https://codeload.github.com/biggaji/vc-govern/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247956099,"owners_count":21024514,"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":["biggaji","did","oxwware","tbdev","vcjwt","verifiable-credentials","web5"],"created_at":"2024-11-05T11:13:37.771Z","updated_at":"2025-04-09T01:29:17.102Z","avatar_url":"https://github.com/biggaji.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vc-govern\n\nWeb5 verifiable credentials manager.\n\nvc-govern facilitates the issuance and verification of verifiable credentials (VCs) and the generation of\npresentations. It leverages the capabilities of the @web5/credentials and @web5/dids libraries for creating\nand handling decentralized identifiers (DIDs) and verifiable credentials.\n\n## Installation\n\nUsing npm?\n\n```bash\n  npm install --save vc-govern\n```\n\nUsing yarn?\n\n```bash\n  yarn add vc-govern\n```\n\n## Usage\n\n```js\n  // commonjs\n  const { vcGovern } = require('vc-govern');\n\n  // esm\n  import { vcGovern } from 'vc-govern';\n\n  const issuer = /* ... */; // Portable DID of the issuer\n  const subject = /* ... */; // Portable DID of the subject\n  const data = /* ... */; // Data to be included in the verifiable credential\n\n  // Issue Verifiable Credential\n  const vcJwt = await vcGovern.issueVerifiableCredential({\n    issuer,\n    subject,\n    data,\n    type: 'TestVerifiableCredential', // Optional, it is used to describe the type of credential being created.\n  });\n\n  // You should store the issued verifiable credential somewhere save\n\n  // Presentation Definition\n  const presentationDefinition: PresentationDefinitionV2 = /* ... */;\n\n  // Verifiable Credential JWTs\n  const vcJwts: string[] = /* ... */;\n\n  // Generate Presentation\n  const presentation = vcGovern.generatePresentation(presentationDefinition, vcJwts);\n\n  // Verify Verifiable Credential\n  const verificationResult = await vcGovern.verifyCredential(vcJwt, true);\n\n  // Verify Verifiable Credentials within Presentation\n  const verificationResults = await vcGovern.verifyCredentialFromPresentation(presentation, true);\n\n```\n\n# API\n\n## `issueVerifiableCredential(issueVerifiableCredentialParams: IssueVerifiableCredentialParams): Promise\u003cstring | undefined\u003e`\n\nIssues a verifiable credential (VC) to a subject.\n\n- `issuer`: Portable DID of the issuer.\n- `subject`: Portable DID of the subject.\n- `data`: Data to be included in the verifiable credential.\n- `type`: Optional string or string array specifying the type of the credential.\n\nReturns a signed JWT token representing the created verifiable credential.\n\n## `generatePresentation(presentationDefinition: PresentationDefinitionV2, vcJwts: string[]): any`\n\nGenerates a presentation from a presentation definition by performing a presentation exchange (PEX).\n\n- `presentationDefinition`: The presentation definition provided by the verifier.\n- `vcJwts`: Verifiable Credential JWTs.\n\nReturns a presentation.\n\n## `verifyCredential(vcJwt: string, includeParsedData: boolean): Promise\u003cCredentialVerificationResult\u003e`\n\nVerifies a signed verifiable credential JWT.\n\n- `vcJwt`: The verifiable credential JWT to be verified.\n- `includeParsedData`: A boolean indicating whether to include parsed credential data in the result.\n\nReturns an object representing the evaluation of the result and the credential data if requested.\n\n## `verifyCredentialFromPresentation(presentation: any, includeParsedData: boolean): Promise\u003cCredentialVerificationResult[]\u003e`\n\nVerifies signed verifiable credentials within a presentation.\n\n- `presentation`: The submitted presentation.\n- `includeParsedData`: A boolean indicating whether to include parsed credential data in the result.\n\nReturns an array of objects representing the evaluation of the result and the credential data if requested.\n\n# Notes\n\n- The `expirationDate` property is skipped due to a bug preventing the creation of VCs with the expiration\n  date property set.\n\n# License\n\nvcGovern is licensed under the MIT License. See [LICENSE](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiggaji%2Fvc-govern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbiggaji%2Fvc-govern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbiggaji%2Fvc-govern/lists"}