Skip to main content

List proof requests

Returns a list of proof requests. Use the optional parameters to filter and sort.

Function

getProofs(proofId: ProofListQuery): Promise<ItemList<ProofListItem>>

Parameters

export interface ProofListQuery extends ListQuery {
sort?: SortableProofColumnEnum;
sortDirection?: SortDirection;
name?: string;
ids?: string[];
proofStates?: ProofStateEnum[];
proofSchemaIds?: string[];
exact?: ExactProofFilterColumnEnum[];
}
export interface ListQuery {
page: number;
pageSize: number;
organisationId: string;
}

Fields

  • page - Returns a specific page of the results. The first page is 0.

  • pageSize - Specify how many items appear on each page.

  • organisationId - Value from create organization.

  • sorting - If no sorting values are provided, CREATED_DATE + DESCENDING are used. If a value is passed for sort, the default direction becomes ASCENDING.

    • sort - Sort by certain values in the response body.

      • [CREATED_DATE, SCHEMA_NAME, ISSUER_DID, STATE]
    • sortDirection - Default value = DESCENDING.

      • [ASCENDING, DESCENDING]
  • name - Return proof requests whose name starts with this string. Not case-sensitive.

  • exact - Set which filters apply in an exact way.

    • [NAME]
  • ids - Specify proof requests to be returned by their UUID.
  • proofStates - Return only proof requests with the specified state representation in the system.

  • proofSchemaIds - Return only the proof requests associated with the specified proof schema UUIDs.

Return value

export interface ItemList<Item> {
totalItems: number;
totalPages: number;
values: Item[];
}
export interface ProofListItem {
id: string;
createdDate: string;
lastModified: string;
issuanceDate: string;
requestedDate?: string;
completedDate?: string;
verifierDid?: string;
exchange: string;
transport: string;
state: ProofStateEnum;
schema: ProofSchemaListItem;
}

Fields

  • issuanceDate - When proof request was shared with holder.

  • requestedDate - When proof request state changed from PENDING to REQUESTED. Not supported in all exchange protocols.

  • completedDate - When holder submitted valid proof.

  • verifierDid - DID of the verifier making the request.

  • exchange - Exchange protocol used to make the request.

  • transport - Transport protocol used to transmit proof request.

  • schema - Credential schema being used to issue the credential. This includes the layout properties of the credential, detailing how the credential should be displayed in the wallet.

  • state - See the proof request states guide.

    • [CREATED, PENDING, REQUESTED, ACCEPTED, REJECTED, ERROR]