@psalomo/jsonrpc-client 1.2.0 → 1.3.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"generated-types.d.ts","sourceRoot":"","sources":["../src/generated-types.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,UAAU,EACV,UAAU,EACV,sCAAsC,EACtC,qCAAqC,EACrC,aAAa,EACb,oBAAoB,EACpB,0BAA0B,EAC1B,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,+BAA+B,EAC/B,gCAAgC,EAChC,mCAAmC,EACnC,oCAAoC,EACpC,8BAA8B,EAC9B,+BAA+B,EAC/B,4BAA4B,EAC5B,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,mCAAmC,EACnC,oCAAoC,EACpC,6BAA6B,EAC7B,8BAA8B,EAC9B,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,EACtB,2BAA2B,EAC3B,mBAAmB,EACnB,oBAAoB,EACpB,2BAA2B,EAC5B,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,MAAM,WAAW,iBAAiB;IAChC,mBAAmB,CACjB,MAAM,CAAC,EAAE,mCAAmC,GAC3C,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAC3C,0BAA0B,CACxB,MAAM,CAAC,EAAE,6BAA6B,GACrC,OAAO,CAAC,oCAAoC,CAAC,CAAC;IACjD,2BAA2B,CACzB,MA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C9B,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAAC,oBAAoB,CAAC,CAE/B"}
package/dist/index.d.mts CHANGED
@@ -1,8 +1,9 @@
1
- import { N as NearRpcClient } from './convenience-DFvZCHOk.mjs';
2
- export { b as ClientConfig, a as CompleteClientInterface, C as ConvenienceMethods, D as DynamicRpcMethods, g as JsonRpcClientError, f as JsonRpcError, h as JsonRpcNetworkError, J as JsonRpcRequest, c as JsonRpcResponse, k as NearRpcError, j as RpcError, R as RpcRequest, i as RpcResponse, d as defaultClient, e as enableValidation, p as parseCallResultToJson, v as viewFunctionAsJson } from './convenience-DFvZCHOk.mjs';
1
+ import { N as NearRpcClient } from './convenience-CzETQz3b.mjs';
2
+ export { b as ClientConfig, a as CompleteClientInterface, C as ConvenienceMethods, D as DynamicRpcMethods, f as JsonRpcClientError, e as JsonRpcError, g as JsonRpcNetworkError, J as JsonRpcRequest, c as JsonRpcResponse, j as NearRpcError, i as RpcError, R as RpcRequest, h as RpcResponse, d as defaultClient, p as parseCallResultToJson, v as viewFunctionAsJson } from './convenience-CzETQz3b.mjs';
3
3
  import { AccountView, CallResult, AccessKeyView, RpcStateChangesInBlockByTypeRequest, RpcStateChangesInBlockResponse, RpcStateChangesInBlockRequest, RpcStateChangesInBlockByTypeResponse, RpcCongestionLevelRequest, RpcCongestionLevelResponse, GenesisConfigRequest, GenesisConfig, RpcLightClientBlockProofRequest, RpcLightClientBlockProofResponse, RpcLightClientExecutionProofRequest, RpcLightClientExecutionProofResponse, RpcMaintenanceWindowsRequest, EXPERIMENTALMaintenanceWindowsResponse, RpcProtocolConfigRequest, RpcProtocolConfigResponse, RpcReceiptRequest, RpcReceiptResponse, RpcSplitStorageInfoRequest, RpcSplitStorageInfoResponse, RpcTransactionStatusRequest, RpcTransactionResponse, RpcValidatorsOrderedRequest, EXPERIMENTALValidatorsOrderedResponse, RpcBlockRequest, RpcBlockResponse, RpcSendTransactionRequest, CryptoHash, RpcChunkRequest, RpcChunkResponse, RpcClientConfigRequest, RpcClientConfigResponse, RpcGasPriceRequest, RpcGasPriceResponse, RpcHealthRequest, RpcHealthResponse, MaintenanceWindowsResponse, RpcNetworkInfoRequest, RpcNetworkInfoResponse, RpcLightClientNextBlockRequest, RpcLightClientNextBlockResponse, RpcQueryRequest, RpcQueryResponse, RpcStatusRequest, RpcStatusResponse, RpcValidatorRequest, RpcValidatorResponse } from '@psalomo/jsonrpc-types';
4
4
  export { JsonRpcRequestSchema, JsonRpcResponseSchema, RPC_METHODS } from '@psalomo/jsonrpc-types';
5
5
 
6
+ declare function enableValidation(): void;
6
7
  declare function viewAccount(client: NearRpcClient, params: {
7
8
  accountId: string;
8
9
  finality?: 'final' | 'near-final' | 'optimistic';
@@ -21,36 +22,150 @@ declare function viewAccessKey(client: NearRpcClient, params: {
21
22
  finality?: 'final' | 'near-final' | 'optimistic';
22
23
  blockId?: string | number;
23
24
  }): Promise<AccessKeyView>;
25
+ /**
26
+ * [Deprecated] Returns changes for a given account, contract or contract code
27
+ * for given block height or hash. Consider using changes instead.
28
+ */
24
29
  declare function experimentalChanges(client: NearRpcClient, params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
30
+ /**
31
+ * [Deprecated] Returns changes in block for given block height or hash over
32
+ * all transactions for all the types. Includes changes like account_touched,
33
+ * access_key_touched, data_touched, contract_code_touched. Consider using
34
+ * block_effects instead
35
+ */
25
36
  declare function experimentalChangesInBlock(client: NearRpcClient, params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
37
+ /**
38
+ * Queries the congestion level of a shard. More info about congestion
39
+ * [here](https://near.github.io/nearcore/architecture/how/receipt-congestion.html?highlight=congestion#receipt-congestion)
40
+ */
26
41
  declare function experimentalCongestionLevel(client: NearRpcClient, params?: RpcCongestionLevelRequest): Promise<RpcCongestionLevelResponse>;
42
+ /**
43
+ * [Deprecated] Get initial state and parameters for the genesis block.
44
+ * Consider genesis_config instead.
45
+ */
27
46
  declare function experimentalGenesisConfig(client: NearRpcClient, params?: GenesisConfigRequest): Promise<GenesisConfig>;
47
+ /** Returns the proofs for a transaction execution. */
28
48
  declare function experimentalLightClientBlockProof(client: NearRpcClient, params?: RpcLightClientBlockProofRequest): Promise<RpcLightClientBlockProofResponse>;
49
+ /** Returns the proofs for a transaction execution. */
29
50
  declare function experimentalLightClientProof(client: NearRpcClient, params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
51
+ /**
52
+ * [Deprecated] Returns the future windows for maintenance in current epoch
53
+ * for the specified account. In the maintenance windows, the node will not be
54
+ * block producer or chunk producer. Consider using maintenance_windows
55
+ * instead.
56
+ */
30
57
  declare function experimentalMaintenanceWindows(client: NearRpcClient, params?: RpcMaintenanceWindowsRequest): Promise<EXPERIMENTALMaintenanceWindowsResponse>;
58
+ /**
59
+ * A configuration that defines the protocol-level parameters such as
60
+ * gas/storage costs, limits, feature flags, other settings
61
+ */
31
62
  declare function experimentalProtocolConfig(client: NearRpcClient, params?: RpcProtocolConfigRequest): Promise<RpcProtocolConfigResponse>;
63
+ /** Fetches a receipt by its ID (as is, without a status or execution outcome) */
32
64
  declare function experimentalReceipt(client: NearRpcClient, params?: RpcReceiptRequest): Promise<RpcReceiptResponse>;
65
+ /**
66
+ * Contains the split storage information. More info on split storage
67
+ * [here](https://near-nodes.io/archival/split-storage-archival)
68
+ */
33
69
  declare function experimentalSplitStorageInfo(client: NearRpcClient, params?: RpcSplitStorageInfoRequest): Promise<RpcSplitStorageInfoResponse>;
70
+ /**
71
+ * Queries status of a transaction by hash, returning the final transaction
72
+ * result and details of all receipts.
73
+ */
34
74
  declare function experimentalTxStatus(client: NearRpcClient, params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
75
+ /**
76
+ * Returns the current epoch validators ordered in the block producer order
77
+ * with repetition. This endpoint is solely used for bridge currently and is
78
+ * not intended for other external use cases.
79
+ */
35
80
  declare function experimentalValidatorsOrdered(client: NearRpcClient, params?: RpcValidatorsOrderedRequest): Promise<EXPERIMENTALValidatorsOrderedResponse>;
81
+ /** Returns block details for given height or hash */
36
82
  declare function block(client: NearRpcClient, params?: RpcBlockRequest): Promise<RpcBlockResponse>;
83
+ /**
84
+ * Returns changes in block for given block height or hash over all
85
+ * transactions for all the types. Includes changes like account_touched,
86
+ * access_key_touched, data_touched, contract_code_touched.
87
+ */
37
88
  declare function blockEffects(client: NearRpcClient, params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
89
+ /**
90
+ * [Deprecated] Sends a transaction and immediately returns transaction hash.
91
+ * Consider using send_tx instead.
92
+ */
38
93
  declare function broadcastTxAsync(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<CryptoHash>;
94
+ /**
95
+ * [Deprecated] Sends a transaction and waits until transaction is fully
96
+ * complete. (Has a 10 second timeout). Consider using send_tx instead.
97
+ */
39
98
  declare function broadcastTxCommit(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
99
+ /**
100
+ * Returns changes for a given account, contract or contract code for given
101
+ * block height or hash.
102
+ */
40
103
  declare function changes(client: NearRpcClient, params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
104
+ /**
105
+ * Returns details of a specific chunk. You can run a block details query to
106
+ * get a valid chunk hash.
107
+ */
41
108
  declare function chunk(client: NearRpcClient, params?: RpcChunkRequest): Promise<RpcChunkResponse>;
109
+ /** Queries client node configuration */
42
110
  declare function clientConfig(client: NearRpcClient, params?: RpcClientConfigRequest): Promise<RpcClientConfigResponse>;
111
+ /**
112
+ * Returns gas price for a specific block_height or block_hash. Using [null]
113
+ * will return the most recent block's gas price.
114
+ */
43
115
  declare function gasPrice(client: NearRpcClient, params?: RpcGasPriceRequest): Promise<RpcGasPriceResponse>;
116
+ /** Get initial state and parameters for the genesis block */
44
117
  declare function genesisConfig(client: NearRpcClient, params?: GenesisConfigRequest): Promise<GenesisConfig>;
118
+ /** Returns the current health status of the RPC node the client connects to. */
45
119
  declare function health(client: NearRpcClient, params?: RpcHealthRequest): Promise<RpcHealthResponse>;
120
+ /** Returns the proofs for a transaction execution. */
46
121
  declare function lightClientProof(client: NearRpcClient, params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
122
+ /**
123
+ * Returns the future windows for maintenance in current epoch for the
124
+ * specified account. In the maintenance windows, the node will not be block
125
+ * producer or chunk producer.
126
+ */
47
127
  declare function maintenanceWindows(client: NearRpcClient, params?: RpcMaintenanceWindowsRequest): Promise<MaintenanceWindowsResponse>;
128
+ /**
129
+ * Queries the current state of node network connections. This includes
130
+ * information about active peers, transmitted data, known producers, etc.
131
+ */
48
132
  declare function networkInfo(client: NearRpcClient, params?: RpcNetworkInfoRequest): Promise<RpcNetworkInfoResponse>;
133
+ /** Returns the next light client block. */
49
134
  declare function nextLightClientBlock(client: NearRpcClient, params?: RpcLightClientNextBlockRequest): Promise<RpcLightClientNextBlockResponse>;
135
+ /**
136
+ * This module allows you to make generic requests to the network. The
137
+ * `RpcQueryRequest` struct takes in a
138
+ * [`BlockReference`](https://docs.rs/near-primitives/0.12.0/near_primitives/types/enum.BlockReference.html)
139
+ * and a
140
+ * [`QueryRequest`](https://docs.rs/near-primitives/0.12.0/near_primitives/views/enum.QueryRequest.html).
141
+ * The `BlockReference` enum allows you to specify a block by `Finality`,
142
+ * `BlockId` or `SyncCheckpoint`. The `QueryRequest` enum provides multiple
143
+ * variants for performing the following actions: - View an account's details
144
+ * - View a contract's code - View the state of an account - View the
145
+ * `AccessKey` of an account - View the `AccessKeyList` of an account - Call a
146
+ * function in a contract deployed on the network.
147
+ */
50
148
  declare function query(client: NearRpcClient, params?: RpcQueryRequest): Promise<RpcQueryResponse>;
149
+ /**
150
+ * Sends transaction. Returns the guaranteed execution status and the results
151
+ * the blockchain can provide at the moment.
152
+ */
51
153
  declare function sendTx(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
154
+ /**
155
+ * Requests the status of the connected RPC node. This includes information
156
+ * about sync status, nearcore node version, protocol version, the current set
157
+ * of validators, etc.
158
+ */
52
159
  declare function status(client: NearRpcClient, params?: RpcStatusRequest): Promise<RpcStatusResponse>;
160
+ /**
161
+ * Queries status of a transaction by hash and returns the final transaction
162
+ * result.
163
+ */
53
164
  declare function tx(client: NearRpcClient, params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
165
+ /**
166
+ * Queries active validators on the network. Returns details and the state of
167
+ * validation on the blockchain.
168
+ */
54
169
  declare function validators(client: NearRpcClient, params?: RpcValidatorRequest): Promise<RpcValidatorResponse>;
55
170
 
56
- export { NearRpcClient, block, blockEffects, broadcastTxAsync, broadcastTxCommit, changes, chunk, clientConfig, NearRpcClient as default, experimentalChanges, experimentalChangesInBlock, experimentalCongestionLevel, experimentalGenesisConfig, experimentalLightClientBlockProof, experimentalLightClientProof, experimentalMaintenanceWindows, experimentalProtocolConfig, experimentalReceipt, experimentalSplitStorageInfo, experimentalTxStatus, experimentalValidatorsOrdered, gasPrice, genesisConfig, health, lightClientProof, maintenanceWindows, networkInfo, nextLightClientBlock, query, sendTx, status, tx, validators, viewAccessKey, viewAccount, viewFunction };
171
+ export { NearRpcClient, block, blockEffects, broadcastTxAsync, broadcastTxCommit, changes, chunk, clientConfig, NearRpcClient as default, enableValidation, experimentalChanges, experimentalChangesInBlock, experimentalCongestionLevel, experimentalGenesisConfig, experimentalLightClientBlockProof, experimentalLightClientProof, experimentalMaintenanceWindows, experimentalProtocolConfig, experimentalReceipt, experimentalSplitStorageInfo, experimentalTxStatus, experimentalValidatorsOrdered, gasPrice, genesisConfig, health, lightClientProof, maintenanceWindows, networkInfo, nextLightClientBlock, query, sendTx, status, tx, validators, viewAccessKey, viewAccount, viewFunction };
package/dist/index.d.ts CHANGED
@@ -5,6 +5,5 @@ export type { DynamicRpcMethods, ConvenienceMethods, CompleteClientInterface, }
5
5
  export { JsonRpcRequestSchema, JsonRpcResponseSchema, } from '@psalomo/jsonrpc-types';
6
6
  export { RPC_METHODS } from '@psalomo/jsonrpc-types';
7
7
  export * from './validated/index.js';
8
- export { enableValidation } from './validation.js';
9
8
  export { NearRpcClient as default } from './client';
10
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGxD,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGrD,cAAc,sBAAsB,CAAC;AAGrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAGnD,OAAO,EAAE,aAAa,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGxD,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGrD,cAAc,sBAAsB,CAAC;AAGrC,OAAO,EAAE,aAAa,IAAI,OAAO,EAAE,MAAM,UAAU,CAAC"}
package/dist/index.js CHANGED
@@ -22,11 +22,11 @@ var index_exports = {};
22
22
  __export(index_exports, {
23
23
  JsonRpcClientError: () => JsonRpcClientError,
24
24
  JsonRpcNetworkError: () => JsonRpcNetworkError,
25
- JsonRpcRequestSchema: () => import_jsonrpc_types3.JsonRpcRequestSchema,
26
- JsonRpcResponseSchema: () => import_jsonrpc_types3.JsonRpcResponseSchema,
25
+ JsonRpcRequestSchema: () => import_jsonrpc_types2.JsonRpcRequestSchema,
26
+ JsonRpcResponseSchema: () => import_jsonrpc_types2.JsonRpcResponseSchema,
27
27
  NearRpcClient: () => NearRpcClient,
28
28
  NearRpcError: () => NearRpcError,
29
- RPC_METHODS: () => import_jsonrpc_types4.RPC_METHODS,
29
+ RPC_METHODS: () => import_jsonrpc_types3.RPC_METHODS,
30
30
  block: () => block2,
31
31
  blockEffects: () => blockEffects2,
32
32
  broadcastTxAsync: () => broadcastTxAsync2,
@@ -126,7 +126,6 @@ var NearRpcClient = class _NearRpcClient {
126
126
  headers;
127
127
  timeout;
128
128
  retries;
129
- validation;
130
129
  constructor(config) {
131
130
  if (typeof config === "string") {
132
131
  this.endpoint = config;
@@ -138,9 +137,6 @@ var NearRpcClient = class _NearRpcClient {
138
137
  this.headers = config.headers || {};
139
138
  this.timeout = config.timeout || 3e4;
140
139
  this.retries = config.retries || 3;
141
- if (config.validation) {
142
- this.validation = config.validation;
143
- }
144
140
  }
145
141
  }
146
142
  /**
@@ -148,19 +144,6 @@ var NearRpcClient = class _NearRpcClient {
148
144
  * This is used internally by the standalone RPC functions
149
145
  */
150
146
  async makeRequest(method, params) {
151
- const requestForValidation = {
152
- jsonrpc: "2.0",
153
- id: REQUEST_ID,
154
- method,
155
- params: params !== void 0 ? params : null
156
- };
157
- if (this.validation) {
158
- if ("validateMethodRequest" in this.validation) {
159
- this.validation.validateMethodRequest(method, requestForValidation);
160
- } else {
161
- this.validation.validateRequest(requestForValidation);
162
- }
163
- }
164
147
  const snakeCaseParams = params !== void 0 ? convertKeysToSnakeCase(params) : null;
165
148
  const request = {
166
149
  jsonrpc: "2.0",
@@ -212,9 +195,6 @@ var NearRpcClient = class _NearRpcClient {
212
195
  jsonResponse
213
196
  );
214
197
  }
215
- if (this.validation) {
216
- this.validation.validateResponse(jsonResponse);
217
- }
218
198
  const camelCaseResult = jsonResponse.result ? convertKeysToCamelCase(jsonResponse.result) : jsonResponse.result;
219
199
  if (camelCaseResult && typeof camelCaseResult === "object" && "error" in camelCaseResult) {
220
200
  const errorMessage = camelCaseResult.error;
@@ -225,13 +205,6 @@ var NearRpcClient = class _NearRpcClient {
225
205
  camelCaseResult
226
206
  );
227
207
  }
228
- if (this.validation && "validateMethodResponse" in this.validation) {
229
- const camelCaseResponse = {
230
- ...jsonResponse,
231
- result: camelCaseResult
232
- };
233
- this.validation.validateMethodResponse(method, camelCaseResponse);
234
- }
235
208
  return camelCaseResult;
236
209
  } catch (error) {
237
210
  lastError = error;
@@ -259,8 +232,7 @@ var NearRpcClient = class _NearRpcClient {
259
232
  endpoint: config.endpoint ?? this.endpoint,
260
233
  headers: config.headers ?? this.headers,
261
234
  timeout: config.timeout ?? this.timeout,
262
- retries: config.retries ?? this.retries,
263
- ...config.validation !== void 0 ? { validation: config.validation } : this.validation !== void 0 ? { validation: this.validation } : {}
235
+ retries: config.retries ?? this.retries
264
236
  });
265
237
  }
266
238
  };
@@ -279,8 +251,8 @@ var NearRpcError = class extends Error {
279
251
  };
280
252
 
281
253
  // src/index.ts
254
+ var import_jsonrpc_types2 = require("@psalomo/jsonrpc-types");
282
255
  var import_jsonrpc_types3 = require("@psalomo/jsonrpc-types");
283
- var import_jsonrpc_types4 = require("@psalomo/jsonrpc-types");
284
256
 
285
257
  // src/generated-types.ts
286
258
  async function experimentalChanges(client, params) {
@@ -401,6 +373,8 @@ async function viewFunctionAsJson(client, params) {
401
373
 
402
374
  // src/validated/index.ts
403
375
  var import_jsonrpc_types = require("@psalomo/jsonrpc-types");
376
+ function enableValidation() {
377
+ }
404
378
  async function viewAccount2(client, params) {
405
379
  const queryParams = params.blockId ? {
406
380
  requestType: "view_account",
@@ -986,74 +960,6 @@ async function validators2(client, params) {
986
960
  }
987
961
  return result;
988
962
  }
989
-
990
- // src/validation.ts
991
- var import_jsonrpc_types2 = require("@psalomo/jsonrpc-types");
992
- function enableValidation() {
993
- const requestSchema = (0, import_jsonrpc_types2.JsonRpcRequestSchema)();
994
- const responseSchema = (0, import_jsonrpc_types2.JsonRpcResponseSchema)();
995
- return {
996
- validateRequest: (request) => {
997
- try {
998
- requestSchema.parse(request);
999
- } catch (error) {
1000
- throw new JsonRpcNetworkError(
1001
- `Invalid request format: ${error instanceof Error ? error.message : "Unknown error"}`,
1002
- error
1003
- );
1004
- }
1005
- },
1006
- validateResponse: (response) => {
1007
- try {
1008
- responseSchema.parse(response);
1009
- } catch (error) {
1010
- throw new JsonRpcClientError(
1011
- `Invalid response format: ${error instanceof Error ? error.message : "Unknown error"}`
1012
- );
1013
- }
1014
- },
1015
- validateMethodRequest: (method, request) => {
1016
- try {
1017
- requestSchema.parse(request);
1018
- const methodSchemas = import_jsonrpc_types2.VALIDATION_SCHEMA_MAP[method];
1019
- if (methodSchemas?.requestSchema) {
1020
- const methodRequestSchema = methodSchemas.requestSchema();
1021
- methodRequestSchema.parse(request);
1022
- }
1023
- } catch (error) {
1024
- throw new JsonRpcNetworkError(
1025
- `Invalid ${method} request: ${error instanceof Error ? error.message : "Unknown error"}`,
1026
- error
1027
- );
1028
- }
1029
- },
1030
- validateMethodResponse: (method, response) => {
1031
- try {
1032
- responseSchema.parse(response);
1033
- if (response.result && typeof response.result === "object" && "error" in response.result) {
1034
- const serverError = response.result.error;
1035
- throw new JsonRpcClientError(
1036
- `Server error: ${serverError}`,
1037
- -32e3,
1038
- response.result
1039
- );
1040
- }
1041
- const methodSchemas = import_jsonrpc_types2.VALIDATION_SCHEMA_MAP[method];
1042
- if (methodSchemas?.responseSchema) {
1043
- const methodResponseSchema = methodSchemas.responseSchema();
1044
- methodResponseSchema.parse(response);
1045
- }
1046
- } catch (error) {
1047
- if (error instanceof JsonRpcClientError) {
1048
- throw error;
1049
- }
1050
- throw new JsonRpcClientError(
1051
- `Invalid ${method} response: ${error instanceof Error ? error.message : "Unknown error"}`
1052
- );
1053
- }
1054
- }
1055
- };
1056
- }
1057
963
  // Annotate the CommonJS export names for ESM import in node:
1058
964
  0 && (module.exports = {
1059
965
  JsonRpcClientError,
package/dist/index.mjs CHANGED
@@ -37,12 +37,12 @@ import {
37
37
  tx,
38
38
  validators,
39
39
  viewFunctionAsJson
40
- } from "./chunk-GCIU6ZLN.mjs";
40
+ } from "./chunk-ABZUXHR5.mjs";
41
41
 
42
42
  // src/index.ts
43
43
  import {
44
- JsonRpcRequestSchema as JsonRpcRequestSchema2,
45
- JsonRpcResponseSchema as JsonRpcResponseSchema2
44
+ JsonRpcRequestSchema,
45
+ JsonRpcResponseSchema
46
46
  } from "@psalomo/jsonrpc-types";
47
47
  import { RPC_METHODS } from "@psalomo/jsonrpc-types";
48
48
 
@@ -93,6 +93,8 @@ import {
93
93
  RpcValidatorResponseSchema,
94
94
  RpcValidatorsOrderedRequestSchema
95
95
  } from "@psalomo/jsonrpc-types";
96
+ function enableValidation() {
97
+ }
96
98
  async function viewAccount(client, params) {
97
99
  const queryParams = params.blockId ? {
98
100
  requestType: "view_account",
@@ -678,83 +680,11 @@ async function validators2(client, params) {
678
680
  }
679
681
  return result;
680
682
  }
681
-
682
- // src/validation.ts
683
- import {
684
- JsonRpcRequestSchema,
685
- JsonRpcResponseSchema,
686
- VALIDATION_SCHEMA_MAP
687
- } from "@psalomo/jsonrpc-types";
688
- function enableValidation() {
689
- const requestSchema = JsonRpcRequestSchema();
690
- const responseSchema = JsonRpcResponseSchema();
691
- return {
692
- validateRequest: (request) => {
693
- try {
694
- requestSchema.parse(request);
695
- } catch (error) {
696
- throw new JsonRpcNetworkError(
697
- `Invalid request format: ${error instanceof Error ? error.message : "Unknown error"}`,
698
- error
699
- );
700
- }
701
- },
702
- validateResponse: (response) => {
703
- try {
704
- responseSchema.parse(response);
705
- } catch (error) {
706
- throw new JsonRpcClientError(
707
- `Invalid response format: ${error instanceof Error ? error.message : "Unknown error"}`
708
- );
709
- }
710
- },
711
- validateMethodRequest: (method, request) => {
712
- try {
713
- requestSchema.parse(request);
714
- const methodSchemas = VALIDATION_SCHEMA_MAP[method];
715
- if (methodSchemas?.requestSchema) {
716
- const methodRequestSchema = methodSchemas.requestSchema();
717
- methodRequestSchema.parse(request);
718
- }
719
- } catch (error) {
720
- throw new JsonRpcNetworkError(
721
- `Invalid ${method} request: ${error instanceof Error ? error.message : "Unknown error"}`,
722
- error
723
- );
724
- }
725
- },
726
- validateMethodResponse: (method, response) => {
727
- try {
728
- responseSchema.parse(response);
729
- if (response.result && typeof response.result === "object" && "error" in response.result) {
730
- const serverError = response.result.error;
731
- throw new JsonRpcClientError(
732
- `Server error: ${serverError}`,
733
- -32e3,
734
- response.result
735
- );
736
- }
737
- const methodSchemas = VALIDATION_SCHEMA_MAP[method];
738
- if (methodSchemas?.responseSchema) {
739
- const methodResponseSchema = methodSchemas.responseSchema();
740
- methodResponseSchema.parse(response);
741
- }
742
- } catch (error) {
743
- if (error instanceof JsonRpcClientError) {
744
- throw error;
745
- }
746
- throw new JsonRpcClientError(
747
- `Invalid ${method} response: ${error instanceof Error ? error.message : "Unknown error"}`
748
- );
749
- }
750
- }
751
- };
752
- }
753
683
  export {
754
684
  JsonRpcClientError,
755
685
  JsonRpcNetworkError,
756
- JsonRpcRequestSchema2 as JsonRpcRequestSchema,
757
- JsonRpcResponseSchema2 as JsonRpcResponseSchema,
686
+ JsonRpcRequestSchema,
687
+ JsonRpcResponseSchema,
758
688
  NearRpcClient,
759
689
  NearRpcError,
760
690
  RPC_METHODS,
@@ -1,4 +1,4 @@
1
- export { a as CompleteClientInterface, C as ConvenienceMethods, D as DynamicRpcMethods, N as NearRpcClient, k as NearRpcError, j as RpcError, R as RpcRequest, i as RpcResponse, z as block, A as blockEffects, B as broadcastTxAsync, E as broadcastTxCommit, F as changes, G as chunk, H as clientConfig, d as defaultClient, l as experimentalChanges, m as experimentalChangesInBlock, n as experimentalCongestionLevel, o as experimentalGenesisConfig, q as experimentalLightClientBlockProof, r as experimentalLightClientProof, s as experimentalMaintenanceWindows, t as experimentalProtocolConfig, u as experimentalReceipt, w as experimentalSplitStorageInfo, x as experimentalTxStatus, y as experimentalValidatorsOrdered, I as gasPrice, K as genesisConfig, L as health, M as lightClientProof, O as maintenanceWindows, P as networkInfo, Q as nextLightClientBlock, p as parseCallResultToJson, S as query, T as sendTx, U as status, V as tx, W as validators, Z as viewAccessKey, X as viewAccount, Y as viewFunction, v as viewFunctionAsJson } from '../convenience-DFvZCHOk.mjs';
1
+ export { a as CompleteClientInterface, C as ConvenienceMethods, D as DynamicRpcMethods, N as NearRpcClient, j as NearRpcError, i as RpcError, R as RpcRequest, h as RpcResponse, y as block, z as blockEffects, A as broadcastTxAsync, B as broadcastTxCommit, E as changes, F as chunk, G as clientConfig, d as defaultClient, k as experimentalChanges, l as experimentalChangesInBlock, m as experimentalCongestionLevel, n as experimentalGenesisConfig, o as experimentalLightClientBlockProof, q as experimentalLightClientProof, r as experimentalMaintenanceWindows, s as experimentalProtocolConfig, t as experimentalReceipt, u as experimentalSplitStorageInfo, w as experimentalTxStatus, x as experimentalValidatorsOrdered, H as gasPrice, I as genesisConfig, K as health, L as lightClientProof, M as maintenanceWindows, O as networkInfo, P as nextLightClientBlock, p as parseCallResultToJson, Q as query, S as sendTx, T as status, U as tx, V as validators, Y as viewAccessKey, W as viewAccount, X as viewFunction, v as viewFunctionAsJson } from '../convenience-CzETQz3b.mjs';
2
2
  export { JsonRpcRequestSchema, JsonRpcResponseSchema, RPC_METHODS } from '@psalomo/jsonrpc-types';
3
3
 
4
4
  declare function enableValidation(): void;
@@ -123,7 +123,6 @@ var NearRpcClient = class _NearRpcClient {
123
123
  headers;
124
124
  timeout;
125
125
  retries;
126
- validation;
127
126
  constructor(config) {
128
127
  if (typeof config === "string") {
129
128
  this.endpoint = config;
@@ -135,9 +134,6 @@ var NearRpcClient = class _NearRpcClient {
135
134
  this.headers = config.headers || {};
136
135
  this.timeout = config.timeout || 3e4;
137
136
  this.retries = config.retries || 3;
138
- if (config.validation) {
139
- this.validation = config.validation;
140
- }
141
137
  }
142
138
  }
143
139
  /**
@@ -145,19 +141,6 @@ var NearRpcClient = class _NearRpcClient {
145
141
  * This is used internally by the standalone RPC functions
146
142
  */
147
143
  async makeRequest(method, params) {
148
- const requestForValidation = {
149
- jsonrpc: "2.0",
150
- id: REQUEST_ID,
151
- method,
152
- params: params !== void 0 ? params : null
153
- };
154
- if (this.validation) {
155
- if ("validateMethodRequest" in this.validation) {
156
- this.validation.validateMethodRequest(method, requestForValidation);
157
- } else {
158
- this.validation.validateRequest(requestForValidation);
159
- }
160
- }
161
144
  const snakeCaseParams = params !== void 0 ? convertKeysToSnakeCase(params) : null;
162
145
  const request = {
163
146
  jsonrpc: "2.0",
@@ -209,9 +192,6 @@ var NearRpcClient = class _NearRpcClient {
209
192
  jsonResponse
210
193
  );
211
194
  }
212
- if (this.validation) {
213
- this.validation.validateResponse(jsonResponse);
214
- }
215
195
  const camelCaseResult = jsonResponse.result ? convertKeysToCamelCase(jsonResponse.result) : jsonResponse.result;
216
196
  if (camelCaseResult && typeof camelCaseResult === "object" && "error" in camelCaseResult) {
217
197
  const errorMessage = camelCaseResult.error;
@@ -222,13 +202,6 @@ var NearRpcClient = class _NearRpcClient {
222
202
  camelCaseResult
223
203
  );
224
204
  }
225
- if (this.validation && "validateMethodResponse" in this.validation) {
226
- const camelCaseResponse = {
227
- ...jsonResponse,
228
- result: camelCaseResult
229
- };
230
- this.validation.validateMethodResponse(method, camelCaseResponse);
231
- }
232
205
  return camelCaseResult;
233
206
  } catch (error) {
234
207
  lastError = error;
@@ -256,8 +229,7 @@ var NearRpcClient = class _NearRpcClient {
256
229
  endpoint: config.endpoint ?? this.endpoint,
257
230
  headers: config.headers ?? this.headers,
258
231
  timeout: config.timeout ?? this.timeout,
259
- retries: config.retries ?? this.retries,
260
- ...config.validation !== void 0 ? { validation: config.validation } : this.validation !== void 0 ? { validation: this.validation } : {}
232
+ retries: config.retries ?? this.retries
261
233
  });
262
234
  }
263
235
  };
@@ -38,7 +38,7 @@ import {
38
38
  viewAccount,
39
39
  viewFunction,
40
40
  viewFunctionAsJson
41
- } from "../chunk-GCIU6ZLN.mjs";
41
+ } from "../chunk-ABZUXHR5.mjs";
42
42
 
43
43
  // src/no-validation/index.ts
44
44
  import { RPC_METHODS } from "@psalomo/jsonrpc-types";