import { getVESSKit,getPkhDIDFromAddress } from 'vess-kit-node'
const provider:any // any ethereum provider that is already connected
const signer = provider.getSigner()
const isDev:boolean = true
const issuerAddress = "0x....."
const did = "did:pkh:eip155:1:0x......."
const subject = {
id: did,
...other props
}
const vess = getVESSKit()
// connect to ComposeDB
await vessKit.connect(
issuerAddress,
async (message) => {
const signed = await signer.signMessage(message)
return signed
},
!isDev ? 'mainnet' : 'testnet-clay',
)
const vcs = await vessKit.issueMembershipCredEIP712(
provider,
getPkhDIDFromAddress(issuerAddress),
[subject],
expirationDate,
)
provider: Web3Provider,
issuerDid: string,
credentialSubjects: CredentialSubjectProp[],
expirationDate?: string