-
Notifications
You must be signed in to change notification settings - Fork 124
Closed
Labels
Description
The API currently uses the Stacks 2.0 stx_lock_event
event to store and retrieve "locked" and "unlock_height" data when responding to account balance requests. This was implemented in #324 -- the account balance response is currently:
interface StxBalance {
balance: string;
total_sent: string;
total_received: string;
total_fees_sent: string;
total_miner_rewards_received: string;
/* [PoX] The transaction where the lock event occurred. Empty if no tokens are locked. */
lock_tx_id: string;
/* [PoX] The amount of locked STX, as string quoted micro-STX. Zero if no tokens are locked. */
locked: string;
/* [PoX] The STX chain block height of when the lock event occurred. Zero if no tokens are locked. */
lock_height: number;
/* [PoX] The burnchain block height of when the lock event occurred. Zero if no tokens are locked. */
burnchain_lock_height: number;
/* [PoX] The burnchain block height of when the tokens unlock. Zero if no tokens are locked. */
burnchain_unlock_height: number;
}
PoX v2 introduces several new features, some already merged:
Some WIP:
- PoX Updates:
stack-unlock
stacks-network/stacks-core#2534 - PoX Updates:
stack-increase
stacks-network/stacks-core#2533 - Emit simulated events for delegate-stack-stx in PoX contract stacks-network/stacks-core#2556
It doesn't look like there are any new events (similar to stx_lock_event
) for these new PoX operations -- can/will the various new operations just emit another stx_lock_event
event. If so, does it make sense for the API use the same event to query for the latest locked
state when returning stx balance data?
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
✅ Done