diff --git a/docs/api/ithaca-mempool-openapi.json b/docs/api/ithaca-mempool-openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..6ce5d433266ba67ee95fd2fc4430dc01cd553333 --- /dev/null +++ b/docs/api/ithaca-mempool-openapi.json @@ -0,0 +1,821 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Tezos RPC", + "description": "Tezos client RPC API.", + "version": "12.0~rc1" + }, + "paths": { + "/ban_operation": { + "post": { + "description": "Remove an operation from the mempool if present, reverting its effect if it was applied. Add it to the set of banned operations to prevent it from being fetched/processed/injected in the future. Note: If the baker has already received the operation, then it's necessary to restart it to flush the operation from it.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation_hash" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": {} + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/filter": { + "get": { + "description": "Get the configuration of the mempool filter. The minimal_fees are in mutez. Each field minimal_nanotez_per_xxx is a rational number given as a numerator and a denominator, e.g. \"minimal_nanotez_per_gas_unit\": [ \"100\", \"1\" ].", + "parameters": [ + { + "name": "include_default", + "in": "query", + "description": "Show fields equal to their default value (set by default)", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": {} + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + }, + "post": { + "description": "Set the configuration of the mempool filter. **If any of the fields is absent from the input JSON, then it is set to the default value for this field (i.e. its value in the default configuration), even if it previously had a different value.** If the input JSON does not describe a valid configuration, then the configuration is left unchanged. Also return the new configuration (which may differ from the input if it had omitted fields or was invalid). You may call [./tezos-client rpc get '/chains/main/mempool/filter?include_default=true'] to see an example of JSON describing a valid configuration.", + "requestBody": { + "content": { + "application/json": { + "schema": {} + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": {} + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/monitor_operations": { + "get": { + "description": "Monitor the mempool operations.", + "parameters": [ + { + "name": "applied", + "in": "query", + "description": "Include applied operations (set by default)", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "refused", + "in": "query", + "description": "Include refused operations", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "outdated", + "in": "query", + "description": "Include outdated operations", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch_refused", + "in": "query", + "description": "Include branch refused operations", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "branch_delayed", + "in": "query", + "description": "Include branch delayed operations (set by default)", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "description": "An operation's shell header.", + "type": "object", + "properties": { + "hash": { + "$ref": "#/components/schemas/Operation_hash" + }, + "protocol": { + "type": "string", + "enum": [ + "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" + ] + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + }, + "error": { + "$ref": "#/components/schemas/error_opt" + } + }, + "required": [ + "hash", + "protocol", + "branch" + ], + "additionalProperties": {} + } + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/pending_operations": { + "get": { + "description": "List the prevalidated operations.", + "parameters": [ + { + "name": "version", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "title": "new_encoding_pending_operations", + "type": "object", + "properties": { + "applied": { + "type": "array", + "items": { + "description": "An operation's shell header.", + "type": "object", + "properties": { + "hash": { + "$ref": "#/components/schemas/Operation_hash" + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + } + }, + "required": [ + "hash", + "branch" + ], + "additionalProperties": {} + } + }, + "refused": { + "type": "array", + "items": { + "description": "An operation's shell header.", + "type": "object", + "properties": { + "hash": { + "$ref": "#/components/schemas/Operation_hash" + }, + "protocol": { + "type": "string", + "enum": [ + "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" + ] + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + }, + "error": { + "$ref": "#/components/schemas/error" + } + }, + "required": [ + "hash", + "protocol", + "branch", + "error" + ], + "additionalProperties": {} + } + }, + "outdated": { + "type": "array", + "items": { + "description": "An operation's shell header.", + "type": "object", + "properties": { + "hash": { + "$ref": "#/components/schemas/Operation_hash" + }, + "protocol": { + "type": "string", + "enum": [ + "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" + ] + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + }, + "error": { + "$ref": "#/components/schemas/error" + } + }, + "required": [ + "hash", + "protocol", + "branch", + "error" + ], + "additionalProperties": {} + } + }, + "branch_refused": { + "type": "array", + "items": { + "description": "An operation's shell header.", + "type": "object", + "properties": { + "hash": { + "$ref": "#/components/schemas/Operation_hash" + }, + "protocol": { + "type": "string", + "enum": [ + "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" + ] + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + }, + "error": { + "$ref": "#/components/schemas/error" + } + }, + "required": [ + "hash", + "protocol", + "branch", + "error" + ], + "additionalProperties": {} + } + }, + "branch_delayed": { + "type": "array", + "items": { + "description": "An operation's shell header.", + "type": "object", + "properties": { + "hash": { + "$ref": "#/components/schemas/Operation_hash" + }, + "protocol": { + "type": "string", + "enum": [ + "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" + ] + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + }, + "error": { + "$ref": "#/components/schemas/error" + } + }, + "required": [ + "hash", + "protocol", + "branch", + "error" + ], + "additionalProperties": {} + } + }, + "unprocessed": { + "type": "array", + "items": { + "description": "An operation's shell header.", + "type": "object", + "properties": { + "hash": { + "$ref": "#/components/schemas/Operation_hash" + }, + "protocol": { + "type": "string", + "enum": [ + "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" + ] + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + } + }, + "required": [ + "hash", + "protocol", + "branch" + ], + "additionalProperties": {} + } + } + }, + "required": [ + "applied", + "refused", + "outdated", + "branch_refused", + "branch_delayed", + "unprocessed" + ] + }, + { + "title": "old_encoding_pending_operations", + "type": "object", + "properties": { + "applied": { + "type": "array", + "items": { + "description": "An operation's shell header.", + "type": "object", + "properties": { + "hash": { + "$ref": "#/components/schemas/Operation_hash" + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + } + }, + "required": [ + "hash", + "branch" + ], + "additionalProperties": {} + } + }, + "refused": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/Operation_hash" + }, + { + "description": "An operation's shell header.", + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" + ] + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + }, + "error": { + "$ref": "#/components/schemas/error" + } + }, + "required": [ + "protocol", + "branch", + "error" + ], + "additionalProperties": {} + } + ] + } + } + }, + "outdated": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/Operation_hash" + }, + { + "description": "An operation's shell header.", + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" + ] + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + }, + "error": { + "$ref": "#/components/schemas/error" + } + }, + "required": [ + "protocol", + "branch", + "error" + ], + "additionalProperties": {} + } + ] + } + } + }, + "branch_refused": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/Operation_hash" + }, + { + "description": "An operation's shell header.", + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" + ] + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + }, + "error": { + "$ref": "#/components/schemas/error" + } + }, + "required": [ + "protocol", + "branch", + "error" + ], + "additionalProperties": {} + } + ] + } + } + }, + "branch_delayed": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/Operation_hash" + }, + { + "description": "An operation's shell header.", + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" + ] + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + }, + "error": { + "$ref": "#/components/schemas/error" + } + }, + "required": [ + "protocol", + "branch", + "error" + ], + "additionalProperties": {} + } + ] + } + } + }, + "unprocessed": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/Operation_hash" + }, + { + "$ref": "#/components/schemas/next_operation" + } + ] + } + } + } + }, + "required": [ + "applied", + "refused", + "outdated", + "branch_refused", + "branch_delayed", + "unprocessed" + ] + } + ] + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/request_operations": { + "post": { + "description": "Request the operations of our peers or a specific peer if specified via a query parameter.", + "parameters": [ + { + "name": "peer_id", + "in": "query", + "description": "A cryptographic node identity (Base58Check-encoded)", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/unban_all_operations": { + "post": { + "description": "Clear the set of banned operations.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": {} + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": {} + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/unban_operation": { + "post": { + "description": "Remove an operation from the set of banned operations (nothing happens if it was not banned).", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation_hash" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": {} + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Operation_hash": { + "title": "A Tezos operation ID (Base58Check-encoded)", + "oneOf": [ + { + "$ref": "#/components/schemas/unistring" + } + ] + }, + "block_hash": { + "title": "A block identifier (Base58Check-encoded)", + "oneOf": [ + { + "$ref": "#/components/schemas/unistring" + } + ] + }, + "error": { + "description": "The full list of errors is available with the global RPC `GET errors`" + }, + "error_opt": { + "description": "An optional error-trace (None indicates no error). The full list of errors is available with the global RPC `GET errors`" + }, + "next_operation": { + "description": "An operation's shell header.", + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" + ] + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + } + }, + "required": [ + "protocol", + "branch" + ], + "additionalProperties": {} + }, + "unistring": { + "title": "Universal string representation", + "description": "Either a plain UTF8 string, or a sequence of bytes for strings that contain invalid byte sequences.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "invalid_utf8_string": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0, + "maximum": 255 + } + } + }, + "required": [ + "invalid_utf8_string" + ] + } + ] + } + } + } +} diff --git a/docs/api/ithaca-openapi.json b/docs/api/ithaca-openapi.json new file mode 100644 index 0000000000000000000000000000000000000000..78e14916d9c6300a5efa24f79ffeb1f1ebd94988 --- /dev/null +++ b/docs/api/ithaca-openapi.json @@ -0,0 +1,2087 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Tezos RPC", + "description": "Tezos client RPC API.", + "version": "12.0~rc1" + }, + "paths": { + "/": { + "get": { + "description": "All the information about a block. The associated metadata may not be present depending on the history mode and block's distance from the head.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "PrihK96nBAFSxVL1GLJTVhu9YnzkMFiBeuJRPA8NwuZVZCE1L6i" + ] + }, + "chain_id": { + "$ref": "#/components/schemas/Chain_id" + }, + "hash": { + "$ref": "#/components/schemas/block_hash" + }, + "header": { + "$ref": "#/components/schemas/raw_block_header" + }, + "metadata": { + "$ref": "#/components/schemas/block_header_metadata" + }, + "operations": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/operation" + } + } + } + }, + "required": [ + "protocol", + "chain_id", + "hash", + "header", + "operations" + ] + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/context/merkle_tree": { + "get": { + "description": "Returns the merkle tree of a piece of context.", + "parameters": [ + { + "name": "holey", + "in": "query", + "description": "Send only hashes, omit data of key", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "nullable": true, + "oneOf": [ + { + "title": "Some", + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/unistring" + }, + { + "oneOf": [ + { + "title": "Hash", + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/components/schemas/unistring" + } + ] + } + }, + { + "title": "Data", + "nullable": true, + "oneOf": [ + { + "title": "Key", + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + }, + { + "title": "Dir", + "type": "object", + "properties": {}, + "additionalProperties": { + "$ref": "#/components/schemas/raw_context" + } + } + ] + }, + { + "title": "Continue", + "oneOf": [ + { + "$ref": "#/components/schemas/merkle_tree" + } + ] + } + ] + } + ] + } + } + } + ] + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/context/raw/bytes": { + "get": { + "description": "Returns the raw context.", + "parameters": [ + { + "name": "depth", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "nullable": true, + "oneOf": [ + { + "title": "Key", + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + }, + { + "title": "Dir", + "type": "object", + "properties": {}, + "additionalProperties": { + "$ref": "#/components/schemas/raw_context" + } + } + ] + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/hash": { + "get": { + "description": "The block's hash, its unique identifier.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/block_hash" + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/header": { + "get": { + "description": "The whole block header.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/block_header" + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/header/protocol_data": { + "get": { + "description": "The version-specific fragment of the block header.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "PrihK96nBAFSxVL1GLJTVhu9YnzkMFiBeuJRPA8NwuZVZCE1L6i" + ] + } + }, + "required": [ + "protocol" + ] + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/header/protocol_data/raw": { + "get": { + "description": "The version-specific fragment of the block header (unparsed).", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/header/raw": { + "get": { + "description": "The whole block header (unparsed).", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/header/shell": { + "get": { + "description": "The shell-specific fragment of the block header.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/block_header.shell" + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/helpers/complete/{prefix}": { + "get": { + "description": "Try to complete a prefix of a Base58Check-encoded data. This RPC is actually able to complete hashes of block, operations, public_keys and contracts.", + "parameters": [ + { + "name": "prefix", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/unistring" + } + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/helpers/forge/block": { + "post": { + "description": "Forge a block", + "requestBody": { + "content": { + "application/json": { + "schema": { + "oneOf": [ + { + "title": "Activate", + "type": "object", + "properties": { + "level": { + "type": "integer", + "minimum": -2147483648, + "maximum": 2147483647 + }, + "proto_level": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "predecessor": { + "$ref": "#/components/schemas/block_hash" + }, + "timestamp": { + "$ref": "#/components/schemas/timestamp.protocol" + }, + "fitness": { + "$ref": "#/components/schemas/fitness" + }, + "context": { + "$ref": "#/components/schemas/Context_hash" + }, + "command": { + "type": "string", + "enum": [ + "activate" + ] + }, + "hash": { + "$ref": "#/components/schemas/Protocol_hash" + }, + "protocol_parameters": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + } + }, + "required": [ + "level", + "proto_level", + "predecessor", + "timestamp", + "fitness", + "context", + "command", + "hash", + "protocol_parameters" + ] + }, + { + "title": "Activate_testchain", + "type": "object", + "properties": { + "level": { + "type": "integer", + "minimum": -2147483648, + "maximum": 2147483647 + }, + "proto_level": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "predecessor": { + "$ref": "#/components/schemas/block_hash" + }, + "timestamp": { + "$ref": "#/components/schemas/timestamp.protocol" + }, + "fitness": { + "$ref": "#/components/schemas/fitness" + }, + "context": { + "$ref": "#/components/schemas/Context_hash" + }, + "command": { + "type": "string", + "enum": [ + "activate_testchain" + ] + }, + "hash": { + "$ref": "#/components/schemas/Protocol_hash" + }, + "protocol_parameters": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + }, + "validity_time": { + "$ref": "#/components/schemas/int64" + } + }, + "required": [ + "level", + "proto_level", + "predecessor", + "timestamp", + "fitness", + "context", + "command", + "hash", + "protocol_parameters", + "validity_time" + ] + } + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "payload": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + } + }, + "required": [ + "payload" + ] + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/helpers/forge_block_header": { + "post": { + "description": "Forge a block header", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/block_header" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "block": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + } + }, + "required": [ + "block" + ] + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/helpers/preapply/block": { + "post": { + "description": "Simulate the validation of a block that would contain the given operations and return the resulting fitness and context hash.", + "parameters": [ + { + "name": "sort", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "timestamp", + "in": "query", + "description": "A date in seconds from epoch", + "required": false, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "protocol_data": { + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" + ] + }, + "content": { + "oneOf": [ + { + "title": "Activate", + "type": "object", + "properties": { + "command": { + "type": "string", + "enum": [ + "activate" + ] + }, + "hash": { + "$ref": "#/components/schemas/Protocol_hash" + }, + "fitness": { + "$ref": "#/components/schemas/fitness" + }, + "protocol_parameters": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + } + }, + "required": [ + "command", + "hash", + "fitness", + "protocol_parameters" + ] + }, + { + "title": "Activate_testchain", + "type": "object", + "properties": { + "command": { + "type": "string", + "enum": [ + "activate_testchain" + ] + }, + "hash": { + "$ref": "#/components/schemas/Protocol_hash" + }, + "fitness": { + "$ref": "#/components/schemas/fitness" + }, + "protocol_parameters": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + }, + "validity_time": { + "$ref": "#/components/schemas/int64" + } + }, + "required": [ + "command", + "hash", + "fitness", + "protocol_parameters", + "validity_time" + ] + } + ] + }, + "signature": { + "$ref": "#/components/schemas/Signature" + } + }, + "required": [ + "protocol", + "content", + "signature" + ] + }, + "operations": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/next_operation" + } + } + } + }, + "required": [ + "protocol_data", + "operations" + ] + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "shell_header": { + "$ref": "#/components/schemas/block_header.shell" + }, + "operations": { + "type": "array", + "items": { + "type": "object", + "properties": { + "applied": { + "type": "array", + "items": { + "description": "An operation. The shell_header part indicates a block an operation is meant to apply on top of. The proto part is protocol-specific and appears as a binary blob.", + "type": "object", + "properties": { + "hash": { + "$ref": "#/components/schemas/Operation_hash" + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + }, + "data": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + } + }, + "required": [ + "hash", + "branch", + "data" + ] + } + }, + "refused": { + "type": "array", + "items": { + "description": "An operation. The shell_header part indicates a block an operation is meant to apply on top of. The proto part is protocol-specific and appears as a binary blob.", + "type": "object", + "properties": { + "hash": { + "$ref": "#/components/schemas/Operation_hash" + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + }, + "data": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + }, + "error": { + "$ref": "#/components/schemas/error" + } + }, + "required": [ + "hash", + "branch", + "data", + "error" + ] + } + }, + "outdated": { + "type": "array", + "items": { + "description": "An operation. The shell_header part indicates a block an operation is meant to apply on top of. The proto part is protocol-specific and appears as a binary blob.", + "type": "object", + "properties": { + "hash": { + "$ref": "#/components/schemas/Operation_hash" + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + }, + "data": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + }, + "error": { + "$ref": "#/components/schemas/error" + } + }, + "required": [ + "hash", + "branch", + "data", + "error" + ] + } + }, + "branch_refused": { + "type": "array", + "items": { + "description": "An operation. The shell_header part indicates a block an operation is meant to apply on top of. The proto part is protocol-specific and appears as a binary blob.", + "type": "object", + "properties": { + "hash": { + "$ref": "#/components/schemas/Operation_hash" + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + }, + "data": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + }, + "error": { + "$ref": "#/components/schemas/error" + } + }, + "required": [ + "hash", + "branch", + "data", + "error" + ] + } + }, + "branch_delayed": { + "type": "array", + "items": { + "description": "An operation. The shell_header part indicates a block an operation is meant to apply on top of. The proto part is protocol-specific and appears as a binary blob.", + "type": "object", + "properties": { + "hash": { + "$ref": "#/components/schemas/Operation_hash" + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + }, + "data": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + }, + "error": { + "$ref": "#/components/schemas/error" + } + }, + "required": [ + "hash", + "branch", + "data", + "error" + ] + } + } + }, + "required": [ + "applied", + "refused", + "outdated", + "branch_refused", + "branch_delayed" + ] + } + } + }, + "required": [ + "shell_header", + "operations" + ] + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/helpers/preapply/operations": { + "post": { + "description": "Simulate the validation of an operation.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/next_operation" + } + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": {} + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/live_blocks": { + "get": { + "description": "List the ancestors of the given block which, if referred to as the branch in an operation header, are recent enough for that operation to be included in the current block.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/block_hash" + } + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/metadata": { + "get": { + "description": "All the metadata associated to the block.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/block_header_metadata" + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/metadata_hash": { + "get": { + "description": "Hash of the metadata associated to the block. This is only set on blocks starting from environment V1.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Block_metadata_hash" + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/operation_hashes": { + "get": { + "description": "The hashes of all the operations included in the block.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation_hash" + } + } + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/operation_hashes/{list_offset}": { + "get": { + "description": "All the operations included in `n-th` validation pass of the block.", + "parameters": [ + { + "name": "list_offset", + "in": "path", + "description": "Index `n` of the requested validation pass.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation_hash" + } + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/operation_hashes/{list_offset}/{operation_offset}": { + "get": { + "description": "The hash of then `m-th` operation in the `n-th` validation pass of the block.", + "parameters": [ + { + "name": "list_offset", + "in": "path", + "description": "Index `n` of the requested validation pass.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "operation_offset", + "in": "path", + "description": "Index `m` of the requested operation in its validation pass.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation_hash" + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/operation_metadata_hashes": { + "get": { + "description": "The hashes of all the operation metadata included in the block. This is only set on blocks starting from environment V1.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation_metadata_hash" + } + } + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/operation_metadata_hashes/{list_offset}": { + "get": { + "description": "All the operation metadata included in `n-th` validation pass of the block. This is only set on blocks starting from environment V1.", + "parameters": [ + { + "name": "list_offset", + "in": "path", + "description": "Index `n` of the requested validation pass.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Operation_metadata_hash" + } + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/operation_metadata_hashes/{list_offset}/{operation_offset}": { + "get": { + "description": "The hash of then `m-th` operation metadata in the `n-th` validation pass of the block. This is only set on blocks starting from environment V1.", + "parameters": [ + { + "name": "list_offset", + "in": "path", + "description": "Index `n` of the requested validation pass.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "operation_offset", + "in": "path", + "description": "Index `m` of the requested operation in its validation pass.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation_metadata_hash" + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/operations": { + "get": { + "description": "All the operations included in the block.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/operation" + } + } + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/operations/{list_offset}": { + "get": { + "description": "All the operations included in `n-th` validation pass of the block.", + "parameters": [ + { + "name": "list_offset", + "in": "path", + "description": "Index `n` of the requested validation pass.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/operation" + } + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/operations/{list_offset}/{operation_offset}": { + "get": { + "description": "The `m-th` operation in the `n-th` validation pass of the block.", + "parameters": [ + { + "name": "list_offset", + "in": "path", + "description": "Index `n` of the requested validation pass.", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "operation_offset", + "in": "path", + "description": "Index `m` of the requested operation in its validation pass.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/operation" + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/operations_metadata_hash": { + "get": { + "description": "The root hash of the operations metadata from the block. This is only set on blocks starting from environment V1.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Operation_metadata_list_list_hash" + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + }, + "/protocols": { + "get": { + "description": "Current and next protocol.", + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "protocol": { + "$ref": "#/components/schemas/Protocol_hash" + }, + "next_protocol": { + "$ref": "#/components/schemas/Protocol_hash" + } + }, + "required": [ + "protocol", + "next_protocol" + ] + } + } + } + }, + "default": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/error" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "Block_metadata_hash": { + "title": "A Tezos block metadata ID (Base58Check-encoded)", + "oneOf": [ + { + "$ref": "#/components/schemas/unistring" + } + ] + }, + "Chain_id": { + "title": "Network identifier (Base58Check-encoded)", + "oneOf": [ + { + "$ref": "#/components/schemas/unistring" + } + ] + }, + "Context_hash": { + "title": "A hash of context (Base58Check-encoded)", + "oneOf": [ + { + "$ref": "#/components/schemas/unistring" + } + ] + }, + "Operation_hash": { + "title": "A Tezos operation ID (Base58Check-encoded)", + "oneOf": [ + { + "$ref": "#/components/schemas/unistring" + } + ] + }, + "Operation_list_list_hash": { + "title": "A list of list of operations (Base58Check-encoded)", + "oneOf": [ + { + "$ref": "#/components/schemas/unistring" + } + ] + }, + "Operation_metadata_hash": { + "title": "A Tezos operation metadata ID (Base58Check-encoded)", + "oneOf": [ + { + "$ref": "#/components/schemas/unistring" + } + ] + }, + "Operation_metadata_list_list_hash": { + "title": "A list of list of operation metadata (Base58Check-encoded)", + "oneOf": [ + { + "$ref": "#/components/schemas/unistring" + } + ] + }, + "Protocol_hash": { + "title": "A Tezos protocol ID (Base58Check-encoded)", + "oneOf": [ + { + "$ref": "#/components/schemas/unistring" + } + ] + }, + "Signature": { + "title": "A Ed25519, Secp256k1 or P256 signature (Base58Check-encoded)", + "oneOf": [ + { + "$ref": "#/components/schemas/unistring" + } + ] + }, + "block_hash": { + "title": "A block identifier (Base58Check-encoded)", + "oneOf": [ + { + "$ref": "#/components/schemas/unistring" + } + ] + }, + "block_header": { + "title": "Shell header", + "description": "Block header's shell-related content. It contains information such as the block level, its predecessor and timestamp.", + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "PrihK96nBAFSxVL1GLJTVhu9YnzkMFiBeuJRPA8NwuZVZCE1L6i" + ] + }, + "chain_id": { + "$ref": "#/components/schemas/Chain_id" + }, + "hash": { + "$ref": "#/components/schemas/block_hash" + }, + "level": { + "type": "integer", + "minimum": -2147483648, + "maximum": 2147483647 + }, + "proto": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "predecessor": { + "$ref": "#/components/schemas/block_hash" + }, + "timestamp": { + "$ref": "#/components/schemas/timestamp.protocol" + }, + "validation_pass": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "operations_hash": { + "$ref": "#/components/schemas/Operation_list_list_hash" + }, + "fitness": { + "$ref": "#/components/schemas/fitness" + }, + "context": { + "$ref": "#/components/schemas/Context_hash" + } + }, + "required": [ + "protocol", + "chain_id", + "hash", + "level", + "proto", + "predecessor", + "timestamp", + "validation_pass", + "operations_hash", + "fitness", + "context" + ] + }, + "block_header.shell": { + "title": "Shell header", + "description": "Block header's shell-related content. It contains information such as the block level, its predecessor and timestamp.", + "type": "object", + "properties": { + "level": { + "type": "integer", + "minimum": -2147483648, + "maximum": 2147483647 + }, + "proto": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "predecessor": { + "$ref": "#/components/schemas/block_hash" + }, + "timestamp": { + "$ref": "#/components/schemas/timestamp.protocol" + }, + "validation_pass": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "operations_hash": { + "$ref": "#/components/schemas/Operation_list_list_hash" + }, + "fitness": { + "$ref": "#/components/schemas/fitness" + }, + "context": { + "$ref": "#/components/schemas/Context_hash" + } + }, + "required": [ + "level", + "proto", + "predecessor", + "timestamp", + "validation_pass", + "operations_hash", + "fitness", + "context" + ] + }, + "block_header_metadata": { + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "PrihK96nBAFSxVL1GLJTVhu9YnzkMFiBeuJRPA8NwuZVZCE1L6i" + ] + }, + "next_protocol": { + "type": "string", + "enum": [ + "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" + ] + }, + "test_chain_status": { + "$ref": "#/components/schemas/test_chain_status" + }, + "max_operations_ttl": { + "type": "integer", + "minimum": -1073741824, + "maximum": 1073741823 + }, + "max_operation_data_length": { + "type": "integer", + "minimum": -1073741824, + "maximum": 1073741823 + }, + "max_block_header_length": { + "type": "integer", + "minimum": -1073741824, + "maximum": 1073741823 + }, + "max_operation_list_length": { + "type": "array", + "items": { + "type": "object", + "properties": { + "max_size": { + "type": "integer", + "minimum": -1073741824, + "maximum": 1073741823 + }, + "max_op": { + "type": "integer", + "minimum": -1073741824, + "maximum": 1073741823 + } + }, + "required": [ + "max_size" + ] + } + } + }, + "required": [ + "protocol", + "next_protocol", + "test_chain_status", + "max_operations_ttl", + "max_operation_data_length", + "max_block_header_length", + "max_operation_list_length" + ] + }, + "error": { + "description": "The full list of errors is available with the global RPC `GET errors`" + }, + "fitness": { + "title": "Block fitness", + "description": "The fitness, or score, of a block, that allow the Tezos to decide which chain is the best. A fitness value is a list of byte sequences. They are compared as follows: shortest lists are smaller; lists of the same length are compared according to the lexicographical order.", + "type": "array", + "items": { + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + } + }, + "int64": { + "title": "64 bit integers", + "description": "Decimal representation of 64 bit integers", + "type": "string" + }, + "merkle_tree": { + "type": "array", + "items": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/unistring" + }, + { + "oneOf": [ + { + "title": "Hash", + "type": "array", + "items": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "#/components/schemas/unistring" + } + ] + } + }, + { + "title": "Data", + "nullable": true, + "oneOf": [ + { + "title": "Key", + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + }, + { + "title": "Dir", + "type": "object", + "properties": {}, + "additionalProperties": { + "$ref": "#/components/schemas/raw_context" + } + } + ] + }, + { + "title": "Continue", + "oneOf": [ + { + "$ref": "#/components/schemas/merkle_tree" + } + ] + } + ] + } + ] + } + } + }, + "next_operation": { + "description": "An operation's shell header.", + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "ProtoGenesisGenesisGenesisGenesisGenesisGenesk612im" + ] + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + } + }, + "required": [ + "protocol", + "branch" + ], + "additionalProperties": {} + }, + "operation": { + "oneOf": [ + { + "description": "An operation's shell header.", + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "PrihK96nBAFSxVL1GLJTVhu9YnzkMFiBeuJRPA8NwuZVZCE1L6i" + ] + }, + "chain_id": { + "$ref": "#/components/schemas/Chain_id" + }, + "hash": { + "$ref": "#/components/schemas/Operation_hash" + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + } + }, + "required": [ + "protocol", + "chain_id", + "hash", + "branch" + ] + }, + { + "description": "An operation's shell header.", + "type": "object", + "properties": { + "protocol": { + "type": "string", + "enum": [ + "PrihK96nBAFSxVL1GLJTVhu9YnzkMFiBeuJRPA8NwuZVZCE1L6i" + ] + }, + "chain_id": { + "$ref": "#/components/schemas/Chain_id" + }, + "hash": { + "$ref": "#/components/schemas/Operation_hash" + }, + "branch": { + "$ref": "#/components/schemas/block_hash" + } + }, + "required": [ + "protocol", + "chain_id", + "hash", + "branch" + ] + } + ] + }, + "raw_block_header": { + "title": "Shell header", + "description": "Block header's shell-related content. It contains information such as the block level, its predecessor and timestamp.", + "type": "object", + "properties": { + "level": { + "type": "integer", + "minimum": -2147483648, + "maximum": 2147483647 + }, + "proto": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "predecessor": { + "$ref": "#/components/schemas/block_hash" + }, + "timestamp": { + "$ref": "#/components/schemas/timestamp.protocol" + }, + "validation_pass": { + "type": "integer", + "minimum": 0, + "maximum": 255 + }, + "operations_hash": { + "$ref": "#/components/schemas/Operation_list_list_hash" + }, + "fitness": { + "$ref": "#/components/schemas/fitness" + }, + "context": { + "$ref": "#/components/schemas/Context_hash" + } + }, + "required": [ + "level", + "proto", + "predecessor", + "timestamp", + "validation_pass", + "operations_hash", + "fitness", + "context" + ] + }, + "raw_context": { + "nullable": true, + "oneOf": [ + { + "title": "Key", + "type": "string", + "pattern": "^([a-zA-Z0-9][a-zA-Z0-9])*$" + }, + { + "title": "Dir", + "type": "object", + "properties": {}, + "additionalProperties": { + "$ref": "#/components/schemas/raw_context" + } + } + ] + }, + "test_chain_status": { + "description": "The status of the test chain: not_running (there is no test chain at the moment), forking (the test chain is being setup), running (the test chain is running).", + "oneOf": [ + { + "title": "Not_running", + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "not_running" + ] + } + }, + "required": [ + "status" + ] + }, + { + "title": "Forking", + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "forking" + ] + }, + "protocol": { + "$ref": "#/components/schemas/Protocol_hash" + }, + "expiration": { + "$ref": "#/components/schemas/timestamp.protocol" + } + }, + "required": [ + "status", + "protocol", + "expiration" + ] + }, + { + "title": "Running", + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": [ + "running" + ] + }, + "chain_id": { + "$ref": "#/components/schemas/Chain_id" + }, + "genesis": { + "$ref": "#/components/schemas/block_hash" + }, + "protocol": { + "$ref": "#/components/schemas/Protocol_hash" + }, + "expiration": { + "$ref": "#/components/schemas/timestamp.protocol" + } + }, + "required": [ + "status", + "chain_id", + "genesis", + "protocol", + "expiration" + ] + } + ] + }, + "timestamp.protocol": { + "description": "A timestamp as seen by the protocol: second-level precision, epoch based.", + "oneOf": [ + { + "$ref": "#/components/schemas/unistring" + } + ] + }, + "unistring": { + "title": "Universal string representation", + "description": "Either a plain UTF8 string, or a sequence of bytes for strings that contain invalid byte sequences.", + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "invalid_utf8_string": { + "type": "array", + "items": { + "type": "integer", + "minimum": 0, + "maximum": 255 + } + } + }, + "required": [ + "invalid_utf8_string" + ] + } + ] + } + } + } +} diff --git a/docs/api/openapi.rst b/docs/api/openapi.rst index fe2dfd9eb3bb529f6c2497aa7f5d61a24c8edb83..82246b70a381bee8f7d375aa7c3c0be409d71ab4 100644 --- a/docs/api/openapi.rst +++ b/docs/api/openapi.rst @@ -40,6 +40,19 @@ and specific to the Hangzhou protocol can be found at: - `hangzhou-mempool-openapi.json (version 11.0) `_ +Ithaca RPCs +----------- + +The OpenAPI specification for RPCs which are specific to the Ithaca (``PsiThaCa``) +protocol can be found at: + +- `ithaca-openapi.json (version 12.0~rc1) `_ + +The OpenAPI specification for RPCs which are related to the mempool +and specific to the Ithaca protocol can be found at: + +- `ithaca-mempool-openapi.json (version 12.0~rc1) `_ + How to Generate --------------- diff --git a/src/bin_openapi/generate.sh b/src/bin_openapi/generate.sh index 876326407daa418c29c418e031bc839a5294d8de..81d999a5ecd4d7f612fba2a12f4681e547e990a3 100755 --- a/src/bin_openapi/generate.sh +++ b/src/bin_openapi/generate.sh @@ -13,13 +13,13 @@ cd "$(dirname "$0")"/../.. || exit # Tezos binaries. -tezos_node=./tezos-node -tezos_client=./tezos-client +tezos_node=_build/default/src/bin_node/main.exe +tezos_client=_build/default/src/bin_client/main.exe # Protocol configuration. -protocol_hash=PtGRANADsDU8R9daYKAgWnQYAJ64omN1o3KMGVCykShA97vQbvV -protocol_parameters=src/proto_010_PtGRANAD/parameters/sandbox-parameters.json -protocol_name=granada +protocol_hash=PsiThaCaT47Zboaw71QWScM8sXeMM7bbQFncK9FLqYc6EKdpjVP +protocol_parameters=src/proto_012_PsiThaCa/parameters/sandbox-parameters.json +protocol_name=ithaca # Secret key to activate the protocol. activator_secret_key="unencrypted:edsk31vznjHSSpGExDMHYASz45VZqXN4DPxvsa4hAyY8dHM28cZzp6"