Last active
February 15, 2022 19:20
-
-
Save brianorwhatever/96cef7458056d08af3a6f2a2c3acc676 to your computer and use it in GitHub Desktop.
ACA-Py /present-proof-2.0/create-request JSON Schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "object", | |
"required": ["presentation_request"], | |
"properties": { | |
"trace": { | |
"type": "boolean", | |
"example": false, | |
"title": "Whether to trace event (default false)" | |
}, | |
"comment": { | |
"type": "string", | |
"title": "Comment" | |
}, | |
"presentation_request": { | |
"type": "object", | |
"title": "Presentation Request Object", | |
"properties": { | |
"indy": { | |
"type": "object", | |
"title": "Presentation Request for Indy", | |
"properties": { | |
"name": { | |
"type": "string", | |
"example": "Proof of Education", | |
"title": "Name of the Proof" | |
}, | |
"version": { | |
"type": "string", | |
"example": "1.0", | |
"title": "Proof Version Number" | |
}, | |
"non_revoked": { | |
"type": "object", | |
"x-nullable": true | |
}, | |
"nonce": { | |
"type": "string", | |
"example": "1", | |
"description": "Nonce", | |
"pattern": "^[1-9][0-9]*$" | |
}, | |
"requested_attributes": { | |
"type": "object", | |
"title": "Attributes Being Requested", | |
"patternProperties": { | |
"^[A-Za-z_][A-Za-z0-9_]*$": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string", | |
"example": "name", | |
"title": "Property Name" | |
}, | |
"restrictions": { | |
"type": "array", | |
"title": "Restrictions on the attribute", | |
"items": { | |
"type": "object", | |
"properties": { | |
"schema_name": { | |
"type": "string", | |
"example": "degree schema", | |
"title": "Schema Name" | |
} | |
} | |
} | |
}, | |
"p_type": { | |
"type": "string", | |
"example": "<=", | |
"title": "Predicate Type" | |
}, | |
"p_value": { | |
"type": "number", | |
"example": 604139696, | |
"title": "Predicate Value" | |
}, | |
"non_revoked": { | |
"type": "object", | |
"properties": { | |
"from": { | |
"type": "number", | |
"example": 1644447000 | |
}, | |
"to": { | |
"type": "number", | |
"example": 1644447883 | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"requested_predicated": { | |
"type": "object", | |
"description": "Requested predicate specifications of proof request", | |
"patternProperties": { | |
"^[A-Za-z_][A-Za-z0-9_]*$": { | |
"type": "object", | |
"required": ["name", "p_type", "p_value"], | |
"properties": { | |
"name": { | |
"type": "string", | |
"example": "index", | |
"description": "Attribute name" | |
}, | |
"non_revoked": { | |
"type": "object", | |
"x-nullable": true | |
}, | |
"p_type": { | |
"type": "string", | |
"example": ">=", | |
"description": "Predicate type ('<', '<=', '>=', or '>')", | |
"enum": ["<", "<=", ">=", ">"] | |
}, | |
"p_value": { | |
"type": "integer", | |
"description": "Threshold value" | |
}, | |
"restrictions": { | |
"type": "array", | |
"description": "If present, credential must satisfy one of given restrictions: specify schema_id, schema_issuer_did, schema_name, schema_version, issuer_did, cred_def_id, and/or attr::<attribute-name>::value where <attribute-name> represents a credential attribute name", | |
"items": { | |
"type": "object", | |
"additionalProperties": { | |
"type": "string", | |
"example": "WgWxqztrNooG92RXvxSTWv:3:CL:20:tag" | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
}, | |
"dif": { | |
"type": "object", | |
"title": "Presentation request for DIF", | |
"required": ["presentation_definition"], | |
"properties": { | |
"options": { | |
"type": "object", | |
"properties": { | |
"challenge": { | |
"type": "string", | |
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", | |
"description": "Challenge protect against replay attack", | |
"pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}" | |
}, | |
"domain": { | |
"type": "string", | |
"example": "4jt78h47fh47", | |
"description": "Domain protect against replay attack" | |
} | |
} | |
}, | |
"presentation_definition": { | |
"type": "object", | |
"properties": { | |
"format": { | |
"type": "object", | |
"properties": { | |
"jwt": { | |
"type": "object", | |
"properties": {} | |
}, | |
"jwt_vc": { | |
"type": "object", | |
"properties": {} | |
}, | |
"jwt_vp": { | |
"type": "object", | |
"properties": {} | |
}, | |
"ldp": { | |
"type": "object", | |
"properties": {} | |
}, | |
"ldp_vc": { | |
"type": "object", | |
"properties": {} | |
}, | |
"ldp_vp": { | |
"type": "object", | |
"properties": {} | |
} | |
} | |
}, | |
"id": { | |
"type": "string", | |
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", | |
"description": "Unique Resource Identifier", | |
"pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}" | |
}, | |
"input_descriptors": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"constraints": { | |
"type": "object", | |
"properties": { | |
"fields": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"filter": { | |
"type": "object", | |
"properties": { | |
"const": { | |
"description": "Const" | |
}, | |
"enum": { | |
"type": "array", | |
"items": { | |
"description": "Enum" | |
} | |
}, | |
"exclusiveMaximum": { | |
"description": "ExclusiveMaximum" | |
}, | |
"exclusiveMinimum": { | |
"description": "ExclusiveMinimum" | |
}, | |
"format": { | |
"type": "string", | |
"description": "Format" | |
}, | |
"maxLength": { | |
"type": "integer", | |
"example": 1234, | |
"description": "Max Length" | |
}, | |
"maximum": { | |
"description": "Maximum" | |
}, | |
"minLength": { | |
"type": "integer", | |
"example": 1234, | |
"description": "Min Length" | |
}, | |
"minimum": { | |
"description": "Minimum" | |
}, | |
"not": { | |
"type": "boolean", | |
"example": false, | |
"description": "Not" | |
}, | |
"pattern": { | |
"type": "string", | |
"description": "Pattern" | |
}, | |
"type": { | |
"type": "string", | |
"description": "Type" | |
} | |
} | |
}, | |
"id": { | |
"type": "string", | |
"description": "ID" | |
}, | |
"path": { | |
"type": "array", | |
"items": { | |
"type": "string", | |
"description": "Path" | |
} | |
}, | |
"predicate": { | |
"type": "string", | |
"description": "Preference", | |
"enum": ["required", "preferred"] | |
}, | |
"purpose": { | |
"type": "string", | |
"description": "Purpose" | |
} | |
} | |
} | |
}, | |
"is_holder": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"directive": { | |
"type": "string", | |
"description": "Preference", | |
"enum": ["required", "preferred"] | |
}, | |
"field_id": { | |
"type": "array", | |
"items": { | |
"type": "string", | |
"example": "3fa85f64-5717-4562-b3fc-2c963f66afa6", | |
"description": "FieldID", | |
"pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}" | |
} | |
} | |
} | |
} | |
}, | |
"limit_disclosure": { | |
"type": "string", | |
"description": "LimitDisclosure" | |
}, | |
"status_active": { | |
"type": "string", | |
"enum": ["required", "allowed", "disallowed"] | |
}, | |
"status_revoked": { | |
"type": "string", | |
"enum": ["required", "allowed", "disallowed"] | |
}, | |
"status_suspended": { | |
"type": "string", | |
"enum": ["required", "allowed", "disallowed"] | |
}, | |
"subject_is_issuer": { | |
"type": "string", | |
"description": "SubjectIsIssuer", | |
"enum": ["required", "preferred"] | |
} | |
} | |
}, | |
"group": { | |
"type": "array", | |
"items": { | |
"type": "string", | |
"description": "Group" | |
} | |
}, | |
"id": { | |
"type": "string", | |
"description": "ID" | |
}, | |
"metadata": { | |
"type": "object", | |
"description": "Metadata dictionary", | |
"properties": {} | |
}, | |
"name": { | |
"type": "string", | |
"description": "Name" | |
}, | |
"purpose": { | |
"type": "string", | |
"description": "Purpose" | |
} | |
} | |
} | |
}, | |
"name": { | |
"type": "string", | |
"description": "Human-friendly name that describes what the presentation definition pertains to" | |
}, | |
"purpose": { | |
"type": "string", | |
"description": "Describes the purpose for which the Presentation Definition's inputs are being requested" | |
}, | |
"submission_requirements": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"count": { | |
"type": "integer", | |
"example": 1234, | |
"description": "Count Value" | |
}, | |
"from": { | |
"type": "string", | |
"description": "From" | |
}, | |
"from_nested": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"count": { | |
"type": "integer", | |
"example": 1234, | |
"description": "Count Value" | |
}, | |
"from": { | |
"type": "string", | |
"description": "From" | |
}, | |
"from_nested": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"additionalProperties": true | |
} | |
}, | |
"max": { | |
"type": "integer", | |
"example": 1234, | |
"description": "Max Value" | |
}, | |
"min": { | |
"type": "integer", | |
"example": 1234, | |
"description": "Min Value" | |
}, | |
"name": { | |
"type": "string", | |
"description": "Name" | |
}, | |
"purpose": { | |
"type": "string", | |
"description": "Purpose" | |
}, | |
"rule": { | |
"type": "string", | |
"description": "Selection", | |
"enum": ["all", "pick"] | |
} | |
} | |
} | |
}, | |
"max": { | |
"type": "integer", | |
"example": 1234, | |
"description": "Max Value" | |
}, | |
"min": { | |
"type": "integer", | |
"example": 1234, | |
"description": "Min Value" | |
}, | |
"name": { | |
"type": "string", | |
"description": "Name" | |
}, | |
"purpose": { | |
"type": "string", | |
"description": "Purpose" | |
}, | |
"rule": { | |
"type": "string", | |
"description": "Selection", | |
"enum": ["all", "pick"] | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment