Presentation
Last updated
Last updated
Entity Studio SSI API base URL: https://api.entity.hypersign.id
/api/v1/presentation
Bearer <access_token>
Origin as you set in application cors
list of credentials
did:hid:testnet:............
Challenge can be used to match the response to a request
skfdhldklgjh-gaghkdhgaskda-aisgkjheyi
domain that will receive verifiable presentation
example.com
curl -L \
--request POST \
--url '/api/v1/presentation' \
--header 'Authorization: Bearer JWT' \
--header 'Content-Type: application/json' \
--data '{
"holderDid": "did:hid:testnet:............",
"challenge": "skfdhldklgjh-gaghkdhgaskda-aisgkjheyi",
"domain": "example.com",
"credentialDocuments": [
{
"id": "vc:hid:testnet:......",
"expirationDate": "2027-12-10T18:30:00Z",
"issuanceDate": "2027-12-10T18:30:00Z",
"issuer": "did:hid:testnet:..........",
"type": [
"VerifiableCredential",
"nameschema"
],
"@context": [
"https://www.w3.org/2018/credentials/v1",
{
"hs": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/schema/sch:hid:testnet:...........:1.0:"
},
{
"name": "hs:name"
},
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"credentialSubject": {
"id": "did:hid:testnet:..............."
},
"credentialSchema": {
"id": "sch:hid:testnet:...............",
"type": "JsonSchemaValidator2018"
},
"credentialStatus": {
"id": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/credential/vc:hid:testnet:...............",
"type": "CredentialStatusList2017"
},
"proof": {
"type": "Ed25519Signature2020",
"created": "2023-01-25T17:01:02Z",
"verificationMethod": "did:hid:testnet:...............#key-${id}",
"proofPurpose": "assertionMethod",
"proofValue": "z5LairjrBYkc5FtP.......................EXFHm37aDvcMtCvnYfmvQ"
}
}
]
}'
{
"presentation": {
"id": "vp:hid:testnet:..........................",
"holder": "did:hid:testnet:..............",
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"type": [
"VerifiablePresentation"
],
"verifiableCredential": [
{
"id": "vc:hid:testnet:......",
"expirationDate": "2027-12-10T18:30:00Z",
"issuanceDate": "2027-12-10T18:30:00Z",
"issuer": "did:hid:testnet:..........",
"type": [
"VerifiableCredential",
"nameschema"
],
"@context": [
"https://www.w3.org/2018/credentials/v1",
{
"hs": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/schema/sch:hid:testnet:...........:1.0:"
},
{
"name": "hs:name"
},
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"credentialSubject": {
"id": "did:hid:testnet:..............."
},
"credentialSchema": {
"id": "sch:hid:testnet:...............",
"type": "JsonSchemaValidator2018"
},
"credentialStatus": {
"id": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/credential/vc:hid:testnet:...............",
"type": "CredentialStatusList2017"
},
"proof": {
"type": "Ed25519Signature2020",
"created": "2023-01-25T17:01:02Z",
"verificationMethod": "did:hid:testnet:...............#key-${id}",
"proofPurpose": "assertionMethod",
"proofValue": "z5LairjrBYkc5FtP.......................EXFHm37aDvcMtCvnYfmvQ"
}
}
],
"proof": {
"type": "Ed25519Signature2020",
"created": "2023-01-25T17:01:02Z",
"verificationMethod": "did:hid:testnet:...............#key-${id}",
"proofPurpose": "authentication",
"challenge": "skfdhldklgjh-gaghkdhgaskda-aisgkjheyi",
"proofValue": "z5LairjrBYkc5FtPWeDVuLdQUzpMTBULcp3Q5YDnrLh63UuBuY6BpdiQYhTEcKBFW76TEXFHm37aDvcMtCvnYfmvQ"
}
}
}
Response of presentation
/api/v1/presentation/request
Bearer <access_token>
Origin as you set in application cors
Challenge can be used to match the response to a request
skfdhldklgjh-gaghkdhgaskda-aisgkjheyi
did of the verifier
did:hid:<namespace>:...............
templateId of the presentation templete to form presentation request
6392854982......
expiresTime for the presentation request (unix timestamp)
1231423
callbackUrl that will receive verifiable presentation
https://example.com/verify/callback
curl -L \
--request POST \
--url '/api/v1/presentation/request' \
--header 'Authorization: Bearer JWT' \
--header 'Content-Type: application/json' \
--data '{
"challenge": "skfdhldklgjh-gaghkdhgaskda-aisgkjheyi",
"did": "did:hid:<namespace>:...............",
"templateId": "6392854982......",
"expiresTime": 1231423,
"callbackUrl": "https://example.com/verify/callback"
}'
{
"id": "f....8-84ae-4..2-a..3-efab....d4db",
"from": "did:hid:testnet:...............",
"created_time": 1675167388737,
"expires_time": 1675177277551,
"reply_url": "https://example.com/verify/callback",
"reply_to": [
"did:hid:testnet:................."
],
"body": {
"appId": "43...18-...........",
"domain": "fyre.hypersign.id",
"query": [
{
"type": "QueryByExample",
"credentialQuery": [
{
"required": true,
"reason": "We need you to prove your eligibility to work.",
"example": {
"type": "AlumniCredential",
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"credentialSubject": {
"name": "Random name",
"id": "did:hid:testnet:............................."
},
"credentialSchema": {
"id": "sch:hid:testnet:...............",
"type": "JsonSchemaValidator2018"
},
"trustedIssuer": [
{
"required": true,
"issuer": "did:hid:testnet:................"
}
]
}
}
]
}
]
}
}
Presentation request is created
/api/v1/presentation/verify
Bearer <access_token>
Origin as you set in application cors
list of credentials
curl -L \
--request POST \
--url '/api/v1/presentation/verify' \
--header 'Authorization: Bearer JWT' \
--header 'Content-Type: application/json' \
--data '{
"presentation": {
"id": "vp:hid:testnet:..........................",
"holder": "did:hid:testnet:..............",
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"type": [
"VerifiablePresentation"
],
"verifiableCredential": [
{
"id": "vc:hid:testnet:......",
"expirationDate": "2027-12-10T18:30:00Z",
"issuanceDate": "2027-12-10T18:30:00Z",
"issuer": "did:hid:testnet:..........",
"type": [
"VerifiableCredential",
"nameschema"
],
"@context": [
"https://www.w3.org/2018/credentials/v1",
{
"hs": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/schema/sch:hid:testnet:...........:1.0:"
},
{
"name": "hs:name"
},
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"credentialSubject": {
"id": "did:hid:testnet:..............."
},
"credentialSchema": {
"id": "sch:hid:testnet:...............",
"type": "JsonSchemaValidator2018"
},
"credentialStatus": {
"id": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/credential/vc:hid:testnet:...............",
"type": "CredentialStatusList2017"
},
"proof": {
"type": "Ed25519Signature2020",
"created": "2023-01-25T17:01:02Z",
"verificationMethod": "did:hid:testnet:...............#key-${id}",
"proofPurpose": "assertionMethod",
"proofValue": "z5LairjrBYkc5FtP.......................EXFHm37aDvcMtCvnYfmvQ"
}
}
],
"proof": {
"type": "Ed25519Signature2020",
"created": "2023-01-25T17:01:02Z",
"verificationMethod": "did:hid:testnet:...............#key-${id}",
"proofPurpose": "authentication",
"challenge": "skfdhldklgjh-gaghkdhgaskda-aisgkjheyi",
"proofValue": "z5LairjrBYkc5FtPWeDVuLdQUzpMTBULcp3Q5YDnrLh63UuBuY6BpdiQYhTEcKBFW76TEXFHm37aDvcMtCvnYfmvQ"
}
}
}'
{
"verified": true,
"results": [
{
"id": "vp:hid:testnet:..........................",
"holder": "did:hid:testnet:..............",
"@context": [
"https://www.w3.org/2018/credentials/v1"
],
"type": [
"VerifiablePresentation"
],
"verifiableCredential": [
{
"id": "vc:hid:testnet:......",
"expirationDate": "2027-12-10T18:30:00Z",
"issuanceDate": "2027-12-10T18:30:00Z",
"issuer": "did:hid:testnet:..........",
"type": [
"VerifiableCredential",
"nameschema"
],
"@context": [
"https://www.w3.org/2018/credentials/v1",
{
"hs": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/schema/sch:hid:testnet:...........:1.0:"
},
{
"name": "hs:name"
},
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"credentialSubject": {
"id": "did:hid:testnet:..............."
},
"credentialSchema": {
"id": "sch:hid:testnet:...............",
"type": "JsonSchemaValidator2018"
},
"credentialStatus": {
"id": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/credential/vc:hid:testnet:...............",
"type": "CredentialStatusList2017"
},
"proof": {
"type": "Ed25519Signature2020",
"created": "2023-01-25T17:01:02Z",
"verificationMethod": "did:hid:testnet:...............#key-${id}",
"proofPurpose": "assertionMethod",
"proofValue": "z5LairjrBYkc5FtP.......................EXFHm37aDvcMtCvnYfmvQ"
}
}
],
"proof": {
"type": "Ed25519Signature2020",
"created": "2023-01-25T17:01:02Z",
"verificationMethod": "did:hid:testnet:...............#key-${id}",
"proofPurpose": "authentication",
"challenge": "skfdhldklgjh-gaghkdhgaskda-aisgkjheyi",
"proofValue": "z5LairjrBYkc5FtPWeDVuLdQUzpMTBULcp3Q5YDnrLh63UuBuY6BpdiQYhTEcKBFW76TEXFHm37aDvcMtCvnYfmvQ"
}
}
],
"credentialResults": [
{
"verified": true,
"credentialId": "vc:hid:testnet:......",
"results": [
{
"verified": true,
"proof": {
"type": "Ed25519Signature2020",
"created": "2023-01-25T17:01:02Z",
"verificationMethod": "did:hid:testnet:...............#key-${id}",
"proofPurpose": "assertionMethod",
"proofValue": "z5LairjrBYkc5FtP.......................EXFHm37aDvcMtCvnYfmvQ",
"Context": [
"https://www.w3.org/2018/credentials/v1",
{
"hs": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/schema/sch:hid:testnet:z3KX4ZqoizKTaED645aV4aE8dBbnSpmQYe3xfzVBJadPY:1.0:"
},
{
"name": "hs:name"
},
"https://w3id.org/security/suites/ed25519-2020/v1"
]
},
"verificationMethod": {
"id": "did:hid:testnet:................................#key-${id}",
"type": "Ed25519VerificationKey2020",
"controller": "did:hid:method:..............",
"publicKeyMultibase": "z28ScfSszr.............j8nCwx4DBF6nAUHu4p"
},
"purposeResult": {
"valid": true
}
}
],
"statusResult": {
"verified": true
}
}
]
}
presentation verification done successfully