Presentation

Entity Studio SSI API base URL: https://api.entity.hypersign.id

post
Authorizations
Header parameters
Authorizationstringoptional

Bearer <access_token>

Originstringoptional

Origin as you set in application cors

Body
credentialDocumentsobject[]required

list of credentials

holderDidstringrequired

list of credentials

Example: did:hid:testnet:............
challengestringrequired

Challenge can be used to match the response to a request

Example: skfdhldklgjh-gaghkdhgaskda-aisgkjheyi
domainstringrequired

domain that will receive verifiable presentation

Example: example.com
Responses
curl -L \
  --request POST \
  --url '/api/v1/presentation' \
  --header 'Authorization: Bearer JWT' \
  --header 'Content-Type: application/json' \
  --data '{
    "credentialDocuments": [
      {
        "@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"
        ],
        "id": "vc:hid:testnet:......",
        "type": [
          "VerifiableCredential",
          "nameschema"
        ],
        "expirationDate": "2027-12-10T18:30:00Z",
        "issuanceDate": "2027-12-10T18:30:00Z",
        "issuer": "did:hid:testnet:..........",
        "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"
        }
      }
    ],
    "holderDid": "did:hid:testnet:............",
    "challenge": "skfdhldklgjh-gaghkdhgaskda-aisgkjheyi",
    "domain": "example.com"
  }'
{
  "presentation": {
    "@context": [
      "https://www.w3.org/2018/credentials/v1"
    ],
    "type": [
      "VerifiablePresentation"
    ],
    "verifiableCredential": [
      {
        "@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"
        ],
        "id": "vc:hid:testnet:......",
        "type": [
          "VerifiableCredential",
          "nameschema"
        ],
        "expirationDate": "2027-12-10T18:30:00Z",
        "issuanceDate": "2027-12-10T18:30:00Z",
        "issuer": "did:hid:testnet:..........",
        "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"
        }
      }
    ],
    "id": "vp:hid:testnet:..........................",
    "holder": "did:hid:testnet:..............",
    "proof": {
      "type": "Ed25519Signature2020",
      "created": "2023-01-25T17:01:02Z",
      "verificationMethod": "did:hid:testnet:...............#key-${id}",
      "proofPurpose": "authentication",
      "challenge": "skfdhldklgjh-gaghkdhgaskda-aisgkjheyi",
      "proofValue": "z5LairjrBYkc5FtPWeDVuLdQUzpMTBULcp3Q5YDnrLh63UuBuY6BpdiQYhTEcKBFW76TEXFHm37aDvcMtCvnYfmvQ"
    }
  }
}
post
Authorizations
Header parameters
Authorizationstringoptional

Bearer <access_token>

Originstringoptional

Origin as you set in application cors

Body
challengestringrequired

Challenge can be used to match the response to a request

Example: skfdhldklgjh-gaghkdhgaskda-aisgkjheyi
didstringrequired

did of the verifier

Example: did:hid:<namespace>:...............
templateIdstringrequired

templateId of the presentation templete to form presentation request

Example: 6392854982......
expiresTimenumberrequired

expiresTime for the presentation request (unix timestamp)

Example: 1231423
callbackUrlstringrequired

callbackUrl that will receive verifiable presentation

Example: https://example.com/verify/callback
Responses
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": {
              "@context": [
                "https://www.w3.org/2018/credentials/v1"
              ],
              "type": "AlumniCredential",
              "credentialSubject": {
                "name": "Random name",
                "id": "did:hid:testnet:............................."
              },
              "credentialSchema": {
                "id": "sch:hid:testnet:...............",
                "type": "JsonSchemaValidator2018"
              },
              "trustedIssuer": [
                {
                  "required": true,
                  "issuer": "did:hid:testnet:................"
                }
              ]
            }
          }
        ]
      }
    ]
  }
}
post
Authorizations
Header parameters
Authorizationstringoptional

Bearer <access_token>

Originstringoptional

Origin as you set in application cors

Body
presentationall ofrequired

list of credentials

Responses
curl -L \
  --request POST \
  --url '/api/v1/presentation/verify' \
  --header 'Authorization: Bearer JWT' \
  --header 'Content-Type: application/json' \
  --data '{
    "presentation": {
      "@context": [
        "https://www.w3.org/2018/credentials/v1"
      ],
      "type": [
        "VerifiablePresentation"
      ],
      "verifiableCredential": [
        {
          "@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"
          ],
          "id": "vc:hid:testnet:......",
          "type": [
            "VerifiableCredential",
            "nameschema"
          ],
          "expirationDate": "2027-12-10T18:30:00Z",
          "issuanceDate": "2027-12-10T18:30:00Z",
          "issuer": "did:hid:testnet:..........",
          "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"
          }
        }
      ],
      "id": "vp:hid:testnet:..........................",
      "holder": "did:hid:testnet:..............",
      "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": [
    {
      "@context": [
        "https://www.w3.org/2018/credentials/v1"
      ],
      "type": [
        "VerifiablePresentation"
      ],
      "verifiableCredential": [
        {
          "@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"
          ],
          "id": "vc:hid:testnet:......",
          "type": [
            "VerifiableCredential",
            "nameschema"
          ],
          "expirationDate": "2027-12-10T18:30:00Z",
          "issuanceDate": "2027-12-10T18:30:00Z",
          "issuer": "did:hid:testnet:..........",
          "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"
          }
        }
      ],
      "id": "vp:hid:testnet:..........................",
      "holder": "did:hid:testnet:..............",
      "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,
      "results": [
        {
          "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"
            ]
          },
          "verified": true,
          "verificationMethod": {
            "id": "did:hid:testnet:................................#key-${id}",
            "type": "Ed25519VerificationKey2020",
            "controller": "did:hid:method:..............",
            "publicKeyMultibase": "z28ScfSszr.............j8nCwx4DBF6nAUHu4p"
          },
          "purposeResult": {
            "valid": true
          }
        }
      ],
      "statusResult": {
        "verified": true
      },
      "credentialId": "vc:hid:testnet:......"
    }
  ]
}

Last updated