|
1 | 1 |
|
2 | 2 | # How to run |
| 3 | +At repo root folder, run the following command to start the server |
3 | 4 |
|
4 | 5 | ``` |
5 | | -docker compose up --build -d |
| 6 | +docker compose -f Docker-Compose.yml up --build |
6 | 7 | ``` |
7 | 8 | and the server will run on port 8080 |
8 | 9 |
|
@@ -96,6 +97,8 @@ and the server will run on port 8080 |
96 | 97 | - Must obtain transactionID before any write operation |
97 | 98 | - Each transactionID can only be used once |
98 | 99 | - Ensures idempotency and prevents duplicate transactions |
| 100 | + - We can also put transaction validation logic here, and return hash as transactionID |
| 101 | + - And when transactionID is used, we can use it to validate the transaction in middleware |
99 | 102 | 4. Deposit |
100 | 103 | - PUT /api/v1/users/{userID}/wallet/deposit |
101 | 104 | - Deposits funds into user's wallet |
@@ -146,10 +149,10 @@ and the server will run on port 8080 |
146 | 149 | - Use pagination for efficient large data retrieval |
147 | 150 | - User can query with time |
148 | 151 | - Query parameters: |
149 | | - - createdBefore: RFC3339 timestamp |
150 | | - - IDBefore: Transaction ID for pagination |
151 | | - - limit: Max number of records (default 100) |
152 | | - - Returns transactions sorted by creation time |
| 152 | + - createdBefore (optional, RFC3339 timestamp string): RFC3339 timestamp, like `2024-12-16T03:59:02.608558Z` |
| 153 | + - IDBefore (optional, int): Transaction ID for pagination |
| 154 | + - limit (optional, int): Max number of records (default 100) |
| 155 | + - Returns transactions sorted by creation time descending |
153 | 156 |
|
154 | 157 | ## Postman Collection |
155 | 158 | [Postman Collection](./Cryptocom.postman_collection.json) |
|
0 commit comments