idtree-sdk
v1.0.2
Published
SDK to Interact with IDTree Hyperledger Network and generate UniqueIDs
Downloads
6
Readme
SDK to Interact with IDTree Hyperledger Network and generate UniqueIDs
- To Get an API-KEY Please Register
- Once You Register You will receive an
apiKey
- You can use that
apiKey
in ouridtree-sdk
, intruction given below
Install
npm install idtree-sdk
Usage
const generateId = require('idtree-sdk')
const apiKey = `YOUR_API_KEY` //received after registration
const id = await generateId.generateUniqueID(apiKey)
Example Responses
- On Success:
{
status: 200,
uniqueID: '06F608371B194EB968D202DA82E93FD9C3F96F27',
privateKey: '-----BEGIN PRIVATE KEY-----MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgIPCf+W56LOUGhwRewwVKt9SFXxWH+jxzO0iI30NZpiGhRANCAAQXzGjR87ixS8jaVsJmA2/At5DPhZ8TZTdRlLgWhcfVwiPJAnSAYbVv6g2TbYpOewhjOjgIppwRurCbUby58N2d-----END PRIVATE KEY-----'
}
- On Error:
{
status: 401,
error: 'Invalid API Key',
data: {
result: 0,
msg: 'error',
data: 'Invalid API Key'
}
}
IDTree SDK to Interact with IDTree Hyperledger Fabric Blockchain Network