Skip to content

v2.1.0 Release Notes - February 10, 2020

Compare
Choose a tag to compare
@jacobgershon jacobgershon released this 10 Feb 10:23
· 55 commits to master since this release

What's new in akc-node-sdk v2.1.0?

registerUser

View detail

const akcSDK = require('@akachain/akc-node-sdk')

let user = {
    orgName: req.body.orgname,
    userName: req.body.username,
    role: req.body.role,
    maxEnrollments: req.body.maxEnrollments,
    attrs: req.body.attrs
}
await akcSDK.registerUser(user)

enrollUser

View detail

const akcSDK = require('@akachain/akc-node-sdk')

let user = {
    orgName: req.body.orgname,
    userName: req.body.username,
    enrollmentSecret: req.body.password,
} 
await akcSDK.enrollUser(user)

tlsEnroll

View detail

const akcSDK = require('@akachain/akc-node-sdk')

let client = await akcSDK.getClientForOrg(orgName, true);
await akcSDK.tlsEnroll(client)

installChaincode

View detail

const akcSDK = require('@akachain/akc-node-sdk')

await akcSDK.installChaincode(orgname, {
    chaincodePath: chaincodePath,
    chaincodeId: chaincodeId,
    metadataPath: metadataPath,
    chaincodeVersion: chaincodeVersion,
    chaincodeType: chaincodeType
})

initChainCode

View detail

const akcSDK = require('@akachain/akc-node-sdk')

await akcSDK.initChaincode(orgname, channelName, {
    chaincodeId: chaincodeId,
    chaincodeVersion: chaincodeVersion,
    chaincodeType: chaincodeType,
    args: args
})

upgradeChainCode

View detail

const akcSDK = require('@akachain/akc-node-sdk')

await akcSDK.upgradeChaincode(orgname, channelName, {
    chaincodeId: chaincodeId,
    chaincodeVersion: chaincodeVersion,
    chaincodeType: chaincodeType,
    args: args
})