{"openapi":"3.1.0","info":{"title":"server","description":"","license":{"name":""},"version":"0.1.0"},"servers":[{"url":"https://mission-control.api.herodotus.cloud","description":"Production server"},{"url":"https://api.herodotus.cloud","description":"Production alias (Storage Proof API hostname)"},{"url":"http://localhost:8037","description":"Local server"}],"paths":{"/get_actions/{query_id}":{"get":{"tags":["Actions"],"operationId":"get_actions","parameters":[{"name":"query_id","in":"path","description":"Query ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Actions for the given query","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetActionsResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/get_queries/{request_id}":{"get":{"tags":["Queries"],"operationId":"get_queries","parameters":[{"name":"request_id","in":"path","description":"User request ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Queries for the given request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetQueriesResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/grow-orders":{"get":{"tags":["Grow Orders"],"operationId":"list_grow_orders","responses":{"200":{"description":"List grow orders","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGrowOrdersResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}},"post":{"tags":["Grow Orders"],"operationId":"create_grow_order","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGrowOrderRequest"}}},"required":true},"responses":{"200":{"description":"Create grow order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGrowOrderResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/grow-orders/{grow_order_id}":{"get":{"tags":["Grow Orders"],"operationId":"get_grow_order","parameters":[{"name":"grow_order_id","in":"path","description":"Grow order ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Get grow order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GrowOrderResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Grow order not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/grow-orders/{grow_order_id}/cancel":{"post":{"tags":["Grow Orders"],"operationId":"cancel_grow_order","parameters":[{"name":"grow_order_id","in":"path","description":"Grow order ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Cancel grow order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelGrowOrderResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"404":{"description":"Grow order not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}},"/is-alive":{"get":{"tags":["Health Check"],"summary":"Simple health check endpoint","operationId":"get_is_alive","responses":{"200":{"description":"Get all accumulators","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IsAliveResponse"}}}}}}},"/submit-request":{"post":{"tags":["Submit Request"],"operationId":"submit_request","requestBody":{"description":"Submit user request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRequest"},"example":{"data":{"11155111":{"block:10197420":{"accounts":{"0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238":{"slots":["0x0000000000000000000000000000000000000000000000000000000000000000"]},"0xEEBC6016539E0bC60D35f527FEfa414794854499":{"props":["BALANCE"]}},"header":["STATE_ROOT","TIMESTAMP"]}}},"destination_chain_id":"11155420","fee":0}}},"required":true},"responses":{"200":{"description":"Submit request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitRequestResponse"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"408":{"description":"Request timeout","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable entity","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"AccountField":{"type":"string","enum":["Nonce","Balance","StorageRoot","CodeHash","ApeFlags","ApeFixed","ApeShares","ApeDebt","ApeDelegate"]},"AccountProving":{"type":"object","properties":{"props":{"type":["array","null"],"items":{"$ref":"#/components/schemas/AccountField"}},"slots":{"type":["array","null"],"items":{"type":"string"}}}},"ActionResponse":{"type":"object","required":["query_id","index","status","depends_on","can_trigger","method","created_at"],"properties":{"can_trigger":{"type":"array","items":{"type":"integer","format":"int32"}},"completed_at":{"type":["string","null"]},"created_at":{"type":"string"},"depends_on":{"type":"array","items":{"type":"integer","format":"int32"}},"index":{"type":"integer","format":"int32"},"method":{"type":"object"},"query_id":{"type":"string"},"status":{"$ref":"#/components/schemas/ExecutionStatus"},"tracking_id":{"type":["string","null"]}}},"ApiErrorResponse":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}},"BlockHeaderField":{"type":"string","enum":["ParentHash","OmmersHash","Beneficiary","StateRoot","TransactionsRoot","ReceiptsRoot","LogsBloom","Difficulty","Number","GasLimit","GasUsed","Timestamp","ExtraData","MixHash","Nonce"]},"BlockNumber":{"type":"integer","format":"int64","minimum":0},"BlockRange":{"type":"object","required":["start","end"],"properties":{"end":{"$ref":"#/components/schemas/BlockNumber"},"start":{"$ref":"#/components/schemas/BlockNumber"}}},"BlockRanges":{"type":"array","items":{"$ref":"#/components/schemas/BlockRange"},"description":"Ranges are guaranteed to be sorted and non-overlapping.\nBoth side inclusive."},"CancelGrowOrderResponse":{"type":"object","required":["grow_order"],"properties":{"grow_order":{"$ref":"#/components/schemas/GrowOrderResponse"}}},"ChainId":{"type":"string","enum":["1","11155111","STARKNET","SN_SEPOLIA","10","11155420","42161","421614","480","4801","8453","84532","33139","33111","300"]},"CreateGrowOrderRequest":{"type":"object","required":["accumulated_chain_id","settle_chain_id","hashing_functions","min_batch_size"],"properties":{"accumulated_chain_id":{"$ref":"#/components/schemas/ChainId"},"finish_block_number":{"type":["integer","null"],"format":"int64"},"hashing_functions":{"type":"array","items":{"$ref":"#/components/schemas/HashingFunction"}},"min_batch_size":{"type":"integer","format":"int64"},"settle_chain_id":{"$ref":"#/components/schemas/ChainId"},"start_block_number":{"type":["integer","null"],"format":"int64"}}},"CreateGrowOrderResponse":{"type":"object","required":["grow_order"],"properties":{"grow_order":{"$ref":"#/components/schemas/GrowOrderResponse"}}},"ErrorResponse":{"type":"object","required":["status","error"],"properties":{"error":{"type":"string"},"status":{"$ref":"#/components/schemas/ResponseStatus"}},"example":{"error":"Something went wrong","status":"error"}},"ExecutionStatus":{"type":"string","enum":["PENDING","IN_PROGRESS","COMPLETED","FAILED","CANCELLED"]},"FactHash":{"type":"object","required":["fact_hash","is_mocked"],"properties":{"fact_hash":{"type":"array","items":{"type":"integer","format":"int32","minimum":0}},"is_mocked":{"type":"boolean"}}},"GetActionsResponse":{"type":"object","required":["actions"],"properties":{"actions":{"type":"array","items":{"$ref":"#/components/schemas/ActionResponse"}}}},"GetQueriesResponse":{"type":"object","required":["queries"],"properties":{"queries":{"type":"array","items":{"$ref":"#/components/schemas/QueryResponse"}}}},"GrowOrderResponse":{"type":"object","required":["internal_id","status","accumulated_chain_id","settle_chain_id","hashing_functions","min_batch_size","start_block_number","next_from_block_number","created_at","updated_at"],"properties":{"accumulated_chain_id":{"$ref":"#/components/schemas/ChainId"},"active_query_id":{"type":["string","null"]},"cancelled_at":{"type":["string","null"]},"completed_at":{"type":["string","null"]},"created_at":{"type":"string"},"finish_block_number":{"type":["integer","null"],"format":"int64"},"hashing_functions":{"type":"array","items":{"$ref":"#/components/schemas/HashingFunction"}},"internal_id":{"type":"string"},"min_batch_size":{"type":"integer","format":"int64"},"next_from_block_number":{"type":"integer","format":"int64"},"settle_chain_id":{"$ref":"#/components/schemas/ChainId"},"start_block_number":{"type":"integer","format":"int64"},"status":{"$ref":"#/components/schemas/GrowOrderStatus"},"updated_at":{"type":"string"}}},"GrowOrderStatus":{"type":"string","enum":["ACTIVE","CANCEL_REQUESTED","CANCELLED","COMPLETED","FAILED"]},"HashingFunction":{"type":"string","enum":["KECCAK","POSEIDON"]},"IsAliveResponse":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}},"ListGrowOrdersResponse":{"type":"object","required":["grow_orders"],"properties":{"grow_orders":{"type":"array","items":{"$ref":"#/components/schemas/GrowOrderResponse"}}}},"QueryResponse":{"type":"object","required":["internal_id","status","typ","created_at"],"properties":{"completed_at":{"type":["string","null"]},"created_at":{"type":"string"},"internal_id":{"type":"string"},"status":{"$ref":"#/components/schemas/ExecutionStatus"},"typ":{"type":"object"}}},"RequestedChainData":{"oneOf":[{"type":"object","required":["Timestamp"],"properties":{"Timestamp":{"type":"integer","format":"int64","minimum":0}}},{"type":"object","required":["Block"],"properties":{"Block":{"$ref":"#/components/schemas/BlockNumber"}}},{"type":"object","required":["BlockRanges"],"properties":{"BlockRanges":{"$ref":"#/components/schemas/BlockRanges"}}}],"description":"Must match the following regex: /^(?:timestamp:\\d+|block:\\d+|block_ranges:\\d+(-\\d+)?(,\\d+(-\\d+)?)*)$/\n\nExample: \"timestamp:1112470620\" or \"block:10197420\" or \"block_ranges:10197420-10197421,10197422-10197423\""},"RequestedProving":{"type":"object","properties":{"accounts":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/AccountProving"},"propertyNames":{"type":"string"}},"hashing_functions":{"type":["array","null"],"items":{"$ref":"#/components/schemas/HashingFunction"},"description":"Mmrs with which hashing functions are being requested.\nIf user provides header or accounts, hashing functions are set automatically,\nbut if the user wants other hashing functions, they can be provided here.","uniqueItems":true},"header":{"type":["array","null"],"items":{"$ref":"#/components/schemas/BlockHeaderField"}}}},"ResponseStatus":{"type":"string","enum":["success","error"]},"SubmitRequestResponse":{"type":"object","required":["status","request_id"],"properties":{"request_id":{"type":"string"},"status":{"$ref":"#/components/schemas/ResponseStatus"}}},"UserRequest":{"type":"object","required":["destination_chain_id","data"],"properties":{"data":{"$ref":"#/components/schemas/UserRequestData"},"destination_chain_id":{"$ref":"#/components/schemas/ChainId"},"settings":{"$ref":"#/components/schemas/UserRequestSettings"}}},"UserRequestChainData":{"type":"object","required":["proving","fact_hashes"],"properties":{"fact_hashes":{"type":"array","items":{"$ref":"#/components/schemas/FactHash"}},"proving":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/RequestedProving"},"propertyNames":{"oneOf":[{"type":"object","required":["Timestamp"],"properties":{"Timestamp":{"type":"integer","format":"int64","minimum":0}}},{"type":"object","required":["Block"],"properties":{"Block":{"$ref":"#/components/schemas/BlockNumber"}}},{"type":"object","required":["BlockRanges"],"properties":{"BlockRanges":{"$ref":"#/components/schemas/BlockRanges"}}}],"description":"Must match the following regex: /^(?:timestamp:\\d+|block:\\d+|block_ranges:\\d+(-\\d+)?(,\\d+(-\\d+)?)*)$/\n\nExample: \"timestamp:1112470620\" or \"block:10197420\" or \"block_ranges:10197420-10197421,10197422-10197423\""}}}},"UserRequestData":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/UserRequestChainData"},"propertyNames":{"type":"string","enum":["1","11155111","STARKNET","SN_SEPOLIA","10","11155420","42161","421614","480","4801","8453","84532","33139","33111","300"]}},"UserRequestSettings":{"type":"object","required":["max_cost","max_time","optimize"],"properties":{"max_cost":{"oneOf":[{"type":"number","format":"float"},{"type":"object","additionalProperties":{"type":"number","format":"float"}}]},"max_time":{"oneOf":[{"type":"number","format":"float"},{"type":"object","additionalProperties":{"type":"number","format":"float"}}]},"optimize":{"type":"string","enum":["Time","Cost"]}}}}}}