Skip to content
High level Schema Extensions (Compiler & Checker)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

IdentityChain Schema Extensions -
High Level Schemas

Welcome to the Schema Extensions repository, please see our documentation site for more information.

Getting prerequisites

A recent version of Java JRE and JDK (>=7) must be installed.

To download required libraries, run once the first time inside the repo:

make update

(Re)Building the Schema/Credential compiler

After a latest git pull of this repo, run:


Running the Schema/Credential compiler as a Server

In the repo directory run:

java -jar bin/idchain.jar idchain/HTTP --help
java -jar bin/idchain.jar idchain/HTTP --host --port 8000 # the arguments are optional, defaults to localhost:8000

To hit the Server from the client side, run:

curl -X POST 'http://localhost:8000/schema' -H 'Content-Type: application/json' -d '<SCHEMAS_JSON>'

, validates and compiles the high-level schema to low-level Indy schema.

curl -X POST 'http://localhost:8000/cred' -H 'Content-Type: application/json' -d '{"schemas": <SCHEMAS_JSON>, "credential": <CREDENTIAL_JSON>}'

, validates the high-level schema and credential and returns the filled-in Indy credential.

curl -G "http://localhost:8000/types"

, returns a list of types supported in the high-level schema.

Running the Schema/Credential compiler from CommandLine

Take a look at the help-message output (java -jar bin/idchain.jar idchain/CLI --help):

Typechecker & Compiler of High-level Schemas/Credentials to low-level Indy schemas/credentials

--help                      (this message)
--schema <filepath>         The inputted file containing the higher-level schema(s)
--cred <filepath>           The inputted file containing the unfinished credentials given by the issuer
--checkSchema               Syntax-check and type-check the inputted schema
--checkCred                 Syntax-check and type-check the inputted credential
--compileSchema             Compile the inputted higher-level schema(s) to (lower-level) Indy schemas
--compileCred               Compile the unfinished inputted credential to a full Indy credential
--odir <directory>          Where to put the output files (default: current directory)

Also take a look at make test inside the Makefile for a running example:

make test
You can’t perform that action at this time.