GithubHelp home page GithubHelp logo

jadinek / wallet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from interledgerjs/wallet

0.0 1.0 0.0 425 KB

Work In Progress: A demo ILP wallet being built by the interns at Coil

License: Apache License 2.0

TypeScript 95.66% JavaScript 4.23% Shell 0.12%

wallet's Introduction

A demo ILP wallet

This project is being built by the interns at Coil and is NOT ready to use. We'll make a release as soon as it is.

CircleCI codecov

If there are features you think are important feel free to log issues that will help us practice our agile workflow and product management.

Goal

A working REST API that exposes the functions of simple wallet system (accounts, users, transactions etc) and integrates the functions required of an ILSP or wallet that can peer with connectors on the Interledger.

Folders

All source code is expected to be TypeScript and is placed in the src folder. Tests are put in the test folder.

The NPM package will not contain any TypeScript files (*.ts) but will have typings and source maps.

Environmental variables

The environmental variable file, in the root folder, is used to store and configure variables for database management, development and deployment. This repo is supplied with an example.env.

Please change the example variables to suit your needs.

Scripts

  • clean : Cleans the build folder and test output
  • build : Build the project
  • lint : Run the linter over the project
  • test : Run the unit tests and produce a code coverage report
  • loadtest : Run the loadtest and produces an artillery report afterwards
  • docs : Build the docs
  • consolelog : will show Winston logging for debugging

Endpoints

Users

Endpoints for user data

Path Description Expected Output Expected Body Input
post /admin Check for duplicate admin-level users, create a new admin user in db, hashes pssword 200 { userName, pssword }
post /users Check for duplicate users, create a new user in db, hashes pssword 200 { userName, pssword }
get /users Return all users as an array of objects [ { id, userName, dateCreated, deletedAt, role, pssword }, ... ] None
get /users/?id=[id] Return a user specified by id { id, userName, dateCreated, deletedAt, role, pssword } None
get /users/?username=[username] Return a user specified by username { id, userName, dateCreated, deletedAt, role, pssword } None
put /user/:id Update a user specified by id 200 At least one: { userName, dateCreated, deletedAt, pssword }
delete /user/:id Soft delete a user specified by id 200 None

Accounts

Endpoints for account data

Path Description Expected Output Expected Body Input
post /accounts Add new account to db 200 { name, owner}
get /accounts Return all accounts as an array of objects [ { id, name, owner, balance, deletedAt, lastUpdated }, โ€ฆ ] None
get /accounts/?id=[id] Return an account specified by id { id, name, owner, balance, deletedAt, lastUpdated } None
get /accounts/?owner=[owner] Return all accounts associated with specified owner as an array of objects [ { id, name, owner, balance, deletedAt, lastUpdated }, ... ] None
put /accounts/:id Update an account specified by id 200 At least one: { name, owner, balance }
delete /accounts/:id Soft delete an account specified by id 200 None

Transactions

Endpoints for transaction data

TODO

Services

Services used throughout the API

Path Description Expected Output Expected Body Input
post /token User login and token signing { token } { username, pssword }

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.