stacks-blockchain-api
stacks-blockchain-api copied to clipboard
Stacking page API work
The explorer needs the API team to add certain stacking related data to existing API endpoints and new endpoints in order to make the new stacking page designs possible
Stacking page design: https://www.figma.com/design/gsgfw9WmMbETBEC4FbY2H9/Stacks-Explorer-%5BRedesign%5D?node-id=18-992&node-type=canvas&t=zJcwzoSDx8txT3UW-0
This notion doc describes this work in detail: https://www.notion.so/hiropbc/Stacking-Page-API-Requirements-a90981dbeef6465ba23b96a9297d6128
So far I think we're looking at the following tasks:
- Add pool addr to
/extended/v2/pox/cycles/<cycle>/signers/<signer_key>/stackersresponse forstacker_type: pooledentries. - Create new endpoint
/extended/v2/pox/cycle/<cycle>/poolswhich lists previously seendelegated_to: <principal>pools (queried from the stacking events table). - Add BTC rewards to the new endpoint
/extended/v2/pox/cycle/<cycle>/pools(should be queryable from the /new_burn_block event data). - Add total STX stacked and total BTC paid to the
/extended/v2/pox/cycles/{cycle_number}endpoint (btc amounts also queried from the /new_burn_block event data). - Modify stacks-core
/new_blockevent to include something like apox_cycle: { cycle_id: number; burn_block_start: number; burn_block_end: number; }property. Or modify the stack-core/new_burn_blockevent to include pox cycle ID. Unless we can already determine this from existing data, I don't think we can currently calculate BTC rewards for a pox cycle.