-
-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Labels
Description
Implement the /wallet/history Endpoint
Reward: 15 RTC
Background
The /wallet/history endpoint is documented in the API spec but returns 404. Multiple bug reports have been filed (#775, #886). Time to fix it.
Task
Add a /wallet/history endpoint to rustchain_v2_integrated_v2.2.1_rip200.py that returns transaction history for a given wallet/miner ID.
Expected Behavior
GET /wallet/history?miner_id=dual-g4-125&limit=50
Response:
{
"ok": true,
"miner_id": "dual-g4-125",
"transactions": [
{"type": "reward", "amount": 0.297, "epoch": 424, "timestamp": 1733..., "tx_hash": "..."},
{"type": "transfer_in", "from": "founder_community", "amount": 10.0, "timestamp": ..., "tx_hash": "..."},
...
],
"total": 42
}
Data Sources
ledgertable: all transfersepoch_rewardstable: mining rewardsbalancestable: current balance
Requirements
- Query both
ledgerandepoch_rewardstables - Return unified, sorted-by-time response
- Support
limitandoffsetpagination - Handle unknown miner_id gracefully (empty list, not error)
Tags: api, bug-fix, flask, sqlite
Reactions are currently unavailable