Skip to content

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