@psalomo/jsonrpc-client 1.0.3 → 1.2.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.
- package/README.md +69 -19
- package/dist/browser-standalone.js +804 -37
- package/dist/browser-standalone.min.js +1 -1
- package/dist/chunk-GCIU6ZLN.mjs +395 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/convenience-DFvZCHOk.d.mts +212 -0
- package/dist/convenience-DFvZCHOk.d.ts +212 -0
- package/dist/convenience.d.ts +9 -1
- package/dist/convenience.d.ts.map +1 -1
- package/dist/generated-types.d.ts +1 -1
- package/dist/index.d.mts +23 -172
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +646 -51
- package/dist/index.mjs +684 -331
- package/dist/no-validation/index.d.mts +6 -0
- package/dist/no-validation/index.d.ts +9 -0
- package/dist/no-validation/index.d.ts.map +1 -0
- package/dist/no-validation/index.js +471 -0
- package/dist/no-validation/index.mjs +95 -0
- package/dist/validated/index.d.ts +54 -0
- package/dist/validated/index.d.ts.map +1 -0
- package/dist/validation.d.ts.map +1 -1
- package/package.json +7 -2
@@ -0,0 +1,6 @@
|
|
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';
|
2
|
+
export { JsonRpcRequestSchema, JsonRpcResponseSchema, RPC_METHODS } from '@psalomo/jsonrpc-types';
|
3
|
+
|
4
|
+
declare function enableValidation(): void;
|
5
|
+
|
6
|
+
export { enableValidation };
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export { NearRpcClient, defaultClient } from '../client.js';
|
2
|
+
export { NearRpcError, type RpcRequest, type RpcResponse, type RpcError, } from '../types.js';
|
3
|
+
export * from '../generated-functions.js';
|
4
|
+
export * from '../convenience.js';
|
5
|
+
export type { DynamicRpcMethods, ConvenienceMethods, CompleteClientInterface, } from '../generated-types.js';
|
6
|
+
export { RPC_METHODS } from '@psalomo/jsonrpc-types';
|
7
|
+
export { JsonRpcRequestSchema, JsonRpcResponseSchema, } from '@psalomo/jsonrpc-types';
|
8
|
+
export declare function enableValidation(): void;
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/no-validation/index.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAG5D,OAAO,EACL,YAAY,EACZ,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,QAAQ,GACd,MAAM,aAAa,CAAC;AAGrB,cAAc,2BAA2B,CAAC;AAG1C,cAAc,mBAAmB,CAAC;AAGlC,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAGrD,OAAO,EACL,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,wBAAwB,CAAC;AAIhC,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC"}
|
@@ -0,0 +1,471 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __export = (target, all) => {
|
7
|
+
for (var name in all)
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
+
};
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
+
for (let key of __getOwnPropNames(from))
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
+
}
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
+
|
20
|
+
// src/no-validation/index.ts
|
21
|
+
var no_validation_exports = {};
|
22
|
+
__export(no_validation_exports, {
|
23
|
+
JsonRpcRequestSchema: () => import_jsonrpc_types2.JsonRpcRequestSchema,
|
24
|
+
JsonRpcResponseSchema: () => import_jsonrpc_types2.JsonRpcResponseSchema,
|
25
|
+
NearRpcClient: () => NearRpcClient,
|
26
|
+
NearRpcError: () => NearRpcError,
|
27
|
+
RPC_METHODS: () => import_jsonrpc_types.RPC_METHODS,
|
28
|
+
block: () => block,
|
29
|
+
blockEffects: () => blockEffects,
|
30
|
+
broadcastTxAsync: () => broadcastTxAsync,
|
31
|
+
broadcastTxCommit: () => broadcastTxCommit,
|
32
|
+
changes: () => changes,
|
33
|
+
chunk: () => chunk,
|
34
|
+
clientConfig: () => clientConfig,
|
35
|
+
defaultClient: () => defaultClient,
|
36
|
+
enableValidation: () => enableValidation,
|
37
|
+
experimentalChanges: () => experimentalChanges,
|
38
|
+
experimentalChangesInBlock: () => experimentalChangesInBlock,
|
39
|
+
experimentalCongestionLevel: () => experimentalCongestionLevel,
|
40
|
+
experimentalGenesisConfig: () => experimentalGenesisConfig,
|
41
|
+
experimentalLightClientBlockProof: () => experimentalLightClientBlockProof,
|
42
|
+
experimentalLightClientProof: () => experimentalLightClientProof,
|
43
|
+
experimentalMaintenanceWindows: () => experimentalMaintenanceWindows,
|
44
|
+
experimentalProtocolConfig: () => experimentalProtocolConfig,
|
45
|
+
experimentalReceipt: () => experimentalReceipt,
|
46
|
+
experimentalSplitStorageInfo: () => experimentalSplitStorageInfo,
|
47
|
+
experimentalTxStatus: () => experimentalTxStatus,
|
48
|
+
experimentalValidatorsOrdered: () => experimentalValidatorsOrdered,
|
49
|
+
gasPrice: () => gasPrice,
|
50
|
+
genesisConfig: () => genesisConfig,
|
51
|
+
health: () => health,
|
52
|
+
lightClientProof: () => lightClientProof,
|
53
|
+
maintenanceWindows: () => maintenanceWindows,
|
54
|
+
networkInfo: () => networkInfo,
|
55
|
+
nextLightClientBlock: () => nextLightClientBlock,
|
56
|
+
parseCallResultToJson: () => parseCallResultToJson,
|
57
|
+
query: () => query,
|
58
|
+
sendTx: () => sendTx,
|
59
|
+
status: () => status,
|
60
|
+
tx: () => tx,
|
61
|
+
validators: () => validators,
|
62
|
+
viewAccessKey: () => viewAccessKey,
|
63
|
+
viewAccount: () => viewAccount,
|
64
|
+
viewFunction: () => viewFunction,
|
65
|
+
viewFunctionAsJson: () => viewFunctionAsJson
|
66
|
+
});
|
67
|
+
module.exports = __toCommonJS(no_validation_exports);
|
68
|
+
|
69
|
+
// src/client.ts
|
70
|
+
function camelToSnake(str) {
|
71
|
+
return str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);
|
72
|
+
}
|
73
|
+
function snakeToCamel(str) {
|
74
|
+
return str.replace(/_([a-z])/g, (_, letter) => letter.toUpperCase());
|
75
|
+
}
|
76
|
+
function convertKeysToSnakeCase(obj) {
|
77
|
+
if (obj === null || typeof obj !== "object") {
|
78
|
+
return obj;
|
79
|
+
}
|
80
|
+
if (Array.isArray(obj)) {
|
81
|
+
return obj.map(convertKeysToSnakeCase);
|
82
|
+
}
|
83
|
+
const converted = {};
|
84
|
+
for (const [key, value] of Object.entries(obj)) {
|
85
|
+
const snakeKey = camelToSnake(key);
|
86
|
+
converted[snakeKey] = convertKeysToSnakeCase(value);
|
87
|
+
}
|
88
|
+
return converted;
|
89
|
+
}
|
90
|
+
function convertKeysToCamelCase(obj) {
|
91
|
+
if (obj === null || typeof obj !== "object") {
|
92
|
+
return obj;
|
93
|
+
}
|
94
|
+
if (Array.isArray(obj)) {
|
95
|
+
return obj.map(convertKeysToCamelCase);
|
96
|
+
}
|
97
|
+
const converted = {};
|
98
|
+
for (const [key, value] of Object.entries(obj)) {
|
99
|
+
const camelKey = snakeToCamel(key);
|
100
|
+
converted[camelKey] = convertKeysToCamelCase(value);
|
101
|
+
}
|
102
|
+
return converted;
|
103
|
+
}
|
104
|
+
var REQUEST_ID = "dontcare";
|
105
|
+
var JsonRpcClientError = class extends Error {
|
106
|
+
constructor(message, code, data) {
|
107
|
+
super(message);
|
108
|
+
this.code = code;
|
109
|
+
this.data = data;
|
110
|
+
this.name = "JsonRpcClientError";
|
111
|
+
}
|
112
|
+
};
|
113
|
+
var JsonRpcNetworkError = class extends Error {
|
114
|
+
constructor(message, originalError, responseBody) {
|
115
|
+
super(message);
|
116
|
+
this.originalError = originalError;
|
117
|
+
this.responseBody = responseBody;
|
118
|
+
this.name = "JsonRpcNetworkError";
|
119
|
+
}
|
120
|
+
};
|
121
|
+
var NearRpcClient = class _NearRpcClient {
|
122
|
+
endpoint;
|
123
|
+
headers;
|
124
|
+
timeout;
|
125
|
+
retries;
|
126
|
+
validation;
|
127
|
+
constructor(config) {
|
128
|
+
if (typeof config === "string") {
|
129
|
+
this.endpoint = config;
|
130
|
+
this.headers = {};
|
131
|
+
this.timeout = 3e4;
|
132
|
+
this.retries = 3;
|
133
|
+
} else {
|
134
|
+
this.endpoint = config.endpoint;
|
135
|
+
this.headers = config.headers || {};
|
136
|
+
this.timeout = config.timeout || 3e4;
|
137
|
+
this.retries = config.retries || 3;
|
138
|
+
if (config.validation) {
|
139
|
+
this.validation = config.validation;
|
140
|
+
}
|
141
|
+
}
|
142
|
+
}
|
143
|
+
/**
|
144
|
+
* Make a raw JSON-RPC request
|
145
|
+
* This is used internally by the standalone RPC functions
|
146
|
+
*/
|
147
|
+
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
|
+
const snakeCaseParams = params !== void 0 ? convertKeysToSnakeCase(params) : null;
|
162
|
+
const request = {
|
163
|
+
jsonrpc: "2.0",
|
164
|
+
id: REQUEST_ID,
|
165
|
+
method,
|
166
|
+
params: snakeCaseParams
|
167
|
+
};
|
168
|
+
let lastError = null;
|
169
|
+
for (let attempt = 0; attempt <= this.retries; attempt++) {
|
170
|
+
try {
|
171
|
+
const controller = new AbortController();
|
172
|
+
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
173
|
+
const response = await fetch(this.endpoint, {
|
174
|
+
method: "POST",
|
175
|
+
headers: {
|
176
|
+
"Content-Type": "application/json",
|
177
|
+
...this.headers
|
178
|
+
},
|
179
|
+
body: JSON.stringify(request),
|
180
|
+
signal: controller.signal
|
181
|
+
});
|
182
|
+
clearTimeout(timeoutId);
|
183
|
+
let jsonResponse;
|
184
|
+
try {
|
185
|
+
jsonResponse = await response.json();
|
186
|
+
} catch (parseError) {
|
187
|
+
if (!response.ok) {
|
188
|
+
throw new JsonRpcNetworkError(
|
189
|
+
`HTTP error! status: ${response.status} - Failed to parse JSON response`,
|
190
|
+
parseError
|
191
|
+
);
|
192
|
+
}
|
193
|
+
throw new JsonRpcNetworkError(
|
194
|
+
"Failed to parse JSON response",
|
195
|
+
parseError
|
196
|
+
);
|
197
|
+
}
|
198
|
+
if (jsonResponse.error) {
|
199
|
+
throw new JsonRpcClientError(
|
200
|
+
jsonResponse.error.message,
|
201
|
+
jsonResponse.error.code,
|
202
|
+
jsonResponse.error.data
|
203
|
+
);
|
204
|
+
}
|
205
|
+
if (!response.ok) {
|
206
|
+
throw new JsonRpcNetworkError(
|
207
|
+
`HTTP error! status: ${response.status}`,
|
208
|
+
void 0,
|
209
|
+
jsonResponse
|
210
|
+
);
|
211
|
+
}
|
212
|
+
if (this.validation) {
|
213
|
+
this.validation.validateResponse(jsonResponse);
|
214
|
+
}
|
215
|
+
const camelCaseResult = jsonResponse.result ? convertKeysToCamelCase(jsonResponse.result) : jsonResponse.result;
|
216
|
+
if (camelCaseResult && typeof camelCaseResult === "object" && "error" in camelCaseResult) {
|
217
|
+
const errorMessage = camelCaseResult.error;
|
218
|
+
throw new JsonRpcClientError(
|
219
|
+
`RPC Error: ${errorMessage}`,
|
220
|
+
-32e3,
|
221
|
+
// Generic RPC error code
|
222
|
+
camelCaseResult
|
223
|
+
);
|
224
|
+
}
|
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
|
+
return camelCaseResult;
|
233
|
+
} catch (error) {
|
234
|
+
lastError = error;
|
235
|
+
if (error instanceof JsonRpcClientError) {
|
236
|
+
throw error;
|
237
|
+
}
|
238
|
+
if (attempt === this.retries) {
|
239
|
+
break;
|
240
|
+
}
|
241
|
+
await new Promise(
|
242
|
+
(resolve) => setTimeout(resolve, Math.pow(2, attempt) * 1e3)
|
243
|
+
);
|
244
|
+
}
|
245
|
+
}
|
246
|
+
throw new JsonRpcNetworkError(
|
247
|
+
lastError?.message || "Request failed after all retries",
|
248
|
+
lastError || void 0
|
249
|
+
);
|
250
|
+
}
|
251
|
+
/**
|
252
|
+
* Create a new client with modified configuration
|
253
|
+
*/
|
254
|
+
withConfig(config) {
|
255
|
+
return new _NearRpcClient({
|
256
|
+
endpoint: config.endpoint ?? this.endpoint,
|
257
|
+
headers: config.headers ?? this.headers,
|
258
|
+
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 } : {}
|
261
|
+
});
|
262
|
+
}
|
263
|
+
};
|
264
|
+
var defaultClient = new NearRpcClient({
|
265
|
+
endpoint: "https://rpc.mainnet.near.org"
|
266
|
+
});
|
267
|
+
|
268
|
+
// src/types.ts
|
269
|
+
var NearRpcError = class extends Error {
|
270
|
+
constructor(code, message, data) {
|
271
|
+
super(message);
|
272
|
+
this.code = code;
|
273
|
+
this.data = data;
|
274
|
+
this.name = "NearRpcError";
|
275
|
+
}
|
276
|
+
};
|
277
|
+
|
278
|
+
// src/generated-types.ts
|
279
|
+
async function experimentalChanges(client, params) {
|
280
|
+
return client.makeRequest("EXPERIMENTAL_changes", params);
|
281
|
+
}
|
282
|
+
async function experimentalChangesInBlock(client, params) {
|
283
|
+
return client.makeRequest("EXPERIMENTAL_changes_in_block", params);
|
284
|
+
}
|
285
|
+
async function experimentalCongestionLevel(client, params) {
|
286
|
+
return client.makeRequest("EXPERIMENTAL_congestion_level", params);
|
287
|
+
}
|
288
|
+
async function experimentalGenesisConfig(client, params) {
|
289
|
+
return client.makeRequest("EXPERIMENTAL_genesis_config", params);
|
290
|
+
}
|
291
|
+
async function experimentalLightClientBlockProof(client, params) {
|
292
|
+
return client.makeRequest("EXPERIMENTAL_light_client_block_proof", params);
|
293
|
+
}
|
294
|
+
async function experimentalLightClientProof(client, params) {
|
295
|
+
return client.makeRequest("EXPERIMENTAL_light_client_proof", params);
|
296
|
+
}
|
297
|
+
async function experimentalMaintenanceWindows(client, params) {
|
298
|
+
return client.makeRequest("EXPERIMENTAL_maintenance_windows", params);
|
299
|
+
}
|
300
|
+
async function experimentalProtocolConfig(client, params) {
|
301
|
+
return client.makeRequest("EXPERIMENTAL_protocol_config", params);
|
302
|
+
}
|
303
|
+
async function experimentalReceipt(client, params) {
|
304
|
+
return client.makeRequest("EXPERIMENTAL_receipt", params);
|
305
|
+
}
|
306
|
+
async function experimentalSplitStorageInfo(client, params) {
|
307
|
+
return client.makeRequest("EXPERIMENTAL_split_storage_info", params);
|
308
|
+
}
|
309
|
+
async function experimentalTxStatus(client, params) {
|
310
|
+
return client.makeRequest("EXPERIMENTAL_tx_status", params);
|
311
|
+
}
|
312
|
+
async function experimentalValidatorsOrdered(client, params) {
|
313
|
+
return client.makeRequest("EXPERIMENTAL_validators_ordered", params);
|
314
|
+
}
|
315
|
+
async function block(client, params) {
|
316
|
+
return client.makeRequest("block", params);
|
317
|
+
}
|
318
|
+
async function blockEffects(client, params) {
|
319
|
+
return client.makeRequest("block_effects", params);
|
320
|
+
}
|
321
|
+
async function broadcastTxAsync(client, params) {
|
322
|
+
return client.makeRequest("broadcast_tx_async", params);
|
323
|
+
}
|
324
|
+
async function broadcastTxCommit(client, params) {
|
325
|
+
return client.makeRequest("broadcast_tx_commit", params);
|
326
|
+
}
|
327
|
+
async function changes(client, params) {
|
328
|
+
return client.makeRequest("changes", params);
|
329
|
+
}
|
330
|
+
async function chunk(client, params) {
|
331
|
+
return client.makeRequest("chunk", params);
|
332
|
+
}
|
333
|
+
async function clientConfig(client, params) {
|
334
|
+
return client.makeRequest("client_config", params);
|
335
|
+
}
|
336
|
+
async function gasPrice(client, params) {
|
337
|
+
return client.makeRequest("gas_price", params);
|
338
|
+
}
|
339
|
+
async function genesisConfig(client, params) {
|
340
|
+
return client.makeRequest("genesis_config", params);
|
341
|
+
}
|
342
|
+
async function health(client, params) {
|
343
|
+
return client.makeRequest("health", params);
|
344
|
+
}
|
345
|
+
async function lightClientProof(client, params) {
|
346
|
+
return client.makeRequest("light_client_proof", params);
|
347
|
+
}
|
348
|
+
async function maintenanceWindows(client, params) {
|
349
|
+
return client.makeRequest("maintenance_windows", params);
|
350
|
+
}
|
351
|
+
async function networkInfo(client, params) {
|
352
|
+
return client.makeRequest("network_info", params);
|
353
|
+
}
|
354
|
+
async function nextLightClientBlock(client, params) {
|
355
|
+
return client.makeRequest("next_light_client_block", params);
|
356
|
+
}
|
357
|
+
async function query(client, params) {
|
358
|
+
return client.makeRequest("query", params);
|
359
|
+
}
|
360
|
+
async function sendTx(client, params) {
|
361
|
+
return client.makeRequest("send_tx", params);
|
362
|
+
}
|
363
|
+
async function status(client, params) {
|
364
|
+
return client.makeRequest("status", params);
|
365
|
+
}
|
366
|
+
async function tx(client, params) {
|
367
|
+
return client.makeRequest("tx", params);
|
368
|
+
}
|
369
|
+
async function validators(client, params) {
|
370
|
+
return client.makeRequest("validators", params);
|
371
|
+
}
|
372
|
+
|
373
|
+
// src/convenience.ts
|
374
|
+
async function viewAccount(client, params) {
|
375
|
+
const queryParams = params.blockId ? {
|
376
|
+
requestType: "view_account",
|
377
|
+
accountId: params.accountId,
|
378
|
+
blockId: params.blockId
|
379
|
+
} : {
|
380
|
+
requestType: "view_account",
|
381
|
+
accountId: params.accountId,
|
382
|
+
finality: params.finality || "final"
|
383
|
+
};
|
384
|
+
return query(client, queryParams);
|
385
|
+
}
|
386
|
+
async function viewFunction(client, params) {
|
387
|
+
const baseParams = {
|
388
|
+
requestType: "call_function",
|
389
|
+
accountId: params.accountId,
|
390
|
+
methodName: params.methodName,
|
391
|
+
argsBase64: params.argsBase64 ?? ""
|
392
|
+
// Default to empty string if no arguments
|
393
|
+
};
|
394
|
+
const queryParams = params.blockId ? { ...baseParams, blockId: params.blockId } : { ...baseParams, finality: params.finality || "final" };
|
395
|
+
return query(client, queryParams);
|
396
|
+
}
|
397
|
+
async function viewAccessKey(client, params) {
|
398
|
+
const queryParams = params.blockId ? {
|
399
|
+
requestType: "view_access_key",
|
400
|
+
accountId: params.accountId,
|
401
|
+
publicKey: params.publicKey,
|
402
|
+
blockId: params.blockId
|
403
|
+
} : {
|
404
|
+
requestType: "view_access_key",
|
405
|
+
accountId: params.accountId,
|
406
|
+
publicKey: params.publicKey,
|
407
|
+
finality: params.finality || "final"
|
408
|
+
};
|
409
|
+
return query(client, queryParams);
|
410
|
+
}
|
411
|
+
function parseCallResultToJson(callResult) {
|
412
|
+
const bytes = new Uint8Array(callResult.result);
|
413
|
+
const text = new TextDecoder().decode(bytes);
|
414
|
+
return JSON.parse(text);
|
415
|
+
}
|
416
|
+
async function viewFunctionAsJson(client, params) {
|
417
|
+
const result = await viewFunction(client, params);
|
418
|
+
return parseCallResultToJson(result);
|
419
|
+
}
|
420
|
+
|
421
|
+
// src/no-validation/index.ts
|
422
|
+
var import_jsonrpc_types = require("@psalomo/jsonrpc-types");
|
423
|
+
var import_jsonrpc_types2 = require("@psalomo/jsonrpc-types");
|
424
|
+
function enableValidation() {
|
425
|
+
}
|
426
|
+
// Annotate the CommonJS export names for ESM import in node:
|
427
|
+
0 && (module.exports = {
|
428
|
+
JsonRpcRequestSchema,
|
429
|
+
JsonRpcResponseSchema,
|
430
|
+
NearRpcClient,
|
431
|
+
NearRpcError,
|
432
|
+
RPC_METHODS,
|
433
|
+
block,
|
434
|
+
blockEffects,
|
435
|
+
broadcastTxAsync,
|
436
|
+
broadcastTxCommit,
|
437
|
+
changes,
|
438
|
+
chunk,
|
439
|
+
clientConfig,
|
440
|
+
defaultClient,
|
441
|
+
enableValidation,
|
442
|
+
experimentalChanges,
|
443
|
+
experimentalChangesInBlock,
|
444
|
+
experimentalCongestionLevel,
|
445
|
+
experimentalGenesisConfig,
|
446
|
+
experimentalLightClientBlockProof,
|
447
|
+
experimentalLightClientProof,
|
448
|
+
experimentalMaintenanceWindows,
|
449
|
+
experimentalProtocolConfig,
|
450
|
+
experimentalReceipt,
|
451
|
+
experimentalSplitStorageInfo,
|
452
|
+
experimentalTxStatus,
|
453
|
+
experimentalValidatorsOrdered,
|
454
|
+
gasPrice,
|
455
|
+
genesisConfig,
|
456
|
+
health,
|
457
|
+
lightClientProof,
|
458
|
+
maintenanceWindows,
|
459
|
+
networkInfo,
|
460
|
+
nextLightClientBlock,
|
461
|
+
parseCallResultToJson,
|
462
|
+
query,
|
463
|
+
sendTx,
|
464
|
+
status,
|
465
|
+
tx,
|
466
|
+
validators,
|
467
|
+
viewAccessKey,
|
468
|
+
viewAccount,
|
469
|
+
viewFunction,
|
470
|
+
viewFunctionAsJson
|
471
|
+
});
|
@@ -0,0 +1,95 @@
|
|
1
|
+
import {
|
2
|
+
NearRpcClient,
|
3
|
+
NearRpcError,
|
4
|
+
block,
|
5
|
+
blockEffects,
|
6
|
+
broadcastTxAsync,
|
7
|
+
broadcastTxCommit,
|
8
|
+
changes,
|
9
|
+
chunk,
|
10
|
+
clientConfig,
|
11
|
+
defaultClient,
|
12
|
+
experimentalChanges,
|
13
|
+
experimentalChangesInBlock,
|
14
|
+
experimentalCongestionLevel,
|
15
|
+
experimentalGenesisConfig,
|
16
|
+
experimentalLightClientBlockProof,
|
17
|
+
experimentalLightClientProof,
|
18
|
+
experimentalMaintenanceWindows,
|
19
|
+
experimentalProtocolConfig,
|
20
|
+
experimentalReceipt,
|
21
|
+
experimentalSplitStorageInfo,
|
22
|
+
experimentalTxStatus,
|
23
|
+
experimentalValidatorsOrdered,
|
24
|
+
gasPrice,
|
25
|
+
genesisConfig,
|
26
|
+
health,
|
27
|
+
lightClientProof,
|
28
|
+
maintenanceWindows,
|
29
|
+
networkInfo,
|
30
|
+
nextLightClientBlock,
|
31
|
+
parseCallResultToJson,
|
32
|
+
query,
|
33
|
+
sendTx,
|
34
|
+
status,
|
35
|
+
tx,
|
36
|
+
validators,
|
37
|
+
viewAccessKey,
|
38
|
+
viewAccount,
|
39
|
+
viewFunction,
|
40
|
+
viewFunctionAsJson
|
41
|
+
} from "../chunk-GCIU6ZLN.mjs";
|
42
|
+
|
43
|
+
// src/no-validation/index.ts
|
44
|
+
import { RPC_METHODS } from "@psalomo/jsonrpc-types";
|
45
|
+
import {
|
46
|
+
JsonRpcRequestSchema,
|
47
|
+
JsonRpcResponseSchema
|
48
|
+
} from "@psalomo/jsonrpc-types";
|
49
|
+
function enableValidation() {
|
50
|
+
}
|
51
|
+
export {
|
52
|
+
JsonRpcRequestSchema,
|
53
|
+
JsonRpcResponseSchema,
|
54
|
+
NearRpcClient,
|
55
|
+
NearRpcError,
|
56
|
+
RPC_METHODS,
|
57
|
+
block,
|
58
|
+
blockEffects,
|
59
|
+
broadcastTxAsync,
|
60
|
+
broadcastTxCommit,
|
61
|
+
changes,
|
62
|
+
chunk,
|
63
|
+
clientConfig,
|
64
|
+
defaultClient,
|
65
|
+
enableValidation,
|
66
|
+
experimentalChanges,
|
67
|
+
experimentalChangesInBlock,
|
68
|
+
experimentalCongestionLevel,
|
69
|
+
experimentalGenesisConfig,
|
70
|
+
experimentalLightClientBlockProof,
|
71
|
+
experimentalLightClientProof,
|
72
|
+
experimentalMaintenanceWindows,
|
73
|
+
experimentalProtocolConfig,
|
74
|
+
experimentalReceipt,
|
75
|
+
experimentalSplitStorageInfo,
|
76
|
+
experimentalTxStatus,
|
77
|
+
experimentalValidatorsOrdered,
|
78
|
+
gasPrice,
|
79
|
+
genesisConfig,
|
80
|
+
health,
|
81
|
+
lightClientProof,
|
82
|
+
maintenanceWindows,
|
83
|
+
networkInfo,
|
84
|
+
nextLightClientBlock,
|
85
|
+
parseCallResultToJson,
|
86
|
+
query,
|
87
|
+
sendTx,
|
88
|
+
status,
|
89
|
+
tx,
|
90
|
+
validators,
|
91
|
+
viewAccessKey,
|
92
|
+
viewAccount,
|
93
|
+
viewFunction,
|
94
|
+
viewFunctionAsJson
|
95
|
+
};
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import type { NearRpcClient } from '../client.js';
|
2
|
+
import type { AccessKeyView, AccountView, CallResult, CryptoHash, EXPERIMENTALMaintenanceWindowsResponse, EXPERIMENTALValidatorsOrderedResponse, GenesisConfig, GenesisConfigRequest, MaintenanceWindowsResponse, RpcBlockRequest, RpcBlockResponse, RpcChunkRequest, RpcChunkResponse, RpcClientConfigRequest, RpcClientConfigResponse, RpcCongestionLevelRequest, RpcCongestionLevelResponse, RpcGasPriceRequest, RpcGasPriceResponse, RpcHealthRequest, RpcHealthResponse, RpcLightClientBlockProofRequest, RpcLightClientBlockProofResponse, RpcLightClientExecutionProofRequest, RpcLightClientExecutionProofResponse, RpcLightClientNextBlockRequest, RpcLightClientNextBlockResponse, RpcMaintenanceWindowsRequest, RpcNetworkInfoRequest, RpcNetworkInfoResponse, RpcProtocolConfigRequest, RpcProtocolConfigResponse, RpcQueryRequest, RpcQueryResponse, RpcReceiptRequest, RpcReceiptResponse, RpcSendTransactionRequest, RpcSplitStorageInfoRequest, RpcSplitStorageInfoResponse, RpcStateChangesInBlockByTypeRequest, RpcStateChangesInBlockByTypeResponse, RpcStateChangesInBlockRequest, RpcStateChangesInBlockResponse, RpcStatusRequest, RpcStatusResponse, RpcTransactionResponse, RpcTransactionStatusRequest, RpcValidatorRequest, RpcValidatorResponse, RpcValidatorsOrderedRequest } from '@psalomo/jsonrpc-types';
|
3
|
+
export { parseCallResultToJson, viewFunctionAsJson } from '../convenience.js';
|
4
|
+
export declare function enableValidation(): void;
|
5
|
+
export declare function viewAccount(client: NearRpcClient, params: {
|
6
|
+
accountId: string;
|
7
|
+
finality?: 'final' | 'near-final' | 'optimistic';
|
8
|
+
blockId?: string | number;
|
9
|
+
}): Promise<AccountView>;
|
10
|
+
export declare function viewFunction(client: NearRpcClient, params: {
|
11
|
+
accountId: string;
|
12
|
+
methodName: string;
|
13
|
+
argsBase64?: string;
|
14
|
+
finality?: 'final' | 'near-final' | 'optimistic';
|
15
|
+
blockId?: string | number;
|
16
|
+
}): Promise<CallResult>;
|
17
|
+
export declare function viewAccessKey(client: NearRpcClient, params: {
|
18
|
+
accountId: string;
|
19
|
+
publicKey: string;
|
20
|
+
finality?: 'final' | 'near-final' | 'optimistic';
|
21
|
+
blockId?: string | number;
|
22
|
+
}): Promise<AccessKeyView>;
|
23
|
+
export declare function experimentalChanges(client: NearRpcClient, params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
|
24
|
+
export declare function experimentalChangesInBlock(client: NearRpcClient, params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
|
25
|
+
export declare function experimentalCongestionLevel(client: NearRpcClient, params?: RpcCongestionLevelRequest): Promise<RpcCongestionLevelResponse>;
|
26
|
+
export declare function experimentalGenesisConfig(client: NearRpcClient, params?: GenesisConfigRequest): Promise<GenesisConfig>;
|
27
|
+
export declare function experimentalLightClientBlockProof(client: NearRpcClient, params?: RpcLightClientBlockProofRequest): Promise<RpcLightClientBlockProofResponse>;
|
28
|
+
export declare function experimentalLightClientProof(client: NearRpcClient, params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
|
29
|
+
export declare function experimentalMaintenanceWindows(client: NearRpcClient, params?: RpcMaintenanceWindowsRequest): Promise<EXPERIMENTALMaintenanceWindowsResponse>;
|
30
|
+
export declare function experimentalProtocolConfig(client: NearRpcClient, params?: RpcProtocolConfigRequest): Promise<RpcProtocolConfigResponse>;
|
31
|
+
export declare function experimentalReceipt(client: NearRpcClient, params?: RpcReceiptRequest): Promise<RpcReceiptResponse>;
|
32
|
+
export declare function experimentalSplitStorageInfo(client: NearRpcClient, params?: RpcSplitStorageInfoRequest): Promise<RpcSplitStorageInfoResponse>;
|
33
|
+
export declare function experimentalTxStatus(client: NearRpcClient, params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
|
34
|
+
export declare function experimentalValidatorsOrdered(client: NearRpcClient, params?: RpcValidatorsOrderedRequest): Promise<EXPERIMENTALValidatorsOrderedResponse>;
|
35
|
+
export declare function block(client: NearRpcClient, params?: RpcBlockRequest): Promise<RpcBlockResponse>;
|
36
|
+
export declare function blockEffects(client: NearRpcClient, params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
|
37
|
+
export declare function broadcastTxAsync(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<CryptoHash>;
|
38
|
+
export declare function broadcastTxCommit(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
|
39
|
+
export declare function changes(client: NearRpcClient, params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
|
40
|
+
export declare function chunk(client: NearRpcClient, params?: RpcChunkRequest): Promise<RpcChunkResponse>;
|
41
|
+
export declare function clientConfig(client: NearRpcClient, params?: RpcClientConfigRequest): Promise<RpcClientConfigResponse>;
|
42
|
+
export declare function gasPrice(client: NearRpcClient, params?: RpcGasPriceRequest): Promise<RpcGasPriceResponse>;
|
43
|
+
export declare function genesisConfig(client: NearRpcClient, params?: GenesisConfigRequest): Promise<GenesisConfig>;
|
44
|
+
export declare function health(client: NearRpcClient, params?: RpcHealthRequest): Promise<RpcHealthResponse>;
|
45
|
+
export declare function lightClientProof(client: NearRpcClient, params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
|
46
|
+
export declare function maintenanceWindows(client: NearRpcClient, params?: RpcMaintenanceWindowsRequest): Promise<MaintenanceWindowsResponse>;
|
47
|
+
export declare function networkInfo(client: NearRpcClient, params?: RpcNetworkInfoRequest): Promise<RpcNetworkInfoResponse>;
|
48
|
+
export declare function nextLightClientBlock(client: NearRpcClient, params?: RpcLightClientNextBlockRequest): Promise<RpcLightClientNextBlockResponse>;
|
49
|
+
export declare function query(client: NearRpcClient, params?: RpcQueryRequest): Promise<RpcQueryResponse>;
|
50
|
+
export declare function sendTx(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
|
51
|
+
export declare function status(client: NearRpcClient, params?: RpcStatusRequest): Promise<RpcStatusResponse>;
|
52
|
+
export declare function tx(client: NearRpcClient, params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
|
53
|
+
export declare function validators(client: NearRpcClient, params?: RpcValidatorRequest): Promise<RpcValidatorResponse>;
|
54
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validated/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,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;AAiDhC,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG9E,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAGD,wBAAsB,WAAW,CAC/B,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE;IACN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,sBAAsB,CAAC,CAwBjC;AAED,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,8BAA8B,GACtC,OAAO,CAAC,+BAA+B,CAAC,CAwB1C;AAED,wBAAsB,KAAK,CACzB,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,gBAAgB,CAAC,CAwB3B;AAED,wBAAsB,MAAM,CAC1B,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,yBAAyB,GACjC,OAAO,CAAC,sBAAsB,CAAC,CAwBjC;AAED,wBAAsB,MAAM,CAC1B,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAwB5B;AAED,wBAAsB,EAAE,CACtB,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,2BAA2B,GACnC,OAAO,CAAC,sBAAsB,CAAC,CAwBjC;AAED,wBAAsB,UAAU,CAC9B,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAAC,oBAAoB,CAAC,CAwB/B"}
|
package/dist/validation.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,cAAc,EACd,eAAe,EAGhB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,gBAAgB;IAC/B,eAAe,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IACnD,gBAAgB,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,CAAC;IACtD,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1E,sBAAsB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,KAAK,IAAI,CAAC;CAC9E;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,gBAAgB,
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../src/validation.ts"],"names":[],"mappings":"AAMA,OAAO,EACL,cAAc,EACd,eAAe,EAGhB,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,gBAAgB;IAC/B,eAAe,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IACnD,gBAAgB,EAAE,CAAC,QAAQ,EAAE,eAAe,KAAK,IAAI,CAAC;IACtD,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1E,sBAAsB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,KAAK,IAAI,CAAC;CAC9E;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,gBAAgB,CAoFnD"}
|