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

1.4.0 • Public • Published

Kaspa gRPC interface

Kaspa gRPC module is a basic request/response wrapper for interfacing with Kaspad

Usage

Clone the following repository:

$ git clone https://github.com/aspectron/kaspa-grpc

Example

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

const client = new Client({
    host:"127.0.0.1:16210"
});
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);
})

Readme

Keywords

none

Package Sidebar

Install

npm i @kaspa/grpc

Weekly Downloads

87

Version

1.4.0

License

ISC

Unpacked Size

98.6 kB

Total Files

20

Last publish

Collaborators

  • aspect