@@ -49,8 +49,7 @@ import { CASM_COMPILED_CONTRACT_CLASS } from './executable.js';
4949import { OneOf } from './expansions/helpless.js' ;
5050import { IsInBlock , IsPreConfirmed } from './expansions/transactionReceipt.js' ;
5151
52- // METHOD RESPONSES
53- // response starknet_getClass, starknet_getClassAt
52+ /** Response for starknet_getClass, starknet_getClassAt */
5453export type ContractClass = OneOf < [ CONTRACT_CLASS , DEPRECATED_CONTRACT_CLASS ] >
5554
5655/**
@@ -82,21 +81,21 @@ export type SimulateTransactionResponseWithInitialReads = {
8281 initial_reads : INITIAL_READS
8382}
8483
85- // response starknet_estimateFee
84+ /** Response for starknet_estimateFee */
8685export type FeeEstimate = FEE_ESTIMATE
87- // response starknet_estimateMessageFee
86+ /** Response for starknet_estimateMessageFee */
8887export type MessageFeeEstimate = MESSAGE_FEE_ESTIMATE
89- // response starknet_getTransactionByHash, starknet_getTransactionByBlockIdAndIndex
88+ /** Response for starknet_getTransactionByHash, starknet_getTransactionByBlockIdAndIndex */
9089export type TransactionWithHash = TXN_WITH_HASH
91- // response starknet_blockHashAndNumber
90+ /** Response for starknet_blockHashAndNumber */
9291export type BlockHashAndNumber = { block_hash : BLOCK_HASH ; block_number : BLOCK_NUMBER }
93- // response starknet_getBlockWithTxs
92+ /** Response for starknet_getBlockWithTxs */
9493export type BlockWithTxs = OneOf < [ BLOCK_WITH_TXS , PRE_CONFIRMED_BLOCK_WITH_TXS ] >
95- // response starknet_getBlockWithTxHashes
94+ /** Response for starknet_getBlockWithTxHashes */
9695export type BlockWithTxHashes = OneOf < [ BLOCK_WITH_TX_HASHES , PRE_CONFIRMED_BLOCK_WITH_TX_HASHES ] >
97- // response starknet_getBlockWithReceipts
96+ /** Response for starknet_getBlockWithReceipts */
9897export type BlockWithTxReceipts = OneOf < [ BLOCK_WITH_RECEIPTS , PRE_CONFIRMED_BLOCK_WITH_RECEIPTS ] >
99- // response starknet_getStateUpdate
98+ /** Response for starknet_getStateUpdate */
10099export type StateUpdate = OneOf < [ STATE_UPDATE , PRE_CONFIRMED_STATE_UPDATE ] >
101100
102101/**
@@ -125,21 +124,21 @@ export type BlockTransactionsTracesWithInitialReads = {
125124 */
126125 initial_reads : INITIAL_READS
127126}
128- // response starknet_syncing
127+ /** Response for starknet_syncing */
129128export type Syncing = false | SYNC_STATUS
130- // response starknet_getEvents
129+ /** Response for starknet_getEvents */
131130export type Events = EVENTS_CHUNK
132131export type EmittedEvent = EMITTED_EVENT
133132export type Event = EVENT
134- // response starknet_addInvokeTransaction
133+ /** Response for starknet_addInvokeTransaction */
135134export type InvokedTransaction = { transaction_hash : TXN_HASH }
136- // response starknet_addDeclareTransaction
135+ /** Response for starknet_addDeclareTransaction */
137136export type DeclaredTransaction = { transaction_hash : TXN_HASH ; class_hash : FELT }
138- // response starknet_addDeployAccountTransaction
137+ /** Response for starknet_addDeployAccountTransaction */
139138export type DeployedAccountTransaction = { transaction_hash : TXN_HASH ; contract_address : FELT }
140- // response starknet_getMessagesStatus (ordered by the l1 tx sending order)
139+ /** Response for starknet_getMessagesStatus (ordered by the l1 tx sending order) */
141140export type L1L2MessagesStatus = Array < L1L2MessageStatus >
142- // response starknet_getStorageProof (merkle paths)
141+ /** Response for starknet_getStorageProof (merkle paths) */
143142export type StorageProof = {
144143 classes_proof : NODE_HASH_TO_NODE_MAPPING
145144 contracts_proof : {
@@ -166,15 +165,20 @@ export type StorageProof = {
166165 block_hash : FELT
167166 }
168167}
169- // response starknet_getCompiledCasm
168+ /** response starknet_getCompiledCasm */
170169export type CompiledCasm = CASM_COMPILED_CONTRACT_CLASS
171170
172- // Nice Components names
171+ /** Contract address type alias */
173172export type ContractAddress = ADDRESS
173+ /** Field element type alias */
174174export type Felt = FELT
175+ /** Nonce type alias */
175176export type Nonce = FELT
177+ /** Transaction hash type alias */
176178export type TransactionHash = TXN_HASH
179+ /** Transaction trace type alias */
177180export type TransactionTrace = TRANSACTION_TRACE
181+ /** Block hash type alias */
178182export type BlockHash = BLOCK_HASH
179183/**
180184 * All Type Transaction Receipt
@@ -188,15 +192,25 @@ export type TransactionReceiptProductionBlock = IsInBlock<TransactionReceipt>
188192 * All Type Transaction Receipt from pre confirmed block
189193 */
190194export type TransactionReceiptPreConfirmedBlock = IsPreConfirmed < TransactionReceipt >
195+ /** Event filter type alias */
191196export type EventFilter = EVENT_FILTER & RESULT_PAGE_REQUEST
197+ /** Simulation flags type alias */
192198export type SimulationFlags = Array < SIMULATION_FLAG >
199+ /** L1 message type alias */
193200export type L1Message = MSG_FROM_L1
201+ /** Base transaction type alias */
194202export type BaseTransaction = BROADCASTED_TXN
203+ /** Chain ID type alias */
195204export type ChainId = CHAIN_ID
205+ /** Transaction type alias */
196206export type Transaction = TXN
207+ /** Transaction status type alias */
197208export type TransactionStatus = TXN_STATUS_RESULT
209+ /** Resource bounds type alias */
198210export type ResourceBounds = RESOURCE_BOUNDS_MAPPING
211+ /** Fee payment type alias */
199212export type FeePayment = FEE_PAYMENT
213+ /** Price unit type alias */
200214export type PriceUnit = PRICE_UNIT
201215
202216/**
@@ -221,8 +235,11 @@ export type L1L2MessageStatus = {
221235 failure_reason ?: string
222236}
223237
224- // Diff Than Seq
238+ /** Storage diffs type alias */
225239export type StorageDiffs = Array < CONTRACT_STORAGE_DIFF_ITEM >
240+ /** Deprecated declared classes type alias */
226241export type DeprecatedDeclaredClasses = Array < FELT >
242+ /** Nonce updates type alias */
227243export type NonceUpdates = NONCE_UPDATE [ ]
244+ /** Replaced classes type alias */
228245export type ReplacedClasses = REPLACED_CLASS [ ]
0 commit comments