Credential Verification
Proof requests enable the initiation and management of credential verification processes across multiple ecosystems (OpenID, Privado ID, Indicio, Cheqd). These methods allow you to send proof requests, retrieve a list of requests, and fetch details of a specific request. This section covers methods to send, list, and retrieve proof requests.
Send Proof Request
Sends a proof request to a connection or tenant for credential verification.
import { OpenIDEcosystem } from '@openid/core-sdk';
const openid = new OpenIDEcosystem({
  apiKey: 'your-ecosystem-api-key',
});
const result = await openid.sendProofRequest({
  tenantId: 'your-tenant-id',
  verificationTemplateId: 'your-verification-template-id',
  connectionId: 'your-connection-id',
});
Params
| Parameter | Type | Description | 
|---|---|---|
| tenantId | string (Required) | The ID of the tenant initiating the request. | 
| verificationTemplateId | string (Required) | The ID of the verification template to use. | 
| comment | string (Optional) | A comment or message for the request. | 
| connectionId | string (Optional) | The ID of the connection to send the request to (if omitted, the request is broadcast). | 
note
- If 
connectionIdis omitted, the request is sent to all connections associated with the tenant. - Ensure the 
verificationTemplateIdcorresponds to a valid template. 
Get All Proof Requests
Retrieves a list of proof requests associated with a tenant, with an optional filter by state.
import { OpenIDEcosystem } from '@openid/core-sdk';
const openid = new OpenIDEcosystem({
  apiKey: 'your-ecosystem-api-key',
});
const requests = await openid.getAllProofRequests({
  tenantId: 'your-tenant-id',
});
Params
| Parameter | Type | Description | 
|---|---|---|
| tenantId | string (Required) | The ID of the tenant to query. | 
| state | string (Optional) | The state of the proof requests to filter by (e.g., `pending`, `completed`; if omitted, returns all states). | 
note
- Use the 
statefilter to narrow down requests (e.g.,pending,completed,rejected). - Check 
GetProofRequestsResponsefor the full structure of returned objects. 
Get Proof Request by ID
Retrieves details of a specific proof request by its ID.
import { OpenIDEcosystem } from '@openid/core-sdk';
const openid = new OpenIDEcosystem({
  apiKey: 'your-ecosystem-api-key',
});
const request = await openid.getProofRequestById({
  tenantId: 'your-tenant-id',
  proofExchangeId: 'proof-456',
});
Params
| Parameter | Type | Description | 
|---|---|---|
| tenantId | string (Required) | The ID of the tenant owning the request. | 
| proofExchangeId | string (Required) | The ID of the proof request to retrieve. | 
note
- Use this to check the status or results of a specific proof request.
 - Ensure the 
proofExchangeIdis valid and associated with the tenant.