Skip to content

Add getboostsbyaddress RPC: list content boosts for an address#915

Open
only1question wants to merge 2 commits into
0.22from
feature/get-boosts-by-address
Open

Add getboostsbyaddress RPC: list content boosts for an address#915
only1question wants to merge 2 commits into
0.22from
feature/get-boosts-by-address

Conversation

@only1question

Copy link
Copy Markdown
Collaborator

Summary

Adds a new getboostsbyaddress RPC method to the contents group that lists content boosts related to a given address.

What it does

  • Returns boosts sent by and received for the specified address
  • Includes sent/received amount totals in PKOIN
  • Supports pagination via topHeight

Commits

  • Add getboostsbyaddress RPC: list content boosts for an address
  • getboostsbyaddress: add sent/received amount totals in PKOIN

Notes

  • Branched off 0.22.
  • Merge will be performed manually.

New 'contents' RPC method returning boosts related to an address in both
directions (sent by the address and received on its content), with
height-anchored pagination and per-direction totals.

Params: address, topHeight (0 = current height, search downwards),
direction (sent/received/both), count (max 1000), offset.
Response: { height, totals: {sent, received}, boosts: [...] }.

boostAmount is returned in PKOIN via ValueFromAmount. Received boosts are
deduplicated across content versions via the Last table; results are
ordered by height then txid for stable pagination.
Alongside the existing per-direction boost counts, totals now also
expose sentAmount and receivedAmount: the summed boost value (inputs
minus outputs of each Type 208 tx) in PKOIN, respecting topHeight and
ignoring count/offset like the counts do.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant