@psalomo/jsonrpc-client 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -95,36 +95,150 @@ declare class NearRpcError extends Error {
95
95
  }
96
96
 
97
97
  interface DynamicRpcMethods {
98
+ /**
99
+ * [Deprecated] Returns changes for a given account, contract or contract code
100
+ * for given block height or hash. Consider using changes instead.
101
+ */
98
102
  experimentalChanges(params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
103
+ /**
104
+ * [Deprecated] Returns changes in block for given block height or hash over
105
+ * all transactions for all the types. Includes changes like account_touched,
106
+ * access_key_touched, data_touched, contract_code_touched. Consider using
107
+ * block_effects instead
108
+ */
99
109
  experimentalChangesInBlock(params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
110
+ /**
111
+ * Queries the congestion level of a shard. More info about congestion
112
+ * [here](https://near.github.io/nearcore/architecture/how/receipt-congestion.html?highlight=congestion#receipt-congestion)
113
+ */
100
114
  experimentalCongestionLevel(params?: RpcCongestionLevelRequest): Promise<RpcCongestionLevelResponse>;
115
+ /**
116
+ * [Deprecated] Get initial state and parameters for the genesis block.
117
+ * Consider genesis_config instead.
118
+ */
101
119
  experimentalGenesisConfig(params?: GenesisConfigRequest): Promise<GenesisConfig>;
120
+ /** Returns the proofs for a transaction execution. */
102
121
  experimentalLightClientBlockProof(params?: RpcLightClientBlockProofRequest): Promise<RpcLightClientBlockProofResponse>;
122
+ /** Returns the proofs for a transaction execution. */
103
123
  experimentalLightClientProof(params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
124
+ /**
125
+ * [Deprecated] Returns the future windows for maintenance in current epoch
126
+ * for the specified account. In the maintenance windows, the node will not be
127
+ * block producer or chunk producer. Consider using maintenance_windows
128
+ * instead.
129
+ */
104
130
  experimentalMaintenanceWindows(params?: RpcMaintenanceWindowsRequest): Promise<EXPERIMENTALMaintenanceWindowsResponse>;
131
+ /**
132
+ * A configuration that defines the protocol-level parameters such as
133
+ * gas/storage costs, limits, feature flags, other settings
134
+ */
105
135
  experimentalProtocolConfig(params?: RpcProtocolConfigRequest): Promise<RpcProtocolConfigResponse>;
136
+ /** Fetches a receipt by its ID (as is, without a status or execution outcome) */
106
137
  experimentalReceipt(params?: RpcReceiptRequest): Promise<RpcReceiptResponse>;
138
+ /**
139
+ * Contains the split storage information. More info on split storage
140
+ * [here](https://near-nodes.io/archival/split-storage-archival)
141
+ */
107
142
  experimentalSplitStorageInfo(params?: RpcSplitStorageInfoRequest): Promise<RpcSplitStorageInfoResponse>;
143
+ /**
144
+ * Queries status of a transaction by hash, returning the final transaction
145
+ * result and details of all receipts.
146
+ */
108
147
  experimentalTxStatus(params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
148
+ /**
149
+ * Returns the current epoch validators ordered in the block producer order
150
+ * with repetition. This endpoint is solely used for bridge currently and is
151
+ * not intended for other external use cases.
152
+ */
109
153
  experimentalValidatorsOrdered(params?: RpcValidatorsOrderedRequest): Promise<EXPERIMENTALValidatorsOrderedResponse>;
154
+ /** Returns block details for given height or hash */
110
155
  block(params?: RpcBlockRequest): Promise<RpcBlockResponse>;
156
+ /**
157
+ * Returns changes in block for given block height or hash over all
158
+ * transactions for all the types. Includes changes like account_touched,
159
+ * access_key_touched, data_touched, contract_code_touched.
160
+ */
111
161
  blockEffects(params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
162
+ /**
163
+ * [Deprecated] Sends a transaction and immediately returns transaction hash.
164
+ * Consider using send_tx instead.
165
+ */
112
166
  broadcastTxAsync(params?: RpcSendTransactionRequest): Promise<CryptoHash>;
167
+ /**
168
+ * [Deprecated] Sends a transaction and waits until transaction is fully
169
+ * complete. (Has a 10 second timeout). Consider using send_tx instead.
170
+ */
113
171
  broadcastTxCommit(params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
172
+ /**
173
+ * Returns changes for a given account, contract or contract code for given
174
+ * block height or hash.
175
+ */
114
176
  changes(params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
177
+ /**
178
+ * Returns details of a specific chunk. You can run a block details query to
179
+ * get a valid chunk hash.
180
+ */
115
181
  chunk(params?: RpcChunkRequest): Promise<RpcChunkResponse>;
182
+ /** Queries client node configuration */
116
183
  clientConfig(params?: RpcClientConfigRequest): Promise<RpcClientConfigResponse>;
184
+ /**
185
+ * Returns gas price for a specific block_height or block_hash. Using [null]
186
+ * will return the most recent block's gas price.
187
+ */
117
188
  gasPrice(params?: RpcGasPriceRequest): Promise<RpcGasPriceResponse>;
189
+ /** Get initial state and parameters for the genesis block */
118
190
  genesisConfig(params?: GenesisConfigRequest): Promise<GenesisConfig>;
191
+ /** Returns the current health status of the RPC node the client connects to. */
119
192
  health(params?: RpcHealthRequest): Promise<RpcHealthResponse>;
193
+ /** Returns the proofs for a transaction execution. */
120
194
  lightClientProof(params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
195
+ /**
196
+ * Returns the future windows for maintenance in current epoch for the
197
+ * specified account. In the maintenance windows, the node will not be block
198
+ * producer or chunk producer.
199
+ */
121
200
  maintenanceWindows(params?: RpcMaintenanceWindowsRequest): Promise<MaintenanceWindowsResponse>;
201
+ /**
202
+ * Queries the current state of node network connections. This includes
203
+ * information about active peers, transmitted data, known producers, etc.
204
+ */
122
205
  networkInfo(params?: RpcNetworkInfoRequest): Promise<RpcNetworkInfoResponse>;
206
+ /** Returns the next light client block. */
123
207
  nextLightClientBlock(params?: RpcLightClientNextBlockRequest): Promise<RpcLightClientNextBlockResponse>;
208
+ /**
209
+ * This module allows you to make generic requests to the network. The
210
+ * `RpcQueryRequest` struct takes in a
211
+ * [`BlockReference`](https://docs.rs/near-primitives/0.12.0/near_primitives/types/enum.BlockReference.html)
212
+ * and a
213
+ * [`QueryRequest`](https://docs.rs/near-primitives/0.12.0/near_primitives/views/enum.QueryRequest.html).
214
+ * The `BlockReference` enum allows you to specify a block by `Finality`,
215
+ * `BlockId` or `SyncCheckpoint`. The `QueryRequest` enum provides multiple
216
+ * variants for performing the following actions: - View an account's details
217
+ * - View a contract's code - View the state of an account - View the
218
+ * `AccessKey` of an account - View the `AccessKeyList` of an account - Call a
219
+ * function in a contract deployed on the network.
220
+ */
124
221
  query(params?: RpcQueryRequest): Promise<RpcQueryResponse>;
222
+ /**
223
+ * Sends transaction. Returns the guaranteed execution status and the results
224
+ * the blockchain can provide at the moment.
225
+ */
125
226
  sendTx(params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
227
+ /**
228
+ * Requests the status of the connected RPC node. This includes information
229
+ * about sync status, nearcore node version, protocol version, the current set
230
+ * of validators, etc.
231
+ */
126
232
  status(params?: RpcStatusRequest): Promise<RpcStatusResponse>;
233
+ /**
234
+ * Queries status of a transaction by hash and returns the final transaction
235
+ * result.
236
+ */
127
237
  tx(params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
238
+ /**
239
+ * Queries active validators on the network. Returns details and the state of
240
+ * validation on the blockchain.
241
+ */
128
242
  validators(params?: RpcValidatorRequest): Promise<RpcValidatorResponse>;
129
243
  }
130
244
  interface ConvenienceMethods {
@@ -150,36 +264,150 @@ interface ConvenienceMethods {
150
264
  interface CompleteClientInterface extends DynamicRpcMethods, ConvenienceMethods {
151
265
  call<TParams = unknown, TResult = unknown>(method: string, params?: TParams): Promise<TResult>;
152
266
  }
267
+ /**
268
+ * [Deprecated] Returns changes for a given account, contract or contract code
269
+ * for given block height or hash. Consider using changes instead.
270
+ */
153
271
  declare function experimentalChanges(client: NearRpcClient, params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
272
+ /**
273
+ * [Deprecated] Returns changes in block for given block height or hash over
274
+ * all transactions for all the types. Includes changes like account_touched,
275
+ * access_key_touched, data_touched, contract_code_touched. Consider using
276
+ * block_effects instead
277
+ */
154
278
  declare function experimentalChangesInBlock(client: NearRpcClient, params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
279
+ /**
280
+ * Queries the congestion level of a shard. More info about congestion
281
+ * [here](https://near.github.io/nearcore/architecture/how/receipt-congestion.html?highlight=congestion#receipt-congestion)
282
+ */
155
283
  declare function experimentalCongestionLevel(client: NearRpcClient, params?: RpcCongestionLevelRequest): Promise<RpcCongestionLevelResponse>;
284
+ /**
285
+ * [Deprecated] Get initial state and parameters for the genesis block.
286
+ * Consider genesis_config instead.
287
+ */
156
288
  declare function experimentalGenesisConfig(client: NearRpcClient, params?: GenesisConfigRequest): Promise<GenesisConfig>;
289
+ /** Returns the proofs for a transaction execution. */
157
290
  declare function experimentalLightClientBlockProof(client: NearRpcClient, params?: RpcLightClientBlockProofRequest): Promise<RpcLightClientBlockProofResponse>;
291
+ /** Returns the proofs for a transaction execution. */
158
292
  declare function experimentalLightClientProof(client: NearRpcClient, params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
293
+ /**
294
+ * [Deprecated] Returns the future windows for maintenance in current epoch
295
+ * for the specified account. In the maintenance windows, the node will not be
296
+ * block producer or chunk producer. Consider using maintenance_windows
297
+ * instead.
298
+ */
159
299
  declare function experimentalMaintenanceWindows(client: NearRpcClient, params?: RpcMaintenanceWindowsRequest): Promise<EXPERIMENTALMaintenanceWindowsResponse>;
300
+ /**
301
+ * A configuration that defines the protocol-level parameters such as
302
+ * gas/storage costs, limits, feature flags, other settings
303
+ */
160
304
  declare function experimentalProtocolConfig(client: NearRpcClient, params?: RpcProtocolConfigRequest): Promise<RpcProtocolConfigResponse>;
305
+ /** Fetches a receipt by its ID (as is, without a status or execution outcome) */
161
306
  declare function experimentalReceipt(client: NearRpcClient, params?: RpcReceiptRequest): Promise<RpcReceiptResponse>;
307
+ /**
308
+ * Contains the split storage information. More info on split storage
309
+ * [here](https://near-nodes.io/archival/split-storage-archival)
310
+ */
162
311
  declare function experimentalSplitStorageInfo(client: NearRpcClient, params?: RpcSplitStorageInfoRequest): Promise<RpcSplitStorageInfoResponse>;
312
+ /**
313
+ * Queries status of a transaction by hash, returning the final transaction
314
+ * result and details of all receipts.
315
+ */
163
316
  declare function experimentalTxStatus(client: NearRpcClient, params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
317
+ /**
318
+ * Returns the current epoch validators ordered in the block producer order
319
+ * with repetition. This endpoint is solely used for bridge currently and is
320
+ * not intended for other external use cases.
321
+ */
164
322
  declare function experimentalValidatorsOrdered(client: NearRpcClient, params?: RpcValidatorsOrderedRequest): Promise<EXPERIMENTALValidatorsOrderedResponse>;
323
+ /** Returns block details for given height or hash */
165
324
  declare function block(client: NearRpcClient, params?: RpcBlockRequest): Promise<RpcBlockResponse>;
325
+ /**
326
+ * Returns changes in block for given block height or hash over all
327
+ * transactions for all the types. Includes changes like account_touched,
328
+ * access_key_touched, data_touched, contract_code_touched.
329
+ */
166
330
  declare function blockEffects(client: NearRpcClient, params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
331
+ /**
332
+ * [Deprecated] Sends a transaction and immediately returns transaction hash.
333
+ * Consider using send_tx instead.
334
+ */
167
335
  declare function broadcastTxAsync(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<CryptoHash>;
336
+ /**
337
+ * [Deprecated] Sends a transaction and waits until transaction is fully
338
+ * complete. (Has a 10 second timeout). Consider using send_tx instead.
339
+ */
168
340
  declare function broadcastTxCommit(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
341
+ /**
342
+ * Returns changes for a given account, contract or contract code for given
343
+ * block height or hash.
344
+ */
169
345
  declare function changes(client: NearRpcClient, params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
346
+ /**
347
+ * Returns details of a specific chunk. You can run a block details query to
348
+ * get a valid chunk hash.
349
+ */
170
350
  declare function chunk(client: NearRpcClient, params?: RpcChunkRequest): Promise<RpcChunkResponse>;
351
+ /** Queries client node configuration */
171
352
  declare function clientConfig(client: NearRpcClient, params?: RpcClientConfigRequest): Promise<RpcClientConfigResponse>;
353
+ /**
354
+ * Returns gas price for a specific block_height or block_hash. Using [null]
355
+ * will return the most recent block's gas price.
356
+ */
172
357
  declare function gasPrice(client: NearRpcClient, params?: RpcGasPriceRequest): Promise<RpcGasPriceResponse>;
358
+ /** Get initial state and parameters for the genesis block */
173
359
  declare function genesisConfig(client: NearRpcClient, params?: GenesisConfigRequest): Promise<GenesisConfig>;
360
+ /** Returns the current health status of the RPC node the client connects to. */
174
361
  declare function health(client: NearRpcClient, params?: RpcHealthRequest): Promise<RpcHealthResponse>;
362
+ /** Returns the proofs for a transaction execution. */
175
363
  declare function lightClientProof(client: NearRpcClient, params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
364
+ /**
365
+ * Returns the future windows for maintenance in current epoch for the
366
+ * specified account. In the maintenance windows, the node will not be block
367
+ * producer or chunk producer.
368
+ */
176
369
  declare function maintenanceWindows(client: NearRpcClient, params?: RpcMaintenanceWindowsRequest): Promise<MaintenanceWindowsResponse>;
370
+ /**
371
+ * Queries the current state of node network connections. This includes
372
+ * information about active peers, transmitted data, known producers, etc.
373
+ */
177
374
  declare function networkInfo(client: NearRpcClient, params?: RpcNetworkInfoRequest): Promise<RpcNetworkInfoResponse>;
375
+ /** Returns the next light client block. */
178
376
  declare function nextLightClientBlock(client: NearRpcClient, params?: RpcLightClientNextBlockRequest): Promise<RpcLightClientNextBlockResponse>;
377
+ /**
378
+ * This module allows you to make generic requests to the network. The
379
+ * `RpcQueryRequest` struct takes in a
380
+ * [`BlockReference`](https://docs.rs/near-primitives/0.12.0/near_primitives/types/enum.BlockReference.html)
381
+ * and a
382
+ * [`QueryRequest`](https://docs.rs/near-primitives/0.12.0/near_primitives/views/enum.QueryRequest.html).
383
+ * The `BlockReference` enum allows you to specify a block by `Finality`,
384
+ * `BlockId` or `SyncCheckpoint`. The `QueryRequest` enum provides multiple
385
+ * variants for performing the following actions: - View an account's details
386
+ * - View a contract's code - View the state of an account - View the
387
+ * `AccessKey` of an account - View the `AccessKeyList` of an account - Call a
388
+ * function in a contract deployed on the network.
389
+ */
179
390
  declare function query(client: NearRpcClient, params?: RpcQueryRequest): Promise<RpcQueryResponse>;
391
+ /**
392
+ * Sends transaction. Returns the guaranteed execution status and the results
393
+ * the blockchain can provide at the moment.
394
+ */
180
395
  declare function sendTx(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
396
+ /**
397
+ * Requests the status of the connected RPC node. This includes information
398
+ * about sync status, nearcore node version, protocol version, the current set
399
+ * of validators, etc.
400
+ */
181
401
  declare function status(client: NearRpcClient, params?: RpcStatusRequest): Promise<RpcStatusResponse>;
402
+ /**
403
+ * Queries status of a transaction by hash and returns the final transaction
404
+ * result.
405
+ */
182
406
  declare function tx(client: NearRpcClient, params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
407
+ /**
408
+ * Queries active validators on the network. Returns details and the state of
409
+ * validation on the blockchain.
410
+ */
183
411
  declare function validators(client: NearRpcClient, params?: RpcValidatorRequest): Promise<RpcValidatorResponse>;
184
412
 
185
413
  declare function viewAccount(client: NearRpcClient, params: {
@@ -95,36 +95,150 @@ declare class NearRpcError extends Error {
95
95
  }
96
96
 
97
97
  interface DynamicRpcMethods {
98
+ /**
99
+ * [Deprecated] Returns changes for a given account, contract or contract code
100
+ * for given block height or hash. Consider using changes instead.
101
+ */
98
102
  experimentalChanges(params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
103
+ /**
104
+ * [Deprecated] Returns changes in block for given block height or hash over
105
+ * all transactions for all the types. Includes changes like account_touched,
106
+ * access_key_touched, data_touched, contract_code_touched. Consider using
107
+ * block_effects instead
108
+ */
99
109
  experimentalChangesInBlock(params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
110
+ /**
111
+ * Queries the congestion level of a shard. More info about congestion
112
+ * [here](https://near.github.io/nearcore/architecture/how/receipt-congestion.html?highlight=congestion#receipt-congestion)
113
+ */
100
114
  experimentalCongestionLevel(params?: RpcCongestionLevelRequest): Promise<RpcCongestionLevelResponse>;
115
+ /**
116
+ * [Deprecated] Get initial state and parameters for the genesis block.
117
+ * Consider genesis_config instead.
118
+ */
101
119
  experimentalGenesisConfig(params?: GenesisConfigRequest): Promise<GenesisConfig>;
120
+ /** Returns the proofs for a transaction execution. */
102
121
  experimentalLightClientBlockProof(params?: RpcLightClientBlockProofRequest): Promise<RpcLightClientBlockProofResponse>;
122
+ /** Returns the proofs for a transaction execution. */
103
123
  experimentalLightClientProof(params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
124
+ /**
125
+ * [Deprecated] Returns the future windows for maintenance in current epoch
126
+ * for the specified account. In the maintenance windows, the node will not be
127
+ * block producer or chunk producer. Consider using maintenance_windows
128
+ * instead.
129
+ */
104
130
  experimentalMaintenanceWindows(params?: RpcMaintenanceWindowsRequest): Promise<EXPERIMENTALMaintenanceWindowsResponse>;
131
+ /**
132
+ * A configuration that defines the protocol-level parameters such as
133
+ * gas/storage costs, limits, feature flags, other settings
134
+ */
105
135
  experimentalProtocolConfig(params?: RpcProtocolConfigRequest): Promise<RpcProtocolConfigResponse>;
136
+ /** Fetches a receipt by its ID (as is, without a status or execution outcome) */
106
137
  experimentalReceipt(params?: RpcReceiptRequest): Promise<RpcReceiptResponse>;
138
+ /**
139
+ * Contains the split storage information. More info on split storage
140
+ * [here](https://near-nodes.io/archival/split-storage-archival)
141
+ */
107
142
  experimentalSplitStorageInfo(params?: RpcSplitStorageInfoRequest): Promise<RpcSplitStorageInfoResponse>;
143
+ /**
144
+ * Queries status of a transaction by hash, returning the final transaction
145
+ * result and details of all receipts.
146
+ */
108
147
  experimentalTxStatus(params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
148
+ /**
149
+ * Returns the current epoch validators ordered in the block producer order
150
+ * with repetition. This endpoint is solely used for bridge currently and is
151
+ * not intended for other external use cases.
152
+ */
109
153
  experimentalValidatorsOrdered(params?: RpcValidatorsOrderedRequest): Promise<EXPERIMENTALValidatorsOrderedResponse>;
154
+ /** Returns block details for given height or hash */
110
155
  block(params?: RpcBlockRequest): Promise<RpcBlockResponse>;
156
+ /**
157
+ * Returns changes in block for given block height or hash over all
158
+ * transactions for all the types. Includes changes like account_touched,
159
+ * access_key_touched, data_touched, contract_code_touched.
160
+ */
111
161
  blockEffects(params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
162
+ /**
163
+ * [Deprecated] Sends a transaction and immediately returns transaction hash.
164
+ * Consider using send_tx instead.
165
+ */
112
166
  broadcastTxAsync(params?: RpcSendTransactionRequest): Promise<CryptoHash>;
167
+ /**
168
+ * [Deprecated] Sends a transaction and waits until transaction is fully
169
+ * complete. (Has a 10 second timeout). Consider using send_tx instead.
170
+ */
113
171
  broadcastTxCommit(params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
172
+ /**
173
+ * Returns changes for a given account, contract or contract code for given
174
+ * block height or hash.
175
+ */
114
176
  changes(params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
177
+ /**
178
+ * Returns details of a specific chunk. You can run a block details query to
179
+ * get a valid chunk hash.
180
+ */
115
181
  chunk(params?: RpcChunkRequest): Promise<RpcChunkResponse>;
182
+ /** Queries client node configuration */
116
183
  clientConfig(params?: RpcClientConfigRequest): Promise<RpcClientConfigResponse>;
184
+ /**
185
+ * Returns gas price for a specific block_height or block_hash. Using [null]
186
+ * will return the most recent block's gas price.
187
+ */
117
188
  gasPrice(params?: RpcGasPriceRequest): Promise<RpcGasPriceResponse>;
189
+ /** Get initial state and parameters for the genesis block */
118
190
  genesisConfig(params?: GenesisConfigRequest): Promise<GenesisConfig>;
191
+ /** Returns the current health status of the RPC node the client connects to. */
119
192
  health(params?: RpcHealthRequest): Promise<RpcHealthResponse>;
193
+ /** Returns the proofs for a transaction execution. */
120
194
  lightClientProof(params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
195
+ /**
196
+ * Returns the future windows for maintenance in current epoch for the
197
+ * specified account. In the maintenance windows, the node will not be block
198
+ * producer or chunk producer.
199
+ */
121
200
  maintenanceWindows(params?: RpcMaintenanceWindowsRequest): Promise<MaintenanceWindowsResponse>;
201
+ /**
202
+ * Queries the current state of node network connections. This includes
203
+ * information about active peers, transmitted data, known producers, etc.
204
+ */
122
205
  networkInfo(params?: RpcNetworkInfoRequest): Promise<RpcNetworkInfoResponse>;
206
+ /** Returns the next light client block. */
123
207
  nextLightClientBlock(params?: RpcLightClientNextBlockRequest): Promise<RpcLightClientNextBlockResponse>;
208
+ /**
209
+ * This module allows you to make generic requests to the network. The
210
+ * `RpcQueryRequest` struct takes in a
211
+ * [`BlockReference`](https://docs.rs/near-primitives/0.12.0/near_primitives/types/enum.BlockReference.html)
212
+ * and a
213
+ * [`QueryRequest`](https://docs.rs/near-primitives/0.12.0/near_primitives/views/enum.QueryRequest.html).
214
+ * The `BlockReference` enum allows you to specify a block by `Finality`,
215
+ * `BlockId` or `SyncCheckpoint`. The `QueryRequest` enum provides multiple
216
+ * variants for performing the following actions: - View an account's details
217
+ * - View a contract's code - View the state of an account - View the
218
+ * `AccessKey` of an account - View the `AccessKeyList` of an account - Call a
219
+ * function in a contract deployed on the network.
220
+ */
124
221
  query(params?: RpcQueryRequest): Promise<RpcQueryResponse>;
222
+ /**
223
+ * Sends transaction. Returns the guaranteed execution status and the results
224
+ * the blockchain can provide at the moment.
225
+ */
125
226
  sendTx(params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
227
+ /**
228
+ * Requests the status of the connected RPC node. This includes information
229
+ * about sync status, nearcore node version, protocol version, the current set
230
+ * of validators, etc.
231
+ */
126
232
  status(params?: RpcStatusRequest): Promise<RpcStatusResponse>;
233
+ /**
234
+ * Queries status of a transaction by hash and returns the final transaction
235
+ * result.
236
+ */
127
237
  tx(params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
238
+ /**
239
+ * Queries active validators on the network. Returns details and the state of
240
+ * validation on the blockchain.
241
+ */
128
242
  validators(params?: RpcValidatorRequest): Promise<RpcValidatorResponse>;
129
243
  }
130
244
  interface ConvenienceMethods {
@@ -150,36 +264,150 @@ interface ConvenienceMethods {
150
264
  interface CompleteClientInterface extends DynamicRpcMethods, ConvenienceMethods {
151
265
  call<TParams = unknown, TResult = unknown>(method: string, params?: TParams): Promise<TResult>;
152
266
  }
267
+ /**
268
+ * [Deprecated] Returns changes for a given account, contract or contract code
269
+ * for given block height or hash. Consider using changes instead.
270
+ */
153
271
  declare function experimentalChanges(client: NearRpcClient, params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
272
+ /**
273
+ * [Deprecated] Returns changes in block for given block height or hash over
274
+ * all transactions for all the types. Includes changes like account_touched,
275
+ * access_key_touched, data_touched, contract_code_touched. Consider using
276
+ * block_effects instead
277
+ */
154
278
  declare function experimentalChangesInBlock(client: NearRpcClient, params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
279
+ /**
280
+ * Queries the congestion level of a shard. More info about congestion
281
+ * [here](https://near.github.io/nearcore/architecture/how/receipt-congestion.html?highlight=congestion#receipt-congestion)
282
+ */
155
283
  declare function experimentalCongestionLevel(client: NearRpcClient, params?: RpcCongestionLevelRequest): Promise<RpcCongestionLevelResponse>;
284
+ /**
285
+ * [Deprecated] Get initial state and parameters for the genesis block.
286
+ * Consider genesis_config instead.
287
+ */
156
288
  declare function experimentalGenesisConfig(client: NearRpcClient, params?: GenesisConfigRequest): Promise<GenesisConfig>;
289
+ /** Returns the proofs for a transaction execution. */
157
290
  declare function experimentalLightClientBlockProof(client: NearRpcClient, params?: RpcLightClientBlockProofRequest): Promise<RpcLightClientBlockProofResponse>;
291
+ /** Returns the proofs for a transaction execution. */
158
292
  declare function experimentalLightClientProof(client: NearRpcClient, params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
293
+ /**
294
+ * [Deprecated] Returns the future windows for maintenance in current epoch
295
+ * for the specified account. In the maintenance windows, the node will not be
296
+ * block producer or chunk producer. Consider using maintenance_windows
297
+ * instead.
298
+ */
159
299
  declare function experimentalMaintenanceWindows(client: NearRpcClient, params?: RpcMaintenanceWindowsRequest): Promise<EXPERIMENTALMaintenanceWindowsResponse>;
300
+ /**
301
+ * A configuration that defines the protocol-level parameters such as
302
+ * gas/storage costs, limits, feature flags, other settings
303
+ */
160
304
  declare function experimentalProtocolConfig(client: NearRpcClient, params?: RpcProtocolConfigRequest): Promise<RpcProtocolConfigResponse>;
305
+ /** Fetches a receipt by its ID (as is, without a status or execution outcome) */
161
306
  declare function experimentalReceipt(client: NearRpcClient, params?: RpcReceiptRequest): Promise<RpcReceiptResponse>;
307
+ /**
308
+ * Contains the split storage information. More info on split storage
309
+ * [here](https://near-nodes.io/archival/split-storage-archival)
310
+ */
162
311
  declare function experimentalSplitStorageInfo(client: NearRpcClient, params?: RpcSplitStorageInfoRequest): Promise<RpcSplitStorageInfoResponse>;
312
+ /**
313
+ * Queries status of a transaction by hash, returning the final transaction
314
+ * result and details of all receipts.
315
+ */
163
316
  declare function experimentalTxStatus(client: NearRpcClient, params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
317
+ /**
318
+ * Returns the current epoch validators ordered in the block producer order
319
+ * with repetition. This endpoint is solely used for bridge currently and is
320
+ * not intended for other external use cases.
321
+ */
164
322
  declare function experimentalValidatorsOrdered(client: NearRpcClient, params?: RpcValidatorsOrderedRequest): Promise<EXPERIMENTALValidatorsOrderedResponse>;
323
+ /** Returns block details for given height or hash */
165
324
  declare function block(client: NearRpcClient, params?: RpcBlockRequest): Promise<RpcBlockResponse>;
325
+ /**
326
+ * Returns changes in block for given block height or hash over all
327
+ * transactions for all the types. Includes changes like account_touched,
328
+ * access_key_touched, data_touched, contract_code_touched.
329
+ */
166
330
  declare function blockEffects(client: NearRpcClient, params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
331
+ /**
332
+ * [Deprecated] Sends a transaction and immediately returns transaction hash.
333
+ * Consider using send_tx instead.
334
+ */
167
335
  declare function broadcastTxAsync(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<CryptoHash>;
336
+ /**
337
+ * [Deprecated] Sends a transaction and waits until transaction is fully
338
+ * complete. (Has a 10 second timeout). Consider using send_tx instead.
339
+ */
168
340
  declare function broadcastTxCommit(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
341
+ /**
342
+ * Returns changes for a given account, contract or contract code for given
343
+ * block height or hash.
344
+ */
169
345
  declare function changes(client: NearRpcClient, params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
346
+ /**
347
+ * Returns details of a specific chunk. You can run a block details query to
348
+ * get a valid chunk hash.
349
+ */
170
350
  declare function chunk(client: NearRpcClient, params?: RpcChunkRequest): Promise<RpcChunkResponse>;
351
+ /** Queries client node configuration */
171
352
  declare function clientConfig(client: NearRpcClient, params?: RpcClientConfigRequest): Promise<RpcClientConfigResponse>;
353
+ /**
354
+ * Returns gas price for a specific block_height or block_hash. Using [null]
355
+ * will return the most recent block's gas price.
356
+ */
172
357
  declare function gasPrice(client: NearRpcClient, params?: RpcGasPriceRequest): Promise<RpcGasPriceResponse>;
358
+ /** Get initial state and parameters for the genesis block */
173
359
  declare function genesisConfig(client: NearRpcClient, params?: GenesisConfigRequest): Promise<GenesisConfig>;
360
+ /** Returns the current health status of the RPC node the client connects to. */
174
361
  declare function health(client: NearRpcClient, params?: RpcHealthRequest): Promise<RpcHealthResponse>;
362
+ /** Returns the proofs for a transaction execution. */
175
363
  declare function lightClientProof(client: NearRpcClient, params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
364
+ /**
365
+ * Returns the future windows for maintenance in current epoch for the
366
+ * specified account. In the maintenance windows, the node will not be block
367
+ * producer or chunk producer.
368
+ */
176
369
  declare function maintenanceWindows(client: NearRpcClient, params?: RpcMaintenanceWindowsRequest): Promise<MaintenanceWindowsResponse>;
370
+ /**
371
+ * Queries the current state of node network connections. This includes
372
+ * information about active peers, transmitted data, known producers, etc.
373
+ */
177
374
  declare function networkInfo(client: NearRpcClient, params?: RpcNetworkInfoRequest): Promise<RpcNetworkInfoResponse>;
375
+ /** Returns the next light client block. */
178
376
  declare function nextLightClientBlock(client: NearRpcClient, params?: RpcLightClientNextBlockRequest): Promise<RpcLightClientNextBlockResponse>;
377
+ /**
378
+ * This module allows you to make generic requests to the network. The
379
+ * `RpcQueryRequest` struct takes in a
380
+ * [`BlockReference`](https://docs.rs/near-primitives/0.12.0/near_primitives/types/enum.BlockReference.html)
381
+ * and a
382
+ * [`QueryRequest`](https://docs.rs/near-primitives/0.12.0/near_primitives/views/enum.QueryRequest.html).
383
+ * The `BlockReference` enum allows you to specify a block by `Finality`,
384
+ * `BlockId` or `SyncCheckpoint`. The `QueryRequest` enum provides multiple
385
+ * variants for performing the following actions: - View an account's details
386
+ * - View a contract's code - View the state of an account - View the
387
+ * `AccessKey` of an account - View the `AccessKeyList` of an account - Call a
388
+ * function in a contract deployed on the network.
389
+ */
179
390
  declare function query(client: NearRpcClient, params?: RpcQueryRequest): Promise<RpcQueryResponse>;
391
+ /**
392
+ * Sends transaction. Returns the guaranteed execution status and the results
393
+ * the blockchain can provide at the moment.
394
+ */
180
395
  declare function sendTx(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
396
+ /**
397
+ * Requests the status of the connected RPC node. This includes information
398
+ * about sync status, nearcore node version, protocol version, the current set
399
+ * of validators, etc.
400
+ */
181
401
  declare function status(client: NearRpcClient, params?: RpcStatusRequest): Promise<RpcStatusResponse>;
402
+ /**
403
+ * Queries status of a transaction by hash and returns the final transaction
404
+ * result.
405
+ */
182
406
  declare function tx(client: NearRpcClient, params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
407
+ /**
408
+ * Queries active validators on the network. Returns details and the state of
409
+ * validation on the blockchain.
410
+ */
183
411
  declare function validators(client: NearRpcClient, params?: RpcValidatorRequest): Promise<RpcValidatorResponse>;
184
412
 
185
413
  declare function viewAccount(client: NearRpcClient, params: {