credentials.read
scope must be set.
CredentialService
new CredentialService(retrievalProcedures
):CredentialService
Parameter | Type |
---|---|
retrievalProcedures | CredentialRetrievalProcedure [] |
CredentialService
CredentialServiceRaw.constructor
Property | Type | Inherited from | Defined in |
---|---|---|---|
retrievalProcedures | CredentialRetrievalProcedure [] | CredentialServiceRaw.retrievalProcedures | verifiableCredentialsSDK/presentation/getCredential.ts:45 |
getById(Retrieves a verifiable credential from Crossmint using its credential ID.credentialId
):Promise
<null
|VerifiableCredentialType
>
Parameter | Type | Description |
---|---|---|
credentialId | string | The ID of the credential to retrieve. |
Promise
<null
| VerifiableCredentialType
>
A promise that resolves to a VerifiableCredentialType
or null
if the credential is not found.
getCredential(Retrieves a Verifiable Credential from a given collection and token ID. This function finds the appropriate retrieval procedure based on the collection’s metadata and uses it to fetch the credential.collection
,tokenId
):Promise
<VerifiableCredentialType
>
Parameter | Type | Description |
---|---|---|
collection | CredentialsCollection | The CredentialsCollection containing the credential’s metadata. |
tokenId | string | The token ID of the credential to retrieve. |
Promise
<VerifiableCredentialType
>
A promise that resolves to a VerifiableCredentialType
.
CredentialServiceRaw.getCredential