---
# System prepended metadata

title: VCDM Docs

---

# VCDM Docs
## TODO:
- how should we refer to the sdk? `client-sdk` doesn't sound very appealing, maybe we want to give it a name?

## Example sections
- [VCDM intro](#)
- [Incremental creation and verification of VC](#)
- [Incremental creation and verification of VP](#)
- [DID integration](#)

## Example tests to cover
- Issuing should return an object with a proof, and it must pass validation.
- The sample signed credential should pass verification.
- A proper verifiable presentation should be created from two valid sample credentials.
- A verifiable presentation should contain a proof once signed, and it should pass verification.
- VC creation with only id should be possible, yet bring default values
- VC creation with an object context should be possible
- JSON representation of a VC should bring the proper keys
- Incremental VC creation should be possible
- Incremental VC creations runs basic validation
- Issuing an incrementally-created VC should return an object with a proof, and it must pass validation.
- VP creation with only id should be possible, yet bring default values
- VP creation with an object context should be possible
- The JSON representation of a VP should bring the proper keys
- Incremental VP creation should be possible
- Incremental VP creations runs basic validation
- Incremental VP creation from external VCs should be possible
- Issuing an incrementally-created VP from an incrementally created VC should return an object with a proof, and it must pass validation.

--------

# Verifiable Credentials
*(TODO: this was 99% taken from the vcdm spec. Do we need more than this intro?)*

Credentials are a part of our daily lives: driver's licenses are used to assert that we are capable of operating a motor vehicle, university degrees can be used to assert our level of education, and government-issued passports enable us to travel between countries. These credentials provide benefits to us when used in the physical world, but their use on the Web continues to be elusive.

Currently it is difficult to express education qualifications, healthcare data, financial account details, and other sorts of third-party verified machine-readable personal information on the Web. The difficulty of expressing digital credentials on the Web makes it challenging to receive the same benefits through the Web that physical credentials provide us in the physical world.

The [VCDM specification](https://www.w3.org/TR/vc-data-model/) specification provides a standard way to express credentials on the Web in a way that is cryptographically secure, privacy respecting, and machine-verifiable.


## Incremental creation and verification of VC
The `client-sdk` exposes a `VerifiableCredential` class that is useful to incrementally create valid Verifiable Credentials of any tipe, sign them and verify them. Its constructor takes a `credentialId` as sole argument to initialize the credential. Once the credential is initialized, you can sequentially call the different methods provided by the class to add contexts, types, issuance dates and everything else.

### Building functions
#### addContext(context)
addType(type)
addSubject(subject)
setStatus(status)
setIssuanceDate(issuanceDate)
setExpirationDate(expirationDate)
toJSON()
async sign(keyDoc, compactProof = true)
async verify(resolver, compactProof = true, forceRevocationCheck = true, revocationAPI)


## Incremental creation and verification of VP
The `client-sdk`


## Issuing a ready VC
The `client-sdk` allows 

## Verifying a ready VC
The `client-sdk`

## Issuing a ready VP
The `client-sdk`

## Verifying a ready VP
The `client-sdk`

## DID integration
The `client-sdk`
