---
# System prepended metadata

title: Self Issued VC Creation

---

# Self Issued VC Creation


context: generating VC from user input

so, after taking the user provided input and placing that input into appropriate locations using JSON Path , I have either this:

```json=
{
  "credentialSubject": {
    "givenName": "Randy",
    "familyName": "McJanky",
    "birthDate": "1988-03-28",
    "postalAddress": {
      "addressCountry": "USA",
      "addressLocality": "Austin",
      "addressRegion": "TX",
      "postalCode": "78724",
      "streetAddress": "123 Janktopia Ave."
    },
    "taxID": "123-45-6789"
  }
}
```

OR this:

```json=
{
  "vc": {
    "credentialSubject": {
      "givenName": "Randy",
      "familyName": "McJanky",
      "birthDate": "1988-03-28",
      "postalAddress": {
        "addressCountry": "USA",
        "addressLocality": "Austin",
        "addressRegion": "TX",
        "postalCode": "78724",
        "streetAddress": "123 Janktopia Ave."
      },
      "taxID": "123-45-6789"
    }
  }
}
```

so basically, `vc` or not.

Below are the properties i may or may not need to add:
| Property               | Value                                                      |
| ---------------------- |:---------------------------------------------------------- |
| `@context`             | only and always `"https://www.w3.org/2018/credentials/v1"` |
| `type`                 | `VerifiableCredential`                                     |
| `issuer`               | DID of subject                                             |
| `issuanceDate`         | always included. `Date.now()` as ISO8601                   | 
| `credentialSubject.id` | DID of subject                                             |


:warning: :warning: :warning: 
**QUESTION** Generally speaking, how am i to know where to put any of these fields. To `vc` or not to `vc`? I guess i can naively check for the existence of `vc`. if present, just assume to jam all of it into `vc` 
:warning: :warning: :warning:




# Credential Application Creation
```json=
{
  id: "uuidv4",
  spec_version: "get from cm.spec_version",
  manifest_id: "get from cm.id",
  format: "decided by wallet but limited to cm.format?",
  credential_application: {
    presentation_submission: {
      id: "uuidv4",
      definition_id: "get from cm.presentation_definition.id",
      descriptor_map: [{
        id: "get id from result of processCredentials",
        format: "select from cm.format OR cm.presentation_definition.format",
        path: "deduce "
      }]
    }
  },
  verifiableCredentials: ["generate"]
}
```
