Skip to content

Commit

Permalink
Update readme (#127)
Browse files Browse the repository at this point in the history
* Update Readme for release v0.4.0

Signed-off-by: Manoranjith <ponraj.manoranjitha@in.bosch.com>
  • Loading branch information
manoranjith committed Oct 16, 2020
1 parent 3630696 commit a2da20c
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 18 deletions.
22 changes: 18 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
40 changes: 26 additions & 14 deletions cmd/perunnodecli/README.md → cmd/perunnodecli/TryingItOut.md
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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:

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a2da20c

Please sign in to comment.