Skip to main content

v2.0 to v4.0

Major changes from OA v2.0

This section briefly describes the changes from OpenAttestation (OA) v2.0 to v4.0. For more information and examples of these changes, refer to our guide on upgrading to v4.0.

Modified properties

The following properties that existed in OA v2.0 have been restructured or moved to newly named properties in v4.0 to comply with W3C Verifiable Credentials Data Model v2.0.

Credential Subject

Previously located at the root level of raw documents or nested under data (if already wrapped/signed), the claims about the subject of the credential are now always nested under credentialSubject.

Credential Status

Previously specified in issuers[i].revocation, the revocation type and location are now specified in credentialStatus and is now an optional property to be set if applicable.

Issuer

Instead of the original issuers array in OA v2.0, v4.0 uses the W3C issuer property containing similar data about the id, name, and identity proof of the document. To facilitate interoperability with other verifiers, there is now an added property issuer.type which in the case of OA v4.0 should always be set to OpenAttestationIssuer.

Render Method

Previously specified in $template, details about rendering the document are now specified in renderMethod.

New properties

The following are new properties that have been added in OA v4.0 to comply with W3C Verifiable Credentials Data Model v2.0:

The context property

Added in OA v4 to provide semantics of the terms used in the document via JSON-LD contexts. This property should be an array of URLs pointing to JSON-LD contexts.

In OA v4, the array must start with these two context URLs:

{
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://schemata.openattestation.com/com/openattestation/4.0/context.json"
]
}

The type property

Added in OA v4 to specify the JSON-LD context type of document. This property should be an array of strings for the expression of object type information.

In OA v4, the array must start with these 2 context types:

{
"type": ["VerifiableCredential", "OpenAttestationCredential"]
}

Status of OA v3.0

OpenAttestation v3.0 has been deprecated in favour of v4.0