Skip to content
A Raiden node client written in Go
Go
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Fix coverage command to test all directories Jul 11, 2019
.github Initial commit Jul 3, 2019
address
channels Fix tests to use ipv4 ips when environment variable is specified Jul 11, 2019
config Initial commit Jul 3, 2019
connections Fix tests to use ipv4 ips when environment variable is specified Jul 11, 2019
payments Fix tests to use ipv4 ips when environment variable is specified Jul 11, 2019
pending_transfers Fix tests to use ipv4 ips when environment variable is specified Jul 11, 2019
tokens Fix tests to use ipv4 ips when environment variable is specified Jul 11, 2019
util Initial commit Jul 3, 2019
.gitignore Remove coverage.txt and add gitignore Jul 12, 2019
LICENSE Initial commit Jul 3, 2019
README.md Add coverage badge in README Jul 11, 2019
client.go Add pending transfers client and add remaining unit tests Jul 4, 2019
client_test.go Initial commit Jul 3, 2019

README.md

go-raiden-client

GoDoc CircleCI Coverage Status

A client for a Raiden node written in Go. This is meant to be used for backend development environments where you are able to connect to running Raiden node(s).

Getting Started

Get the Raiden client within your go path by using go get github.com/cpurta/go-raiden-client.

You can then start writing some code using the client. Here is an example that will connect to a locally running Raiden node and get our Ethereum address that the node is using.

package main

import (
	"context"
	"log"
	"net/http"

	"github.com/cpurta/go-raiden-client/config"
	"github.com/ethereum/go-ethereum/common"
)

func main() {
	var (
		err          error
		raidenConfig = &config.Config{
			Host:       "http://localhost:5001",
			APIVersion: "v1",
		}

		raidenClient = NewClient(raidenConfig, http.DefaultClient)
		address common.Address
	)

	// get our token address from the raiden node
	if address, err = raidenClient.Address().Get(context.TODO()); err != nil {
		log.Println("there was an error getting raiden address:", err.Error())
	}

	log.Println("raiden address:", address.Hex())
}

Contributing

If you notice some issues please feel free to create one in the repo with as much detailed information on how you encountered your issues and any error messages. If you would like to add on features feel free to fork and submit a pull request.

LICENSE

Distributed under the MIT License

You can’t perform that action at this time.