# Anoncreds Challenge
https://discord.com/channels/905194001349627914/905206466410057728/967072806460354571
@swcurran — Today at 07:42
I'm looking for some help with a "non-trivial" AnonCreds proof request.
- I'm a verifier and I can accept claims from any one of three different credentials, each based on a different schema.
- Holders will ever only have one of the three credentials
Challenge: Can I create a single AnonCreds proof request that any Holder with one of the credentials of interest can respond to with a valid proof?
Tried so far:
- one attribs with a names array of all claims from all creds and restrictions listing each credDefId (or'd).
- three attribs, one for each CredDef with names from the CredDef and restrictions for the CredDef
Any ideas?
## Testing Stack
For the test, the [Traction](https://github.com/bcgov/traction) project was used to manage the agent instances (issuer, holder and verifier). Traction is a multi-tenant aca-py manager and can be used to manage aca-py tenant instances as well as their connections, credentials and proof requests/proofs.
## Schemas
First Schema:
```
{
"attributes": [
"surname",
"birthdate_dateint",
"given_names"
],
"schema_name": "person_1",
"schema_version": "1.0.0"
}
```
Second Schema:
```
{
"attributes": [
"name",
"birth_dateint"
],
"schema_name": "person_2",
"schema_version": "1.0.0"
}
```
Third Schema:
```
{
"attributes": [
"given_name",
"date_of_birth",
"last_name"
],
"schema_name": "person_3",
"schema_version": "1.0.0"
}
```
## Anoncreds Proof Requests
First proof request:
```
{
"requested_attributes": {
"attr_1": {
"names": [
"given_names",
"surname",
"birthdate_dateint"
],
"restrictions": [
{
"cred_def_id": "1t5fB6RxgYtEMuMw2VTdP:3:CL:252221:default"
}
]
},
"attr_2": {
"names": [
"name",
"birth_dateint"
],
"restrictions": [
{
"cred_def_id": "1t5fB6RxgYtEMuMw2VTdP:3:CL:252219:default"
}
]
},
"attr_3": {
"names": [
"given_name",
"last_name",
"date_of_birth"
],
"restrictions": [
{
"cred_def_id": "1t5fB6RxgYtEMuMw2VTdP:3:CL:252216:default"
}
]
}
},
"requested_predicates": {}
}
```
Second proof request:
```
{
"requested_attributes": {
"attr_1": {
"names": [
"given_names",
"surname",
"birthdate_dateint",
"name",
"birth_dateint",
"given_name",
"last_name",
"date_of_birth"
],
"restrictions": [
{
"cred_def_id": "1t5fB6RxgYtEMuMw2VTdP:3:CL:252221:default"
},
{
"cred_def_id": "1t5fB6RxgYtEMuMw2VTdP:3:CL:252219:default"
},
{
"cred_def_id": "1t5fB6RxgYtEMuMw2VTdP:3:CL:252216:default"
}
]
}
}
}
```
## Additional Testing
Aca-py does some pre-validations when verifying proofs - for example checking if revocation intervals supplied in the proof match those requested in the proof request - to ensure that these don't affect the tests, a custom aca-py image was built using the following aca-py branch:
https://github.com/ianco/aries-cloudagent-python/tree/proof-req-testing
The image was built using the BC Gov repo: https://github.com/bcgov/aries-cloudagent-container.git
Additional proof requests to try:
```
{
"requested_attributes": {
"attr_1": {
"names": [
"given_names",
"surname",
"birthdate_dateint",
"name",
"birth_dateint",
"given_name",
"last_name",
"date_of_birth"
],
"restrictions": [
{
"cred_def_id": "1t5fB6RxgYtEMuMw2VTdP:3:CL:252221:default",
"cred_def_id": "1t5fB6RxgYtEMuMw2VTdP:3:CL:252219:default",
"cred_def_id": "1t5fB6RxgYtEMuMw2VTdP:3:CL:252216:default"
}
]
}
}
}
```
```
{
"requested_attributes": {
"attr_1": {
"names": [
"given_names",
"surname",
"birthdate_dateint",
"name",
"birth_dateint",
"given_name",
"last_name",
"date_of_birth"
],
"restrictions": [
{
"cred_def_id": "1t5fB6RxgYtEMuMw2VTdP:3:CL:252221:default"
}
]
}
}
}
```