openapi: 3.1.0 info: title: atoma-daemon description: '' license: name: Apache-2.0 identifier: Apache-2.0 version: 0.1.0 servers: - url: http://localhost:3001 description: Local development server paths: /attestation_disputes/against/nodes/{node_id}: get: tags: - Attestation disputes summary: List against attestation disputes description: Lists all attestation disputes against a specific node. operationId: attestation_disputes_against_nodes_list parameters: - name: node_id in: path description: The small ID of the node whose disputes should be retrieved required: true schema: type: integer format: int64 responses: '200': description: List of against attestation disputes where the specified node is the defendant content: application/json: schema: type: array items: $ref: '#/components/schemas/StackAttestationDispute' '500': description: Internal server error /attestation_disputes/own/nodes/{node_id}: get: tags: - Attestation disputes summary: List own attestation disputes description: Lists all attestation disputes initiated by a specific node. operationId: attestation_disputes_own_nodes_list parameters: - name: node_id in: path description: The small ID of the node whose initiated disputes should be retrieved required: true schema: type: integer format: int64 responses: '200': description: List of own attestation disputes where the specified node is the plaintiff content: application/json: schema: type: array items: $ref: '#/components/schemas/StackAttestationDispute' '500': description: Internal server error /claimed-stacks/claimed_stacks/nodes/{node_id}: get: tags: - Claimed stacks summary: List claimed stacks description: Lists all claimed stacks for a specific node identified by its small ID. operationId: claimed_stacks_nodes_list parameters: - name: node_id in: path description: Node small ID required: true schema: type: integer format: int64 responses: '200': description: List of claimed stacks matching the criteria content: application/json: schema: type: array items: $ref: '#/components/schemas/StackSettlementTicket' '500': description: Internal server error /nodes/claim-funds: post: tags: - Nodes summary: Create claim funds transaction description: Claims funds for completed stacks. operationId: nodes_claim_funds requestBody: content: application/json: schema: $ref: '#/components/schemas/NodeClaimFundsRequest' required: true responses: '200': description: Node claim funds successful content: application/json: schema: $ref: '#/components/schemas/NodeClaimFundsResponse' '500': description: Failed to submit claim funds /nodes/model-subscribe: post: tags: - Nodes summary: Create model subscription transaction description: |- Create model subscription transaction Subscribes a node to a specific model. operationId: nodes_model_subscribe requestBody: content: application/json: schema: $ref: '#/components/schemas/NodeModelSubscriptionRequest' required: true responses: '200': description: Node model subscription successful content: application/json: schema: $ref: '#/components/schemas/NodeModelSubscriptionResponse' '500': description: Failed to submit model subscription transaction /nodes/register: post: tags: - Nodes summary: Create node registration transaction description: |- Create node registration transaction Registers a new node in the system. operationId: nodes_register requestBody: content: application/json: schema: $ref: '#/components/schemas/NodeRegistrationRequest' required: true responses: '200': description: Node registration successful content: application/json: schema: $ref: '#/components/schemas/NodeRegistrationResponse' '500': description: Failed to submit registration transaction /nodes/task-subscribe: post: tags: - Nodes summary: Create task subscription transaction description: |- Create task subscription transaction Subscribes a node to a specific task. operationId: nodes_task_subscribe requestBody: content: application/json: schema: $ref: '#/components/schemas/NodeTaskSubscriptionRequest' required: true responses: '200': description: Node task subscription successful content: application/json: schema: $ref: '#/components/schemas/NodeTaskSubscriptionResponse' '500': description: Failed to submit task subscription transaction /nodes/task-unsubscribe: delete: tags: - Nodes summary: Delete task subscription description: Unsubscribes a node from a specific task. operationId: nodes_task_unsubscribe requestBody: content: application/json: schema: $ref: '#/components/schemas/NodeTaskUnsubscriptionRequest' required: true responses: '200': description: Node task unsubscription successful content: application/json: schema: $ref: '#/components/schemas/NodeTaskUnsubscriptionResponse' '500': description: Failed to submit task unsubscription /nodes/task-update-subscription: post: tags: - Nodes summary: Modify task subscription description: |- Modify task subscription Updates an existing task subscription for a node. operationId: nodes_task_update_subscription requestBody: content: application/json: schema: $ref: '#/components/schemas/NodeTaskUpdateSubscriptionRequest' required: true responses: '200': description: Node task update subscription successful content: application/json: schema: $ref: '#/components/schemas/NodeTaskUpdateSubscriptionResponse' '500': description: Failed to submit task update subscription /stacks/stacks/nodes/{node_id}: get: tags: - Stacks summary: List stacks description: Lists all stacks for a specific node identified by its small ID. operationId: stacks_nodes_list parameters: - name: node_id in: path description: Node small ID required: true schema: type: integer format: int64 - name: min_fill_fraction in: query description: Optional minimum fill fraction (0.0 to 100.0) required: false schema: type: number format: double responses: '200': description: List of Stack objects matching the criteria content: application/json: schema: type: array items: $ref: '#/components/schemas/Stack' '500': description: Internal server error /subscriptions/nodes/{node_id}: get: tags: - Subscriptions summary: List subscriptions description: Lists all subscriptions for a specific node identified by its small ID. operationId: subscriptions_nodes_list parameters: - name: node_id in: path description: The small ID of the node whose subscriptions should be retrieved required: true schema: type: integer format: int64 responses: '200': description: List of node subscriptions content: application/json: schema: type: array items: $ref: '#/components/schemas/NodeSubscription' '500': description: Internal server error /tasks/: get: tags: - Tasks summary: List all tasks description: Retrieves all tasks from the state manager. operationId: tasks_list responses: '200': description: List of all tasks content: application/json: schema: type: array items: $ref: '#/components/schemas/Task' '500': description: Internal server error components: schemas: NodeAttestationProofRequest: type: object description: |- Represents a request to submit a node attestation proof. This struct encapsulates the necessary parameters for submitting a node attestation proof. required: - stack_small_ids properties: gas: type: string description: |- Optional gas object ID. If not provided, the default is `None`. gas_budget: type: - integer - 'null' format: int64 description: |- Optional gas budget. If not provided, the default is `None`. minimum: 0 gas_price: type: - integer - 'null' format: int64 description: |- Optional gas price. If not provided, the default is `None`. minimum: 0 node_small_id: type: - integer - 'null' format: int64 description: |- Optional node badge ID. If not provided, the default is `None`. stack_small_ids: type: array items: type: integer format: int64 description: The small IDs of the stacks to attest to. NodeAttestationProofResponse: type: object description: |- Represents a response to a node attestation proof request. This struct contains the transaction digests, which are unique identifiers for the transactions associated with the attestation proof. required: - tx_digests properties: tx_digests: type: array items: type: string description: The transaction digests. NodeClaimFundsRequest: type: object description: |- Represents a request to claim funds from a stack. This struct encapsulates the necessary parameters for claiming funds from a stack, including optional gas-related fields. required: - stack_small_ids properties: gas: type: string description: |- Optional gas object ID. If not provided, the default is `None`. gas_budget: type: - integer - 'null' format: int64 description: |- Optional gas budget. If not provided, the default is `None`. minimum: 0 gas_price: type: - integer - 'null' format: int64 description: |- Optional gas price. If not provided, the default is `None`. minimum: 0 node_badge_id: type: string description: |- Optional node badge IDs. If not provided, the default is `None`. stack_small_ids: type: array items: type: integer format: int64 description: The small IDs of the stacks to claim funds from. NodeClaimFundsResponse: type: object description: |- Represents a response to a node claim funds request. This struct contains the transaction digest, which is a unique identifier for the transaction associated with the claim funds. required: - tx_digest properties: tx_digest: type: string description: The associated transaction digest. NodeModelSubscriptionRequest: type: object description: |- Represents a request to subscribe to a node model. This struct encapsulates the necessary parameters for subscribing to a node model, including optional gas-related fields. required: - model_name - echelon_id properties: echelon_id: type: integer format: int64 description: The echelon ID associated with the subscription. minimum: 0 gas: type: string description: |- Optional gas object ID. If not provided, the default is `None`. gas_budget: type: - integer - 'null' format: int64 description: |- Optional gas budget. If not provided, the default is `None`. minimum: 0 gas_price: type: - integer - 'null' format: int64 description: |- Optional gas price. If not provided, the default is `None`. minimum: 0 model_name: type: string description: The name of the model to subscribe to. node_badge_id: type: string description: |- Optional node badge ID. If not provided, the default is `None`. NodeModelSubscriptionResponse: type: object description: |- Represents a response to a node model subscription request. This struct contains the transaction digest, which is a unique identifier for the transaction associated with the node model subscription. required: - tx_digest properties: tx_digest: type: string description: |- The transaction digest. This is a unique identifier for the transaction. NodeRegistrationRequest: type: object description: |- Represents a request to register a node. This struct is used to encapsulate the necessary parameters for registering a node, including optional gas-related fields. properties: gas: type: string description: |- Optional gas object ID. If not provided, the default is `None`. gas_budget: type: - integer - 'null' format: int64 description: |- Optional gas budget. If not provided, the default is `None`. minimum: 0 gas_price: type: - integer - 'null' format: int64 description: |- Optional gas price. If not provided, the default is `None`. minimum: 0 NodeRegistrationResponse: type: object description: |- Represents a response to a node registration request. This struct contains the transaction digest, which is a unique identifier for the transaction associated with the node registration. required: - tx_digest properties: tx_digest: type: string description: |- The transaction digest. This is a unique identifier for the transaction. NodeSubscription: type: object description: Represents a node subscription to a task required: - node_small_id - task_small_id - price_per_one_million_compute_units - max_num_compute_units - valid properties: max_num_compute_units: type: integer format: int64 description: Maximum number of compute units for the subscription node_small_id: type: integer format: int64 description: Unique small integer identifier for the node subscription price_per_one_million_compute_units: type: integer format: int64 description: Price per compute unit for the subscription task_small_id: type: integer format: int64 description: Unique small integer identifier for the task valid: type: boolean description: Indicates whether the subscription is valid NodeTaskSubscriptionRequest: type: object description: |- Represents a request to subscribe to a node task. This struct encapsulates the necessary parameters for subscribing to a node task, including optional gas-related fields. required: - task_small_id - price_per_one_million_compute_units properties: gas: type: string description: |- Optional gas object ID. If not provided, the default is `None`. gas_budget: type: - integer - 'null' format: int64 description: |- Optional gas budget. If not provided, the default is `None`. minimum: 0 gas_price: type: - integer - 'null' format: int64 description: |- Optional gas price. If not provided, the default is `None`. minimum: 0 node_badge_id: type: string description: |- Optional node badge ID. If not provided, the default is `None`. price_per_one_million_compute_units: type: integer format: int64 description: The price per one million compute units. minimum: 0 task_small_id: type: integer format: int64 description: The small ID of the task to subscribe to. NodeTaskSubscriptionResponse: type: object description: |- Represents a response to a node task subscription request. This struct contains the transaction digest, which is a unique identifier for the transaction associated with the node task subscription. required: - tx_digest properties: tx_digest: type: string description: |- The transaction digest. This is a unique identifier for the transaction. NodeTaskUnsubscriptionRequest: type: object description: |- Represents a request to unsubscribe from a node task. This struct encapsulates the necessary parameters for unsubscribing from a node task, including optional gas-related fields. required: - task_small_id properties: gas: type: string description: |- Optional gas object ID. If not provided, the default is `None`. gas_budget: type: - integer - 'null' format: int64 description: |- Optional gas budget. If not provided, the default is `None`. minimum: 0 gas_price: type: - integer - 'null' format: int64 description: |- Optional gas price. If not provided, the default is `None`. minimum: 0 node_badge_id: type: string description: |- Optional node badge ID. If not provided, the default is `None`. task_small_id: type: integer format: int64 description: The small ID of the task to unsubscribe from. NodeTaskUnsubscriptionResponse: type: object description: |- Represents a response to a node task unsubscription request. This struct contains the transaction digest, which is a unique identifier for the transaction associated with the node task unsubscription. required: - tx_digest properties: tx_digest: type: string description: |- The transaction digest. This is a unique identifier for the transaction. NodeTaskUpdateSubscriptionRequest: type: object required: - task_small_id - price_per_one_million_compute_units properties: gas: type: string description: |- Optional gas object ID. If not provided, the default is `None`. gas_budget: type: - integer - 'null' format: int64 description: |- Optional gas budget. If not provided, the default is `None`. minimum: 0 gas_price: type: - integer - 'null' format: int64 description: |- Optional gas price. If not provided, the default is `None`. minimum: 0 node_badge_id: type: string description: |- Optional node badge ID. If not provided, the default is `None`. price_per_one_million_compute_units: type: integer format: int64 description: The price per one million compute units. minimum: 0 task_small_id: type: integer format: int64 description: The small ID of the task to subscribe to. NodeTaskUpdateSubscriptionResponse: type: object description: |- Represents a response to a node task update subscription request. This struct contains the transaction digest, which is a unique identifier for the transaction associated with the node task subscription. required: - tx_digest properties: tx_digest: type: string description: |- The transaction digest. This is a unique identifier for the transaction. NodeTrySettleStacksRequest: type: object description: |- Represents a request to try settling a stack. This struct encapsulates the necessary parameters for attempting to settle a stack, including optional gas-related fields. required: - stack_small_ids - num_claimed_compute_units properties: gas: type: string description: |- Optional gas object ID. If not provided, the default is `None`. gas_budget: type: - integer - 'null' format: int64 description: |- Optional gas budget. If not provided, the default is `None`. minimum: 0 gas_price: type: - integer - 'null' format: int64 description: |- Optional gas price. If not provided, the default is `None`. minimum: 0 node_badge_id: type: string description: |- Optional node badge ID. If not provided, the default is `None`. num_claimed_compute_units: type: integer format: int64 description: The number of compute units claimed. minimum: 0 stack_small_ids: type: array items: type: integer format: int64 description: The small IDs of the stacks to settle. NodeTrySettleStacksResponse: type: object description: |- Represents a response to a node try settle stack request. This struct contains the transaction digest, which is a unique identifier for the transaction associated with the attempt to settle a stack. required: - tx_digests properties: tx_digests: type: array items: type: string description: |- The transaction digests. This is a unique identifier for the transaction. Stack: type: object description: Represents a stack of compute units for a specific task required: - owner_address - stack_small_id - stack_id - task_small_id - selected_node_id - num_compute_units - price_per_one_million_compute_units - already_computed_units - in_settle_period - num_total_messages - is_claimed - is_locked_for_claim properties: already_computed_units: type: integer format: int64 description: Number of compute units already processed in_settle_period: type: boolean description: Indicates whether the stack is currently in the settle period is_claimed: type: boolean description: Indicates whether the stack is claimed (for testing purposes) is_locked_for_claim: type: boolean description: Indicates whether the stack is locked for claim (for testing purposes) num_compute_units: type: integer format: int64 description: Total number of compute units in this stack num_total_messages: type: integer format: int64 description: Number of payload requests that were received by the node for this stack. owner_address: type: string description: Address of the owner of the stack price_per_one_million_compute_units: type: integer format: int64 description: Price of the stack (likely in smallest currency unit) selected_node_id: type: integer format: int64 description: Identifier of the selected node for computation stack_id: type: string description: Unique string identifier for the stack stack_small_id: type: integer format: int64 description: Unique small integer identifier for the stack task_small_id: type: integer format: int64 description: Small integer identifier of the associated task StackAttestationDispute: type: object description: Represents a dispute in the stack attestation process required: - stack_small_id - attestation_commitment - attestation_node_id - original_node_id - original_commitment properties: attestation_commitment: type: array items: type: integer format: int32 minimum: 0 description: Cryptographic commitment provided by the attesting node attestation_node_id: type: integer format: int64 description: Identifier of the node that provided the attestation original_commitment: type: array items: type: integer format: int32 minimum: 0 description: Original cryptographic commitment provided by the computing node original_node_id: type: integer format: int64 description: Identifier of the original node that performed the computation stack_small_id: type: integer format: int64 description: Unique small integer identifier for the stack involved in the dispute StackQuery: type: object properties: min_fill_fraction: type: - number - 'null' format: double StackSettlementTicket: type: object description: Represents a settlement ticket for a compute stack required: - stack_small_id - selected_node_id - num_claimed_compute_units - requested_attestation_nodes - committed_stack_proofs - stack_merkle_leaves - already_attested_nodes - is_in_dispute - user_refund_amount - is_claimed properties: already_attested_nodes: type: string description: Comma-separated list of node IDs that have already attested committed_stack_proofs: type: array items: type: integer format: int32 minimum: 0 description: Cryptographic proof of the committed stack state dispute_settled_at_epoch: type: - integer - 'null' format: int64 description: Optional epoch timestamp when a dispute was settled is_claimed: type: boolean description: Indicates whether the settlement ticket has been claimed is_in_dispute: type: boolean description: Indicates whether the stack is currently in a dispute num_claimed_compute_units: type: integer format: int64 description: Number of compute units claimed to be processed requested_attestation_nodes: type: string description: Comma-separated list of node IDs requested for attestation selected_node_id: type: integer format: int64 description: Identifier of the node selected for computation stack_merkle_leaves: type: array items: type: integer format: int32 minimum: 0 description: Merkle leaf representing the stack in a larger tree structure stack_small_id: type: integer format: int64 description: Unique small integer identifier for the stack user_refund_amount: type: integer format: int64 description: Amount to be refunded to the user (likely in smallest currency unit) Task: type: object description: Represents a task in the system required: - task_small_id - task_id - role - is_deprecated - security_level properties: deprecated_at_epoch: type: - integer - 'null' format: int64 description: Optional epoch timestamp when the task was deprecated is_deprecated: type: boolean description: Indicates whether the task is deprecated minimum_reputation_score: type: - integer - 'null' format: int64 description: Optional minimum reputation score required for the task model_name: type: - string - 'null' description: Optional name of the model used for the task role: type: integer format: int64 description: Role associated with the task (encoded as an integer) security_level: type: integer format: int64 description: Security level of the task (encoded as an integer) task_id: type: string description: Unique string identifier for the task task_small_id: type: integer format: int64 description: Unique small integer identifier for the task valid_until_epoch: type: - integer - 'null' format: int64 description: Optional epoch timestamp until which the task is valid tags: - name: Almost filled stacks description: Almost filled stacks management - name: Claimed stacks description: Claimed stacks management - name: Attestation disputes description: Attestation disputes management - name: Nodes description: Nodes management - name: Stacks description: Stacks management - name: Subscriptions description: Subscriptions management - name: Tasks description: Tasks management