Proofs
This API suite focuses on verifying proof of credentials.
Retrieve the list of presentations for proof requests
GET
/api/v1/proof/presentations
Retrieves the list of presentations for proof requests. This can be used to check the status or details of proofs.
Headers
Query param
the thid of the presentation to get
Response
{
"data": [
{
"recordId": "61faa8cb-7bc9-4c41-a0e5-7c10d81dd98f",
"thid": "87323d88-51ec-424f-882a-a1f2655888db",
"credentialFormat": "JWT",
"validityPeriod": 3600,
"claims": {
"uid": "12345",
"name": "Stable Diffusion SDXL"
},
"automaticIssuance": false,
"createdAt": "2024-10-03T15:28:01.776806Z",
"updatedAt": "2024-10-04T14:42:27.262001Z",
"role": "Issuer",
"protocolState": "RequestReceived",
"metaRetries": 5
}
]
}
Retrieve the first matching presentation
GET
/api/v1/proof/presentation/match/{claim_type}
Get the first presentation request (or proof) that matches a type (point of view of Holder)
Headers
params
a type of claim (e.g.: "identity")
Response
{
"data": [
{
"recordId": "61faa8cb-7bc9-4c41-a0e5-7c10d81dd98f",
"thid": "87323d88-51ec-424f-882a-a1f2655888db",
"credentialFormat": "JWT",
"validityPeriod": 3600,
"claims": {
"uid": "12345",
"name": "Stable Diffusion SDXL"
},
"automaticIssuance": false,
"createdAt": "2024-10-03T15:28:01.776806Z",
"updatedAt": "2024-10-04T14:42:27.262001Z",
"role": "Issuer",
"protocolState": "RequestReceived",
"metaRetries": 5
}
]
}
Create a VC presentation request
from verifier to holder
POST
/api/v1/proof/presentation
Headers
Body
the connectionId between verifier and prover (compulsory)
claim_type that verifier wants to ask for (holder will have to provide a record creds of same claim_type)
domain where this VC applies to (compulsory / point of view of verifier)
Response
{
"data": {
"presentationId": "ad0a1eba-b9bd-41f4-a9ee-2268343119ae",
"thid": "52120ed0-b919-460f-9b02-7dcaccaca2d5",
"role": "Verifier",
"status": "RequestPending",
"proofs": [],
"data": [],
"requestData": [
"{\n \"options\" : {\n \"challenge\" : \"Prove your identity\",\n \"domain\" : \"localhost:3022\"\n },\n \"presentation_definition\" : {\n \"id\" : \"893faa5c-fd61-4aff-818f-c888c509154c\",\n \"input_descriptors\" : [\n ],\n \"name\" : null,\n \"purpose\" : null,\n \"format\" : null\n }\n}"
],
"connectionId": "add6d381-1180-484c-bc40-178d362346c0",
"metaRetries": 5
}
}
Accept a presentation request
From holder
POST
/api/v1/proof/presentation/accept
Headers
Body
the id of the presentation from holder point of view (compulsory)
the recordId of the VC that the holder will provide as proof
Response
{
"data": {
"presentationId": "46a13394-be95-4868-983d-c96e2826511e",
"thid": "52120ed0-b919-460f-9b02-7dcaccaca2d5",
"role": "Prover",
"status": "PresentationPending",
"proofs": [],
"data": [],
"requestData": [
"{\n \"options\" : {\n \"domain\" : \"localhost:3022\",\n \"challenge\" : \"Prove your identity\"\n },\n \"presentation_definition\" : {\n \"format\" : null,\n \"name\" : null,\n \"purpose\" : null,\n \"id\" : \"893faa5c-fd61-4aff-818f-c888c509154c\",\n \"input_descriptors\" : [\n ]\n }\n}"
],
"metaRetries": 5
}
}
{
"error": "Invalid request"
}
Obtain the final Proof
point of view of Verifier
PATCH
/api/v1/proof/presentation/{id}
Headers
Body
the id of the presentation from verifier point of view (compulsory)
Response
{
"data": {
"presentationId": "ad0a1eba-b9bd-41f4-a9ee-2268343119ae",
"thid": "52120ed0-b919-460f-9b02-7dcaccaca2d5",
"role": "Verifier",
"status": "PresentationAccepted",
"proofs": [],
"data": [
"eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJpc3MiOiJkaWQ6cHJpc206Y2E2MDJmZjY1ZDgwMjFiYjRiNzdjYmNlNmRmNjkxN2UwYjA2MmQ3M2Y4YzVmYjdkMGQ2YzNjZGVkNTg3NGQ4ODpDbm9LZUJJNUNnVnJaWGt0TWhBRVNpNEtDWE5sWTNBeU5UWnJNUkloQXpyM2ItSkwwbzJCZl9CSWtOM0VNdHJ6OThEZTlaSE5WdU1xRHFBQ0oyZzRFanNLQjIxaGMzUmxjakFRQVVvdUNnbHpaV053TWpVMmF6RVNJUU52WUtxZVN5bWd1QjJQeEt0Um9UV2x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ifQ.B0OX2ncM2ilx7bv7lhkVV_qGXyHvsUzKnk_gKp9ChIYrzDjZG8cyHnQiyND0MNQ-x1jexf5LbDafSqhNueLwnw"
],
"requestData": [
"{\n \"options\" : {\n \"challenge\" : \"Prove your identity\",\n \"domain\" : \"localhost:3022\"\n },\n \"presentation_definition\" : {\n \"id\" : \"893faa5c-fd61-4aff-818f-c888c509154c\",\n \"input_descriptors\" : [\n ],\n \"name\" : null,\n \"purpose\" : null,\n \"format\" : null\n }\n}"
],
"connectionId": "add6d381-1180-484c-bc40-178d362346c0",
"metaRetries": 5
}
}
Request a Presentation, accept it, and issue a Proof
POST
/api/v1/proof/presentation/custodial
will do a full request + accept + issue proof (custodial mode)
Headers
Body
the connectionId between verifier and prover (compulsory)
apikey of peer 1 (verifier)
apikey of peer 2 (prover)
the claim type that the Credential must contain for a match (eg : "identity")
domain where this Credential applies
no duplicate of issuance of same type
to force the use of a specific credential in the proof (otherwise, first available is taken)
Response
{
"data": {
"wasPresented": true,
"wasAccepted": true,
"thid": "8f8dc48c-6730-4f9b-811d-984f54c50968",
"proof": "eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NksifQ.eyJpc3MiOiJkaWQ6cHJpc206Y2E2MDJmZjY1ZDgwMjFiYjRiNzdjYmNlNmRmNjkxN2UwYjA2MmQ3M2Y4YzVmYjdkMGQ2YzNjZGVkNTg3NGQ4ODpDbm9LZUJJNUNnVnJaWGt0TWhBRVNpNEtDWE5sWTNBeU5UWnJNUkloQXpyM2ItSkwwbzJCZl9CSWtOM0VNdHJ6OThEZTlaSE5WdU1xRHFBQ0oyZzRFanNLQjIxaGMzUmxjakFRQVVvdUNnbHpaV053TWpVMmF6RVNJUU52WUtxZVN5bWd1QjJQeEt0Um9UV2xxVXNPREFrck9xYWEwTVhjOVNnN2ZBIiwiYXVkIjoidGVzdC5jb20iLCJ2cCI6eyJ0eXBlIjpbIlZlcmlmaWFibGVQcmVzZW50YXRpb24iXSwiQGNvbnRleHQiOlsiaH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