Implemented /wallet/history — unified transaction history from 3 data sources #1004
mtarcure
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all — just submitted PR #997 implementing the
/wallet/historyendpoint that was missing (issues #775 and #886).What it does
The endpoint was documented in the API spec but only queried
pending_ledger. The rewrite pulls from three sources:ledgertable — confirmed transfers (the immutable chain)epoch_rewardstable — mining reward payoutspending_ledger— in-flight transfers that haven't confirmed yetReturns a unified, time-sorted response:
{ "ok": true, "miner_id": "dual-g4-125", "transactions": [ {"type": "reward", "amount": 0.297, "epoch": 424}, {"type": "transfer_in", "from": "founder_community", "amount": 10.0} ], "total": 42 }Added
offsetpagination alongsidelimit, and handles missing tables gracefully so it works on nodes that don't have all tables populated.PR: #997
Feedback welcome — especially on edge cases with the miner_id vs address resolution.
Beta Was this translation helpful? Give feedback.
All reactions