From dafe3e90970cc701ac476233e9794111f50c1b82 Mon Sep 17 00:00:00 2001 From: Ariel Elperin Date: Wed, 20 Sep 2023 21:00:45 +0300 Subject: [PATCH] add getTransactionStatus and remove pendingTransactions --- api/starknet_api_openrpc.json | 95 ++++++++++++++++++++++------------- 1 file changed, 61 insertions(+), 34 deletions(-) diff --git a/api/starknet_api_openrpc.json b/api/starknet_api_openrpc.json index 9494076..e0e0aac 100644 --- a/api/starknet_api_openrpc.json +++ b/api/starknet_api_openrpc.json @@ -184,6 +184,47 @@ } ] }, + { + "name": "starknet_getTransactionStatus", + "summary": "Gets the transaction status (possibly reflecting that the tx is still in the mempool, or dropped from it)", + "paramStructure": "by-name", + "params": [ + { + "name": "transaction_hash", + "summary": "The hash of the requested transaction", + "required": true, + "schema": { + "title": "Transaction hash", + "$ref": "#/components/schemas/TXN_HASH" + } + } + ], + "result": { + "name": "result", + "schema": { + "title": "Transaction status", + "type": "object", + "properties": { + "finality_status": { + "title": "finality status", + "$ref": "#/components/schemas/TXN_STATUS" + }, + "execution_status": { + "title": "execution status", + "$ref": "#/components/schemas/TXN_EXECUTION_STATUS" + } + }, + "required": [ + "finality_status" + ] + } + }, + "errors": [ + { + "$ref": "#/components/errors/TXN_HASH_NOT_FOUND" + } + ] + }, { "name": "starknet_getTransactionByHash", "summary": "Get the details and status of a submitted transaction", @@ -695,37 +736,6 @@ } } }, - { - "name": "starknet_pendingTransactions", - "summary": "Returns the transactions in the transaction pool, recognized by this sequencer", - "params": [], - "result": { - "name": "result", - "schema": { - "type": "array", - "title": "Pending Transactions", - "items": { - "allOf": [ - { - "$ref": "#/components/schemas/TXN" - }, - { - "type": "object", - "properties": { - "transaction_hash": { - "title": "transaction hash", - "$ref": "#/components/schemas/TXN_HASH" - } - }, - "required": [ - "transaction_hash" - ] - } - ] - } - } - } - }, { "name": "starknet_syncing", "summary": "Returns an object about the sync status, or false if the node is not synching", @@ -2567,7 +2577,8 @@ "block_hash", "block_number", "messages_sent", - "events" + "events", + "execution_resources" ] }, "INVOKE_TXN_RECEIPT": { @@ -2921,7 +2932,11 @@ ], "description": "The finality status of the transaction" }, - "execution_reources": { + "execution_status": { + "title": "Execution status", + "$ref": "#/components/schemas/TXN_EXECUTION_STATUS" + }, + "execution_resources": { "title": "Execution resources", "description": "The resources consumed by the transaction", "$ref": "#/components/schemas/EXECUTION_RESOURCES" @@ -2934,7 +2949,8 @@ "messages_sent", "events", "finality_status", - "execution_status" + "execution_status", + "execution_resources" ] }, "MSG_TO_L1": { @@ -2999,6 +3015,17 @@ "entry_point_selector" ] }, + "TXN_STATUS": { + "title": "Transaction status", + "type": "string", + "enum": [ + "RECEIVED", + "REJECTED", + "ACCEPTED_ON_L2", + "ACCEPTED_ON_L1" + ], + "description": "The finality status of the transaction, including the case the txn is still in the mempool or failed validation during the block construction phase" + }, "TXN_FINALITY_STATUS": { "title": "Finality status", "type": "string",