Skip to content

feat: Add wallet activity feed, sync job, dividend distribution, and multi-sig pause (#811, #818, #832, #826) - #842

Merged
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
chiscookeke11:feat/wallet-activity-sync-dividends-multisig-pause-811-818-832-826
Aug 26, 2026
Merged

feat: Add wallet activity feed, sync job, dividend distribution, and multi-sig pause (#811, #818, #832, #826)#842
Chucks1093 merged 1 commit into
accesslayerorg:mainfrom
chiscookeke11:feat/wallet-activity-sync-dividends-multisig-pause-811-818-832-826

Conversation

@chiscookeke11

Copy link
Copy Markdown
Contributor

Summary of Changes

Consolidated resolution for Issues #811, #818, #832, and #826 under a single PR.

1. Issue #811: Unified Chronological Wallet Activity Feed

  • Implemented GET /wallets/:address/activity?cursor=&limit= endpoint returning all on-chain events for a wallet.
  • Enforced JWT validation matching :address (returns 401 when missing or mismatched).
  • Aggregated across buys, sells, incoming/outgoing transfers, burns, and dividend payouts.
  • Returns unified items formatted as { id, type, keyId, creatorName, amount, timestamp, txHash } sorted newest first.
  • Supports cursor-based pagination (default 20, max 100) and returns empty array [] when no events exist.

2. Issue #818: Wallet Activity Sync Job for Transfers and Burns

  • Implemented background streaming listener ActivitySyncJob parsing keys_transferred and keys_burned events.
  • Writes dual records for keys_transferred (sender transfer_out, recipient transfer_in).
  • Writes single record for keys_burned (burner burn).
  • Built exponential backoff retry mechanism (up to 3 retries).
  • Enforced idempotency on transaction hash txHash + actor + type.
  • Added automatic reconnection on dropped stream.

3. Issue #832: Dividend Distribution Endpoint

  • Added POST /creator/:keyId/dividends requiring key creator JWT authentication (403 for non-creators).
  • Validated positive non-zero totalAmount (422 if 0 or negative).
  • Checked creator XLM wallet balance before execution (400 if insufficient).
  • Persisted DividendDistribution and calculated per-holder DividendClaim records.
  • Returned { distributionId, totalAmount, holderCount, perKeyAmount }.

4. Issue #826: Multi-Sig Pause Coordination

  • Added POST /admin/keys/:keyId/pause/propose requiring admin JWT to initiate a pause proposal and emit pause_proposal_created.
  • Added POST /admin/keys/:keyId/pause/approve requiring a different admin JWT; rejects proposing wallet with 403.
  • Approving admin executes pause, marks proposal executed, pauses trading on key, and emits trading_paused notification.
  • 403 returned for non-admin callers on both endpoints.

Linked Issues

Closes #811
Closes #818
Closes #832
Closes #826

@drips-wave

drips-wave Bot commented Aug 26, 2026

Copy link
Copy Markdown

@chiscookeke11 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@Chucks1093
Chucks1093 merged commit 1831362 into accesslayerorg:main Aug 26, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment