From @JaceHensley:
Let's use a simpler example.
This is our PD, it is requesting a VC that has the property foo.bar.baz and it must be 42 or greater. Literally doesn't care about the schema or type of the VC, just wants one with foo.bar.baz of 42 or greater.
{
"id": "32f54163-7166-48f1-93d8-ff217bdb0653",
"input_descriptors": [
{
"id": "foobarbaz_input",
"schema": [{ "uri": "..." }],
"group": ["A"],
"constraints": {
"fields": [
{
"path": ["$.foo.bar.baz"],
"purpose": "Credential must have property foo.bar.baz and it's value must be greater than 42",
"filter": {
"type": "number",
"minimum": 42
}
}
]
}
}
]
}
The holder, if they are a good actor, will use the PD to filter their VCs to select a VC that satisfies the InputDescriptor. But if the holder is a bad actor they'd just submit whatever VC they want.
The PresentationSubmission would like this this:
{
"@context": ["https://www.w3.org/2018/credentials/v1", "https://identity.foundation/presentation-exchange/submission/v1"],
"type": ["VerifiablePresentation", "PresentationSubmission"],
"id": "...",
"presentation_submission": {
"id": "...",
"definition_id": "32f54163-7166-48f1-93d8-ff217bdb0653",
"descriptor_map": [
{
"id": "foobarbaz_input",
"format": "ldp_vc",
"path": "$.verifiableCredential[0]"
}
]
},
"verifiableCredential": [
{
"@context": ["https://www.w3.org/2018/credentials/v1", "..."],
"type": ["VerifiableCredential", "..."],
"credentialSubject": {
// ...
},
"foo": {
"bar": {
"baz": 42
}
},
"proof": {
// ...
}
}
],
"proof": {
// ...
}
}
The verifier would then want to run this PresentationSubmission (and thus it's VCs) against the PD to ensure that the holder did in fact submit a VC that satisfies the PD.
From @JaceHensley:
Let's use a simpler example.
This is our PD, it is requesting a VC that has the property foo.bar.baz and it must be 42 or greater. Literally doesn't care about the schema or type of the VC, just wants one with foo.bar.baz of 42 or greater.
{ "id": "32f54163-7166-48f1-93d8-ff217bdb0653", "input_descriptors": [ { "id": "foobarbaz_input", "schema": [{ "uri": "..." }], "group": ["A"], "constraints": { "fields": [ { "path": ["$.foo.bar.baz"], "purpose": "Credential must have property foo.bar.baz and it's value must be greater than 42", "filter": { "type": "number", "minimum": 42 } } ] } } ] }The holder, if they are a good actor, will use the PD to filter their VCs to select a VC that satisfies the InputDescriptor. But if the holder is a bad actor they'd just submit whatever VC they want.
The PresentationSubmission would like this this:
{ "@context": ["https://www.w3.org/2018/credentials/v1", "https://identity.foundation/presentation-exchange/submission/v1"], "type": ["VerifiablePresentation", "PresentationSubmission"], "id": "...", "presentation_submission": { "id": "...", "definition_id": "32f54163-7166-48f1-93d8-ff217bdb0653", "descriptor_map": [ { "id": "foobarbaz_input", "format": "ldp_vc", "path": "$.verifiableCredential[0]" } ] }, "verifiableCredential": [ { "@context": ["https://www.w3.org/2018/credentials/v1", "..."], "type": ["VerifiableCredential", "..."], "credentialSubject": { // ... }, "foo": { "bar": { "baz": 42 } }, "proof": { // ... } } ], "proof": { // ... } }The verifier would then want to run this PresentationSubmission (and thus it's VCs) against the PD to ensure that the holder did in fact submit a VC that satisfies the PD.