Releases: Akachain/akc-node-sdk
Releases · Akachain/akc-node-sdk
v2.2.3 Release Notes
v2.2.2 Release Notes
This release captures several changes to the node SDK
- Cache client object by username
- Optimize logging with chaincode
- Fix several bugs when invoking chaincode with different endorsement policies
v2.1.1 Release Notes
This update add the getDefaultEndorsermentPolicy
to utlis.common.js
The default endorsement policy is now forced to be "Signed by all organization"
For example, a default policy for a network with 2 organizations:
{
identities: [
{ role: { name: "member", mspId: "org1" }},
{ role: { name: "member", mspId: "org2" }}
],
policy: {
"2-of": [{ "signed-by": 0 }, { "signed-by": 1 }]
}
}
v2.1.0 Release Notes - February 10, 2020
What's new in akc-node-sdk v2.1.0?
registerUser
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
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
const akcSDK = require('@akachain/akc-node-sdk')
let client = await akcSDK.getClientForOrg(orgName, true);
await akcSDK.tlsEnroll(client)
installChaincode
const akcSDK = require('@akachain/akc-node-sdk')
await akcSDK.installChaincode(orgname, {
chaincodePath: chaincodePath,
chaincodeId: chaincodeId,
metadataPath: metadataPath,
chaincodeVersion: chaincodeVersion,
chaincodeType: chaincodeType
})
initChainCode
const akcSDK = require('@akachain/akc-node-sdk')
await akcSDK.initChaincode(orgname, channelName, {
chaincodeId: chaincodeId,
chaincodeVersion: chaincodeVersion,
chaincodeType: chaincodeType,
args: args
})
upgradeChainCode
const akcSDK = require('@akachain/akc-node-sdk')
await akcSDK.upgradeChaincode(orgname, channelName, {
chaincodeId: chaincodeId,
chaincodeVersion: chaincodeVersion,
chaincodeType: chaincodeType,
args: args
})
v2.0.3 Release Notes - February 5, 2020
Important Changes
Update query function
// Pass
var queryChaincode = async function (org_name, channelName, request)
// After changing
var queryChaincode = async function (peerNames, channelName, chaincodeName, fcn, args, orgName, userName)
Re-order parameters when call akcSDK functions.
// Invoke example
const invokeResult = await akcSdk.invoke(peerNames, channelName, chaincodeName, fcn, args, orgName, userName);
akc-node-sdk release
This release incorporate changes from all of our previous development published on Verdacio server at
http://node.sdk.akachain.io:4873/-/web/detail/akc-node-sdk
Please check our installation package on Github NPM registry.