Skip to content
Open
Show file tree
Hide file tree
Changes from 26 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pnpm test:watch
```

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

### Building a plugin

Expand Down
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 <hello@veramo.io>",
"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