🛠️
Technical Documentation
  • Introduction
    • About Empeiria
  • Empe Blockchain
    • Overview
    • Chain Architecture
      • Auth
      • Authz
      • Bank
      • Distribution
      • Governance
      • Staking
      • IBC
      • DidDoc
      • Vesting
      • Minter
  • EVDI
    • EVDI Architecture
    • Self-Sovereign Identity
      • Technical Foundations
      • Roles in the SSI framework
      • Protocols and Standards
  • User Guide
    • Empe DID Wallet
      • Intro
      • Download and first launch
      • Create or import did
      • Main screen overview
      • How to claim credential from issuer
      • How to use credential with verifier
      • Settings and other options
    • Keplr Wallet and Blockchain Operations
      • How to Connect Keplr Wallet
    • Ping Pub operation
    • Staking Tokens Guide
    • Voting on Governance Proposals Guide
    • Sending Tokens Guide
  • Developer Guide
    • Tutorial: Credential Issuance & Verification
      • Overview
      • Understanding Key Concepts
      • Project Setup
      • Deploying the Issuer
      • Uploading the Credential Schema
      • Issuing Credentials
      • Frontend for Credential Issuance
      • Testing Credential Issuance
      • Deploying the Verifier
      • Setting Up the Verification Flow
      • Creating a Verification Endpoint
      • Creating a Protected Dashboard
      • Testing the Verification Flow
      • Summary & Next Steps
    • One-click deployment
      • Introduction
      • Registration
      • Login
      • Creating an Issuer
      • Issuer Data Description
      • Creating a Verifier
      • Verifier Data Description
    • Verifier
      • Terminology and Concepts
      • Architecture Overview
      • Core Responsibilities
      • Query Language
      • Frontend Integration
      • Client Configuration
      • Security Considerations
      • Error Handling and Troubleshooting
      • Future Enhancements
      • References and Standards
      • FAQ
    • Issuer
      • Terminology and Concepts
      • Architecture Overview
      • Core Responsibilities
      • DID Document Management
      • Schemas Management
      • Issuing Credentials
      • Interacting with Wallets
      • Security Considerations
      • Error Handling and Troubleshooting
      • Future Enhancements
      • References and Standards
      • FAQ
    • Wallet SDK (Coming soon)
    • Introduction to cosmwasm
  • Validator Guide
    • Important links
    • Validators Guide
      • New validator
      • Hardware requirements
      • Required software installation
      • Go installation
      • Install prebuild binary
      • Install binary from source code (option B)
      • Configure a node
      • Cosmovisor setup
      • Sync with state-sync
      • Full state sync from archive snapshot
      • Latest snapshot
      • Run a Validator
      • Migration to v0.2.2
      • Migration to v0.3.0
    • FAQ
  • Appendix
    • Glossary
Powered by GitBook
On this page
  1. Developer Guide
  2. Issuer

Schemas Management

Credential schemas define the structure and required fields for credentials, ensuring consistency and interoperability.

Endpoints:

  • Create Schema:

    POST /api/v1/schema
    x-client-secret: [Client Secret]
    Content-Type: application/json
  • Get All Schemas:

    GET /api/v1/schema
  • Get Schema by ID:

    GET /api/v1/schema/{id}
  • Delete Schema:

    DELETE /api/v1/schema/{id}
    x-client-secret: [Client Secret]

Create Schema Example Request:

{
  "name": "ProofOfPurchase",
  "type": "ProofOfPurchase",
  "credentialSubject": {
    "type": "object",
    "properties": {
      "ticket": {"type": "string", "title": "Ticket"},
      "seat": {"type": "string", "title": "Seat"},
      "description": {"type": "string", "title": "Description"}
    },
    "required": ["ticket", "seat", "description"]
  }
}

Example Response:

{
  "id": "db5a33ae-2eef-41b4-9c74-2ed16c4bb4f4",
  "name": "ProofOfPurchase",
  "type": "ProofOfPurchase",
  "version": 3,
  "schemaUri": "http://example.com/api/v1/schema/db5a33ae-2eef-41b4-9c74-2ed16c4bb4f4",
  "schemaBody": {}
}

Get All Schemas Example Response:

[
  {
    "id": "a69ad6ec-8621-472d-90ff-5d15c24d0f2c",
    "name": "ProofOfPurchase",
    "type": "ProofOfPurchase",
    "version": 1,
    "schemaUri": "http://example.com/api/v1/schema/a69ad6ec-8621-472d-90ff-5d15c24d0f2c"
  },
  {
    "id": "7b4ce6ea-2f62-4c54-b15e-6c8b5b1bbbd2",
    "name": "ProofOfPurchase",
    "type": "ProofOfPurchase",
    "version": 2,
    "schemaUri": "http://example.com/api/v1/schema/7b4ce6ea-2f62-4c54-b15e-6c8b5b1bbbd2"
  }
]

Versioning: If a schema with the same type is created more than once, the version increments automatically, allowing evolution without invalidating previously issued credentials.

Security: Only authorized clients (with x-client-secret) can create or delete schemas, ensuring integrity and trustworthiness of credential definitions.

PreviousDID Document ManagementNextIssuing Credentials

Last updated 4 months ago