@pugdag/grpc
TypeScript icon, indicating that this package has built-in type declarations

1.4.4 • Public • Published

Pugdag gRPC interface

Pugdag gRPC module is a basic request/response wrapper for interfacing with Pugdagd

Installing pugdag-grpc

npm install -g @pugdag/grpc

Cloning pugdag-grpc

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

Example

const { Client } = require('@pugdag/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);
})

Dependents (1)

Package Sidebar

Install

npm i @pugdag/grpc

Weekly Downloads

1

Version

1.4.4

License

ISC

Unpacked Size

97.3 kB

Total Files

20

Last publish

Collaborators

  • pugdag