Hypersign Schema SDK
A Javascript based SDK for Schema Operations
The Hypersign Schema comply Verifiable Credentials JSON Schema 2022 data model specification and is stored on Hypersign Identity Blockchain Network as it is adviced to store schema documents and made available as immutable objects.
Read Hypersign Schema section for more details.
HypersignSchema SDK
Is a javascript library for Schema related operation (generate, sign, register etc). It also provides APIs to store/update/retrive Schema to/from the Hypersign Schema Registry on the Hypersign Blockchain network easily.
NOTES
A DID registred on Hypersign blockchain in order to register a schema on Hypersign blockchain network.
Schema can not be registred using private DIDs.
Table of Contents
Install The Package
Import The Package
Offchain APIs
Initialize Instance of HypersignSchema
generate()
generate()Generates a new schema doc without proof
API Definition
ISchemaFields
Usage
Output
sign()
sign()Signs a schema document and attaches proof
API Definition
Note: The difference between SchemaDocument and Schema types is, Schema type is SchemaDocument with proof attached to it. see the example below.
Usage
Output
OnChain APIs
Initialize with offlineSigner
Create Instance of the class
OfflineSigner
You may follow this this code snippet for creating OfflineSigner
Call init() to initialize the offlineSigner
register()
register()Register a schema Document in Hypersign blockchain
API Definition
Usage
Output
resolve()
resolve()Resolves a schema document with schemId from Hypersign blockchain
API Definition
Usage
Output
Security Concerns
// TODO
Last updated