diff --git a/api/starknet_api_openrpc.json b/api/starknet_api_openrpc.json index 330c548..0efaac4 100644 --- a/api/starknet_api_openrpc.json +++ b/api/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" } @@ -454,6 +495,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" } @@ -465,6 +507,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" } } @@ -473,6 +516,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": { @@ -500,6 +544,7 @@ "name": "result", "description": "The latest block number", "schema": { + "title": "Block number", "$ref": "#/components/schemas/BLOCK_NUMBER" } }, @@ -517,15 +562,22 @@ "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" } - } + }, + "required": [ + "block_hash", + "block_number" + ] } }, "errors": [ @@ -542,6 +594,7 @@ "name": "result", "description": "The chain id this node is connected to", "schema": { + "title": "Chain id", "$ref": "#/components/schemas/CHAIN_ID" } } @@ -570,12 +623,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" } ] @@ -592,11 +648,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" } ] @@ -607,6 +666,7 @@ "name": "events", "description": "All the event objects matching the filter", "schema": { + "title": "Events chunk", "$ref": "#/components/schemas/EVENTS_CHUNK" } }, @@ -634,6 +694,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" } }, @@ -642,6 +703,7 @@ "description": "The address of the contract whose nonce we're seeking", "required": true, "schema": { + "title": "Address", "$ref": "#/components/schemas/ADDRESS" } } @@ -650,6 +712,7 @@ "name": "result", "description": "The last nonce used for the given contract.", "schema": { + "title": "Field element", "$ref": "#/components/schemas/FELT" } }, @@ -667,6 +730,7 @@ "contentDescriptors": {}, "schemas": { "EVENTS_CHUNK": { + "title": "Events chunk", "type": "object", "properties": { "events": { @@ -677,6 +741,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" } @@ -686,13 +751,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 } @@ -702,27 +770,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" } }, @@ -735,12 +808,15 @@ ] }, "EVENT": { - "title": "A StarkNet event", + "title": "Event", + "descripition": "A StarkNet event", "allOf": [ { + "title": "Event emitter", "type": "object", "properties": { "from_address": { + "title": "From address", "$ref": "#/components/schemas/ADDRESS" } }, @@ -749,23 +825,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" } @@ -777,7 +856,8 @@ ] }, "EVENT_FILTER": { - "title": "An event filter/query", + "title": "Event filter", + "description": "An event filter/query", "type": "object", "properties": { "from_block": { @@ -793,11 +873,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": { @@ -805,15 +885,24 @@ } } } - } + }, + "required": [ + "from_block", + "to_block", + "address", + "keys" + ] }, "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" } }, @@ -822,9 +911,11 @@ ] }, { + "title": "Block number", "type": "object", "properties": { "block_number": { + "title": "Block number", "$ref": "#/components/schemas/BLOCK_NUMBER" } }, @@ -833,11 +924,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": [ @@ -846,30 +939,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/NUM_AS_HEX" }, "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/NUM_AS_HEX" }, "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/NUM_AS_HEX" } @@ -884,26 +984,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" } @@ -914,22 +1019,28 @@ ] }, { + "title": "Pending state update", "$ref": "#/components/schemas/PENDING_STATE_UPDATE" } ] }, "PENDING_STATE_UPDATE": { + "title": "Pending state update", + "descripition": "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", @@ -937,6 +1048,7 @@ } }, "deprecated_declared_classes": { + "title": "Deprecated declared classes", "type": "array", "items": { "description": "The hash of the declared class", @@ -944,16 +1056,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" } @@ -961,6 +1077,7 @@ } }, "deployed_contracts": { + "title": "Deployed contracts", "type": "array", "items": { "description": "A new contract deployed as part of the state update", @@ -968,16 +1085,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" } @@ -985,16 +1106,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" } @@ -1018,16 +1143,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", @@ -1036,7 +1163,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", @@ -1045,17 +1172,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": { @@ -1069,9 +1200,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": { @@ -1084,29 +1217,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" } @@ -1121,12 +1261,15 @@ ] }, "BLOCK_WITH_TX_HASHES": { - "title": "The block object", + "title": "Block with transaction hashes", + "descripition": "The block object", "allOf": [ { + "title": "Event emitter", "type": "object", "properties": { "status": { + "title": "Status", "$ref": "#/components/schemas/BLOCK_STATUS" } }, @@ -1135,20 +1278,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" } }, @@ -1157,32 +1305,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" } @@ -1191,24 +1347,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" } @@ -1217,13 +1379,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" } @@ -1234,23 +1399,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" } @@ -1268,60 +1439,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", + "descripition": "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" } }, @@ -1333,11 +1518,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" } @@ -1347,40 +1535,50 @@ ] }, { + "title": "Broadcasted transaction common properties", "$ref": "#/components/schemas/BROADCASTED_TXN_COMMON_PROPERTIES" } ] }, "DECLARE_TXN": { + "title": "Declare transaction", "oneOf": [ { + "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", + "descripition": "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" } @@ -1394,15 +1592,19 @@ ] }, "DECLARE_TXN_V2": { - "title": "Declare Contract Transaction", + "title": "Declare Transaction V2", + "descripition": "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" } @@ -1414,29 +1616,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", + "descripition": "mempool representation of a declare transaction", "allOf": [ { + "title": "Broadcasted transaction common properties", "$ref": "#/components/schemas/BROADCASTED_TXN_COMMON_PROPERTIES" }, { "type": "object", + "title": "Event emitter", "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" } @@ -1445,29 +1655,36 @@ ] }, "BROADCASTED_DECLARE_TXN_V2": { - "title": "mempool representation of a declare transaction", + "title": "Broadcasted declare transaction V2", + "descripition": "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" } @@ -1481,49 +1698,60 @@ ] }, "DEPLOY_ACCOUNT_TXN": { - "title": "Deploy Account Transaction", + "title": "Deploy account transaction", + "descripition": "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" } @@ -1541,12 +1769,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" } @@ -1557,18 +1788,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" @@ -1576,10 +1811,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" @@ -1594,20 +1831,22 @@ ] }, "INVOKE_TXN_V0": { - "title": "version 0 invoke transaction", + "title": "Invoke transaction V0", "description": "invokes a specific function in the desired contract (not necessarily an account)", "$ref": "#/components/schemas/FUNCTION_CALL" }, "INVOKE_TXN_V1": { - "title": "version 1 invoke transaction", + "title": "Invoke transaction V1", "description": "initiates a transaction from a given account", "type": "object", "properties": { "sender_address": { + "title": "sender address", "$ref": "#/components/schemas/ADDRESS" }, "calldata": { "type": "array", + "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" @@ -1620,15 +1859,19 @@ ] }, "INVOKE_TXN": { - "title": "Initiate a transaction from an account", + "title": "Invoke transaction", + "description": "Initiate a transaction from an account", "allOf": [ { + "title": "Common transaction properties", "$ref": "#/components/schemas/COMMON_TXN_PROPERTIES" }, { "type": "object", + "title": "Type", "properties": { "type": { + "title": "Type", "type": "string", "enum": [ "INVOKE" @@ -1640,11 +1883,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" } ] @@ -1652,15 +1898,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" @@ -1672,11 +1922,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" } ] @@ -1684,27 +1937,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" } @@ -1717,39 +1975,48 @@ ] }, { + "title": "Function call", "$ref": "#/components/schemas/FUNCTION_CALL" } ] }, "COMMON_RECEIPT_PROPERTIES": { - "title": "Common properties for a transaction receipt", + "title": "Common receipt properties", + "descripition": "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" @@ -1770,9 +2037,11 @@ "title": "Invoke Transaction Receipt", "allOf": [ { + "title": "Type", "type": "object", "properties": { "type": { + "title": "Type", "type": "string", "enum": [ "INVOKE" @@ -1784,6 +2053,7 @@ ] }, { + "title": "Common receipt properties", "$ref": "#/components/schemas/COMMON_RECEIPT_PROPERTIES" } ] @@ -1792,9 +2062,11 @@ "title": "Declare Transaction Receipt", "allOf": [ { + "title": "Event emitter", "type": "object", "properties": { "type": { + "title": "Declare", "type": "string", "enum": [ "DECLARE" @@ -1806,6 +2078,7 @@ ] }, { + "title": "Common receipt properties", "$ref": "#/components/schemas/COMMON_RECEIPT_PROPERTIES" } ] @@ -1814,18 +2087,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" } @@ -1841,18 +2118,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" } @@ -1865,12 +2146,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" @@ -1882,55 +2166,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" @@ -1948,12 +2246,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" } @@ -1962,17 +2263,21 @@ ] }, "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": { "from_address": { @@ -1980,11 +2285,13 @@ "$ref": "#/components/schemas/FELT" }, "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" @@ -1998,6 +2305,7 @@ ] }, "TXN_STATUS": { + "title": "Transaction status", "type": "string", "enum": [ "PENDING", @@ -2008,6 +2316,7 @@ "description": "The status of the transaction" }, "TXN_TYPE": { + "title": "Transaction type", "type": "string", "enum": [ "DECLARE", @@ -2019,6 +2328,7 @@ "description": "The type of the transaction" }, "BLOCK_STATUS": { + "title": "Block status", "type": "string", "enum": [ "PENDING", @@ -2029,16 +2339,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": { @@ -2053,9 +2367,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": { @@ -2063,33 +2379,44 @@ } }, "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" } } - } + }, + "required": [ + "CONSTRUCTOR", + "EXTERNAL", + "L1_HANDLER" + ] }, "abi": { + "title": "ABI", "type": "string", "descripition": "The class ABI, as supplied by the user declaring the class" } @@ -2101,31 +2428,37 @@ ] }, "DEPRECATED_CONTRACT_CLASS": { - "title": "The definition of a StarkNet contract class", + "title": "Deprecated contract class", + "descripition": "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" } @@ -2133,6 +2466,7 @@ } }, "abi": { + "title": "Contract ABI", "$ref": "#/components/schemas/CONTRACT_ABI" } }, @@ -2142,63 +2476,85 @@ ] }, "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", "$ref": "#/components/schemas/NUM_AS_HEX" }, "selector": { + "title": "Selector", "description": "A unique identifier of the entry point (function) in the program", "$ref": "#/components/schemas/FELT" } - } + }, + "required": [ + "offset", + "selector" + ] }, "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" } - } + }, + "required": [ + "selector", + "function_idx" + ] }, "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", @@ -2207,120 +2563,176 @@ ] }, "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" } } - } + }, + "required": [ + "type", + "name", + "size", + "members" + ] }, "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" } } } + ], + "required": [ + "Typed parameter" ] }, "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" } } - } + }, + "required": [ + "type", + "name", + "keys", + "data" + ] }, "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" } } - } + }, + "required": [ + "type", + "name", + "inputs", + "outputs" + ] }, "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" } - } + }, + "required": [ + "name", + "type" + ] }, "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" } - } + }, + "required": [ + "gas_consumed", + "gas_price", + "overall_fee" + ] } }, "errors": {