Closed dckc closed 4 years ago
@dckc both are correct, depending for which RNode version you generate JS bindings. You can also find some info here https://github.com/tgrospic/rnode-grpc-js/issues/5.
rnode-grpc-js has --rnode-version
parameter which you can use generate correct JS API.
This repository is an example how to use it and it's currently using 0.9.22 version to generate API.
https://github.com/tgrospic/rnode-client-js/blob/26e792aaa95e7d31550fbb2979cd998e866240fc/package.json#L14
The method name for deploying changed since 0.9.22?!?!?! Why?
So what version do I use to interoperate with testnet and mainnet? I just used the default.
https://node3.testnet.rchain-dev.tk/status says "version":"RChain Node 0.9.23-8-g0eb25aa (0eb25aa2455b7d59b94a6937755cc098b490131f)"
but https://github.com/rchain/rchain/releases/tag/v0.9.23 says d6e2c31
so I tried --rnode-version 0eb25aa
but I got 404. --rnode-version v0.9.23
seems to work.
I don't understand why the default doesn't work, but I suppose that should be a separate issue.
The method name for deploying changed since 0.9.22?!?!?! Why?
So what version do I use to interoperate with testnet and mainnet? I just used the default.
@dckc default value (when empty) is still 0.9.12 version. It needs to be updated, at least when protobuf definition is changed also. https://github.com/tgrospic/rnode-grpc-js/issues/7
This is the PR when RNode API is changed. It's published with 0.9.15 version. https://github.com/rchain/rchain/pull/2729
--rnode-version
accepts whatever can be substituted for version
to get list of files from GitHub.
https://api.github.com/repos/rchain/rchain/contents/${dir}?ref=${version}
https://github.com/tgrospic/rnode-grpc-js/blob/4d3bf4b/src/cli/index.js#L67-L69
does this still work?
https://github.com/tgrospic/rnode-client-js/blob/8517a3532043648c577b5e08fd6b385bd1507c80/src/nodejs/client.js#L31
in the generated .js, I see:
but when I try to use it that way, I get:
context: https://github.com/rchain-community/rv2020/tree/m3g/m3g 6cc4731
npm install
and thennpm run init
should reproduce the problem.