How i create a Verifiable credential #875
-
Hi, when i create a credential like this: const credential = await agent.createVerifiableCredential({
credential: {
issuer: { id: 'did:web:my domain.com' },
'@context': ['https://www.w3.org/2018/credentials/v1'],
type: ['VerifiableCredential'],
issuanceDate: new Date().toISOString(),
credentialSubject: {
id: user.did,
tutorial: 42,
status: 'completed'
},
},
proofFormat: 'jwt',
save: true,
}); The when i need to find a credential, like this: const credentials1 = await agent.dataStoreORMGetVerifiableCredentialsByClaims({
where: [{ column: 'id', value: [did] }],
}); return the error: EntityColumnNotFound: No entity column "id" was found. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The If you want to search for a credential by ID, you should be able to use the |
Beta Was this translation helpful? Give feedback.
The
id
column is not encoded as one of the claims by which you can query using that method. https://github.com/uport-project/veramo/blob/934b34a18b194928f90e7797289cc6f2243789ec/packages/data-store/src/entities/claim.ts#L6If you want to search for a credential by ID, you should be able to use the
dataStoreORMGetVerifiableCredentials
method, with the parameters you specified