# Trust Registry Extension for VC Data Model
###### tags: `trust registry` `vc extension`
This extension aims to provide integration of Trust Registry, as defined in the Trust Over IP specification, with the Verifiable Credentials Data Model. The goal is to extend the information about the issuer with metadata about their membership in governance registries.
Trust registries can have many different implementations in terms of storage, API, permission, etc. The implementation details are out of scope of this document.
## Use Cases
This extension covers applications in three common use cases:
- Governing authority assigns a member to an ecosystem governance framework. The authority may issue a credential with attestations about the details of the membership, such as givernance framework, the issuer identifier, etc.
- Authoriative issuing member asserts their membership when issuing verifiable credentials to holders. The issuer may include their membership data in the credential.
- Credential holders present their credentials to verifiers with assertions about issuer membership in trust registires.
## Membership Credential
When a governing authority assigns a member to a trust registry, they may issue a credential with assertions about the subject and their membership to governance framework and the associated trust registry.
```json
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/trust-registry/v1"
],
"id": "urn:uuid:8f1c6f5394be48638e0e9a10371ac880",
"type": [
"VerifiableCredential",
"MembershipCredential"
],
"issuer": "did:example:governing-entity",
"credentialSubject": {
"id": "did:example:authorized-issuer",
"type": "AuthoritativeMember",
"governanceFramework": "https://example.gov/framework/5",
"trustRegistry": {
"id": "https://service.example.gov/trusted-issuers",
"type": "TrustRegistry2022"
}
},
"proof": {
"created": "2022-04-27T21:40:06Z",
"proofPurpose": "assertionMethod",
"proofValue": "qpy7HS8+tSl+r5OcAoXAT1UU...",
"type": "Ed25519Signature2018",
"verificationMethod": "did:example:governing-entity#key-1"
}
}
```
### Using Accumulator
Trust registires can also be published to a decentralized storage, managed with a smart contract, for example. This is an example of a trust registry implemented using privacy enabled universal accumulator deployed to ethereum.
The `proof` contains additional entry with information about the public witness.
```json=
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://w3id.org/trust-registry/v1",
"https://w3id.org/universal-accumulator/v1"
],
"id": "urn:uuid:8f1c6f5394be48638e0e9a10371ac880",
"type": [
"VerifiableCredential"
],
"issuer": {
"id": "did:example:governing-entity",
"type": "AuthoritativeMember",
"governanceFramework": "https://example.gov/framework/5",
"trustRegistry": {
"id": "ethereum:0xb794f5ea0ba39494ce839613fffba74279579268",
"type": "UniversalAccumulator2022"
}
},
"credentialSubject": {
"id": "did:example:authorized-issuer",
"name": "Jane Doe"
},
"proof": [
{
"created": "2022-04-27T21:40:06Z",
"proofPurpose": "assertionMethod",
"proofValue": "qpy7HS8+tSl+r5OcAoXAT1UU...",
"type": "Ed25519Signature2018",
"verificationMethod": "did:key:z5TcEWQEjkoFT..."
},
{
"type": "MembershipWitness",
"created": "2022-04-27T21:40:06Z",
"witnessValue": "K4fnp/s7rPSi7ZK5nHYAYKVH+5pilMZG...",
"accumulatorValue": "qpy7HS8+tSl+r5OcAoXAT1UU...",
"verificationMethod": "did:example:governing-entity#key-1"
}
]
}
```
## Credential with Membership Assertions
This credential contains extended issuer information with membership assertions
```json=
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://w3id.org/trust-registry/v1"
],
"id": "urn:uuid:8f1c6f5394be48638e0e9a10371ac880",
"type": ["VerifiableCredential"],
"issuer": {
"id": "did:example:authorized-issuer",
"type": "AuthoritativeMember",
"governanceFramework": "https://example.gov/framework/5",
"trustRegistry": {
"id": "https://service.example.gov/trusted-issuers",
"type": "TrustRegistry2022"
}
},
"credentialSubject": {
"id": "did:example:holder",
"name": "Jane Doe"
},
"proof": {
"type": "Ed25519Signature2018",
"created": "2022-04-27T21:40:06Z",
"proofPurpose": "assertionMethod",
"proofValue": "qpy7HS8+tSl+r5OcAoXAT1UU...",
"verificationMethod": "did:example:authorized-issuer#key-1"
}
}
```
### Using Issuer Witness proof
Holders can add membership information about the issuer by disclosing the witness proof in their credential presentation.
```json
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://w3id.org/trust-registry/v1",
"https://w3id.org/universal-accumulator/v1"
],
"id": "urn:uuid:8f1c6f5394be48638e0e9a10371ac880",
"type": [
"VerifiableCredential"
],
"issuer": {
"id": "did:example:authorized-issuer",
"type": "AuthoritativeMember",
"governanceFramework": "https://example.gov/framework/5",
"trustRegistry": {
"id": "ethereum:0xb794f5ea0ba39494ce839613fffba74279579268",
"type": "UniversalAccumulator2022"
}
},
"credentialSubject": {
"id": "did:example:holder",
"name": "Jane Doe"
},
"proof": [
{
"type": "Ed25519Signature2018",
"created": "2022-04-27T21:40:06Z",
"proofPurpose": "assertionMethod",
"proofValue": "qpy7HS8+tSl+r5OcAoXAT1UU...",
"verificationMethod": "did:key:z5TcEWQEjkoFT..."
},
{
"type": "MembershipWitness",
"created": "2022-04-27T21:40:06Z",
"membershipEntry": "did:example:authorized-issuer",
"witnessValue": "K4fnp/s7rPSi7ZK5nHYAYKVH+5pilMZG...",
"accumulatorState": "qpy7HS8+tSl+r5OcAoXAT1UU...",
"verificationMethod": "did:key:z5TcEWQEjkoFT..."
}
]
}
```
### Using ZKP witness proof
Holder may choose to disclose proof of witness for privacy preserving use cases, if the registry type supports this
```json=
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1",
"https://w3id.org/trust-registry/v1",
"https://w3id.org/universal-accumulator/v1"
],
"id": "urn:uuid:8f1c6f5394be48638e0e9a10371ac880",
"type": [
"VerifiableCredential"
],
"issuer": {
"id": "did:example:authorized-issuer",
"type": "AuthoritativeMember",
"governanceFramework": "https://example.gov/framework/5",
"trustRegistry": {
"id": "ethereum:0xb794f5ea0ba39494ce839613fffba74279579268",
"type": "UniversalAccumulator2022"
}
},
"credentialSubject": {
"id": "did:example:holder",
"name": "Jane Doe"
},
"proof": [
{
"type": "Ed25519Signature2018",
"created": "2022-04-27T21:40:06Z",
"proofPurpose": "assertionMethod",
"proofValue": "qpy7HS8+tSl+r5OcAoXAT1UU...",
"verificationMethod": "did:key:z5TcEWQEjkoFT..."
},
{
"type": "MembershipProof",
"created": "2022-04-27T21:40:06Z",
"challenge": "K4fnp/s7rPSi7ZK5nHYAYKVH+5pilMZG...",
"proofValue": "qpy7HS8+tSl+r5OcAoXAT1UU...",
"verificationMethod": "did:key:z5TcEWQEjkoFT..."
}
]
}
```