Claimed Stacks management
Claimed Stack Management
Get All Claimed Stacks
GET /claimed_stacksReturns all claimed stacks for the currently registered node badges.
Response Status Codes
200 OK: Successfully retrieved claimed stacks500 Internal Server Error: Failed to retrieve claimed stacks from state manager
Response
[
{
"stack_small_id": 1,
"stack_id": "stack-123",
"selected_node_id": 123,
"num_claimed_compute_units": 1000,
"settlement_time": "2024-03-21T12:00:00Z",
"attestation_status": "Pending",
"requested_attestation_nodes": "[456, 789]",
"received_attestations": 1,
"required_attestations": 2,
"settlement_complete": false
}
]Response Fields
stack_small_id(integer): Unique small integer identifier for the stackstack_id(string): Unique string identifier for the stackselected_node_id(integer): ID of the node that claimed the stacknum_claimed_compute_units(integer): Number of compute units claimed for settlementsettlement_time(string): ISO timestamp when the settlement was initiatedattestation_status(string): Current status of attestations ("Pending", "Complete", "Failed")requested_attestation_nodes(string): JSON array of node IDs requested for attestationreceived_attestations(integer): Number of attestations received so farrequired_attestations(integer): Total number of attestations requiredsettlement_complete(boolean): Whether the settlement process is complete
Get Node Claimed Stacks
GET /claimed_stacks/:idReturns all claimed stacks for a specific node identified by its small ID.
Parameters
id(path, integer): Node small ID
Response Status Codes
200 OK: Successfully retrieved claimed stacks500 Internal Server Error: Failed to retrieve claimed stacks from state manager
Response
Same format as Get All Claimed Stacks, filtered for the specified node.
Example Error Response
{
"error": "Failed to get node claimed stacks"
}Notes
Claimed stacks represent stacks that have entered the settlement process
The settlement process requires attestations from other nodes
A stack is considered fully settled when:
Required number of attestations is received
All attestations are positive
No disputes are raised during the settlement period
The
requested_attestation_nodesfield contains a JSON-encoded array of node IDsSettlement status can be determined by comparing
received_attestationswithrequired_attestations
Last updated