From a2da20c18c4c7744ea2de03380c523191fe21f21 Mon Sep 17 00:00:00 2001 From: manoranjith Date: Fri, 16 Oct 2020 22:32:33 +0530 Subject: [PATCH] Update readme (#127) * Update Readme for release v0.4.0 Signed-off-by: Manoranjith --- README.md | 22 ++++++++-- .../{README.md => TryingItOut.md} | 40 ++++++++++++------- 2 files changed, 44 insertions(+), 18 deletions(-) rename cmd/perunnodecli/{README.md => TryingItOut.md} (89%) diff --git a/README.md b/README.md index 48136b07..3a074ee7 100644 --- a/README.md +++ b/README.md @@ -55,11 +55,21 @@ The current version provides the following features: |Contacts Provider|YAML file | |User API|Two Party Payment API | |User API Adapter|gRPC | +|Persistence|LevelDB| -An example for a complete sequence of using the perun node can be found in -the integration test in `api/grpc` package in `server_integ_test.go`. An -independently running node binary is yet to be implemented and will be -included in the next release. +This project currently contains two executable packages located in the `cmd` directory. + +- `perunnode`: An app for starting a running instance of perun node. It can + also generate configuration artifacts for trying out the node. + +- `perunnodecli` is an app with interactive CLI interface that serves two purposes: + - easy way to try out payment channel API. + - reference implementation for using the generated grpc client stubs for + payment channel API. + +For detailed information on the features offered by these two applications and +steps on how to try them out, see the +[Trying It Out](cmd/perunnodecli/TryingItOut.md) article. ## Getting Started @@ -95,8 +105,12 @@ golangci-lint run ./... # Test go test -tags=integration -count=1 ./... + +# Build peurnnode and perunnodecli binaries +make ``` + ## License perun-node is open-sourced under the Apache-2.0 license. See the diff --git a/cmd/perunnodecli/README.md b/cmd/perunnodecli/TryingItOut.md similarity index 89% rename from cmd/perunnodecli/README.md rename to cmd/perunnodecli/TryingItOut.md index 20501f10..0fe5c027 100644 --- a/cmd/perunnodecli/README.md +++ b/cmd/perunnodecli/TryingItOut.md @@ -1,18 +1,30 @@ -# Perun Node CLI - A client application to connect with and use the API of perun node. +# Trying out Perun Node and Perun Node CLI -Perun Node CLI is an interactive CLI based client application to connect with -and use the API of perun node. Currently the app connects via grpc protocol to -the payment channel API. The app provides different sets of commands:chain, -node, session, contact, channel, payment. Each of these commands have -sub-commands to do specific operations. In the app, type `help` to get -information on each of these commands. Typing the command without any -sub-command will return the help messages with the list of sub-commands. -The chain command provides options to directly interact with blockchain such as -for deploying contracts, while the rest of the commands are for accessing the -API of the node. +#### perunnode -## Trying out perunnode-cli +An application for starting a running version of perun node that +serves payment channel API on using grpc protocol. Any application can connect +with the perunnode by directly integrating the grpc client stubs in their +project. The proto file for generating the grpc stub can be found at +`api/grpc/pb/api.proto`. + +#### perunnodecli + +An application with interactive CLI interface that uses generated grpc client +stubs to interact with a running instance of perun node. Besides this, it does +not share any code with rest of the project. + +It provides different sets of commands: chain, node, session, contact, channel, +payment. Each of these commands have sub-commands to do specific operations. +In the app, type `help` to get information on each of these commands. + +The chain command provides options to directly interact with blockchain such +as for deploying contracts, while the rest of the commands are for accessing +the API of the node. + + +## Pre-requisites To try out the perunnode-cli app on your machine, you would require the following things to be running: @@ -21,7 +33,7 @@ following things to be running: 2. Running perunnode connected to the blockchain node. 3. Configuration files for session, in a path accessible by perunnode. -### Pre-requisites +Follow the below steps to setup the pre-requisites: 1. Start a blockchain node: @@ -105,7 +117,7 @@ Leave this running in this terminal. Now all the pre-requisites for `perunnode-cli` are setup. -### Opening a session, opening channel within it, making payments & closing it +## Opening a session, opening channel within it, making payments & closing it 1. Open two new terminals side by side, one each for alice and bob roles respectively. In both the terminal, start the perunnode-cli app using below