Skip to content

rchain-community/repl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

repl

Node.js based RNode REPL interface.

This package enabled applications to use the interal gRPC interface of the RChain RNode server to execute Eval and Run commands.

Library usage

Install using NPM:

npm i @rchain-community/repl

Usage:

const REPL = require('@rchain-community/repl')

const repl = new REPL(host, port)
repl.eval(myRholangCode)
  .then(output => {
    console.log(output)
  })
  .catch(err => {
    console.log(err)
  })

CLI usage

You can also use this package as a CLI script to execute Rholang programs.

In order to do so, first install it globally:

npm i -g @rchain-community/repl

Usage:

rnode-repl <program.rho> [host] [port]

About

Node.js based RNode REPL interface.

Resources

Stars

Watchers

Forks

Packages

No packages published