Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

credential-bbs #1408

Open
wants to merge 19 commits into
base: next
Choose a base branch
from
Binary file added __tests__/fixtures/bbs_database_test.sqlite.tmp
Binary file not shown.
39 changes: 39 additions & 0 deletions packages/credential-bbs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# BBS Veramo Plugin and Credential Provider

This plugin implements a verifiable credential provider with BBS signature.
This provider enables the issuing of credentials and the generation of presentations from BBS signatures.

It also offers the ability to verify credentials and presentations.

This type of credential allows the holder to share credentials containing only a selected portion of the original VC data through selective disclosure, giving the holders real control over which data is shared.

The plugin extends the Veramo agent with the functionality of createSelectiveDisclosureCredentialBbs and verifyDerivedProofBbs.

This implementation is built on top of the jsonld-signatures-bbs libraries provided by mattrglobal [https://github.com/mattrglobal/jsonld-signatures-bbs](https://github.com/mattrglobal/jsonld-signatures-bbs)

### Build BBS Veramo Plugin locally


Install dependencies

```bash
npm -g i pnpm
pnpm install
```

Build

```bash
pnpm build
```

Run the tests

```bash
pnpm test
```


If you are running Visual Studio Code, there are some launch configurations available that can be used as template for
step by step debugging.

18 changes: 18 additions & 0 deletions packages/credential-bbs/api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"apiReport": {
"enabled": true,
"reportFolder": "./api",
"reportTempFolder": "./api"
},

"docModel": {
"enabled": true,
"apiJsonFilePath": "./api/<unscopedPackageName>.api.json"
},

"dtsRollup": {
"enabled": false
},
"mainEntryPointFilePath": "<projectFolder>/build/index.d.ts"
}
91 changes: 91 additions & 0 deletions packages/credential-bbs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"name": "@veramo/credential-bbs",
"description": "Veramo plugin for working with W3C BBS Verifiable Credentials & Presentations.",
"version": "6.0.0",
"main": "build/index.js",
"exports": {
".": "./build/index.js"
},
"types": "build/index.d.ts",
"scripts": {
"build": "tsc",
"extract-api": "node ../cli/bin/veramo.js dev extract-api"
},
"dependencies": {
"@mattrglobal/jsonld-signatures-bbs": "^1.2.0",
"@veramo/core": "workspace:^",
"@veramo/core-types": "workspace:^",
"@veramo/did-manager": "workspace:^",
"@veramo/key-manager": "workspace:^",
"@veramo/kms-local": "workspace:^",
"@veramo/utils": "workspace:^",
"@veramo/credential-w3c": "workspace:^",
"@veramo/did-resolver": "workspace:^",
"@veramo/data-store": "workspace:^",
"@veramo/did-provider-ethr": "workspace:^",
"jsonld": "4.0.1",
"jsonld-signatures": "7.0.0",
"did-resolver": "^4.1.0",
"cross-fetch": "^4.0.0",
"debug": "^4.3.3",
"did-jwt": "^8.0.0",
"ethers": "^6.11.1",
"uint8arrays": "^4.0.6",
"ethr-did-resolver": "^10.1.5",
"typeorm": "^0.3.17"
},

"devDependencies": {
"@jest/globals": "29.7.0",
"@types/cors": "^2.8.15",
"@types/debug": "^4.1.12",
"@types/express": "^4.17.17",
"@types/fast-crc32c": "^2.0.0",
"@types/jest": "^29.5.12",
"jest": "29.7.0",
"jest-config": "29.7.0",
"jest-environment-jsdom": "29.7.0",
"jest-environment-node": "29.7.0",
"ts-jest": "29.1.2",
"ts-node": "^10.9.1",
"typescript": "^4.8.4"
},
"files": [
"build/**/*",
"src/**/*",
"contexts/**/*.json",
"README.md",
"LICENSE"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/decentralized-identity/veramo.git",
"directory": "packages/credential-bbs"
},
"author": "Consensys Mesh R&D <[email protected]>",
"contributors": [
"TODO: VERO: Veromassera"
],
"keywords": [
"Veramo",
"DID",
"Verifiable Credential",
"JSON-LD",
"Data Integrity",
"EcdsaSecp256k1RecoverySignature2020",
"Ed25519Signature2018",
"Ed25519Signature2020",
"JsonWebSignature2020",
"vc-ld-json",
"veramo-plugin"
],
"license": "Apache-2.0",
"type": "module",
"moduleDirectories": [
"node_modules",
"src"
]
}
Loading
Loading