{"id":16199668,"url":"https://github.com/or13/vc-di-bbs","last_synced_at":"2025-04-07T17:45:23.559Z","repository":{"id":155223557,"uuid":"615840041","full_name":"OR13/vc-di-bbs","owner":"OR13","description":"Experimental implementation of bbs selective disclosure zero knowledge data integrity proofs.","archived":false,"fork":false,"pushed_at":"2023-06-03T12:10:33.000Z","size":20076,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-13T19:49:05.096Z","etag":null,"topics":["bbs","bls12-381"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OR13.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":"2023-03-18T20:37:00.000Z","updated_at":"2023-03-19T13:49:14.000Z","dependencies_parsed_at":"2024-12-21T07:42:04.216Z","dependency_job_id":"4dac235f-0a6b-4037-a7a2-d1c40dfd97bc","html_url":"https://github.com/OR13/vc-di-bbs","commit_stats":{"total_commits":19,"total_committers":2,"mean_commits":9.5,"dds":"0.21052631578947367","last_synced_commit":"81046007f2bf103e694103ff133c259fa6f7277e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OR13%2Fvc-di-bbs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OR13%2Fvc-di-bbs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OR13%2Fvc-di-bbs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OR13%2Fvc-di-bbs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OR13","download_url":"https://codeload.github.com/OR13/vc-di-bbs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247703354,"owners_count":20982281,"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":["bbs","bls12-381"],"created_at":"2024-10-10T09:27:04.596Z","updated_at":"2025-04-07T17:45:23.518Z","avatar_url":"https://github.com/OR13.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vc-di-bbs\n\n[![CI](https://github.com/or13/vc-di-bbs/actions/workflows/ci.yml/badge.svg)](https://github.com/or13/vc-di-bbs/actions/workflows/ci.yml)\n![Branches](./badges/coverage-branches.svg)\n![Functions](./badges/coverage-functions.svg)\n![Lines](./badges/coverage-lines.svg)\n![Statements](./badges/coverage-statements.svg)\n![Jest coverage](./badges/coverage-jest%20coverage.svg)\n\n\u003c!-- [![NPM](https://nodei.co/npm/@or13/vc-di-bbs.png?mini=true)](https://npmjs.org/package/@or13/vc-di-bbs) --\u003e\n\nExperimental implementation of bbs data integrity proofs.\n\nBuilt on: [microsoft/bbs-node-reference](https://github.com/microsoft/bbs-node-reference)\n\n\n## Usage\n\n```sh\nnpm i @or13/vc-di-bbs --save\n```\n\n```ts\nimport { DataIntegrity } from '@or13/vc-di-bbs'\nimport { documentLoader } from './documentLoader';\nconst privateKey = {\n  \"kty\": \"OKP\",\n  \"crv\": \"Bls12381G2\",\n  \"x\": \"qBpTVEN37H4iE6G7N9pq_44dH9dyb-vCc4GM3f_cpAj3OOAZcxDkfbEWi_IzctHCAFpptIu0mWLYujroDccDYZp_cIxEWKZ2bAtxvmifuT0YwAI9lV0qavteDOVgnqSZ\",\n  \"d\": \"SUDEGaRYySvW4jKwTai_KGFRbydkaktlzTNvF6AlRiw\"\n}\nconst suite = new DataIntegrity({ privateKey })\nconst document = {\n  \"@context\": [{\"@vocab\":\"https://www.w3.org/ns/did/controller-dependent#\"}],\n  \"💀\": \"🔥\",\n  \"🌱\": \"🐋\",\n  \"🌈\": \"🚀\"\n}\nconst frame = {\n  \"@context\": [{\"@vocab\":\"https://www.w3.org/ns/did/controller-dependent#\"}],\n  \"@explicit\": true,\n  \"🌱\": {}\n}\n// Full disclosure\nconst signed = await suite.sign(document, documentLoader);\nconst verified1 = await suite.verify(signed, documentLoader);\n// Selective disclosure\nconst derived = await suite.derive(signed, frame, documentLoader);\nconst verified2 = await suite.verify(derived, documentLoader);\n```\n\n#### Full Disclosure \n\nExample:\n\n```json\n{\n  \"@context\": [\n    {\n      \"@vocab\": \"https://www.w3.org/ns/did/controller-dependent#\"\n    }\n  ],\n  \"💀\": \"🔥\",\n  \"🌱\": \"🐋\",\n  \"🌈\": \"🚀\",\n  \"proof\": {\n    \"type\": \"FullDisclosureProof\",\n    \"value\": \"oQLBFeiZfpNcHqWcTckM05G7hyOgSgedUoeDnrqGcYQKHnuuok9gRx-1AeVKaTNYMLY9gaTNTnyyZjfDfjcBLL6VV2iXa5PbfR_xk63ca8wPUTt-DSMJ8CknEb9bxbFVG_ccpP4Gnp-3pkmLZgCNjg\"\n  }\n}\n```\n\n#### Selective Disclosure \n\nExample:\n\n```json\n{\n  \"@context\": {\n    \"@vocab\": \"https://www.w3.org/ns/did/controller-dependent#\"\n  },\n  \"@id\": \"urn:bnid:_:c14n0\",\n  \"🌱\": \"🐋\",\n  \"proof\": {\n    \"type\": \"PartialDisclosureProof\",\n    \"disclosed\": [\n      2\n    ],\n    \"generators\": 3,\n    \"value\": \"iDeWr8yHII0fcvpCkh1bTh14PM00uv6TnqGmTETABljkbc1B4HhqtLs3D83_60D9qPoj-oNd7iX5xdWHzxOx4aVt_JIZxdvxCbBrfE2U5PDlI2VlxBu6qc73Kk3o3a1qkkvK748KToQvT2pQ9eWQId-88L_jyVPGizjRRmh0A-QT_G84_M2IfOc4whBBwX3SahhrNDYNXNqfeCnRAxZGPoG5JZASBmHKbWuAwXNhzwUkObg4VifTvIdHqVvAG83RaAYhT7AzGW6kppDqa4KF9TtVQp9uM7e2PWjEGSGsuznN_E-BDhBtiDlhiwFrQWs0LL39X1eLd_PpXHqsV_4BYJmB9KvlkH0yVFEoQO3TmakDYk6_udbXiQkssFNAb1zuwpJjgmc9nl9YFL82J2W_wiOOQZj_DrrSfqsnAUs97mIGz1DBMBN8CWBRVprxXOOVIC1hH8Bp0wmcgt5WMImB6uA51TX9gSMYoZ3mv-bbqWc\"\n  }\n}\n```\n\n## Develop\n\n```bash\nnpm i\nnpm t\nnpm run lint\nnpm run build\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2For13%2Fvc-di-bbs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2For13%2Fvc-di-bbs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2For13%2Fvc-di-bbs/lists"}