## Aries RFC [features/0453-issue-credential-v2](https://github.com/hyperledger/aries-rfcs/tree/master/features/0453-issue-credential-v2)
**Notes:**
- for more details about `~thread` refer to Aries RFC [concepts/0008](https://github.com/hyperledger/aries-rfcs/tree/master/concepts/0008-message-id-and-threading)
- for more details about `credentialStatus` refer to [W3C spec](https://w3c-ccg.github.io/vc-status-rl-2020/) and [digitalbazaar's GitHub repo](https://github.com/digitalbazaar/vc-revocation-list)
### ["propose-credential"](https://github.com/hyperledger/aries-rfcs/tree/master/features/0453-issue-credential-v2#propose-credential) message
#### Example
```
{
"@id" : "574647f0-bc91-431a-a957-7cb73eb36c72",
"@type" : "https://didcomm.org/issue-credential/2.0/propose-credential",
"filter~attach" : [
{
"@id" : "948641ca-9971-4d44-ac8c-89bc0f918746",
"mime-type" : "application/json",
"data" : {
"base64" : "eyJpc3N1ZXIiOiJkaWQ6ZXRocjpzcGhlcml0eTp0ZXN0bmV0OjB4NWZjMGRlZWZjZTUzOTUxMTk2NDU3MTM2OGMzNTg2ZjlkOTU2ZGM5ZSIsImNyZWRlbnRpYWwiOnsiZ3RpbiI6IjEyMyJ9fQ==",
"json" : {
"issuer" : "did:ethr:spherity:testnet:0x5fc0deefce539511964571368c3586f9d956dc9e",
"credential" : {
"gtin" : "123"
}
},
"sha256" : "3f78f69a153a5999306d9bbb159aea752b4a33da0abbb888ac607d99bd427dfa"
}
}
],
"formats" : [
{
"attach_id" : "948641ca-9971-4d44-ac8c-89bc0f918746",
"format" : "dif/credential-manifest@v1.0"
}
],
"~thread" : {
"thid" : "574647f0-bc91-431a-a957-7cb73eb36c72",
"sender_order" : 0
}
}
```
### ["offer-credential"](https://github.com/hyperledger/aries-rfcs/tree/master/features/0453-issue-credential-v2#offer-credential) message
#### Example
```
{
"@id" : "1b8fa620-e1f1-4682-a632-844539e44ad3",
"@type" : "https://didcomm.org/issue-credential/2.0/offer-credential",
"offers~attach" : [
{
"@id" : "3dbae753-b087-4123-9792-8bc1686f51e6",
"mime-type" : "application/json",
"data" : {
"base64" : "eyJjcmVkZW50aWFsX21hbmlmZXN0Ijp7Imlzc3VlciI6ImRpZDpldGhyOnNwaGVyaXR5OnRlc3RuZXQ6MHg1ZmMwZGVlZmNlNTM5NTExOTY0NTcxMzY4YzM1ODZmOWQ5NTZkYzllIiwiY3JlZGVudGlhbCI6eyJndGluIjoiMTIzIn19fQ==",
"json" : {
"credential_manifest" : {
"issuer" : "did:ethr:spherity:testnet:0x5fc0deefce539511964571368c3586f9d956dc9e",
"credential" : {
"gtin" : "123"
}
}
},
"sha256" : "a51aa76a70184062bcdc84fb1a628c8b7d5314169330f78c21cb994a09a5489c"
}
}
],
"formats" : [
{
"attach_id" : "3dbae753-b087-4123-9792-8bc1686f51e6",
"format" : "dif/credential-manifest@v1.0"
}
],
"credential_preview" : {
"attributes" : [
{
"name" : "gtin",
"value" : "123",
"mime-type" : "text/plain"
}
],
"@type" : "https://didcomm.org/issue-credential/2.0/credential-preview"
},
"~thread" : {
"thid" : "574647f0-bc91-431a-a957-7cb73eb36c72",
"sender_order" : 0,
"received_orders" : {
"did:ethr:spherity:testnet:0x9d6530e0758341459c6a1ad447fc17e71fcabe9a" : 0
}
}
}
```
### ["request-credential"](https://github.com/hyperledger/aries-rfcs/tree/master/features/0453-issue-credential-v2#request-credential) message
#### Example
```
{
"@id" : "6ca51326-d1bc-4880-b94e-2ce51646275a",
"@type" : "https://didcomm.org/issue-credential/2.0/request-credential",
"requests~attach" : [
{
"@id" : "7c9f24ab-04ab-4c68-a658-8ab0b8e09ddb",
"mime-type" : "application/json",
"data" : {
"base64" : "eyJjcmVkZW50aWFsX21hbmlmZXN0Ijp7Imlzc3VlciI6ImRpZDpldGhyOnNwaGVyaXR5OnRlc3RuZXQ6MHg1ZmMwZGVlZmNlNTM5NTExOTY0NTcxMzY4YzM1ODZmOWQ5NTZkYzllIiwiY3JlZGVudGlhbCI6eyJndGluIjoiMTIzIn19fQ==",
"json" : {
"credential_manifest" : {
"issuer" : "did:ethr:spherity:testnet:0x5fc0deefce539511964571368c3586f9d956dc9e",
"credential" : {
"gtin" : "123"
}
}
},
"sha256" : "a51aa76a70184062bcdc84fb1a628c8b7d5314169330f78c21cb994a09a5489c"
}
}
],
"formats" : [
{
"attach_id" : "7c9f24ab-04ab-4c68-a658-8ab0b8e09ddb",
"format" : "dif/credential-manifest@v1.0"
}
],
"~thread" : {
"thid" : "574647f0-bc91-431a-a957-7cb73eb36c72",
"sender_order" : 1,
"received_orders" : {
"did:ethr:spherity:testnet:0x5fc0deefce539511964571368c3586f9d956dc9e" : 0
}
}
}
```
### ["issue-credential"](https://github.com/hyperledger/aries-rfcs/tree/master/features/0453-issue-credential-v2#issue-credential) message with JSON-LD based VC
#### Example
```
{
"@id" : "ae1dfedc-36d5-4425-8563-91c6a74bb7db",
"@type" : "https://didcomm.org/issue-credential/2.0/issue-credential",
"credentials~attach" : [
{
"@id" : "f670d260-0e8f-46bb-b396-a552824061e2",
"mime-type" : "application/json",
"data" : {
"base64" : "eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVDcmVkZW50aWFsIl0sImlkIjoiZGlkOmV0aHI6c3BoZXJpdHk6dGVzdG5ldDoweDJhZjI1NzQ4N2YwYTY3M2UyZTQ1NmJmYTdhNTFhMjQ5ZDIxYmM3YzAiLCJpc3N1ZXIiOiJkaWQ6ZXRocjpzcGhlcml0eTp0ZXN0bmV0OjB4NWZjMGRlZWZjZTUzOTUxMTk2NDU3MTM2OGMzNTg2ZjlkOTU2ZGM5ZSIsImlzc3VhbmNlRGF0ZSI6IjIwMjAtMTEtMjhUMjI6MDY6MTUuNzE1WiIsImNyZWRlbnRpYWxTdWJqZWN0Ijp7Imd0aW4iOiIxMjMiLCJpZCI6ImRpZDpldGhyOnNwaGVyaXR5OnRlc3RuZXQ6MHg5ZDY1MzBlMDc1ODM0MTQ1OWM2YTFhZDQ0N2ZjMTdlNzFmY2FiZTlhIn0sImNyZWRlbnRpYWxTdGF0dXMiOnsiaWQiOiJodHRwOi8vbG9jYWxob3N0OjMxMDIvcmV2b2NhdGlvbi1saXN0L2RpZDpldGhyOnNwaGVyaXR5OnRlc3RuZXQ6MHhmNjI3ZmU0MjNlMDgyYzRlMGYzOWNjMmJhZGZkODg2OGUzMmEyNWFkIzgwODY1IiwidHlwZSI6IlJldm9jYXRpb25MaXN0MjAyMFN0YXR1cyIsInJldm9jYXRpb25MaXN0SW5kZXgiOjgwODY1LCJyZXZvY2F0aW9uTGlzdENyZWRlbnRpYWwiOiJodHRwOi8vbG9jYWxob3N0OjMxMDIvcmV2b2NhdGlvbi1saXN0L2RpZDpldGhyOnNwaGVyaXR5OnRlc3RuZXQ6MHhmNjI3ZmU0MjNlMDgyYzRlMGYzOWNjMmJhZGZkODg2OGUzMmEyNWFkIn0sInByb29mIjp7InR5cGUiOiJFY2RzYUtvYmxpdHpTaWduYXR1cmUyMDE2IiwiY3JlYXRvciI6ImRpZDpldGhyOnNwaGVyaXR5OnRlc3RuZXQ6MHg1ZmMwZGVlZmNlNTM5NTExOTY0NTcxMzY4YzM1ODZmOWQ5NTZkYzllIiwiY3JlYXRlZCI6IjIwMjAtMTEtMjhUMjI6MDY6MTUuNzE1WiIsIm5vbmNlIjoiOTAyOTFiNGYtZjE0OC00MTNjLWJjNmItZjg4YTg3NjhkMWI5IiwiZG9tYWluIjoiaHR0cHM6Ly9zcGhlcml0eS5pbyIsInNpZ25hdHVyZVZhbHVlIjoickRCWk1rbzhzSjh0MUVDTy1nZXZoWjBRczhyRV9GdERnUWk0ZkJiTFdtRnNKODFHYTJ1MTZmTjdnbTNqNllaOUtDN2NMeHRCdlFLcUFpUkJTR1czWXdFIn19",
"json" : {
"@context" : [
"https://www.w3.org/2018/credentials/v1"
],
"type" : [
"VerifiableCredential"
],
"id" : "did:ethr:spherity:testnet:0x2af257487f0a673e2e456bfa7a51a249d21bc7c0",
"issuer" : "did:ethr:spherity:testnet:0x5fc0deefce539511964571368c3586f9d956dc9e",
"issuanceDate" : "2020-11-28T22:06:15.715Z",
"credentialSubject" : {
"gtin" : "123",
"id" : "did:ethr:spherity:testnet:0x9d6530e0758341459c6a1ad447fc17e71fcabe9a"
},
"credentialStatus" : {
"id" : "http://localhost:3102/revocation-list/did:ethr:spherity:testnet:0xf627fe423e082c4e0f39cc2badfd8868e32a25ad#80865",
"type" : "RevocationList2020Status",
"revocationListIndex" : 80865,
"revocationListCredential" : "http://localhost:3102/revocation-list/did:ethr:spherity:testnet:0xf627fe423e082c4e0f39cc2badfd8868e32a25ad"
},
"proof" : {
"type" : "EcdsaKoblitzSignature2016",
"creator" : "did:ethr:spherity:testnet:0x5fc0deefce539511964571368c3586f9d956dc9e",
"created" : "2020-11-28T22:06:15.715Z",
"nonce" : "90291b4f-f148-413c-bc6b-f88a8768d1b9",
"domain" : "https://spherity.io",
"signatureValue" : "rDBZMko8sJ8t1ECO-gevhZ0Qs8rE_FtDgQi4fBbLWmFsJ81Ga2u16fN7gm3j6YZ9KC7cLxtBvQKqAiRBSGW3YwE"
}
},
"sha256" : "73a89c6d778e32c370cd937f4fbf1b5285733dada93546ffd1b7cae852f3149a"
}
}
],
"formats" : [
{
"attach_id" : "f670d260-0e8f-46bb-b396-a552824061e2",
"format" : "dif/credential-manifest@v1.0"
}
],
"~thread" : {
"thid" : "574647f0-bc91-431a-a957-7cb73eb36c72",
"sender_order" : 1,
"received_orders" : {
"did:ethr:spherity:testnet:0x9d6530e0758341459c6a1ad447fc17e71fcabe9a" : 1
}
}
}
```
### ["issue-credential"](https://github.com/hyperledger/aries-rfcs/tree/master/features/0453-issue-credential-v2#issue-credential) message with JWT based VC
#### Example
```
```
## Aries RFC [features/0015-acks](https://github.com/hyperledger/aries-rfcs/tree/master/features/0015-acks)
#### Use case:
1. `ack` message is being automatically sent as sub-protocol message upon receival of:
1. `issue-credential` message within `issue-credential` protocol (v1, v2)
2. `presentation` message within `present-proof` protocol (v1)
#### `ack` message example
```
{
"@id" : "58f6981a-f8d6-46a1-88c5-cde303f2edef",
"@type" : "https://didcomm.org/notification/1.0/ack",
"status" : "OK",
"~thread" : {
"thid" : "ae1dfedc-36d5-4425-8563-91c6a74bb7db", // ID of a message that is being approved, kind of a sub-thread id concerning a parent thread
"pthid" : "574647f0-bc91-431a-a957-7cb73eb36c72", // ID of a parent thread
"sender_order" : 2,
"received_orders" : {
"did:ethr:spherity:testnet:0x5fc0deefce539511964571368c3586f9d956dc9e" : 2
}
}
}
```
Refer to Aries RFC [concepts/0008](https://github.com/hyperledger/aries-rfcs/tree/master/concepts/0008-message-id-and-threading) for more details around `~thread`