# Issue Credential v2.1 - issue multiple credentials of same type ### Challenges - `credential_preview` & ~~`credentialSubject`~~ - single `V20CredExRecord` - multiple `cred_request` and `cred_issue` messages ### From RFC ![](https://i.imgur.com/AYRSpsq.png) ![](https://i.imgur.com/qShl7kQ.png) ![](https://i.imgur.com/qbE2ZF6.png) ## Changes proposed - add `issue_multiple` to `cred_request` message - ~~Add `multiple_credentials` bool property and `attach_ids_handled` sequence property to `V20CredExRecord`. Issuer uses `attach_id` to track which credentials are left for issuance. Holder uses this when storing credential. Optionally, holder can also use `attach_id` to send subsequent `cred_request` [in the sequence] with updated `cred_preview`.~~ - For indy credentials or when Holder doesn't initiate from request, exchange of multiple`cred_issue` & `cred_request` messages is not necessary ### Indy ``` "formats": [ { "attach_id": "indy#0", "format": "hlindy/cred-abstract@v2.0" }, { "attach_id": "indy#1", "format": "hlindy/cred-abstract@v2.0" } ], "multiple_available": true, "credential_preview": { "@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/issue-credential/2.0/credential-preview", "attributes": { "indy#0": [ { "name": "testA", "value": "testA" } ], "indy#1": [ { "name": "testB", "value": "testB" } ] } } ``` ### W3C ``` Not valid - as W3C credentials are missing cred_preview "formats": [ { "attach_id": "ld_proof#0", "format": "aries/ld-proof-vc-detail@v1.0" }, { "attach_id": "ld_proof#1", "format": "aries/ld-proof-vc-detail@v1.0" } ], "multiple_available": true, "filter": { "ld_proof": { "credential": { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://w3id.org/citizenship/v1", "https://w3id.org/security/bbs/v1", ], "type": [ "VerifiableCredential", "PermanentResident", ], "id": "https://credential.example.com/residents/1234567890", "issuer": self.did, "issuanceDate": "2020-01-01T12:00:00Z", "credentialSubject": { "ld_proof#0": { "type": [ "PermanentResident" ], "givenName": "ALICE", "familyName": "SMITH", "gender": "Female", "birthCountry": "Bahamas", "birthDate": "1958-07-17" }, "ld_proof#1": { "type": [ "PermanentResident" ], "givenName": "BOB", "familyName": "SMITH", "gender": "Male", "birthCountry": "Bahamas", "birthDate": "1968-07-17" } }, }, "options": { "proofType": SIG_TYPE_BLS }, } } ```