Skip to main content

Create proof request

Creates a proof request which can then be shared with a wallet holder.

This endpoint is also used for the direct verification of physical credentials via the scanToVerify object. See the physical credentials guide for details.

Function

createProof(request: CreateProofRequest): Promise<ProofDetail["id"]>

Parameters

export interface CreateProofRequest {
proofSchemaId: string;
verifierDidId: string;
exchange: string;
redirectUri?: string;
verifierKey?: string;
scanToVerify?: ScanToVerifyRequest;
isoMdlEngagement?: string;
transport?: string[];
}

Fields

  • proofSchemaId - ID of the proof schema used to request the proof.

  • verifierDidId - ID of the DID to use in the request.

  • exchange - Exchange protocol used to request the proof.

  • redirectUri - When a shared proof is accepted, the holder will be redirected to the resource specified here.

  • verifierKey - If multiple keys are specified for the authentication method of the DID, use this value to specify which key should be used as the authentication method for this proof request. If a key isn't specified here, the first key listed during DID creation will be used.

  • scanToVerify - Only used for the direct verification of physical credentials using the Verifiable Credentials Barcodes v0.7 specification. See the physical credentials guide for details on decoding and decompressing scanned barcodes.

    • credential - Credential, as string.

    • barcode - Barcode data, as string.

    • barcodeType - MRZ (supported) or PDF417 (in development)

  • isoMdlEngagement - For proofs using ISO_MDL as the exchange protocol, pass the engagement QR code content from the holder's digital wallet here. Otherwise, do not pass a value.

  • transport - When multiple transport protocols are enabled, use this array to specify which transport protocol should be used.

Return value

The proof ID is returned as a string. This is the value used when requesting a proof. For verification of physical credentials via scanToVerify, the proof can be called directly for results.