Add proof to verifiable presentation
A Verifiable Presentation contains one or more Verifiable Credentials.
The endpoint will accept а Verifiable Presentation and will add a proof to it.
Example request:
POST /v1/presentation/proof
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
],
"id": "ocm-123",
"type": "VerifiablePresentation",
"verifiableCredential": [
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
"credentialSubject": {
"allow": true,
"id": "example/example/1.0",
"taskID": "0123456789abcdef"
},
"issuanceDate": "2022-06-06T15:34:15.453690805Z",
"issuer": "ocm-123",
"type": "VerifiableCredential"
},
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
"credentialSubject": {
"id": "example/example/2.0",
"result": {
"hello": "world"
}
},
"issuanceDate": "2022-06-06T15:34:15.453694805Z",
"issuer": "ocm-123",
"type": "VerifiableCredential"
}
]
}
Example response:
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
],
"id": "ocm-123",
"type": "VerifiablePresentation",
"verifiableCredential": [
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
"credentialSubject": {
"allow": true,
"id": "example/example/1.0",
"taskID": "0123456789abcdef"
},
"issuanceDate": "2022-06-06T15:34:15.453690805Z",
"issuer": "ocm-123",
"type": "VerifiableCredential"
},
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://www.w3.org/2018/credentials/examples/v1"
],
"credentialSubject": {
"id": "example/example/2.0",
"result": {
"hello": "world"
}
},
"issuanceDate": "2022-06-06T15:34:15.453694805Z",
"issuer": "ocm-123",
"type": "VerifiableCredential"
}
],
"proof": {
"created": "2022-06-06T15:34:15.45427818Z",
"proofPurpose": "assertionMethod",
"proofValue": "dmF1bHQ6djE6RWlJTHRtNUF5QVNFeWw5VGc1Ri90LzJFbWFTUkhZM1JtakZSUU01VXltYy9NSHBTQkU5K3NxUlUyaFBvK2diNGZtc1V0NllGemNYQ1hUbjZWVTFkQ1E9PQ",
"type": "Ed25519Signature2018",
"verificationMethod": "signkey1"
}
}
Edited by Lyuben Penkovski