console

command module
v0.0.0-...-9190965 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2022 License: Apache-2.0 Imports: 26 Imported by: 0

README

Console Example

This module contains an example using the SDK in this repository that supports a single payment channel controlled by two people through a command line interface using simple TCP network connection and JSON messages.

State

This example is a rough example and is brittle and is still a work in progress.

Usage

Run the example using the below commands.

git clone https://github.com/stellar/starlight
cd examples/console
go run .

Type help once in to discover commands to use.

Foreground events and commands are written to stdout. Background events are written to stderr. To view them side-by-side pipe them to a file or alternative tty device.

Example

Run these commands on the first terminal:

$ go run .
> listen :6000
> open
> deposit 100
> pay 4
> pay 46

Run these commands in the second terminal:

$ go run .
> connect :6000
> deposit 80
> pay 2
> declareclose
> close

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL