Registry / blockchain / waves-grpc-services-client

waves-grpc-services-client

JSON →
library0.1.6jsnpmunverified

A client library for interacting with Waves blockchain gRPC services, providing APIs for blockchain updates and account data. Version 0.1.6 is the latest stable release, targeting Node.js >= 12. It supports TypeScript with bundled type definitions. The package offers builder patterns for streaming blockchain updates and a simple API for fetching account state. It is designed specifically for the Waves ecosystem, requiring familiarity with gRPC endpoints. Development cadence is low; no breaking changes have been noted.

npm install waves-grpc-services-client
INSTALL
IMPORT
SIG · WAVES-GRPC-SERVICE
W
waves-grpc-services-client
blockchainjavascriptv0.1.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BlockchainUpdates
import { BlockchainUpdates } from 'waves-grpc-services-client'
const BlockchainUpdates = require('waves-grpc-services-client').BlockchainUpdates
Named export; ESM import preferred.
AccountsApi
import { AccountsApi } from 'waves-grpc-services-client'
import AccountsApi from 'waves-grpc-services-client'
Named export; default import is undefined.
BlockchainUpdatesBuilder
import { BlockchainUpdates } from 'waves-grpc-services-client'; const builder = BlockchainUpdates.builder();
import { BlockchainUpdatesBuilder } from 'waves-grpc-services-client'
Builder is accessed via static method on BlockchainUpdates, not directly exported.

Subscribes to blockchain updates from Waves gRPC stream, logs block heights, and stops after 10 seconds.

import { BlockchainUpdates } from 'waves-grpc-services-client'; const blockchainUpdates = BlockchainUpdates.builder() .buAddress('grpc.wavesnodes.com:6881') .from(3528000) .to(3528050) .onData(({ height }) => { console.log(`New block at height ${height}`); }) .build(); blockchainUpdates.start(); // Stop after 10 seconds setTimeout(() => { blockchainUpdates.stop(); }, 10000);
Debug
Known issues
gotchaBuilder .onData() callback parameter is an object with a `height` property; accessing other properties may fail.
fix
Check the type definition for BlockUpdate to know available fields.
affects: *
gotchaThe gRPC endpoint must be stable and accessible; otherwise connection errors occur.
fix
Ensure the address is correct and the node supports gRPC.
affects: *
deprecatedThe `.label()` method is documented as for logging only; its behavior may change.
fix
Use only for debugging; do not rely on label in production logic.
affects: >=0.1.0
Errors
Common errors & fixes
Error: 14 UNAVAILABLE: DNS resolution failed
Cannot connect to gRPC endpoint due to network or DNS issue.
fix
Verify the domain/IP address is reachable and the port is open.
TypeError: BlockchainUpdates.builder is not a function
Incorrect import; likely using default import or wrong module.
fix
Use named import: import { BlockchainUpdates } from 'waves-grpc-services-client'
Error: Cannot find module 'waves-grpc-services-client'
Package not installed or installed in wrong environment.
fix
Run npm install waves-grpc-services-client in the project directory.
Upgrade
Version history
0.1.6latest on npm
Audit
Dependencies
@grpc/grpc-jsrequiredgRPC client implementation
google-protobufrequiredProtobuf serialization
Agent activity
33 hits · last 30 days
node
28
Amazon
1
OpenAI (training)
1
Resources
waves-grpc-services-client — npm install waves-grpc-services-client · libregistry