3.0.0 • Published 4 months ago
bm-ftc-ccer-sdk v3.0.0
ccer-sdk-nodejs
Let developers can all use ccer blockchain services more easily.
Installation
This is a Node.js module available through the npm registry.
Before installing, download and install Node.js. Node.js 18.0.0 or higher is required.
Installation is done using the
npm install
command:
$ npm install bm-ftc-ccer-sdk --save
Quick Start
Create ccer-sdk instance:
'use strict';
const ccerSDK = require('bm-ftc-ccer-sdk');
const sdk = new ccerSDK({
host: 'seed1.ccertest.io:26002',
});
Usage:
// Create account
async function createAccount() {
try {
const data = await sdk.account.create();
console.log(data);
} catch (err) {
console.log(err.message);
}
}
createAccount();
Tests
To run the test suite, first install the dependencies, then run npm test
:
$ npm install
$ npm test
Docs
Changes in Version 3.0.0
- Upgraded to support Node.js 18.0.0 and higher
- Replaced deprecated 'request' and 'request-promise' libraries with 'got'
- Converted Generator functions to async/await for better compatibility
- Updated dependencies to their latest versions
- Improved error handling and API responses