Registry / blockchain / minter-js-hub

minter-js-hub

JSON →
library0.0.6jsnpmunverified

A JavaScript/TypeScript gRPC client for communicating with Minter Hub 2, a blockchain-based system. Version 0.0.6, early stage with no stable release cadence. Differentiates by providing direct gRPC access to Minter Hub, as opposed to REST APIs. Requires protobuf compilation and grpc-web tooling. Minimal documentation, small API surface.

npm install minter-js-hub
INSTALL
IMPORT
SIG · MINTER-JS-HUB
M
minter-js-hub
blockchainjavascriptv0.0.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.

MinterHub
import { MinterHub } from 'minter-js-hub'
const MinterHub = require('minter-js-hub')
Package is ESM-only; no default export.
MinterHubClient
import { MinterHubClient } from 'minter-js-hub/client'
import { MinterHubClient } from 'minter-js-hub'
Client class may be in a subpath; check actual exports.
grpc
import * as grpc from '@grpc/grpc-js'
const grpc = require('grpc')
The old grpc package is deprecated; use @grpc/grpc-js for modern Node.js.

Shows creating a gRPC client to Minter Hub and making a request.

import { MinterHubClient } from 'minter-js-hub'; import * as grpc from '@grpc/grpc-js'; async function main() { const client = new MinterHubClient('localhost:9090', grpc.credentials.createInsecure()); // Example: call a method (adjust based on actual proto) const request = { address: 'Mx...' }; client.getBalance(request, (err, response) => { if (err) console.error(err); else console.log(response); }); } main();
Debug
Known issues
breakingRolling out protoc and grpc-web toolchain required to build from source; pre-built package may not include all proto services.
fix
Run `./protocgen.sh` after installing protoc and protoc-gen-grpc-web.
affects: all
deprecatedPackage version 0.0.6 is pre-1.0; no stable release cadence.
fix
Monitor for future releases and pin to exact version.
affects: 0.0.6
gotchaNo TypeScript type definitions shipped; import may cause type errors.
fix
Declare module: 'declare module 'minter-js-hub';' or use @types if available.
affects: all
gotchaESM only; using require() will cause error 'ERR_REQUIRE_ESM'.
fix
Use import syntax or dynamic import().
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'minter-js-hub'
Package not installed or missing from node_modules.
fix
Run 'npm install minter-js-hub'.
TypeError: grpc.credentials.createInsecure is not a function
Wrong grpc package imported (old 'grpc' vs '@grpc/grpc-js').
fix
Install @grpc/grpc-js and import as 'import * as grpc from '@grpc/grpc-js'.
Uncaught Error: Cannot find module './protos'
Protobuf files not compiled; package missing proto definitions.
fix
Run 'protoc' as per build instructions.
Upgrade
Version history
0.0.6latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
30 hits · last 30 days
node
24
OpenAI (training)
1
Resources
minter-js-hub — npm install minter-js-hub · libregistry