Skip to content

[Bounty #908] Implement /wallet/history with unified transfers + rewards#966

Closed
mtarcure wants to merge 1 commit intoScottcjn:mainfrom
mtarcure:feat/wallet-history-908
Closed

[Bounty #908] Implement /wallet/history with unified transfers + rewards#966
mtarcure wants to merge 1 commit intoScottcjn:mainfrom
mtarcure:feat/wallet-history-908

Conversation

@mtarcure
Copy link
Copy Markdown
Contributor

Closes #908 (fixes #775, #886)

Summary

  • Enhanced /wallet/history to query both pending_ledger (transfers) and epoch_rewards (mining payouts)
  • Returns unified, time-sorted response with offset/limit pagination
  • Response format matches the spec: {"ok": true, "miner_id": "...", "transactions": [...], "total": N}

What changed

The existing endpoint only returned transfers. Now it also includes mining rewards with type: "reward" and epoch metadata. All transactions are merged and sorted by timestamp descending.

Transaction types

type source description
transfer_out pending_ledger Sent transfer
transfer_in pending_ledger Received transfer
reward epoch_rewards Mining epoch payout

Example response

GET /wallet/history?miner_id=dual-g4-125&limit=50

{
  "ok": true,
  "miner_id": "dual-g4-125",
  "transactions": [
    {"type": "reward", "amount": 0.297, "epoch": 424, "timestamp": ..., "tx_hash": "reward_epoch_424_dual-g4-"},
    {"type": "transfer_in", "from": "founder_community", "amount": 10.0, "timestamp": ..., "tx_hash": "..."}
  ],
  "total": 42,
  "limit": 50,
  "offset": 0
}

🤖 Generated with Claude Code

The existing /wallet/history endpoint only returned transfers from
pending_ledger. This merges epoch_rewards (mining payouts) into the
response, adds offset pagination, and returns the expected format
with ok/miner_id/transactions/total envelope.

Fixes #775, #886. Bounty #908.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mtarcure mtarcure requested a review from Scottcjn as a code owner March 14, 2026 17:33
@github-actions github-actions bot added BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) node Node server related size/M PR: 51-200 lines labels Mar 14, 2026
@Scottcjn
Copy link
Copy Markdown
Owner

Thanks mtarcure! However, bounty #908 was already fulfilled by createkr's PR #945 (merged yesterday). Your unified history concept (transfers + rewards in one response) is a good enhancement idea — consider opening a new issue for it as a separate bounty.

Your DriftLock stress test (#127 on shaprai) was excellent work — keep contributing!

@Scottcjn Scottcjn closed this Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) node Node server related size/M PR: 51-200 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOUNTY: 15 RTC] Implement /wallet/history endpoint (fixes #775, #886) [BOUNTY] Report a bug with reproduction steps (0.5 RTC)

2 participants