AGR Client for Node.js
Node.js client for license management features of Aggregion blockchain platform (AGR).
Installation
npm i @aggregion/agr-client
API
See API docs here
Usage example
const AgrClient = require('@aggregion/agr-client');
const config = {
keyProvider: ['key'],
chainId: 'cf057bbfb72640471fd910bcb67639c22df9f92470936cddc1ade0e2f2e7dc4f',
httpEndpoint: 'https://devnet.blockchain.aggregion.com/',
verbose: true
};
const client = new AgrClient(config);
const keyPair = await AgrClient.createKeyPair();
await agg.createAccount('payer', 'accountname', keyPair.publicKey, keyPair.publicKey);
await agg.transfer('sender', 'receiver', new Asset(100, 'AGR'));
const balance = await agg.getAccountBalance('accountname');
Test
Default run:
npm test
Run with verbose mode:
VERBOSE=1 npm test
License
ISC
Contacts
For any questions: info@aggregion.com