npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@fabcotech/rchain-toolkit

v3.0.2

Published

Node JS utils and methods to interact with rchain's rnode api and proto interfaces

Downloads

883

Readme

rchain-toolkit

Up to date with rnode 0.13 alpha3

rchain-toolkit is a general purpose avascript/typescript library to interact with the RChain blockchain, and play with rholang expressions in node JS or the browser. It is not ready for production, not stable and the development is not completed yet.

It includes utils for easily deploying rholang code (smart contract), sending REV transactions, retreiving blocks, listen for data at unforgeable names, public names etc... All of the methods, parameters, and returned values are typed using typescript so the developer can comfortably code.

rchain-toolkit provides some GRPC utils since rnode's main API is GRPC, but it does not strictly assume the transport. This library builds proto objects based on rnode's proto definition files and some user parameters. GRPC is not included in the library, making it potentially elligible for the browser, GRPC and GRPC's proto-loader libraries must be installed separatly in your own project.

The examples folder contains example for each GRPC interface that is currently supported, each one of them exists in typescript and javascript.

Examples

See examples/

Development

Compiling

typescript must be installed on your machine

npm install -g typescript

Compile the .ts files in src directory to the main dist directory.

npm run build

Jest tests

The jest tests are all the tests that do not require proto-loader or GRPC, because it does not work under jest's runtime.

Run the jest tests

npm run test:jest

Full tests

The full tests are the tests that interact with the .proto files, and rnode. A local rnode instance must be running on localhost:40401 with --shard-name dev and automatic proposal (every 5 seconds for example).

Run the full tests

npm run build:tests
npm run test:full -- --private-key AAA --public-key BBB
npm run test:full -- --private-key 28a5c9ac133b4449ca38e9bdf7cacdce31079ef6b3ac2f0a080af83ecff98b36 --public-key 04be064356846e36e485408df50b877dd99ba406d87208add4c92b3c7d4e4c663c2fbc6a1e6534c7e5c0aec00b26486fad1daf20079423b7c8ebffbbdff3682b58

Generate javascript and typescript protos

sudo npm i -g protobufjs
./generate-rnode-protos.sh