Skip to content

Commit

Permalink
Add Install Instructions and cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanbenten committed Jan 2, 2019
1 parent a230948 commit bf210e6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
15 changes: 11 additions & 4 deletions README.md
@@ -1,14 +1,21 @@
# raiden-on-storj
Scripts for Integration of Raiden in the Storj Network

## Dependencies
- UNIX or OSX
- Go 1.11(.4)
- curl

# Install of onboarding tools
1. Clone Repo with: `git clone https://github.com/stefanbenten/raiden-on-storj`
2. Move into directory with: `cd raiden-on-storj`
3. Execute: `go install ./...`

Now the binaries satellite and client should be available!

## Dependencies
- UNIX or OSX
- Go 1.11(.4)
- curl
# Usage

Per Default a satellite is running and you are able to connect your Client to it by running:
`client`

It should generate a Ethereum Address/Wallet for you and open a webbrowser pointing to the Web Interface of the Client App.
16 changes: 9 additions & 7 deletions client/main.go
Expand Up @@ -176,25 +176,25 @@ func main() {
raiden := flag.String("listen-raiden", "0.0.0.0:7709", "Listen Address for Raiden Endpoint")
keystore := flag.String("keystore", "./keystore", "Keystore Path")
pw := flag.String("password", "superStr0ng", "Password used for Keystore encryption")

flag.Parse()

//Set global variables
raidenEndpoint = *raiden
keystorePath = *keystore
password = *pw
log.Println(*raiden, raidenEndpoint)
log.Println(*pw, password)
log.Println(*keystore, keystorePath)

// if Override is requested, it deletes all existing keystore files
if *override {
err := os.RemoveAll(keystorePath)
if err != nil {
log.Fatalln("Could not delete keystore files, due to:", err)
}
}

//Load Ethereum Address or generate a new one
prepareETHAddress()
//When using the direct flag start Raiden directly and request payments

//When using the direct flag start Raiden directly and request payments, else open an browser interface for interaction
if *skip {
//Start Raiden Binary
log.Println("Skip Flag set, starting Raiden Binary..")
Expand All @@ -208,9 +208,11 @@ func main() {
}
active = true
} else {
//If not starting directly, open the interface
log.Println("Opening Website for User Interaction")
_ = browser.OpenURL("http://" + *listen)
err := browser.OpenURL("http://" + *listen)
if err != nil {
log.Println("error opening webbrowser window")
}
}
log.Printf("Starting Webserver on address: %v", *listen)
setupWebserver(*listen)
Expand Down

0 comments on commit bf210e6

Please sign in to comment.