create_presentation_definition
Generate a DIF Presentation Exchange v2.0 definition to specify credential requirements, including input descriptors and field constraints, for secure and structured verification workflows.
Instructions
Create a DIF Presentation Exchange v2.0 definition for requesting specific credentials. Defines input descriptors and constraints for credential selection.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
id | Yes | ||
inputDescriptors | Yes | ||
name | No | ||
purpose | No |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {},
"properties": {
"id": {
"minLength": 1,
"type": "string"
},
"inputDescriptors": {
"items": {
"additionalProperties": false,
"description": "DIF PEX Input Descriptor",
"properties": {
"constraints": {
"additionalProperties": false,
"description": "DIF PEX Constraints",
"properties": {
"fields": {
"items": {
"additionalProperties": false,
"description": "DIF PEX Field constraint",
"properties": {
"filter": {
"additionalProperties": true,
"properties": {},
"type": "object"
},
"name": {
"type": "string"
},
"path": {
"items": {
"type": "string"
},
"minItems": 1,
"type": "array"
},
"predicate": {
"enum": [
"required",
"preferred"
],
"type": "string"
},
"purpose": {
"type": "string"
}
},
"required": [
"path"
],
"type": "object"
},
"type": "array"
},
"limit_disclosure": {
"enum": [
"required",
"preferred"
],
"type": "string"
},
"statuses": {
"additionalProperties": false,
"properties": {
"active": {
"additionalProperties": false,
"properties": {
"directive": {
"enum": [
"required",
"allowed",
"disallowed"
],
"type": "string"
}
},
"required": [
"directive"
],
"type": "object"
},
"revoked": {
"additionalProperties": false,
"properties": {
"directive": {
"enum": [
"required",
"allowed",
"disallowed"
],
"type": "string"
}
},
"required": [
"directive"
],
"type": "object"
},
"suspended": {
"additionalProperties": false,
"properties": {
"directive": {
"enum": [
"required",
"allowed",
"disallowed"
],
"type": "string"
}
},
"required": [
"directive"
],
"type": "object"
}
},
"type": "object"
}
},
"type": "object"
},
"id": {
"minLength": 1,
"type": "string"
},
"name": {
"type": "string"
},
"purpose": {
"type": "string"
},
"schema": {
"items": {
"additionalProperties": false,
"properties": {
"required": {
"type": "boolean"
},
"uri": {
"format": "uri",
"type": "string"
}
},
"required": [
"uri"
],
"type": "object"
},
"type": "array"
}
},
"required": [
"id"
],
"type": "object"
},
"minItems": 1,
"type": "array"
},
"name": {
"type": "string"
},
"purpose": {
"type": "string"
}
},
"required": [
"id",
"inputDescriptors"
],
"type": "object"
}