# createVSCredential()

### How to use?

```typescript
import { getVESSKit,getPkhDIDFromAddress } from 'vess-kit-node'
          
const vc = {
  id: "urn:...........",
  type: ["Verifiable Credential"],
  issuer: {
    id: "did:pkh:eip155:1:0x......."
  },
  credentialSubject: {
    id: "did:pkh:eip155:1:0x......."
    ...other props
  },
  issuanceDate: "2024-10-12",
  expirationDate: "2124-10-12",
  ...other props
  } // EIP712 verifiable credential
          
// connect to ComposeDB
const provider:any // any ethereum provider that is already connected
const signer = provider.getSigner()
const isDev:boolean = true
const issuerAddress = "0x....."

const vess = getVESSKit()
await vessKit.connect(
          issuerAddress,
        async (message) => {
          const signed = await signer.signMessage(message)
          return signed
        },
        !isDev ? 'mainnet' : 'testnet-clay',
      )
const payload = await vessKit.createVSCredential({
      content: {
        plainCreds: JSON.stringify(vc),
        issuerDid: vc.issuer.id,
        holderDid: vc.credentialSubject.id,
        issuanceDate: vc.issuanceDate,
        expirationDate: expirationDate,
        type: vc.type,
      },
    })
```

### Parameters

```typescript
input: CreateVsVerifiableCredentialInput
```

### Return

Promise\<CreateVsVerifiableCredentialPayload>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.vess.id/vess-sdk/api-documentation/v2/create/createvscredential.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
