Giter VIP home page Giter VIP logo

raiden-api-client's Introduction

Raiden-client

Build Status Quality Gate Status Coverage NPM NPM NPM

Introduction

A lightweight Raiden Network API TypeScript client to interact with a Raiden Network node.

Install

npm i raiden-api-client --save

Usage

import RaidenClient from "raiden-api-client";

async function printChannels() {
  const client = new RaidenClient("http://localhost:5001/api");
  const channels = await client.getChannels();
  console.log(channels);
}

Documentation

Contributing

See CONTRIBUTING.

License

This project is released under the MIT License. See LICENSE.

raiden-api-client's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar wslyvh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

elpr aiinkiestism

raiden-api-client's Issues

[REQ] Add status codes and error message to responses

Is your feature request related to a problem? Please describe.
The Raiden API describes all expected responses and status codes for each call. The client only returns a generic error 'invalid response' right now.

Describe the solution you'd like
Include more descriptive error messages, incl. its status code to make troubleshooting more efficient.

E.g. for registering a token, the following responses can be expected:

  • 201 Created – A token network for the token has been successfully created.
  • 402 Payment Required – Insufficient ETH to pay for the gas of the register on-chain transaction
  • 404 Not Found – The given token address is invalid.
  • 409 Conflict – The token was already registered before, or The registering transaction failed.
  • 501 Not Implemented – Registering a token only works on testnet temporarily. On mainnet this error is returned.

See the Raiden API documentation: https://raiden-network.readthedocs.io/en/latest/rest_api.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.