Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chain state provider + Currency Routes + Tests #15

Open
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

micahriggan
Copy link

@micahriggan micahriggan commented Mar 21, 2018

Api

Rest api should be generalized like below

router.use('api/:chain/:network/wallet/:walletId/balance', () => {
  let balance = await ChainStateProvider.getBalanceForWallet(chain, network, walletId);
  res.send({balance});
});

Chain State Provider

  • Each chain would implement this interface, then the REST api will function for that chain
  • Bitcoin based coins can inherit the BTCStateProvider
  • Should lower the barrier to adding new coins to the wallet

Tests

Still have a lot of work left to do here but partial coverage for the following

  • Coverage for address endpoints
  • Coverage for block endpoints
  • Coverage for transaction endpoints

@micahriggan micahriggan changed the title Chain state provider WIP: Chain state provider Mar 21, 2018
@micahriggan micahriggan changed the title WIP: Chain state provider Chain state provider + Currency Routes + Tests Mar 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant