tgrospic / rnode-grpc-js Goto Github PK
View Code? Open in Web Editor NEWRNode gRPC/HTTP API generator for Nodejs and the browser
Home Page: https://tgrospic.github.io/rnode-grpc-js/
License: MIT License
RNode gRPC/HTTP API generator for Nodejs and the browser
Home Page: https://tgrospic.github.io/rnode-grpc-js/
License: MIT License
$ ./node_modules/.bin/rnode-grpc --rnode-version dev
RNode gRPC versions { 'rnode-version': 'dev', 'grpc-web-version': '1.0.6' }
Startinmg downloads...
Downloading https://github.com/grpc/grpc-web/releases/download/1.0.6/protoc-gen-grpc-web-1.0.6-darwin-x86_64
Downloading https://raw.githubusercontent.com/rchain/rchain/dev/models/src/main/protobuf/CasperMessage.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/dev/models/src/main/protobuf/DeployServiceCommon.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/dev/models/src/main/protobuf/DeployServiceV1.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/dev/models/src/main/protobuf/ProposeServiceCommon.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/dev/models/src/main/protobuf/ProposeServiceV1.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/dev/models/src/main/protobuf/RhoTypes.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/dev/models/src/main/protobuf/ServiceError.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/dev/node/src/main/protobuf/repl.proto
Downloading https://raw.githubusercontent.com/scalapb/ScalaPB/master/protobuf/scalapb/scalapb.proto
Generating JS files...
(node:49188) UnhandledPromiseRejectionWarning: Error: not found: grpc_tools_node_protoc
at getNotFoundError (/Users/willqiu/work/pull/playq/node_modules/which/which.js:13:12)
at F (/Users/willqiu/work/pull/playq/node_modules/which/which.js:68:19)
at E (/Users/willqiu/work/pull/playq/node_modules/which/which.js:80:29)
at /Users/willqiu/work/pull/playq/node_modules/which/which.js:89:16
at /Users/willqiu/work/pull/playq/node_modules/isexe/index.js:42:5
at /Users/willqiu/work/pull/playq/node_modules/isexe/mode.js:8:5
at FSReqCallback.oncomplete (fs.js:158:21)
(node:49188) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:49188) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
It would be really handy to be able to just npm install rchain-probuf
and get the stuff generated files with the rnode-grpc-js
tool.
Package versions could correspond to rnode versions.
reproduce codes
const { verifyRevAddr } = require("@tgrospic/rnode-grpc-js");
verifyRevAddr("1111engqbx5d85yltnx6btfbl8429sxtqytflsj7jcn2qcn192vM8")
"1111engqbx5d85yltnx6btfbl8429sxtqytflsj7jcn2qcn192vM8" is not a valid Base58 from pyrchain
Uncaught (in promise)
Object
code: 12
message: "Method not found: /casper.v1.DeployService/doDeploy"
metadata:
content-length: "0"
content-type: "application/grpc-web+proto"
grpc-message: "Method not found: /casper.v1.DeployService/doDeploy"
grpc-status: "12"
__proto__: Object
__proto__: Object
When I do deploy, I got this error.
$ node_modules/.bin/rnode-grpc
RNode gRPC versions { 'rnode-version': 'v0.9.12' }
Startinmg downloads...
Downloading https://raw.githubusercontent.com/rchain/rchain/v0.9.12/models/src/main/protobuf/CasperMessage.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/v0.9.12/models/src/main/protobuf/DeployService.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/v0.9.12/models/src/main/protobuf/Either.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/v0.9.12/models/src/main/protobuf/ProposeService.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/v0.9.12/models/src/main/protobuf/RhoTypes.proto
Downloading https://raw.githubusercontent.com/rchain/rchain/v0.9.12/node/src/main/protobuf/repl.proto
Downloading https://raw.githubusercontent.com/scalapb/ScalaPB/master/protobuf/scalapb/scalapb.proto
(node:9889) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 151.101.0.133:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1126:14)
(node:9889) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:9889) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I have trouble installing on my MAC. But it's OK on ubuntu servers.
I'd like to do:
<script type="module">
import { signDeploy } from '???';
</script>
Is this feasible without a bundler?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.