mintlayer-core
mintlayer-core copied to clipboard
API server design/creation
(Copied over from Gitlab)
This issue incorporates the API server tasks that are required for its initial release
- [x] Use the storage API to read data from the database in the web server
- [ ] Address endpoint TODOs:
- [x] Add InMemory support for testing
- [x] Add tests for the address endpoint
- [x] Add transaction history to the response
- [x] Add pool support
- [x] Add account support
- [ ] Add token support to the response
- [ ] Add support for all TxOutput types
- [ ] Address endpoint TODOs:
- [x] Write tests for the web server based on mocks of the database and ensure the behavior and format is acceptable
- [x] Attempt to store data in postgres from the scanner, and write the config/command line arguments to be used to access the database (host, port, credentials, etc)
- [x] Write the config/command line arguments for configuring the web server to access postgres (host, port, credentials, etc)
- [x] See if we can have a standalone test to write and read data from a docker instance of postgres. This can go into CI
- [x] Figure out the additional required functions, besides the basic ones available now, like get_best_block, to go into the API, and add them one by one
- [x] Currently there's no way to see all available staking pools with their information to know what to delegate to
- [x] Database tests
- [ ] Create tests that attempt SQL injection attacks on the web API
- [x] Implement
ApiServerStorage
for unit tests to force database errors
- [x] #1103