Skip to main content

Credential Merkle Disclosure Proof

info

Please note that this content is under development and is not ready for implementation. This status message will be updated as content development progresses.

This package get idea from merkle-disclosure-proof-2021 and implement to be a plugin for Veramo. It follows the proposal Credential Merkle Disclosure Proof to generate a Merkle proof from a credential.

Usage

Setup

  • Declare the plugin in your Veramo agent:
   # Merkle Disclosure Proof credentialPlugin
credentialIssuerMDP:
$require: '@vckit/credential-merkle-disclosure-proof#CredentialMerkleDisclosureProof'
$args:
- suites:
# - $require: '@veramo/credential-ld#VeramoJsonWebSignature2020'
- $require: '@vckit/credential-merkle-disclosure-proof#VCKitMerkleDisclosureProof2021'
contextMaps:
# The LdDefaultContext is a "catch-all" for now.
- $require: '@veramo/credential-ld?t=object#LdDefaultContexts'
- $require: '@transmute/credentials-context?t=object#contexts'
- $require: '@transmute/did-context?t=object#contexts'
# others should be included here
  • Add the plugin to your Veramo agent:
    agent:
$require: '@veramo/core#Agent'
$args:
- schemaValidation: false
plugins:
# ... other plugins
- $ref: /credentialIssuerMDP

Issue a credential

The merkle disclosure proof plugin includes into the credential router plugin. So you can issue a credential through the credential router plugin with the proofFormat MerkleDisclosureProof2021. The issuer must be a did:web.

curl -X POST "http://localhost:3332/agent/routeCreationVerifiableCredential" \
-H "accept: application/json; charset=utf-8"\
-H "content-type: application/json" \
-d '{"credential":{"issuanceDate":"2023-12-25T08:40:25.243Z","@context":["https://www.w3.org/2018/credentials/v1","https://www.w3.org/2018/credentials/v1","https://www.w3.org/2018/credentials/examples/v1","https://vckit-contexts.s3.ap-southeast-2.amazonaws.com/dev-render-method-context.json"],"type":["VerifiableCredential","VerifiableCredential","UniversityDegreeCredential"],"credentialSubject":{"id":"did:example:ebfeb1f712ebc6f1c276e12ec21","name":"Jane Smith","degree":{"type":"BachelorDegree","name":"Bachelor of Science and Arts","degreeSchool":"Example University"}},"render":[{"template":"<div style=\"width:300px; height:100px; border: 2px solid black; text-align:center\">\n <div>\n This {{credentialSubject.degree.name}} is conferred to\n </div>\n <strong style=\"font-size: 16px\">\n {{credentialSubject.name}}\n </strong>\n <div>\n by {{credentialSubject.degree.degreeSchool}}.\n </div>\n</div>","@type":"WebRenderingTemplate2022"}],"issuer":{"id":"did:web:agtrace-passports.s3.ap-southeast-2.amazonaws.com"}},"proofFormat":"MerkleDisclosureProof2021","save":true,"fetchRemoteContexts":true}' \

Redact a credential

To redact a credential, you need to provide the credential that was issued with the proofFormat MerkleDisclosureProof2021 and the credential that you want to redact.

curl -X POST "http://localhost:3332/agent/redactVerifiableCredential" \
-H "accept: application/json; charset=utf-8"\
-H "content-type: application/json" \
-d '{"inputVerifiableCredential":{"issuanceDate":"2023-12-25T08:41:12.129Z","@context":["https://www.w3.org/2018/credentials/v1","https://www.w3.org/2018/credentials/examples/v1","https://vckit-contexts.s3.ap-southeast-2.amazonaws.com/dev-render-method-context.json","https://w3id.org/vc-revocation-list-2020/v1"],"type":["VerifiableCredential","UniversityDegreeCredential"],"credentialSubject":{"id":"did:example:ebfeb1f712ebc6f1c276e12ec21","name":"Jane Smith","degree":{"type":"BachelorDegree","name":"Bachelor of Science and Arts","degreeSchool":"Example University"}},"render":[{"template":"<div style=\"width:300px; height:100px; border: 2px solid black; text-align:center\">\n <div>\n This {{credentialSubject.degree.name}} is conferred to\n </div>\n <strong style=\"font-size: 16px\">\n {{credentialSubject.name}}\n </strong>\n <div>\n by {{credentialSubject.degree.degreeSchool}}.\n </div>\n</div>","@type":"WebRenderingTemplate2022"}],"issuer":{"id":"did:web:agtrace-passports.s3.ap-southeast-2.amazonaws.com"},"credentialStatus":{"id":"http://localhost:3332/credentials/status/revocation-list-2020/did_web_agtrace-passports.s3.ap-southeast-2.amazonaws.com/11","type":"RevocationList2020Status","revocationListIndex":6,"revocationListCredential":"http://localhost:3332/credentials/status/revocation-list-2020/did_web_agtrace-passports.s3.ap-southeast-2.amazonaws.com/11"},"proof":{"type":"MerkleDisclosureProof2021","created":"2023-12-25T08:41:12.695Z","verificationMethod":"did:web:agtrace-passports.s3.ap-southeast-2.amazonaws.com#e9bc8c0d327897fc70f6d9dea05d1e103b7eca429deba83fc34c2cfde0e81c8f-key-0","proofPurpose":"assertionMethod","normalization":"jsonPointer","proofs":"eJzNz/c/FAwDAHDOKk9G1tnl7DgOF3cke2R0Z5yQZJ6dKJty7rk7I3uvDo+kjDMyykX2jJD5ehKRVcYljg7v5/kPnh96vf6D7xccFHhPPSjIy03dBQKFul9VUgGrQN3RYCjMDQKGw1yvgt1gcIirEkxN1VkVdrkJOC9iaRYmUA0ytBRAGQfHX3RX2RAx3Us6IrGT0U5fqKBOeib6S5x59TIjRDA+rOoyYzoDs+OrivvWA3j+JXOvOGuNn1s68QyCm7rCOPnjjUQS4q2zfpfm+MfEHZBSSwRIOPbSrubQp9ueSpNpHL+GD9ZFFlUKVLwX7rlGtdZ5sgDVmTqKd5IolZi0YTeQveYLb4+GSX+FcIwuSFnjsXB9f8jDj4ZV5+vEaoiohvA3G1HLa4V6GnkyyiVOGuevn1NVQzh0jKaILdubonmGe6L6Znfiy//SaXZjLal/FWdPeNEvB7htJ/1PQvRXhA5381SV0YpQQLbB8XKDWF61HfYA9uPCJ35zh7FUO25gjZxvZggqRCg2GwXBTRsy7s9Ua8WprIlU6Rv79OqehYRIftWLfL86ezyLqtLt/X18KNTNx32cEbvAtWFjf+VwTBy4/hqjt6PjnvI+xxCXNdd80GrsjGDEBhWrqXLJkHKDn1ovZu6oHgMwIo+qt9WgytFdFR+UzAByIziAaGOhg+RpJISLZPONZb7Wyt1THdFUnW0nckZScE9qSBHovQNViFpha/9bF0YUB30PDd5Mme+jU3ipbUINWbxBETwERNQktPKdhYTQ0WRK5WQh3EXze1ZvhdYY2zZ5SYXjFrKtL/B+xpctkRrhHNlnC+EF+ll0ueojU+LeA5XLHtRproz3Hp3ZzvHP17+g5jdvB4KuP47tYi0b1CV8GvQCE2oK/YM/UZ+9yYxRu9yY8u6LMmU0kKvJwoRpYODSSuXR5lg08yW7AF6eEq/q35EQZOhO4lkvFTwi4rgtUM/UVU3dENB+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dwti27ZZ9KIvT05FSRRtj2M+zxAE7ZupkUwaVBrpxJ7VltXx/FjPTBetyxNfFqJ3AedPLnS34Gkixfpc9Yd+RUS86pCEUJJ4W+bFc7NUAYYAgkzb7n4MrP7q2T2pQBPF3Sr5L2O662NosI6evWKsMfnS62kUSHDyP818r83xYYZ","jws":"eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19.InR4ZmZIVkpNZVJtdUlrWlNHVlZJZG9vUlpUUHJIVXYyanYydkRyeG1ZT009Ig.Sqr1Kt4UcjBCQjtF32Em2gbwOWAj3SAA0grUpVaDwM5zePjvr8euoJAjhVv9AnxwzyBPjZ47kn4Kdiui5iTvAw"}},"outputCredential":{"issuanceDate":"2023-12-25T08:41:12.129Z","@context":["https://www.w3.org/2018/credentials/v1","https://www.w3.org/2018/credentials/examples/v1","https://vckit-contexts.s3.ap-southeast-2.amazonaws.com/dev-render-method-context.json","https://w3id.org/vc-revocation-list-2020/v1"],"type":["VerifiableCredential","UniversityDegreeCredential"],"credentialSubject":{"id":"did:example:ebfeb1f712ebc6f1c276e12ec21","name":"Jane Smith","degree":{"type":"BachelorDegree","name":"Bachelor of Science and Arts"}},"render":[{"template":"<div style=\"width:300px; height:100px; border: 2px solid black; text-align:center\">\n <div>\n This {{credentialSubject.degree.name}} is conferred to\n </div>\n <strong style=\"font-size: 16px\">\n {{credentialSubject.name}}\n </strong>\n <div>\n by {{credentialSubject.degree.degreeSchool}}.\n </div>\n</div>","@type":"WebRenderingTemplate2022"}],"issuer":{"id":"did:web:agtrace-passports.s3.ap-southeast-2.amazonaws.com"},"credentialStatus":{"id":"http://localhost:3332/credentials/status/revocation-list-2020/did_web_agtrace-passports.s3.ap-southeast-2.amazonaws.com/11","type":"RevocationList2020Status","revocationListIndex":6,"revocationListCredential":"http://localhost:3332/credentials/status/revocation-list-2020/did_web_agtrace-passports.s3.ap-southeast-2.amazonaws.com/11"}}}' \

// inputVerifiableCredential is the credential that was issued with the proofFormat `MerkleDisclosureProof2021`
{
"issuanceDate": "2023-12-25T08:41:12.129Z",
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://vckit-contexts.s3.ap-southeast-2.amazonaws.com/dev-render-method-context.json",
"https://w3id.org/vc-revocation-list-2020/v1"
],
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
],
"credentialSubject": {
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
"name": "Jane Smith",
"degree": {
"type": "BachelorDegree",
"name": "Bachelor of Science and Arts",
"degreeSchool": "Example University"
}
},
"render": [
{
"template": "<div style=\"width:300px; height:100px; border: 2px solid black; text-align:center\">\n <div>\n This {{credentialSubject.degree.name}} is conferred to\n </div>\n <strong style=\"font-size: 16px\">\n {{credentialSubject.name}}\n </strong>\n <div>\n by {{credentialSubject.degree.degreeSchool}}.\n </div>\n</div>",
"@type": "WebRenderingTemplate2022"
}
],
"issuer": {
"id": "did:web:agtrace-passports.s3.ap-southeast-2.amazonaws.com"
},
"credentialStatus": {
"id": "http://localhost:3332/credentials/status/revocation-list-2020/did_web_agtrace-passports.s3.ap-southeast-2.amazonaws.com/11",
"type": "RevocationList2020Status",
"revocationListIndex": 6,
"revocationListCredential": "http://localhost:3332/credentials/status/revocation-list-2020/did_web_agtrace-passports.s3.ap-southeast-2.amazonaws.com/11"
},
"proof": {
"type": "MerkleDisclosureProof2021",
"created": "2023-12-25T08:41:12.695Z",
"verificationMethod": "did:web:agtrace-passports.s3.ap-southeast-2.amazonaws.com#e9bc8c0d327897fc70f6d9dea05d1e103b7eca429deba83fc34c2cfde0e81c8f-key-0",
"proofPurpose": "assertionMethod",
"normalization": "jsonPointer",
"proofs": "eJzNz/c/FAwDAHDOKk9G1tnl7DgOF3cke2R0Z5yQZJ6dKJty7rk7I3uvDo+kjDMyykX2jJD5ehKRVcYljg7v5/kPnh96vf6D7xccFHhPPSjIy03dBQKFul9VUgGrQN3RYCjMDQKGw1yvgt1gc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mZIVkpNZVJtdUlrWlNHVlZJZG9vUlpUUHJIVXYyanYydkRyeG1ZT009Ig.Sqr1Kt4UcjBCQjtF32Em2gbwOWAj3SAA0grUpVaDwM5zePjvr8euoJAjhVv9AnxwzyBPjZ47kn4Kdiui5iTvAw"
}
}

// outputCredential is that credential but it is redact the degreeSchool field and remove the proof
{
"issuanceDate": "2023-12-25T08:41:12.129Z",
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://vckit-contexts.s3.ap-southeast-2.amazonaws.com/dev-render-method-context.json",
"https://w3id.org/vc-revocation-list-2020/v1"
],
"type": [
"VerifiableCredential",
"UniversityDegreeCredential"
],
"credentialSubject": {
"id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
"name": "Jane Smith",
"degree": {
"type": "BachelorDegree",
"name": "Bachelor of Science and Arts"
}
},
"render": [
{
"template": "<div style=\"width:300px; height:100px; border: 2px solid black; text-align:center\">\n <div>\n This {{credentialSubject.degree.name}} is conferred to\n </div>\n <strong style=\"font-size: 16px\">\n {{credentialSubject.name}}\n </strong>\n <div>\n by {{credentialSubject.degree.degreeSchool}}.\n </div>\n</div>",
"@type": "WebRenderingTemplate2022"
}
],
"issuer": {
"id": "did:web:agtrace-passports.s3.ap-southeast-2.amazonaws.com"
},
"credentialStatus": {
"id": "http://localhost:3332/credentials/status/revocation-list-2020/did_web_agtrace-passports.s3.ap-southeast-2.amazonaws.com/11",
"type": "RevocationList2020Status",
"revocationListIndex": 6,
"revocationListCredential": "http://localhost:3332/credentials/status/revocation-list-2020/did_web_agtrace-passports.s3.ap-southeast-2.amazonaws.com/11"
}
}

Verify a credential

The merkle disclosure proof plugin includes into the credential router plugin. So you can verify a credential through the credential router.

curl -X POST "http://localhost:3332/agent/routeVerificationCredential" \
-H "accept: application/json; charset=utf-8"\
-H "content-type: application/json" \
-d '{"credential":{"issuanceDate":"2023-12-25T08:41:12.129Z","@context":["https://www.w3.org/2018/credentials/v1","https://www.w3.org/2018/credentials/examples/v1","https://vckit-contexts.s3.ap-southeast-2.amazonaws.com/dev-render-method-context.json","https://w3id.org/vc-revocation-list-2020/v1"],"type":["VerifiableCredential","UniversityDegreeCredential"],"credentialSubject":{"id":"did:example:ebfeb1f712ebc6f1c276e12ec21","name":"Jane Smith","degree":{"type":"BachelorDegree","name":"Bachelor of Science and Arts"}},"render":[{"template":"<div style=\"width:300px; height:100px; border: 2px solid black; text-align:center\">\n <div>\n This {{credentialSubject.degree.name}} is conferred to\n </div>\n <strong style=\"font-size: 16px\">\n {{credentialSubject.name}}\n </strong>\n <div>\n by {{credentialSubject.degree.degreeSchool}}.\n </div>\n</div>","@type":"WebRenderingTemplate2022"}],"issuer":{"id":"did:web:agtrace-passports.s3.ap-southeast-2.amazonaws.com"},"credentialStatus":{"id":"http://localhost:3332/credentials/status/revocation-list-2020/did_web_agtrace-passports.s3.ap-southeast-2.amazonaws.com/11","type":"RevocationList2020Status","revocationListIndex":6,"revocationListCredential":"http://localhost:3332/credentials/status/revocation-list-2020/did_web_agtrace-passports.s3.ap-southeast-2.amazonaws.com/11"},"proof":{"type":"MerkleDisclosureProof2021","created":"2023-12-25T08:41:12.695Z","verificationMethod":"did:web:agtrace-passports.s3.ap-southeast-2.amazonaws.com#e9bc8c0d327897fc70f6d9dea05d1e103b7eca429deba83fc34c2cfde0e81c8f-key-0","proofPurpose":"assertionMethod","normalization":"jsonPointer","proofs":"eJzNz/k/EwwDAHDmKk+OXHNNmTuWYbGRXHPkaHNMSGWOuVPKTZk92xy576vFIynHsBzVotCwRMj5eBPx5HgiS4yG9/P8B88Pvd7+g+8XEhF+zTAiItDX0BsKg/md0dGD6MH8cBAY3BcKQcB9zkB84Qiojw7cQB+rDz/ZBpwFOdnHyDSArZxkMDaRqcf99FZBdlsZe1RhOs7rE02xm5uP+4RoCU19iAIhxdSf5M3l4b/ypPa6C5MkveAQmOJi9H3dLJVHds1cnqi1v5pORb3AInuMR9+nb4B1nseB5ZNPbBoPfLgUoD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