Hypersign.Id
Hypersign.idEntity StudioIdentity Wallet
  • 💬Welcome!
  • Hypersign KYC
    • Introduction
    • Integrations
      • KYC Service
      • Widget Configuration
      • Environments
        • Development
        • Production
      • Webhook
    • KYC Widget
      • Integrations
        • Backend Integration
          • Generate AccessTokens
          • Generate KYC Session Id
        • Frontend Integration
      • Data Capture
        • Data Vault Setup
        • Capture Facial Recognition
        • Capture ID Document
        • Capture zk-proof and KYC token
        • Capture User Consent
      • User Data
        • idToken
    • Hypersign ID Wallet
    • On-Chain KYC
      • Contracts Deployment
      • Use Cases
      • Supported Blockchains
      • KYC Token Metadata
    • Dashboard
      • User Sessions
      • User Session Details
      • Usage
      • Credit
    • Concepts
      • Facial Recognition
      • ID Verification (via OCR)
      • Reusable KYC
      • Encrypted Data Vault (EDV)
      • Facial Authentication
      • Issuer Marketplace
      • Security
      • Privacy
      • Credentials Types
        • Personhood Credential
        • Passport / Govt. ID Credential
      • zk Proof Types
        • Proof Of Personhood (PoP)
        • Proof Of KYC (PoK)
        • Proof Of Age (PoA)
      • Uniqueness Check
      • Credential Revocability
      • Machine Readable Zone (MRZ)
      • Liveliness Check
      • Zero Knowledge Proof (zkp)
        • Introduction
        • zk-SNARK
        • Circuits
        • SSI and ZKP
    • Tutorials
      • How to Integrate KYC in minutes?
      • How to add your team member?
  • Hypersign SSI
    • Introduction
    • Setup SSI Service
      • Create Your First DID
      • Credits
    • 🔗API Reference
      • Service Authentication API
      • DID
      • Schema
      • Verifiable Credential
      • Verifiable Presentation
        • Presentation Template
        • Presentation
    • 🎰API Playground
    • 🏑SSI Playground
  • Hypersign Developer Dashboard
    • Service
      • Managing API keys
      • Network Fee
    • Members & Roles
      • Members
        • Assign Role To Member
      • Invitations
        • Member Access Admin's Dashboard
      • Roles & Permissions
        • Permissions List
    • Security
      • Login
      • Multi factor Authentication (MFA)
  • Hypersign Identity Network
    • Introduction
    • Validators & Delegators
      • Installation of Node
      • Running a Testnet Validator Node
    • Governance
      • Proposals
        • Blockchain Node Upgrade
        • Community Pool Spend Proposal
        • Blockchain Parameter Change Proposal
        • Text Proposal
      • Delegation
    • Faucet (testnet)
    • Developers
      • HID-Node Codebase
      • ⚙️Setup Local hid-network Tutorial
        • Running one-node local hid network
        • Create and fund new account
        • Transfer funds
        • Connect Keplr to local hid network
      • Hypersign SSI Toolkit
        • Hypersign DID SDK
        • Hypersign Schema SDK
        • Hypersign Verifiable Credential SDK
        • Hypersign Verifiable Presentation SDK
        • OfflineSigner
    • Blockchain & ID Explorer
  • Core Concepts
    • Introduction
    • Decentralized Identifier (DID)
      • DID Registry
      • Private and Public DID
      • DID Authentication
      • DID Communication (DIDComm)
      • Adding multiple controller to DID
      • Adding multiple verification methods
      • Verification Method vs Recovery Signature
      • Blockchain Account Id
      • DID Threshold
      • Verifiable Condition
      • Verification Relationships
        • Authorization Capabilities (zCap)
    • Schema
      • Schema Registry
      • Schema.org
    • Verifiable Credential (VC)
      • Credential Revocation Registry
      • Issuing a Credential to Multiple Subjects
      • Bearer Credential
      • Single-Use Credential
    • Verifiable Presentation (VP)
    • Specifications
      • Supported Signature Algorithms
      • Client Specification
        • EVM based chains
        • Cosmos based chains
  • Ecosystem
    • Forum
    • Github
    • HID Explorer
    • Eiko
    • MetaAuth
  • Privacy Policy
Powered by GitBook
On this page
Edit on GitHub
  1. Hypersign SSI
  2. API Reference
  3. Verifiable Presentation

Presentation

PreviousPresentation TemplateNextAPI Playground

Last updated 2 years ago

Entity Studio SSI API base URL:

🔗
https://api.entity.hypersign.id
  • POST/api/v1/presentation
  • POST/api/v1/presentation/request
  • POST/api/v1/presentation/verify
post
Authorizations
Header parameters
AuthorizationstringOptional

Bearer <access_token>

OriginstringOptional

Origin as you set in application cors

Body
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
200
Response of presentation
application/json
404
did:hid:testnet:......#key-${id} not found
application/json
post
POST /api/v1/presentation HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 1139

{
  "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
201
Presentation request is created
application/json
400
templeteId :62874356... not found
application/json
post
POST /api/v1/presentation/request HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 203

{
  "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
200
presentation verification done successfully
application/json
post
POST /api/v1/presentation/verify HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 1545

{
  "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"
    }
  }
}
200

presentation verification done successfully

{
  "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:......"
    }
  ]
}