JSPM

nodevct

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q16898F
  • License Apache-2.0

ValueCyber VCT NodeJS API

Package Exports

  • nodevct

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nodevct) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Description

The offical VCT Node API for Node.js

Requirements

  • Node: v8.10.0+
  • NPM: 5.4.0+

Installation

$ npm install nodevct --save

Using Node VCT

Sample code

let NodeVCT = require('nodevct');

// methods
let vct = new NodeVCT({
    host: '127.0.0.1', // default 127.0.0.1
    port: 7055,        // default 7055
    secure: false      // default false
});

// Devops Client
// query
var res = await vct.devops.query({
    name: 'contractname',
    method: 'count',
    args: []
});
console.log(res);

// invoke
var res = await vct.devops.invoke({
    name: 'contractname',
    method: 'invoke',
    args: []
});
console.log(res);