Skip to content

Commit 15f766e

Browse files
committed
docs: update rest of the inline comments for docs
1 parent 70ad775 commit 15f766e

File tree

2 files changed

+41
-24
lines changed

2 files changed

+41
-24
lines changed

src/api/nonspec.ts

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ import { CASM_COMPILED_CONTRACT_CLASS } from './executable.js';
4949
import { OneOf } from './expansions/helpless.js';
5050
import { IsInBlock, IsPreConfirmed } from './expansions/transactionReceipt.js';
5151

52-
// METHOD RESPONSES
53-
// response starknet_getClass, starknet_getClassAt
52+
/** Response for starknet_getClass, starknet_getClassAt */
5453
export 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 */
8685
export type FeeEstimate = FEE_ESTIMATE
87-
// response starknet_estimateMessageFee
86+
/** Response for starknet_estimateMessageFee */
8887
export type MessageFeeEstimate = MESSAGE_FEE_ESTIMATE
89-
// response starknet_getTransactionByHash, starknet_getTransactionByBlockIdAndIndex
88+
/** Response for starknet_getTransactionByHash, starknet_getTransactionByBlockIdAndIndex */
9089
export type TransactionWithHash = TXN_WITH_HASH
91-
// response starknet_blockHashAndNumber
90+
/** Response for starknet_blockHashAndNumber */
9291
export type BlockHashAndNumber = { block_hash: BLOCK_HASH; block_number: BLOCK_NUMBER }
93-
// response starknet_getBlockWithTxs
92+
/** Response for starknet_getBlockWithTxs */
9493
export type BlockWithTxs = OneOf<[BLOCK_WITH_TXS, PRE_CONFIRMED_BLOCK_WITH_TXS]>
95-
// response starknet_getBlockWithTxHashes
94+
/** Response for starknet_getBlockWithTxHashes */
9695
export type BlockWithTxHashes = OneOf<[BLOCK_WITH_TX_HASHES, PRE_CONFIRMED_BLOCK_WITH_TX_HASHES]>
97-
// response starknet_getBlockWithReceipts
96+
/** Response for starknet_getBlockWithReceipts */
9897
export type BlockWithTxReceipts = OneOf<[BLOCK_WITH_RECEIPTS, PRE_CONFIRMED_BLOCK_WITH_RECEIPTS]>
99-
// response starknet_getStateUpdate
98+
/** Response for starknet_getStateUpdate */
10099
export 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 */
129128
export type Syncing = false | SYNC_STATUS
130-
// response starknet_getEvents
129+
/** Response for starknet_getEvents */
131130
export type Events = EVENTS_CHUNK
132131
export type EmittedEvent = EMITTED_EVENT
133132
export type Event = EVENT
134-
// response starknet_addInvokeTransaction
133+
/** Response for starknet_addInvokeTransaction */
135134
export type InvokedTransaction = { transaction_hash: TXN_HASH }
136-
// response starknet_addDeclareTransaction
135+
/** Response for starknet_addDeclareTransaction */
137136
export type DeclaredTransaction = { transaction_hash: TXN_HASH; class_hash: FELT }
138-
// response starknet_addDeployAccountTransaction
137+
/** Response for starknet_addDeployAccountTransaction */
139138
export 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) */
141140
export type L1L2MessagesStatus = Array<L1L2MessageStatus>
142-
// response starknet_getStorageProof (merkle paths)
141+
/** Response for starknet_getStorageProof (merkle paths) */
143142
export 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 */
170169
export type CompiledCasm = CASM_COMPILED_CONTRACT_CLASS
171170

172-
// Nice Components names
171+
/** Contract address type alias */
173172
export type ContractAddress = ADDRESS
173+
/** Field element type alias */
174174
export type Felt = FELT
175+
/** Nonce type alias */
175176
export type Nonce = FELT
177+
/** Transaction hash type alias */
176178
export type TransactionHash = TXN_HASH
179+
/** Transaction trace type alias */
177180
export type TransactionTrace = TRANSACTION_TRACE
181+
/** Block hash type alias */
178182
export 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
*/
190194
export type TransactionReceiptPreConfirmedBlock = IsPreConfirmed<TransactionReceipt>
195+
/** Event filter type alias */
191196
export type EventFilter = EVENT_FILTER & RESULT_PAGE_REQUEST
197+
/** Simulation flags type alias */
192198
export type SimulationFlags = Array<SIMULATION_FLAG>
199+
/** L1 message type alias */
193200
export type L1Message = MSG_FROM_L1
201+
/** Base transaction type alias */
194202
export type BaseTransaction = BROADCASTED_TXN
203+
/** Chain ID type alias */
195204
export type ChainId = CHAIN_ID
205+
/** Transaction type alias */
196206
export type Transaction = TXN
207+
/** Transaction status type alias */
197208
export type TransactionStatus = TXN_STATUS_RESULT
209+
/** Resource bounds type alias */
198210
export type ResourceBounds = RESOURCE_BOUNDS_MAPPING
211+
/** Fee payment type alias */
199212
export type FeePayment = FEE_PAYMENT
213+
/** Price unit type alias */
200214
export 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 */
225239
export type StorageDiffs = Array<CONTRACT_STORAGE_DIFF_ITEM>
240+
/** Deprecated declared classes type alias */
226241
export type DeprecatedDeclaredClasses = Array<FELT>
242+
/** Nonce updates type alias */
227243
export type NonceUpdates = NONCE_UPDATE[]
244+
/** Replaced classes type alias */
228245
export type ReplacedClasses = REPLACED_CLASS[]

src/snip-29/methods.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ import * as Errors from './errors'
88
import { BuildTransactionResponse, ExecuteResponse } from './nonspec'
99

1010
type ReadMethods = {
11-
// Returns the status of the paymaster service
11+
/** Returns the status of the paymaster service */
1212
paymaster_isAvailable: {
1313
params: []
1414
result: boolean
1515
}
1616

17-
// Receives the transaction the user wants to execute. Returns the typed data along with the estimated gas cost and the maximum gas cost suggested to ensure execution
17+
/** Receives the transaction the user wants to execute. Returns the typed data along with the estimated gas cost and the maximum gas cost suggested to ensure execution */
1818
paymaster_buildTransaction: {
1919
params: {
2020
transaction: USER_TRANSACTION
@@ -31,15 +31,15 @@ type ReadMethods = {
3131
| Errors.TRANSACTION_EXECUTION_ERROR
3232
}
3333

34-
// Get a list of the tokens that the paymaster supports, together with their prices in STRK
34+
/** Get a list of the tokens that the paymaster supports, together with their prices in STRK */
3535
paymaster_getSupportedTokens: {
3636
params: {}
3737
result: TOKEN_DATA[]
3838
}
3939
}
4040

4141
type WriteMethods = {
42-
// Sends the signed typed data to the paymaster service for execution
42+
/** Sends the signed typed data to the paymaster service for execution */
4343
paymaster_executeTransaction: {
4444
params: {
4545
transaction: EXECUTABLE_USER_TRANSACTION

0 commit comments

Comments
 (0)