Git Product home page Git Product logo

smilo-api's People

Contributors

dionjakobs avatar elkanroelen avatar mathyn avatar thomasmodeneis avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

smilo-api's Issues

Unit tests fail if a LMDB database already exists

Steps to reproduce:

  • Start the API like you normally would (with nodes running locally)
  • Stop the API
  • Start unit tests

You'll notice the unit tests fail with lots of weird assertions. Deleting the database and then running the tests again will clear these errors. It appears the database is not yet properly mocked?

Implement /status endpoint

The /status endpoint now always returns "ok". I think we can do more with this:

  • Show connection status with each node
  • Show last received block timestamp
  • Show block height
  • Show database stats (amount of transactions/blocks/addresses stored)

Basically any info which might help us detect problems while at the same time not exposing any sensitive information.

Data should be returned as JSON. In the future we might be able to use this endpoint to monitor the API :)

Add endpoints for retrieving asset information

Two endpoints should be added:
/asset
/asset/<asset_id>

The first should return all known assets (XSM and XSP) in a list. The second should return detailed information about a specific asset.

For now these endpoints do not need to be backed by a database. The returned data should be hardcoded.

Returned data:

totalSupply = 200000000;
       name = “Smilo”;
       decimals = 0;
       symbol = “XSM”;

totalSupply = 200000000000000000000000000;
       name = “SmiloPay”;
       decimals = 18;
       symbol = “XSP”;

Extend transaction validation logic

The logic validating if a transaction is valid is very basic right now. We should extend this so it also covers at least:

  • Signature validation
  • Balance validation

Clean up unused controllers/services

Looking at the API it appears the BalanceController is no longer used (superseded by the AddressController).

The PriceController is a dummy right now and the StoredCoinService is not used (and will look very different in its final form). Since it might be a long time before we start using these wouldn't it be better to just remove them right now? Makes for a cleaner code base.

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.