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

Create Wallet Service Microservice #224

Open
BrosG opened this issue May 26, 2023 · 0 comments
Open

Create Wallet Service Microservice #224

BrosG opened this issue May 26, 2023 · 0 comments

Comments

@BrosG
Copy link
Contributor

BrosG commented May 26, 2023

Description

The Wallet Service is responsible for managing all wallet-related operations. This includes wallet creation, balance checks, token transfers, and transaction history. The service will be a self-contained application with its own database and will interact with other services through well-defined APIs.

Proposed Functionality

Wallet Creation: The service should provide an API for wallet creation. This will include generating a new wallet address, storing it in the database, and returning the address to the user.

Balance Checks: The service should provide an API for checking the balance of a wallet. This might involve interacting with the blockchain to get the most up-to-date balance.

Token Transfers: The service should provide an API for transferring tokens from one wallet to another. This will involve submitting the transaction to the blockchain and monitoring it until it's confirmed.

Transaction History: The service should provide an API for retrieving the transaction history of a wallet. This might involve interacting with the blockchain to get a list of past transactions.

Implementation Steps

Extract Wallet-Related Code: Identify and separate all the wallet-related code from the current monolith into the new Wallet Service. This includes relevant parts from the wallet.model.js, wallet.controller.js, and any other relevant parts.

Create Wallet Service APIs: Design and implement the APIs for wallet creation, balance checks, token transfers, and transaction history.

Setup Database for Wallet Service: As part of the microservice architecture, the Wallet Service should have its own separate database. We need to set this up and migrate any existing wallet data to it.

Update Other Services to Use Wallet Service APIs: Any other service that needs to perform wallet-related operations should do so by calling the Wallet Service's APIs. Update the code in these services to replace direct database accesses with API calls.

Deploy Wallet Service: Deploy the Wallet Service as a standalone application. This could involve setting up a new server or using a service like AWS Lambda.

Test Wallet Service: Thoroughly test the Wallet Service to ensure it works correctly. This should include both functional testing of the APIs and load testing to ensure it can handle the expected number of requests.

Please discuss this proposal and let me know of any adjustments or additions that should be made. Once we've finalized the specifications, we can break this down into smaller tasks and start the implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant