1.4.1 • Published 2 months ago

@nexellia/grpc v1.4.1

Weekly downloads
-
License
ISC
Repository
-
Last release
2 months ago

Nexellia gRPC interface

Nexellia gRPC module is a basic request/response wrapper for interfacing with Nexelliad

Installing nexellia-grpc

npm install -g @nexellia/grpc

Cloning nexellia-grpc

git clone https://github.com/nexellia-network/node-nexellia-grpc
cd node-nexellia-grpc
npm install

Example

const { Client } = require('@nexellia/grpc');

const client = new Client({
    host:"127.0.0.1:33455"
});
client.connect();
client.verbose = true;

try {
    let response = await client.call('getMempoolEntriesRequest', { });
    console.log(response);
} catch(ex) {
    ...
}

client.call('getVirtualSelectedParentBlueScoreRequest', { }).then((response)=>{
    console.log(response);
}).catch((err)=>{
    console.log('error:',err);
})