From e6c07cdf86a37cd220a45a406f01719fbe38ccba Mon Sep 17 00:00:00 2001 From: Nevo Agmon Date: Mon, 24 Jul 2023 16:04:11 +0300 Subject: [PATCH] fix v3 spec based on git tag --- .../V0_3_0/starknet_api_openrpc.json | 428 ++++++++++++++++-- 1 file changed, 391 insertions(+), 37 deletions(-) diff --git a/crates/papyrus_gateway/resources/V0_3_0/starknet_api_openrpc.json b/crates/papyrus_gateway/resources/V0_3_0/starknet_api_openrpc.json index 96a4321886..a4d3c4b251 100644 --- a/crates/papyrus_gateway/resources/V0_3_0/starknet_api_openrpc.json +++ b/crates/papyrus_gateway/resources/V0_3_0/starknet_api_openrpc.json @@ -16,6 +16,7 @@ "description": "The hash of the requested block, or number (height) of the requested block, or a block tag", "required": true, "schema": { + "title": "Block id", "$ref": "#/components/schemas/BLOCK_ID" } } @@ -24,11 +25,14 @@ "name": "result", "description": "The resulting block information with transaction hashes", "schema": { + "title": "Starknet get block hash with tx hashes result", "oneOf": [ { + "title": "Block with transaction hashes", "$ref": "#/components/schemas/BLOCK_WITH_TX_HASHES" }, { + "title": "Pending block with transaction hashes", "$ref": "#/components/schemas/PENDING_BLOCK_WITH_TX_HASHES" } ] @@ -49,6 +53,7 @@ "description": "The hash of the requested block, or number (height) of the requested block, or a block tag", "required": true, "schema": { + "title": "Block id", "$ref": "#/components/schemas/BLOCK_ID" } } @@ -57,11 +62,14 @@ "name": "result", "description": "The resulting block information with full transactions", "schema": { + "title": "Starknet get block with txs result", "oneOf": [ { + "title": "Block with transactions", "$ref": "#/components/schemas/BLOCK_WITH_TXS" }, { + "title": "Pending block with transactions", "$ref": "#/components/schemas/PENDING_BLOCK_WITH_TXS" } ] @@ -82,6 +90,7 @@ "description": "The hash of the requested block, or number (height) of the requested block, or a block tag", "required": true, "schema": { + "title": "Block id", "$ref": "#/components/schemas/BLOCK_ID" } } @@ -90,11 +99,14 @@ "name": "result", "description": "The information about the state update of the requested block", "schema": { + "title": "Starknet get state update result", "oneOf": [ { + "title": "State update", "$ref": "#/components/schemas/STATE_UPDATE" }, { + "title": "Pending state update", "$ref": "#/components/schemas/PENDING_STATE_UPDATE" } ] @@ -116,6 +128,7 @@ "summary": "The address of the contract to read from", "required": true, "schema": { + "title": "Address", "$ref": "#/components/schemas/ADDRESS" } }, @@ -125,6 +138,7 @@ "summary": "The key to the storage value for the given contract", "required": true, "schema": { + "title": "Storage key", "$ref": "#/components/schemas/STORAGE_KEY" } }, @@ -133,6 +147,7 @@ "description": "The hash of the requested block, or number (height) of the requested block, or a block tag", "required": true, "schema": { + "title": "Block id", "$ref": "#/components/schemas/BLOCK_ID" } } @@ -142,6 +157,7 @@ "description": "The value at the given key for the given contract. 0 if no value is found", "summary": "The value at the given key for the given contract.", "schema": { + "title": "Field element", "$ref": "#/components/schemas/FELT" } }, @@ -164,6 +180,7 @@ "summary": "The hash of the requested transaction", "required": true, "schema": { + "title": "Transaction hash", "$ref": "#/components/schemas/TXN_HASH" } } @@ -171,6 +188,7 @@ "result": { "name": "result", "schema": { + "title": "Transaction", "$ref": "#/components/schemas/TXN" } }, @@ -190,6 +208,7 @@ "description": "The hash of the requested block, or number (height) of the requested block, or a block tag", "required": true, "schema": { + "title": "Block id", "$ref": "#/components/schemas/BLOCK_ID" } }, @@ -198,6 +217,7 @@ "summary": "The index in the block to search for the transaction", "required": true, "schema": { + "title": "Index", "type": "integer", "minimum": 0 } @@ -206,6 +226,7 @@ "result": { "name": "transactionResult", "schema": { + "title": "Transaction", "$ref": "#/components/schemas/TXN" } }, @@ -228,6 +249,7 @@ "summary": "The hash of the requested transaction", "required": true, "schema": { + "title": "Transaction hash", "$ref": "#/components/schemas/TXN_HASH" } } @@ -235,6 +257,7 @@ "result": { "name": "result", "schema": { + "title": "Transaction receipt", "$ref": "#/components/schemas/TXN_RECEIPT" } }, @@ -253,6 +276,7 @@ "description": "The hash of the requested block, or number (height) of the requested block, or a block tag", "required": true, "schema": { + "title": "Block id", "$ref": "#/components/schemas/BLOCK_ID" } }, @@ -261,6 +285,7 @@ "description": "The hash of the requested contract class", "required": true, "schema": { + "title": "Field element", "$ref": "#/components/schemas/FELT" } } @@ -269,11 +294,14 @@ "name": "result", "description": "The contract class, if found", "schema": { + "title": "Starknet get class result", "oneOf": [ { + "title": "Deprecated contract class", "$ref": "#/components/schemas/DEPRECATED_CONTRACT_CLASS" }, { + "title": "Contract class", "$ref": "#/components/schemas/CONTRACT_CLASS" } ] @@ -297,6 +325,7 @@ "description": "The hash of the requested block, or number (height) of the requested block, or a block tag", "required": true, "schema": { + "title": "Block id", "$ref": "#/components/schemas/BLOCK_ID" } }, @@ -305,6 +334,7 @@ "description": "The address of the contract whose class hash will be returned", "required": true, "schema": { + "title": "Address", "$ref": "#/components/schemas/ADDRESS" } } @@ -313,6 +343,7 @@ "name": "result", "description": "The class hash of the given contract", "schema": { + "title": "Field element", "$ref": "#/components/schemas/FELT" } }, @@ -334,6 +365,7 @@ "description": "The hash of the requested block, or number (height) of the requested block, or a block tag", "required": true, "schema": { + "title": "Block id", "$ref": "#/components/schemas/BLOCK_ID" } }, @@ -342,6 +374,7 @@ "description": "The address of the contract whose class definition will be returned", "required": true, "schema": { + "title": "Address", "$ref": "#/components/schemas/ADDRESS" } } @@ -350,11 +383,14 @@ "name": "result", "description": "The contract class", "schema": { + "title": "Starknet get class at result", "oneOf": [ { + "title": "Deprecated contract class", "$ref": "#/components/schemas/DEPRECATED_CONTRACT_CLASS" }, { + "title": "Contract class", "$ref": "#/components/schemas/CONTRACT_CLASS" } ] @@ -379,6 +415,7 @@ "description": "The hash of the requested block, or number (height) of the requested block, or a block tag", "required": true, "schema": { + "title": "Block id", "$ref": "#/components/schemas/BLOCK_ID" } } @@ -388,6 +425,7 @@ "description": "The number of transactions in the designated block", "summary": "The number of transactions in the designated block", "schema": { + "title": "Block transaction count", "type": "integer", "minimum": 0 } @@ -407,6 +445,7 @@ "name": "request", "summary": "The details of the function call", "schema": { + "title": "Function call", "$ref": "#/components/schemas/FUNCTION_CALL" }, "required": true @@ -416,6 +455,7 @@ "description": "The hash of the requested block, or number (height) of the requested block, or a block tag, for the block referencing the state or call the transaction on.", "required": true, "schema": { + "title": "Block id", "$ref": "#/components/schemas/BLOCK_ID" } } @@ -426,6 +466,7 @@ "description": "The function's return value, as defined in the Cairo output", "schema": { "type": "array", + "title": "Field element", "items": { "$ref": "#/components/schemas/FELT" } @@ -460,6 +501,7 @@ "schema": { "type": "array", "description": "a sequence of transactions to estimate, running each transaction on the state resulting from applying all the previous ones", + "title": "Broadcasted transaction", "items": { "$ref": "#/components/schemas/BROADCASTED_TXN" } @@ -471,6 +513,7 @@ "description": "The hash of the requested block, or number (height) of the requested block, or a block tag, for the block referencing the state or call the transaction on.", "required": true, "schema": { + "title": "Block id", "$ref": "#/components/schemas/BLOCK_ID" } } @@ -479,6 +522,7 @@ "name": "result", "description": "the fee estimations", "schema": { + "title": "Estimation", "type": "array", "description": "a sequence of fee estimatione where the i'th estimate corresponds to the i'th transaction", "items": { @@ -512,6 +556,7 @@ "name": "result", "description": "The latest block number", "schema": { + "title": "Block number", "$ref": "#/components/schemas/BLOCK_NUMBER" } }, @@ -529,12 +574,15 @@ "name": "result", "description": "The latest block hash and number", "schema": { + "title": "Starknet block hash and number result", "type": "object", "properties": { "block_hash": { + "title": "Block hash", "$ref": "#/components/schemas/BLOCK_HASH" }, "block_number": { + "title": "Block number", "$ref": "#/components/schemas/BLOCK_NUMBER" } } @@ -554,6 +602,7 @@ "name": "result", "description": "The chain id this node is connected to", "schema": { + "title": "Chain id", "$ref": "#/components/schemas/CHAIN_ID" } } @@ -582,12 +631,15 @@ "summary": "The state of the synchronization, or false if the node is not synchronizing", "description": "The status of the node, if it is currently synchronizing state. FALSE otherwise", "schema": { + "title": "SyncingStatus", "oneOf": [ { "type": "boolean", + "title": "False", "description": "only legal value is FALSE here" }, { + "title": "Sync status", "$ref": "#/components/schemas/SYNC_STATUS" } ] @@ -604,11 +656,14 @@ "summary": "The conditions used to filter the returned events", "required": true, "schema": { + "title": "Event emitter", "allOf": [ { + "title": "Event filter", "$ref": "#/components/schemas/EVENT_FILTER" }, { + "title": "Result page request", "$ref": "#/components/schemas/RESULT_PAGE_REQUEST" } ] @@ -619,6 +674,7 @@ "name": "events", "description": "All the event objects matching the filter", "schema": { + "title": "Events chunk", "$ref": "#/components/schemas/EVENTS_CHUNK" } }, @@ -646,6 +702,7 @@ "description": "The hash of the requested block, or number (height) of the requested block, or a block tag", "required": true, "schema": { + "title": "Block id", "$ref": "#/components/schemas/BLOCK_ID" } }, @@ -654,6 +711,7 @@ "description": "The address of the contract whose nonce we're seeking", "required": true, "schema": { + "title": "Address", "$ref": "#/components/schemas/ADDRESS" } } @@ -662,6 +720,7 @@ "name": "result", "description": "The last nonce used for the given contract.", "schema": { + "title": "Field element", "$ref": "#/components/schemas/FELT" } }, @@ -679,6 +738,7 @@ "contentDescriptors": {}, "schemas": { "EVENTS_CHUNK": { + "title": "Events chunk", "type": "object", "properties": { "events": { @@ -689,6 +749,7 @@ } }, "continuation_token": { + "title": "Continuation token", "description": "Use this token in a subsequent query to obtain the next page. Should not appear if there are no more pages.", "type": "string" } @@ -698,13 +759,16 @@ ] }, "RESULT_PAGE_REQUEST": { + "title": "Result page request", "type": "object", "properties": { "continuation_token": { + "title": "Continuation token", "description": "The token returned from the previous query. If no token is provided the first page is returned.", "type": "string" }, "chunk_size": { + "title": "Chunk size", "type": "integer", "minimum": 1 } @@ -714,27 +778,32 @@ ] }, "EMITTED_EVENT": { - "title": "An event emitted as a result of transaction execution", - "description": "Event information decorated with metadata on where it was emitted", + "title": "Emitted event", + "description": "Event information decorated with metadata on where it was emitted / An event emitted as a result of transaction execution", "allOf": [ { - "title": "The event information", + "title": "Event", + "description": "The event information", "$ref": "#/components/schemas/EVENT" }, { - "title": "The event emission information", + "title": "Event context", + "description": "The event emission information", "type": "object", "properties": { "block_hash": { - "title": "The hash of the block in which the event was emitted", + "title": "Block hash", + "description": "The hash of the block in which the event was emitted", "$ref": "#/components/schemas/BLOCK_HASH" }, "block_number": { - "title": "The number of the block in which the event was emitted", + "title": "Block number", + "description": "The number of the block in which the event was emitted", "$ref": "#/components/schemas/BLOCK_NUMBER" }, "transaction_hash": { - "title": "The transaction that emitted the event", + "title": "Transaction hash", + "description": "The transaction that emitted the event", "$ref": "#/components/schemas/TXN_HASH" } }, @@ -747,12 +816,15 @@ ] }, "EVENT": { - "title": "A StarkNet event", + "title": "Event", + "description": "A StarkNet event", "allOf": [ { + "title": "Event emitter", "type": "object", "properties": { "from_address": { + "title": "From address", "$ref": "#/components/schemas/ADDRESS" } }, @@ -761,23 +833,26 @@ ] }, { + "title": "Event content", "$ref": "#/components/schemas/EVENT_CONTENT" } ] }, "EVENT_CONTENT": { - "title": "Event Content", + "title": "Event content", "description": "The content of an event", "type": "object", "properties": { "keys": { "type": "array", + "title": "Keys", "items": { "$ref": "#/components/schemas/FELT" } }, "data": { "type": "array", + "title": "Data", "items": { "$ref": "#/components/schemas/FELT" } @@ -789,7 +864,8 @@ ] }, "EVENT_FILTER": { - "title": "An event filter/query", + "title": "Event filter", + "description": "An event filter/query", "type": "object", "properties": { "from_block": { @@ -805,11 +881,11 @@ "$ref": "#/components/schemas/ADDRESS" }, "keys": { - "title": "filter key values", + "title": "Keys", "description": "The values used to filter the events", "type": "array", "items": { - "title": "Possible values, per key", + "title": "Keys", "description": "Per key (by position), designate the possible values to be matched for events to be returned. Empty array designates 'any' value", "type": "array", "items": { @@ -817,15 +893,19 @@ } } } - } + }, + "required": [] }, "BLOCK_ID": { - "title": "Block hash, number or tag", + "title": "Block id", + "description": "Block hash, number or tag", "oneOf": [ { + "title": "Block hash", "type": "object", "properties": { "block_hash": { + "title": "Block hash", "$ref": "#/components/schemas/BLOCK_HASH" } }, @@ -834,9 +914,11 @@ ] }, { + "title": "Block number", "type": "object", "properties": { "block_number": { + "title": "Block number", "$ref": "#/components/schemas/BLOCK_NUMBER" } }, @@ -845,11 +927,13 @@ ] }, { + "title": "Block tag", "$ref": "#/components/schemas/BLOCK_TAG" } ] }, "BLOCK_TAG": { + "title": "Block tag", "type": "string", "description": "A tag specifying a dynamic reference to a block", "enum": [ @@ -858,30 +942,37 @@ ] }, "SYNC_STATUS": { + "title": "Sync status", "type": "object", "description": "An object describing the node synchronization status", "properties": { "starting_block_hash": { + "title": "Starting block hash", "description": "The hash of the block from which the sync started", "$ref": "#/components/schemas/BLOCK_HASH" }, "starting_block_num": { + "title": "Starting block number", "description": "The number (height) of the block from which the sync started", "$ref": "#/components/schemas/BLOCK_NUMBER" }, "current_block_hash": { + "title": "Current block hash", "description": "The hash of the current block being synchronized", "$ref": "#/components/schemas/BLOCK_HASH" }, "current_block_num": { + "title": "Current block number", "description": "The number (height) of the current block being synchronized", "$ref": "#/components/schemas/BLOCK_NUMBER" }, "highest_block_hash": { + "title": "Highest block hash", "description": "The hash of the estimated highest block to be synchronized", "$ref": "#/components/schemas/BLOCK_HASH" }, "highest_block_num": { + "title": "Highest block number", "description": "The number (height) of the estimated highest block to be synchronized", "$ref": "#/components/schemas/BLOCK_NUMBER" } @@ -896,26 +987,31 @@ ] }, "NUM_AS_HEX": { - "title": "An integer number in hex format (0x...)", + "title": "Number as hex", + "description": "An integer number in hex format (0x...)", "type": "string", "pattern": "^0x[a-fA-F0-9]+$" }, "CHAIN_ID": { - "title": "chainId", + "title": "Chain id", "description": "StarkNet chain id, given in hex representation.", "type": "string", "pattern": "^0x[a-fA-F0-9]+$" }, "STATE_UPDATE": { + "title": "State update", "type": "object", "allOf": [ { + "title": "Event emitter", "type": "object", "properties": { "block_hash": { + "title": "Block hash", "$ref": "#/components/schemas/BLOCK_HASH" }, "new_root": { + "title": "New root", "description": "The new global state root", "$ref": "#/components/schemas/FELT" } @@ -926,22 +1022,28 @@ ] }, { + "title": "Pending state update", "$ref": "#/components/schemas/PENDING_STATE_UPDATE" } ] }, "PENDING_STATE_UPDATE": { + "title": "Pending state update", + "description": "Pending state update", "type": "object", "properties": { "old_root": { + "title": "Old root", "description": "The previous global state root", "$ref": "#/components/schemas/FELT" }, "state_diff": { + "title": "State diff", "description": "The change in state applied in this block, given as a mapping of addresses to the new values and/or new contracts", "type": "object", "properties": { "storage_diffs": { + "title": "Storage diffs", "type": "array", "items": { "description": "The changes in the storage per contract address", @@ -949,6 +1051,7 @@ } }, "deprecated_declared_classes": { + "title": "Deprecated declared classes", "type": "array", "items": { "description": "The hash of the declared class", @@ -956,16 +1059,20 @@ } }, "declared_classes": { + "title": "Declared classes", "type": "array", "items": { - "description": "The declared class hash and compiled class hash", + "title": "Event emitter", "type": "object", + "description": "The declared class hash and compiled class hash", "properties": { "class_hash": { + "title": "Class hash", "description": "The hash of the declared class", "$ref": "#/components/schemas/FELT" }, "compiled_class_hash": { + "title": "Compiled class hash", "description": "The Cairo assembly hash corresponding to the declared class", "$ref": "#/components/schemas/FELT" } @@ -973,6 +1080,7 @@ } }, "deployed_contracts": { + "title": "Deployed contracts", "type": "array", "items": { "description": "A new contract deployed as part of the state update", @@ -980,16 +1088,20 @@ } }, "replaced_classes": { + "title": "Replaced classes", "type": "array", "items": { "description": "The list of contracts whose class was replaced", + "title": "Event emitter", "type": "object", "properties": { "contract_address": { + "title": "Contract address", "description": "The address of the contract whose class was replaced", "$ref": "#/components/schemas/ADDRESS" }, "class_hash": { + "title": "Class hash", "description": "The new class hash", "$ref": "#/components/schemas/FELT" } @@ -997,16 +1109,20 @@ } }, "nonces": { + "title": "Nonces", "type": "array", "items": { + "title": "Event emitter", "description": "The updated nonce per contract address", "type": "object", "properties": { "contract_address": { + "title": "Contract address", "description": "The address of the contract", "$ref": "#/components/schemas/ADDRESS" }, "nonce": { + "title": "Nonce", "description": "The nonce for the given address at the end of the block", "$ref": "#/components/schemas/FELT" } @@ -1030,16 +1146,18 @@ ] }, "ADDRESS": { + "title": "Address", "$ref": "#/components/schemas/FELT" }, "STORAGE_KEY": { "type": "string", - "title": "A storage key", + "title": "Storage key", "$comment": "A storage key, represented as a string of hex digits", "description": "A storage key. Represented as up to 62 hex digits, 3 bits, and 5 leading zeroes.", "pattern": "^0x0[0-7]{1}[a-fA-F0-9]{0,62}$" }, "ETH_ADDRESS": { + "title": "Ethereum address", "type": "string", "$comment": "An ethereum address", "description": "an ethereum address represented as 40 hex digits", @@ -1048,7 +1166,7 @@ "TXN_HASH": { "$ref": "#/components/schemas/FELT", "description": "The transaction hash, as assigned in StarkNet", - "title": "A transaction's hash" + "title": "Transaction hash" }, "FELT": { "type": "string", @@ -1057,17 +1175,21 @@ "pattern": "^0x(0|[a-fA-F1-9]{1}[a-fA-F0-9]{0,62})$" }, "BLOCK_NUMBER": { + "title": "Block number", "description": "The block's number (its height)", "type": "integer", "minimum": 0 }, "BLOCK_HASH": { + "title": "Block hash", "$ref": "#/components/schemas/FELT" }, "BLOCK_BODY_WITH_TX_HASHES": { + "title": "Block body with transaction hashes", "type": "object", "properties": { "transactions": { + "title": "Transaction", "description": "The hashes of the transactions included in this block", "type": "array", "items": { @@ -1081,9 +1203,11 @@ ] }, "BLOCK_BODY_WITH_TXS": { + "title": "Block body with transactions", "type": "object", "properties": { "transactions": { + "title": "Transactions", "description": "The transactions in this block", "type": "array", "items": { @@ -1096,29 +1220,36 @@ ] }, "BLOCK_HEADER": { + "title": "Block header", "type": "object", "properties": { "block_hash": { + "title": "Block hash", "$ref": "#/components/schemas/BLOCK_HASH" }, "parent_hash": { + "title": "Parent hash", "description": "The hash of this block's parent", "$ref": "#/components/schemas/BLOCK_HASH" }, "block_number": { + "title": "Block number", "description": "The block number (its height)", "$ref": "#/components/schemas/BLOCK_NUMBER" }, "new_root": { + "title": "New root", "description": "The new global state root", "$ref": "#/components/schemas/FELT" }, "timestamp": { + "title": "Timestamp", "description": "The time in which the block was created, encoded in Unix time", "type": "integer", "minimum": 0 }, "sequencer_address": { + "title": "Sequencer address", "description": "The StarkNet identity of the sequencer submitting this block", "$ref": "#/components/schemas/FELT" } @@ -1133,12 +1264,15 @@ ] }, "BLOCK_WITH_TX_HASHES": { - "title": "The block object", + "title": "Block with transaction hashes", + "description": "The block object", "allOf": [ { + "title": "Event emitter", "type": "object", "properties": { "status": { + "title": "Status", "$ref": "#/components/schemas/BLOCK_STATUS" } }, @@ -1147,20 +1281,25 @@ ] }, { + "title": "Block header", "$ref": "#/components/schemas/BLOCK_HEADER" }, { + "title": "Block body with transaction hashes", "$ref": "#/components/schemas/BLOCK_BODY_WITH_TX_HASHES" } ] }, "BLOCK_WITH_TXS": { - "title": "The block object", + "title": "Block with transactions", + "description": "The block object", "allOf": [ { + "title": "Event emitter", "type": "object", "properties": { "status": { + "title": "Status", "$ref": "#/components/schemas/BLOCK_STATUS" } }, @@ -1169,32 +1308,40 @@ ] }, { + "title": "Block header", "$ref": "#/components/schemas/BLOCK_HEADER" }, { + "title": "Block body with transactions", "$ref": "#/components/schemas/BLOCK_BODY_WITH_TXS" } ] }, "PENDING_BLOCK_WITH_TX_HASHES": { + "title": "Pending block with transaction hashes", "description": "The dynamic block being constructed by the sequencer. Note that this object will be deprecated upon decentralization.", "allOf": [ { + "title": "Block body with transactions hashes", "$ref": "#/components/schemas/BLOCK_BODY_WITH_TX_HASHES" }, { + "title": "Event emitter", "type": "object", "properties": { "timestamp": { + "title": "Timestamp", "description": "The time in which the block was created, encoded in Unix time", "type": "integer", "minimum": 0 }, "sequencer_address": { + "title": "Sequencer address", "description": "The StarkNet identity of the sequencer submitting this block", "$ref": "#/components/schemas/FELT" }, "parent_hash": { + "title": "Parent hash", "description": "The hash of this block's parent", "$ref": "#/components/schemas/BLOCK_HASH" } @@ -1203,24 +1350,30 @@ ] }, "PENDING_BLOCK_WITH_TXS": { + "title": "Pending block with transactions", "description": "The dynamic block being constructed by the sequencer. Note that this object will be deprecated upon decentralization.", "allOf": [ { + "title": "Block body with transactions", "$ref": "#/components/schemas/BLOCK_BODY_WITH_TXS" }, { "type": "object", + "title": "Event emitter", "properties": { "timestamp": { + "title": "Timestamp", "description": "The time in which the block was created, encoded in Unix time", "type": "integer", "minimum": 0 }, "sequencer_address": { + "title": "Sequencer address", "description": "The StarkNet identity of the sequencer submitting this block", "$ref": "#/components/schemas/FELT" }, "parent_hash": { + "title": "Parent hash", "description": "The hash of this block's parent", "$ref": "#/components/schemas/BLOCK_HASH" } @@ -1229,13 +1382,16 @@ ] }, "DEPLOYED_CONTRACT_ITEM": { + "title": "Deployed contract item", "type": "object", "properties": { "address": { + "title": "Address", "description": "The address of the contract", "$ref": "#/components/schemas/FELT" }, "class_hash": { + "title": "Class hash", "description": "The hash of the contract code", "$ref": "#/components/schemas/FELT" } @@ -1246,23 +1402,29 @@ ] }, "CONTRACT_STORAGE_DIFF_ITEM": { + "title": "Contract storage diff item", "type": "object", "properties": { "address": { + "title": "Address", "description": "The contract address for which the storage changed", "$ref": "#/components/schemas/FELT" }, "storage_entries": { + "title": "Storage entries", "description": "The changes in the storage of the contract", "type": "array", "items": { + "title": "Event emitter", "type": "object", "properties": { "key": { + "title": "Key", "description": "The key of the changed value", "$ref": "#/components/schemas/FELT" }, "value": { + "title": "Value", "description": "The new value applied to the given address", "$ref": "#/components/schemas/FELT" } @@ -1280,60 +1442,74 @@ "description": "The transaction schema, as it appears inside a block", "oneOf": [ { + "title": "Invoke transaction", "$ref": "#/components/schemas/INVOKE_TXN" }, { + "title": "L1 handler transaction", "$ref": "#/components/schemas/L1_HANDLER_TXN" }, { + "title": "Declare transaction", "$ref": "#/components/schemas/DECLARE_TXN" }, { + "title": "Deploy transaction", "$ref": "#/components/schemas/DEPLOY_TXN" }, { + "title": "Deploy account transaction", "$ref": "#/components/schemas/DEPLOY_ACCOUNT_TXN" } ] }, "BROADCASTED_TXN": { + "title": "Broadcasted transaction", "description": "the transaction's representation when it's sent to the sequencer (but not yet in a block)", - "title": "Transaction", "oneOf": [ { + "title": "Broadcasted invoke transaction", "$ref": "#/components/schemas/BROADCASTED_INVOKE_TXN" }, { + "title": "Broadcasted declare transaction", "$ref": "#/components/schemas/BROADCASTED_DECLARE_TXN" }, { + "title": "Broadcasted deploy account transaction", "$ref": "#/components/schemas/BROADCASTED_DEPLOY_ACCOUNT_TXN" } ] }, "SIGNATURE": { - "title": "A transaction signature", + "title": "Signature", + "description": "A transaction signature", "type": "array", "items": { "$ref": "#/components/schemas/FELT" } }, "BROADCASTED_TXN_COMMON_PROPERTIES": { + "title": "Broadcasted transaction common properties", "type": "object", "description": "common properties of a transaction that is sent to the sequencer (but is not yet in a block)", "properties": { "max_fee": { + "title": "Max fee", "$ref": "#/components/schemas/FELT", "description": "The maximal fee that can be charged for including the transaction" }, "version": { + "title": "Version", "description": "Version of the transaction scheme", "$ref": "#/components/schemas/NUM_AS_HEX" }, "signature": { + "title": "Signature", "$ref": "#/components/schemas/SIGNATURE" }, "nonce": { + "title": "Nonce", "$ref": "#/components/schemas/FELT" } }, @@ -1345,11 +1521,14 @@ ] }, "COMMON_TXN_PROPERTIES": { + "title": "Common transaction properties", "allOf": [ { "type": "object", + "title": "Transaction hash", "properties": { "transaction_hash": { + "title": "Transaction hash", "$ref": "#/components/schemas/TXN_HASH", "description": "The hash identifying the transaction" } @@ -1359,40 +1538,50 @@ ] }, { + "title": "Broadcasted transaction common properties", "$ref": "#/components/schemas/BROADCASTED_TXN_COMMON_PROPERTIES" } ] }, "DECLARE_TXN": { + "title": "Declare transaction", "anyOf": [ { + "title": "Declare transaction V1", "$ref": "#/components/schemas/DECLARE_TXN_V1" }, { + "title": "Declare transaction V2", "$ref": "#/components/schemas/DECLARE_TXN_V2" } ] }, "DECLARE_TXN_V1": { - "title": "Declare Contract Transaction", + "title": "Declare Contract Transaction V1", + "description": "Declare Contract Transaction V1", "allOf": [ { + "title": "Common transaction properties", "$ref": "#/components/schemas/COMMON_TXN_PROPERTIES" }, { "type": "object", + "title": "Event emitter", "properties": { "type": { + "title": "Declare", "type": "string", "enum": [ "DECLARE" ] }, "class_hash": { + "title": "Class hash", "description": "The hash of the declared class", "$ref": "#/components/schemas/FELT" }, "sender_address": { + "title": "Sender address", "description": "The address of the account contract sending the declaration transaction", "$ref": "#/components/schemas/ADDRESS" } @@ -1406,15 +1595,19 @@ ] }, "DECLARE_TXN_V2": { - "title": "Declare Contract Transaction", + "title": "Declare Transaction V2", + "description": "Declare Contract Transaction V2", "allOf": [ { + "title": "Declare transaction V1", "$ref": "#/components/schemas/DECLARE_TXN_V1" }, { "type": "object", + "title": "Event emitter", "properties": { "compiled_class_hash": { + "title": "Compiled class hash", "description": "The hash of the Cairo assembly resulting from the Sierra compilation", "$ref": "#/components/schemas/FELT" } @@ -1426,29 +1619,37 @@ ] }, "BROADCASTED_DECLARE_TXN": { + "title": "Broadcasted declare transaction", "oneOf": [ { + "title": "Broadcasted declare transaction V1", "$ref": "#/components/schemas/BROADCASTED_DECLARE_TXN_V1" }, { + "title": "Broadcasted declare transaction V2", "$ref": "#/components/schemas/BROADCASTED_DECLARE_TXN_V2" } ] }, "BROADCASTED_DECLARE_TXN_V1": { - "title": "mempool representation of a declare transaction", + "title": "Broadcasted declare transaction V1", + "description": "mempool representation of a declare transaction", "allOf": [ { + "title": "Broadcasted transaction common properties", "$ref": "#/components/schemas/BROADCASTED_TXN_COMMON_PROPERTIES" }, { "type": "object", + "title": "Declare v1", "properties": { "contract_class": { + "title": "Contract class", "description": "The class to be declared", "$ref": "#/components/schemas/DEPRECATED_CONTRACT_CLASS" }, "sender_address": { + "title": "Sender address", "description": "The address of the account contract sending the declaration transaction", "$ref": "#/components/schemas/ADDRESS" } @@ -1461,29 +1662,36 @@ ] }, "BROADCASTED_DECLARE_TXN_V2": { - "title": "mempool representation of a declare transaction", + "title": "Broadcasted declare transaction V2", + "description": "mempool representation of a declare transaction V2", "allOf": [ { + "title": "Broadcasted transaction common properties", "$ref": "#/components/schemas/BROADCASTED_TXN_COMMON_PROPERTIES" }, { "type": "object", + "title": "Event emitter", "properties": { "type": { + "title": "Declare", "type": "string", "enum": [ "DECLARE" ] }, "contract_class": { + "title": "Contract class", "description": "The class to be declared", "$ref": "#/components/schemas/CONTRACT_CLASS" }, "sender_address": { + "title": "Sender address", "description": "The address of the account contract sending the declaration transaction", "$ref": "#/components/schemas/ADDRESS" }, "compiled_class_hash": { + "title": "Compiled class hash", "description": "The hash of the Cairo assembly resulting from the Sierra compilation", "$ref": "#/components/schemas/FELT" } @@ -1497,49 +1705,59 @@ ] }, "DEPLOY_ACCOUNT_TXN": { - "title": "Deploy Account Transaction", + "title": "Deploy account transaction", "description": "Deploys an account contract, charges fee from the pre-funded account addresses", "allOf": [ { + "title": "Common transaction properties", "$ref": "#/components/schemas/COMMON_TXN_PROPERTIES" }, { + "title": "Deploy account transaction properties", "$ref": "#/components/schemas/DEPLOY_ACCOUNT_TXN_PROPERTIES" } ] }, "BROADCASTED_DEPLOY_ACCOUNT_TXN": { + "title": "Broadcasted deploy account transaction", "description": "Mempool representation of a deploy account transaction", "allOf": [ { + "title": "Broadcasted transaction common properties", "$ref": "#/components/schemas/BROADCASTED_TXN_COMMON_PROPERTIES" }, { + "title": "Deploy account transaction properties", "$ref": "#/components/schemas/DEPLOY_ACCOUNT_TXN_PROPERTIES" } ] }, "DEPLOY_ACCOUNT_TXN_PROPERTIES": { + "title": "Deploy account transaction properties", "type": "object", "properties": { "type": { + "title": "Deploy account", "type": "string", "enum": [ "DEPLOY_ACCOUNT" ] }, "contract_address_salt": { + "title": "Contract address salt", "description": "The salt for the address of the deployed contract", "$ref": "#/components/schemas/FELT" }, "constructor_calldata": { "type": "array", "description": "The parameters passed to the constructor", + "title": "Constructor calldata", "items": { "$ref": "#/components/schemas/FELT" } }, "class_hash": { + "title": "Class hash", "description": "The hash of the deployed contract's class", "$ref": "#/components/schemas/FELT" } @@ -1557,12 +1775,15 @@ "allOf": [ { "type": "object", + "title": "Event emitter", "properties": { "transaction_hash": { + "title": "Transaction hash", "$ref": "#/components/schemas/TXN_HASH", "description": "The hash identifying the transaction" }, "class_hash": { + "title": "Class hash", "description": "The hash of the deployed contract's class", "$ref": "#/components/schemas/FELT" } @@ -1573,18 +1794,22 @@ ] }, { + "title": "Deploy transaction properties", "$ref": "#/components/schemas/DEPLOY_TXN_PROPERTIES" } ] }, "DEPLOY_TXN_PROPERTIES": { + "title": "Deploy transaction properties", "type": "object", "properties": { "version": { + "title": "Version", "description": "Version of the transaction scheme", "$ref": "#/components/schemas/NUM_AS_HEX" }, "type": { + "title": "Deploy", "type": "string", "enum": [ "DEPLOY" @@ -1592,10 +1817,12 @@ }, "contract_address_salt": { "description": "The salt for the address of the deployed contract", + "title": "Contract address salt", "$ref": "#/components/schemas/FELT" }, "constructor_calldata": { "type": "array", + "title": "Constructor calldata", "description": "The parameters passed to the constructor", "items": { "$ref": "#/components/schemas/FELT" @@ -1641,9 +1868,9 @@ "$ref": "#/components/schemas/FELT" }, "calldata": { - "title": "Calldata", "type": "array", - "description": "The parameters passed to the function", + "title": "calldata", + "description": "The data expected by the account's `execute` function (in most usecases, this includes the called contract address and a function selector)", "items": { "$ref": "#/components/schemas/FELT" } @@ -1697,6 +1924,7 @@ "type": "object", "properties": { "type": { + "title": "Type", "type": "string", "enum": [ "INVOKE" @@ -1708,11 +1936,14 @@ ] }, { + "title": "Invoke transaction properties", "oneOf": [ { + "title": "Invoke transaction V0", "$ref": "#/components/schemas/INVOKE_TXN_V0" }, { + "title": "Invoke transaction V1", "$ref": "#/components/schemas/INVOKE_TXN_V1" } ] @@ -1720,15 +1951,19 @@ ] }, "BROADCASTED_INVOKE_TXN": { + "title": "Broadcasted invoke transaction", "description": "mempool representation of an invoke transaction", "allOf": [ { + "title": "Broadcasted transaction common properties", "$ref": "#/components/schemas/BROADCASTED_TXN_COMMON_PROPERTIES" }, { + "title": "Event emitter", "type": "object", "properties": { "type": { + "title": "Type", "type": "string", "enum": [ "INVOKE" @@ -1740,8 +1975,10 @@ ] }, { + "title": "Invoke transaction properties", "oneOf": [ { + "title": "Invoke transaction V0", "$ref": "#/components/schemas/INVOKE_TXN_V0" }, { @@ -1783,27 +2020,32 @@ ] }, "L1_HANDLER_TXN": { + "title": "L1 Handler transaction", "allOf": [ { "type": "object", - "title": "l1-->l2 message transaction", + "title": "L1 handler transaction", "description": "a call to an l1_handler on an L2 contract induced by a message from L1", "properties": { "transaction_hash": { + "title": "Transaction hash", "$ref": "#/components/schemas/TXN_HASH", "description": "The hash identifying the transaction" }, "version": { + "title": "Version", "description": "Version of the transaction scheme", "$ref": "#/components/schemas/NUM_AS_HEX" }, "type": { + "title": "type", "type": "string", "enum": [ "L1_HANDLER" ] }, "nonce": { + "title": "Nonce", "description": "The L1->L2 message nonce field of the SN Core L1 contract at the time the transaction was sent", "$ref": "#/components/schemas/NUM_AS_HEX" } @@ -1816,39 +2058,48 @@ ] }, { + "title": "Function call", "$ref": "#/components/schemas/FUNCTION_CALL" } ] }, "COMMON_RECEIPT_PROPERTIES": { - "title": "Common properties for a transaction receipt", + "title": "Common receipt properties", + "description": "Common properties for a transaction receipt", "type": "object", "properties": { "transaction_hash": { + "title": "Transaction hash", "$ref": "#/components/schemas/TXN_HASH", "description": "The hash identifying the transaction" }, "actual_fee": { + "title": "Actual fee", "$ref": "#/components/schemas/FELT", "description": "The fee that was charged by the sequencer" }, "status": { + "title": "Status", "$ref": "#/components/schemas/TXN_STATUS" }, "block_hash": { + "title": "Block hash", "$ref": "#/components/schemas/BLOCK_HASH" }, "block_number": { + "title": "Block number", "$ref": "#/components/schemas/BLOCK_NUMBER" }, "messages_sent": { "type": "array", + "title": "Messages sent", "items": { "$ref": "#/components/schemas/MSG_TO_L1" } }, "events": { "description": "The events emitted as part of this transaction", + "title": "Events", "type": "array", "items": { "$ref": "#/components/schemas/EVENT" @@ -1869,9 +2120,11 @@ "title": "Invoke Transaction Receipt", "allOf": [ { + "title": "Type", "type": "object", "properties": { "type": { + "title": "Type", "type": "string", "enum": [ "INVOKE" @@ -1883,6 +2136,7 @@ ] }, { + "title": "Common receipt properties", "$ref": "#/components/schemas/COMMON_RECEIPT_PROPERTIES" } ] @@ -1891,9 +2145,11 @@ "title": "Declare Transaction Receipt", "allOf": [ { + "title": "Event emitter", "type": "object", "properties": { "type": { + "title": "Declare", "type": "string", "enum": [ "DECLARE" @@ -1905,6 +2161,7 @@ ] }, { + "title": "Common receipt properties", "$ref": "#/components/schemas/COMMON_RECEIPT_PROPERTIES" } ] @@ -1913,18 +2170,22 @@ "title": "Deploy Account Transaction Receipt", "allOf": [ { + "title": "Common receipt properties", "$ref": "#/components/schemas/COMMON_RECEIPT_PROPERTIES" }, { + "title": "Event emitter", "type": "object", "properties": { "type": { + "title": "Deploy account", "type": "string", "enum": [ "DEPLOY_ACCOUNT" ] }, "contract_address": { + "title": "Contract address", "description": "The address of the deployed contract", "$ref": "#/components/schemas/FELT" } @@ -1940,18 +2201,22 @@ "title": "Deploy Transaction Receipt", "allOf": [ { + "title": "Common receipt properties", "$ref": "#/components/schemas/COMMON_RECEIPT_PROPERTIES" }, { + "title": "Event emitter", "type": "object", "properties": { "type": { + "title": "Deploy", "type": "string", "enum": [ "DEPLOY" ] }, "contract_address": { + "title": "Contract address", "description": "The address of the deployed contract", "$ref": "#/components/schemas/FELT" } @@ -1964,12 +2229,15 @@ ] }, "L1_HANDLER_TXN_RECEIPT": { - "title": "receipt for l1 handler transaction", + "title": "L1 Handler Transaction Receipt", + "description": "receipt for l1 handler transaction", "allOf": [ { + "title": "Event emitter", "type": "object", "properties": { "type": { + "title": "type", "type": "string", "enum": [ "L1_HANDLER" @@ -1981,55 +2249,69 @@ ] }, { + "title": "Common receipt properties", "$ref": "#/components/schemas/COMMON_RECEIPT_PROPERTIES" } ] }, "TXN_RECEIPT": { + "title": "Transaction Receipt", "oneOf": [ { + "title": "Invoke transaction receipt", "$ref": "#/components/schemas/INVOKE_TXN_RECEIPT" }, { + "title": "L1 handler transaction receipt", "$ref": "#/components/schemas/L1_HANDLER_TXN_RECEIPT" }, { + "title": "Declare transaction receipt", "$ref": "#/components/schemas/DECLARE_TXN_RECEIPT" }, { + "title": "Deploy transaction receipt", "$ref": "#/components/schemas/DEPLOY_TXN_RECEIPT" }, { + "title": "Deploy account transaction receipt", "$ref": "#/components/schemas/DEPLOY_ACCOUNT_TXN_RECEIPT" }, { + "title": "Pending transaction receipt", "$ref": "#/components/schemas/PENDING_TXN_RECEIPT" } ] }, "PENDING_COMMON_RECEIPT_PROPERTIES": { - "title": "Common properties for a pending transaction receipt", + "title": "Pending common receipt properties", + "description": "Common properties for a pending transaction receipt", "type": "object", "properties": { "transaction_hash": { + "title": "Transaction hash", "$ref": "#/components/schemas/TXN_HASH", "description": "The hash identifying the transaction" }, "actual_fee": { + "title": "Actual fee", "$ref": "#/components/schemas/FELT", "description": "The fee that was charged by the sequencer" }, "type": { + "title": "Transaction type", "$ref": "#/components/schemas/TXN_TYPE" }, "messages_sent": { "type": "array", + "title": "Messages sent", "items": { "$ref": "#/components/schemas/MSG_TO_L1" } }, "events": { "description": "The events emitted as part of this transaction", + "title": "Events", "type": "array", "items": { "$ref": "#/components/schemas/EVENT" @@ -2039,6 +2321,7 @@ "required": [ "transaction_hash", "actual_fee", + "type", "messages_sent", "events" ] @@ -2047,12 +2330,15 @@ "title": "Pending deploy Transaction Receipt", "allOf": [ { + "title": "Common receipt properties", "$ref": "#/components/schemas/PENDING_COMMON_RECEIPT_PROPERTIES" }, { "type": "object", + "title": "Event emitter", "properties": { "contract_address": { + "title": "Contract address", "description": "The address of the deployed contract", "$ref": "#/components/schemas/FELT" } @@ -2061,25 +2347,31 @@ ] }, "PENDING_TXN_RECEIPT": { + "title": "Pending Transaction Receipt", "oneOf": [ { + "title": "Pending deploy transaction receipt", "$ref": "#/components/schemas/PENDING_DEPLOY_TXN_RECEIPT" }, { + "title": "Pending common receipt properties", "$comment": "Used for pending invoke and declare transaction receipts", "$ref": "#/components/schemas/PENDING_COMMON_RECEIPT_PROPERTIES" } ] }, "MSG_TO_L1": { + "title": "Message to L1", "type": "object", "properties": { "to_address": { + "title": "To address", "description": "The target L1 address the message is sent to", "$ref": "#/components/schemas/FELT" }, "payload": { "description": "The payload of the message", + "title": "Payload", "type": "array", "items": { "$ref": "#/components/schemas/FELT" @@ -2097,6 +2389,7 @@ ] }, "TXN_STATUS": { + "title": "Transaction status", "type": "string", "enum": [ "PENDING", @@ -2107,6 +2400,7 @@ "description": "The status of the transaction" }, "TXN_TYPE": { + "title": "Transaction type", "type": "string", "enum": [ "DECLARE", @@ -2118,6 +2412,7 @@ "description": "The type of the transaction" }, "BLOCK_STATUS": { + "title": "Block status", "type": "string", "enum": [ "PENDING", @@ -2128,16 +2423,20 @@ "description": "The status of the block" }, "FUNCTION_CALL": { + "title": "Function call", "type": "object", - "title": "Function call information", + "description": "Function call information", "properties": { "contract_address": { + "title": "Contract address", "$ref": "#/components/schemas/ADDRESS" }, "entry_point_selector": { + "title": "Entry point selector", "$ref": "#/components/schemas/FELT" }, "calldata": { + "title": "Calldata", "type": "array", "description": "The parameters passed to the function", "items": { @@ -2152,9 +2451,11 @@ ] }, "CONTRACT_CLASS": { + "title": "Contract class", "type": "object", "properties": { "sierra_program": { + "title": "Sierra program", "type": "array", "description": "The list of Sierra instructions of which the program consists", "items": { @@ -2162,25 +2463,30 @@ } }, "contract_class_version": { + "title": "Contract class version", "type": "string", "description": "The version of the contract class object. Currently, the Starknet OS supports version 0.1.0" }, "entry_points_by_type": { + "title": "Entry points by type", "type": "object", "properties": { "CONSTRUCTOR": { "type": "array", + "title": "Constructor", "items": { "$ref": "#/components/schemas/SIERRA_ENTRY_POINT" } }, "EXTERNAL": { + "title": "External", "type": "array", "items": { "$ref": "#/components/schemas/SIERRA_ENTRY_POINT" } }, "L1_HANDLER": { + "title": "L1 handler", "type": "array", "items": { "$ref": "#/components/schemas/SIERRA_ENTRY_POINT" @@ -2189,8 +2495,9 @@ } }, "abi": { + "title": "ABI", "type": "string", - "descripition": "The class ABI, as supplied by the user declaring the class" + "description": "The class ABI, as supplied by the user declaring the class" } }, "required": [ @@ -2200,31 +2507,37 @@ ] }, "DEPRECATED_CONTRACT_CLASS": { - "title": "The definition of a StarkNet contract class", + "title": "Deprecated contract class", + "description": "The definition of a StarkNet contract class", "type": "object", "properties": { "program": { "type": "string", + "title": "Program", "description": "A base64 representation of the compressed program code", "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{2}==)?$" }, "entry_points_by_type": { "type": "object", + "title": "Deprecated entry points by type", "properties": { "CONSTRUCTOR": { "type": "array", + "title": "Deprecated constructor", "items": { "$ref": "#/components/schemas/DEPRECATED_CAIRO_ENTRY_POINT" } }, "EXTERNAL": { "type": "array", + "title": "Deprecated external", "items": { "$ref": "#/components/schemas/DEPRECATED_CAIRO_ENTRY_POINT" } }, "L1_HANDLER": { "type": "array", + "title": "Deprecated L1 handler", "items": { "$ref": "#/components/schemas/DEPRECATED_CAIRO_ENTRY_POINT" } @@ -2232,6 +2545,7 @@ } }, "abi": { + "title": "Contract ABI", "$ref": "#/components/schemas/CONTRACT_ABI" } }, @@ -2241,63 +2555,77 @@ ] }, "DEPRECATED_CAIRO_ENTRY_POINT": { + "title": "Deprecated Cairo entry point", "type": "object", "properties": { "offset": { + "title": "Offset", "description": "The offset of the entry point in the program", "type": "integer" }, "selector": { + "title": "Selector", "description": "A unique identifier of the entry point (function) in the program", "$ref": "#/components/schemas/FELT" } } }, "SIERRA_ENTRY_POINT": { + "title": "Sierra entry point", "type": "object", "properties": { "selector": { + "title": "Selector", "description": "A unique identifier of the entry point (function) in the program", "$ref": "#/components/schemas/FELT" }, "function_idx": { + "title": "Function index", "description": "The index of the function in the program", "type": "integer" } } }, "CONTRACT_ABI": { + "title": "Contract ABI", "type": "array", "items": { "$ref": "#/components/schemas/CONTRACT_ABI_ENTRY" } }, "CONTRACT_ABI_ENTRY": { + "title": "Contract ABI entry", "oneOf": [ { + "title": "Function ABI entry", "$ref": "#/components/schemas/FUNCTION_ABI_ENTRY" }, { + "title": "Event ABI entry", "$ref": "#/components/schemas/EVENT_ABI_ENTRY" }, { + "title": "Struct ABI entry", "$ref": "#/components/schemas/STRUCT_ABI_ENTRY" } ] }, "STRUCT_ABI_TYPE": { + "title": "Struct ABI type", "type": "string", "enum": [ "struct" ] }, "EVENT_ABI_TYPE": { + "title": "Event ABI type", "type": "string", "enum": [ "event" ] }, "FUNCTION_ABI_TYPE": { + "title": "Function ABI type", "type": "string", "enum": [ "function", @@ -2306,21 +2634,26 @@ ] }, "STRUCT_ABI_ENTRY": { + "title": "Struct ABI entry", "type": "object", "properties": { "type": { + "title": "Struct ABI type", "$ref": "#/components/schemas/STRUCT_ABI_TYPE" }, "name": { + "title": "Struct name", "description": "The struct name", "type": "string" }, "size": { + "title": "Size", "type": "integer", "minimum": 1 }, "members": { "type": "array", + "title": "Members", "items": { "$ref": "#/components/schemas/STRUCT_MEMBER" } @@ -2328,14 +2661,18 @@ } }, "STRUCT_MEMBER": { + "title": "Struct member", "allOf": [ { + "title": "Typed parameter", "$ref": "#/components/schemas/TYPED_PARAMETER" }, { "type": "object", + "title": "Event emitter", "properties": { "offset": { + "title": "Offset", "description": "offset of this property within the struct", "type": "integer" } @@ -2344,23 +2681,28 @@ ] }, "EVENT_ABI_ENTRY": { + "title": "Event ABI entry", "type": "object", "properties": { "type": { + "title": "Event ABI type", "$ref": "#/components/schemas/EVENT_ABI_TYPE" }, "name": { + "title": "Event name", "description": "The event name", "type": "string" }, "keys": { "type": "array", + "title": "Typed parameter", "items": { "$ref": "#/components/schemas/TYPED_PARAMETER" } }, "data": { "type": "array", + "title": "Typed parameter", "items": { "$ref": "#/components/schemas/TYPED_PARAMETER" } @@ -2368,23 +2710,28 @@ } }, "FUNCTION_ABI_ENTRY": { + "title": "Function ABI entry", "type": "object", "properties": { "type": { + "title": "Function ABI type", "$ref": "#/components/schemas/FUNCTION_ABI_TYPE" }, "name": { + "title": "Function name", "description": "The function name", "type": "string" }, "inputs": { "type": "array", + "title": "Typed parameter", "items": { "$ref": "#/components/schemas/TYPED_PARAMETER" } }, "outputs": { "type": "array", + "title": "Typed parameter", "items": { "$ref": "#/components/schemas/TYPED_PARAMETER" } @@ -2392,30 +2739,37 @@ } }, "TYPED_PARAMETER": { + "title": "Typed parameter", "type": "object", "properties": { "name": { + "title": "Parameter name", "description": "The parameter's name", "type": "string" }, "type": { + "title": "Parameter type", "description": "The parameter's type", "type": "string" } } }, "FEE_ESTIMATE": { + "title": "Fee estimation", "type": "object", "properties": { "gas_consumed": { + "title": "Gas consumed", "description": "The Ethereum gas cost of the transaction (see https://docs.starknet.io/docs/Fees/fee-mechanism for more info)", "$ref": "#/components/schemas/NUM_AS_HEX" }, "gas_price": { + "title": "Gas price", "description": "The gas price (in gwei) that was used in the cost estimation", "$ref": "#/components/schemas/NUM_AS_HEX" }, "overall_fee": { + "title": "Overall fee", "description": "The estimated fee for the transaction (in gwei), product of gas_consumed and gas_price", "$ref": "#/components/schemas/NUM_AS_HEX" }