@0xsequence/metadata 2.2.14 → 2.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.
- package/dist/0xsequence-metadata.cjs.dev.js +255 -158
- package/dist/0xsequence-metadata.cjs.prod.js +255 -158
- package/dist/0xsequence-metadata.esm.js +253 -159
- package/dist/declarations/src/metadata.gen.d.ts +418 -225
- package/package.json +1 -1
- package/src/metadata.gen.ts +754 -466
|
@@ -13,14 +13,14 @@ function _extends() {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/* eslint-disable */
|
|
16
|
-
// sequence-metadata v0.4.0
|
|
16
|
+
// sequence-metadata v0.4.0 7910b31b7ff3c61ec7cf9fe4021ac00e9f9eeea5
|
|
17
17
|
// --
|
|
18
|
-
// Code generated by webrpc-gen@v0.
|
|
18
|
+
// Code generated by webrpc-gen@v0.25.2 with typescript generator. DO NOT EDIT.
|
|
19
19
|
//
|
|
20
20
|
// webrpc-gen -schema=metadata.ridl -target=typescript -client -out=./clients/metadata.gen.ts
|
|
21
21
|
|
|
22
22
|
const WebrpcHeader = 'Webrpc';
|
|
23
|
-
const WebrpcHeaderValue = 'webrpc@v0.
|
|
23
|
+
const WebrpcHeaderValue = 'webrpc@v0.25.2;gen-typescript@v0.17.0;sequence-metadata@v0.4.0';
|
|
24
24
|
|
|
25
25
|
// WebRPC description and code-gen version
|
|
26
26
|
const WebRPCVersion = 'v1';
|
|
@@ -29,7 +29,7 @@ const WebRPCVersion = 'v1';
|
|
|
29
29
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
30
30
|
|
|
31
31
|
// Schema hash generated from your RIDL schema
|
|
32
|
-
const WebRPCSchemaHash = '
|
|
32
|
+
const WebRPCSchemaHash = '7910b31b7ff3c61ec7cf9fe4021ac00e9f9eeea5';
|
|
33
33
|
function VersionFromHeader(headers) {
|
|
34
34
|
const headerValue = headers.get(WebrpcHeader);
|
|
35
35
|
if (!headerValue) {
|
|
@@ -58,11 +58,11 @@ function parseWebrpcGenVersions(header) {
|
|
|
58
58
|
const [codeGenName, codeGenVersion] = versions[1].split('@');
|
|
59
59
|
const [schemaName, schemaVersion] = versions[2].split('@');
|
|
60
60
|
return {
|
|
61
|
-
webrpcGenVersion,
|
|
62
|
-
codeGenName,
|
|
63
|
-
codeGenVersion,
|
|
64
|
-
schemaName,
|
|
65
|
-
schemaVersion
|
|
61
|
+
webrpcGenVersion: webrpcGenVersion != null ? webrpcGenVersion : '',
|
|
62
|
+
codeGenName: codeGenName != null ? codeGenName : '',
|
|
63
|
+
codeGenVersion: codeGenVersion != null ? codeGenVersion : '',
|
|
64
|
+
schemaName: schemaName != null ? schemaName : '',
|
|
65
|
+
schemaVersion: schemaVersion != null ? schemaVersion : ''
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -91,12 +91,14 @@ let Source = /*#__PURE__*/function (Source) {
|
|
|
91
91
|
Source["TOKEN_DIRECTORY_SEQUENCE_GITHUB"] = "TOKEN_DIRECTORY_SEQUENCE_GITHUB";
|
|
92
92
|
Source["TOKEN_DIRECTORY_SEQUENCE_BUILDER"] = "TOKEN_DIRECTORY_SEQUENCE_BUILDER";
|
|
93
93
|
Source["SEQUENCE_BUILDER"] = "SEQUENCE_BUILDER";
|
|
94
|
+
Source["SEQUENCE_BUILDER_DEPLOYED"] = "SEQUENCE_BUILDER_DEPLOYED";
|
|
94
95
|
Source["SEQUENCE_BUILDER_COLLECTIONS"] = "SEQUENCE_BUILDER_COLLECTIONS";
|
|
96
|
+
Source["SEQUENCE_BUILDER_ADMIN"] = "SEQUENCE_BUILDER_ADMIN";
|
|
95
97
|
return Source;
|
|
96
98
|
}({});
|
|
97
99
|
let ResourceStatus = /*#__PURE__*/function (ResourceStatus) {
|
|
98
100
|
ResourceStatus["NOT_AVAILABLE"] = "NOT_AVAILABLE";
|
|
99
|
-
ResourceStatus["
|
|
101
|
+
ResourceStatus["REFRESHING"] = "REFRESHING";
|
|
100
102
|
ResourceStatus["AVAILABLE"] = "AVAILABLE";
|
|
101
103
|
return ResourceStatus;
|
|
102
104
|
}({});
|
|
@@ -117,7 +119,7 @@ let TaskStatus = /*#__PURE__*/function (TaskStatus) {
|
|
|
117
119
|
TaskStatus["QUEUED"] = "QUEUED";
|
|
118
120
|
TaskStatus["PAUSED"] = "PAUSED";
|
|
119
121
|
TaskStatus["FAILED"] = "FAILED";
|
|
120
|
-
TaskStatus["
|
|
122
|
+
TaskStatus["DONE"] = "DONE";
|
|
121
123
|
return TaskStatus;
|
|
122
124
|
}({});
|
|
123
125
|
//
|
|
@@ -193,24 +195,12 @@ class Metadata {
|
|
|
193
195
|
});
|
|
194
196
|
});
|
|
195
197
|
};
|
|
196
|
-
this.
|
|
197
|
-
return this.fetch(this.url('
|
|
198
|
-
return buildResponse(res).then(_data => {
|
|
199
|
-
return {
|
|
200
|
-
taskId: _data.taskId
|
|
201
|
-
};
|
|
202
|
-
});
|
|
203
|
-
}, error => {
|
|
204
|
-
throw WebrpcRequestFailedError.new({
|
|
205
|
-
cause: `fetch(): ${error.message || ''}`
|
|
206
|
-
});
|
|
207
|
-
});
|
|
208
|
-
};
|
|
209
|
-
this.enqueueTokensForRefresh = (args, headers, signal) => {
|
|
210
|
-
return this.fetch(this.url('EnqueueTokensForRefresh'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
198
|
+
this.getContractInfo = (args, headers, signal) => {
|
|
199
|
+
return this.fetch(this.url('GetContractInfo'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
211
200
|
return buildResponse(res).then(_data => {
|
|
212
201
|
return {
|
|
213
|
-
|
|
202
|
+
contractInfo: _data.contractInfo,
|
|
203
|
+
taskID: _data.taskID
|
|
214
204
|
};
|
|
215
205
|
});
|
|
216
206
|
}, error => {
|
|
@@ -219,11 +209,12 @@ class Metadata {
|
|
|
219
209
|
});
|
|
220
210
|
});
|
|
221
211
|
};
|
|
222
|
-
this.
|
|
223
|
-
return this.fetch(this.url('
|
|
212
|
+
this.getContractInfoBatch = (args, headers, signal) => {
|
|
213
|
+
return this.fetch(this.url('GetContractInfoBatch'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
224
214
|
return buildResponse(res).then(_data => {
|
|
225
215
|
return {
|
|
226
|
-
|
|
216
|
+
contractInfoMap: _data.contractInfoMap,
|
|
217
|
+
taskID: _data.taskID
|
|
227
218
|
};
|
|
228
219
|
});
|
|
229
220
|
}, error => {
|
|
@@ -232,13 +223,11 @@ class Metadata {
|
|
|
232
223
|
});
|
|
233
224
|
});
|
|
234
225
|
};
|
|
235
|
-
this.
|
|
236
|
-
return this.fetch(this.url('
|
|
226
|
+
this.findContractInfo = (args, headers, signal) => {
|
|
227
|
+
return this.fetch(this.url('FindContractInfo'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
237
228
|
return buildResponse(res).then(_data => {
|
|
238
229
|
return {
|
|
239
|
-
|
|
240
|
-
tokens: _data.tokens,
|
|
241
|
-
failureReasons: _data.failureReasons
|
|
230
|
+
contractInfoList: _data.contractInfoList
|
|
242
231
|
};
|
|
243
232
|
});
|
|
244
233
|
}, error => {
|
|
@@ -247,11 +236,11 @@ class Metadata {
|
|
|
247
236
|
});
|
|
248
237
|
});
|
|
249
238
|
};
|
|
250
|
-
this.
|
|
251
|
-
return this.fetch(this.url('
|
|
239
|
+
this.findContractInfoBatch = (args, headers, signal) => {
|
|
240
|
+
return this.fetch(this.url('FindContractInfoBatch'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
252
241
|
return buildResponse(res).then(_data => {
|
|
253
242
|
return {
|
|
254
|
-
|
|
243
|
+
contractInfoByChain: _data.contractInfoByChain
|
|
255
244
|
};
|
|
256
245
|
});
|
|
257
246
|
}, error => {
|
|
@@ -263,7 +252,9 @@ class Metadata {
|
|
|
263
252
|
this.refreshContractInfo = (args, headers, signal) => {
|
|
264
253
|
return this.fetch(this.url('RefreshContractInfo'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
265
254
|
return buildResponse(res).then(_data => {
|
|
266
|
-
return {
|
|
255
|
+
return {
|
|
256
|
+
taskID: _data.taskID
|
|
257
|
+
};
|
|
267
258
|
});
|
|
268
259
|
}, error => {
|
|
269
260
|
throw WebrpcRequestFailedError.new({
|
|
@@ -271,8 +262,8 @@ class Metadata {
|
|
|
271
262
|
});
|
|
272
263
|
});
|
|
273
264
|
};
|
|
274
|
-
this.
|
|
275
|
-
return this.fetch(this.url('
|
|
265
|
+
this.refreshContractInfoBatch = (args, headers, signal) => {
|
|
266
|
+
return this.fetch(this.url('RefreshContractInfoBatch'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
276
267
|
return buildResponse(res).then(_data => {
|
|
277
268
|
return {
|
|
278
269
|
taskID: _data.taskID
|
|
@@ -284,12 +275,12 @@ class Metadata {
|
|
|
284
275
|
});
|
|
285
276
|
});
|
|
286
277
|
};
|
|
287
|
-
this.
|
|
288
|
-
return this.fetch(this.url('
|
|
278
|
+
this.searchContractsByQuery = (args, headers, signal) => {
|
|
279
|
+
return this.fetch(this.url('SearchContractsByQuery'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
289
280
|
return buildResponse(res).then(_data => {
|
|
290
281
|
return {
|
|
291
|
-
|
|
292
|
-
|
|
282
|
+
contractInfo: _data.contractInfo,
|
|
283
|
+
nextPage: _data.nextPage
|
|
293
284
|
};
|
|
294
285
|
});
|
|
295
286
|
}, error => {
|
|
@@ -298,12 +289,11 @@ class Metadata {
|
|
|
298
289
|
});
|
|
299
290
|
});
|
|
300
291
|
};
|
|
301
|
-
this.
|
|
302
|
-
return this.fetch(this.url('
|
|
292
|
+
this.searchContractInfo = (args, headers, signal) => {
|
|
293
|
+
return this.fetch(this.url('SearchContractInfo'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
303
294
|
return buildResponse(res).then(_data => {
|
|
304
295
|
return {
|
|
305
|
-
|
|
306
|
-
taskID: _data.taskID
|
|
296
|
+
contractInfoList: _data.contractInfoList
|
|
307
297
|
};
|
|
308
298
|
});
|
|
309
299
|
}, error => {
|
|
@@ -312,12 +302,11 @@ class Metadata {
|
|
|
312
302
|
});
|
|
313
303
|
});
|
|
314
304
|
};
|
|
315
|
-
this.
|
|
316
|
-
return this.fetch(this.url('
|
|
305
|
+
this.searchContractInfoBatch = (args, headers, signal) => {
|
|
306
|
+
return this.fetch(this.url('SearchContractInfoBatch'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
317
307
|
return buildResponse(res).then(_data => {
|
|
318
308
|
return {
|
|
319
|
-
|
|
320
|
-
taskID: _data.taskID
|
|
309
|
+
contractInfoByChain: _data.contractInfoByChain
|
|
321
310
|
};
|
|
322
311
|
});
|
|
323
312
|
}, error => {
|
|
@@ -326,12 +315,12 @@ class Metadata {
|
|
|
326
315
|
});
|
|
327
316
|
});
|
|
328
317
|
};
|
|
329
|
-
this.
|
|
330
|
-
return this.fetch(this.url('
|
|
318
|
+
this.searchContracts = (args, headers, signal) => {
|
|
319
|
+
return this.fetch(this.url('SearchContracts'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
331
320
|
return buildResponse(res).then(_data => {
|
|
332
321
|
return {
|
|
333
|
-
|
|
334
|
-
|
|
322
|
+
contractInfo: _data.contractInfo,
|
|
323
|
+
nextPage: _data.nextPage
|
|
335
324
|
};
|
|
336
325
|
});
|
|
337
326
|
}, error => {
|
|
@@ -340,12 +329,12 @@ class Metadata {
|
|
|
340
329
|
});
|
|
341
330
|
});
|
|
342
331
|
};
|
|
343
|
-
this.
|
|
344
|
-
return this.fetch(this.url('
|
|
332
|
+
this.searchMetadata = (args, headers, signal) => {
|
|
333
|
+
return this.fetch(this.url('SearchMetadata'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
345
334
|
return buildResponse(res).then(_data => {
|
|
346
335
|
return {
|
|
347
|
-
|
|
348
|
-
|
|
336
|
+
tokenMetadata: _data.tokenMetadata,
|
|
337
|
+
contractInfo: _data.contractInfo
|
|
349
338
|
};
|
|
350
339
|
});
|
|
351
340
|
}, error => {
|
|
@@ -354,11 +343,12 @@ class Metadata {
|
|
|
354
343
|
});
|
|
355
344
|
});
|
|
356
345
|
};
|
|
357
|
-
this.
|
|
358
|
-
return this.fetch(this.url('
|
|
346
|
+
this.getTokenMetadata = (args, headers, signal) => {
|
|
347
|
+
return this.fetch(this.url('GetTokenMetadata'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
359
348
|
return buildResponse(res).then(_data => {
|
|
360
349
|
return {
|
|
361
|
-
|
|
350
|
+
tokenMetadata: _data.tokenMetadata,
|
|
351
|
+
taskID: _data.taskID
|
|
362
352
|
};
|
|
363
353
|
});
|
|
364
354
|
}, error => {
|
|
@@ -367,11 +357,11 @@ class Metadata {
|
|
|
367
357
|
});
|
|
368
358
|
});
|
|
369
359
|
};
|
|
370
|
-
this.
|
|
371
|
-
return this.fetch(this.url('
|
|
360
|
+
this.getTokenMetadataBatch = (args, headers, signal) => {
|
|
361
|
+
return this.fetch(this.url('GetTokenMetadataBatch'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
372
362
|
return buildResponse(res).then(_data => {
|
|
373
363
|
return {
|
|
374
|
-
|
|
364
|
+
contractTokenMetadata: _data.contractTokenMetadata,
|
|
375
365
|
taskID: _data.taskID
|
|
376
366
|
};
|
|
377
367
|
});
|
|
@@ -381,11 +371,10 @@ class Metadata {
|
|
|
381
371
|
});
|
|
382
372
|
});
|
|
383
373
|
};
|
|
384
|
-
this.
|
|
385
|
-
return this.fetch(this.url('
|
|
374
|
+
this.refreshTokenMetadata = (args, headers, signal) => {
|
|
375
|
+
return this.fetch(this.url('RefreshTokenMetadata'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
386
376
|
return buildResponse(res).then(_data => {
|
|
387
377
|
return {
|
|
388
|
-
contractInfoMap: _data.contractInfoMap,
|
|
389
378
|
taskID: _data.taskID
|
|
390
379
|
};
|
|
391
380
|
});
|
|
@@ -395,11 +384,12 @@ class Metadata {
|
|
|
395
384
|
});
|
|
396
385
|
});
|
|
397
386
|
};
|
|
398
|
-
this.
|
|
399
|
-
return this.fetch(this.url('
|
|
387
|
+
this.searchTokenMetadataByQuery = (args, headers, signal) => {
|
|
388
|
+
return this.fetch(this.url('SearchTokenMetadataByQuery'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
400
389
|
return buildResponse(res).then(_data => {
|
|
401
390
|
return {
|
|
402
|
-
|
|
391
|
+
tokenMetadata: _data.tokenMetadata,
|
|
392
|
+
nextPage: _data.nextPage
|
|
403
393
|
};
|
|
404
394
|
});
|
|
405
395
|
}, error => {
|
|
@@ -408,11 +398,12 @@ class Metadata {
|
|
|
408
398
|
});
|
|
409
399
|
});
|
|
410
400
|
};
|
|
411
|
-
this.
|
|
412
|
-
return this.fetch(this.url('
|
|
401
|
+
this.searchTokenMetadata = (args, headers, signal) => {
|
|
402
|
+
return this.fetch(this.url('SearchTokenMetadata'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
413
403
|
return buildResponse(res).then(_data => {
|
|
414
404
|
return {
|
|
415
|
-
|
|
405
|
+
page: _data.page,
|
|
406
|
+
tokenMetadata: _data.tokenMetadata
|
|
416
407
|
};
|
|
417
408
|
});
|
|
418
409
|
}, error => {
|
|
@@ -421,12 +412,12 @@ class Metadata {
|
|
|
421
412
|
});
|
|
422
413
|
});
|
|
423
414
|
};
|
|
424
|
-
this.
|
|
425
|
-
return this.fetch(this.url('
|
|
415
|
+
this.searchTokenMetadataTokenIDs = (args, headers, signal) => {
|
|
416
|
+
return this.fetch(this.url('SearchTokenMetadataTokenIDs'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
426
417
|
return buildResponse(res).then(_data => {
|
|
427
418
|
return {
|
|
428
|
-
|
|
429
|
-
|
|
419
|
+
page: _data.page,
|
|
420
|
+
tokenIDs: _data.tokenIDs
|
|
430
421
|
};
|
|
431
422
|
});
|
|
432
423
|
}, error => {
|
|
@@ -435,12 +426,11 @@ class Metadata {
|
|
|
435
426
|
});
|
|
436
427
|
});
|
|
437
428
|
};
|
|
438
|
-
this.
|
|
439
|
-
return this.fetch(this.url('
|
|
429
|
+
this.getTokenMetadataPropertyFilters = (args, headers, signal) => {
|
|
430
|
+
return this.fetch(this.url('GetTokenMetadataPropertyFilters'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
440
431
|
return buildResponse(res).then(_data => {
|
|
441
432
|
return {
|
|
442
|
-
|
|
443
|
-
nextPage: _data.nextPage
|
|
433
|
+
filters: _data.filters
|
|
444
434
|
};
|
|
445
435
|
});
|
|
446
436
|
}, error => {
|
|
@@ -449,12 +439,12 @@ class Metadata {
|
|
|
449
439
|
});
|
|
450
440
|
});
|
|
451
441
|
};
|
|
452
|
-
this.
|
|
453
|
-
return this.fetch(this.url('
|
|
442
|
+
this.refreshAllContractTokens = (args, headers, signal) => {
|
|
443
|
+
return this.fetch(this.url('RefreshAllContractTokens'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
454
444
|
return buildResponse(res).then(_data => {
|
|
455
445
|
return {
|
|
456
|
-
|
|
457
|
-
|
|
446
|
+
taskID: _data.taskID,
|
|
447
|
+
retryAfter: _data.retryAfter
|
|
458
448
|
};
|
|
459
449
|
});
|
|
460
450
|
}, error => {
|
|
@@ -463,11 +453,12 @@ class Metadata {
|
|
|
463
453
|
});
|
|
464
454
|
});
|
|
465
455
|
};
|
|
466
|
-
this.
|
|
467
|
-
return this.fetch(this.url('
|
|
456
|
+
this.searchTokens = (args, headers, signal) => {
|
|
457
|
+
return this.fetch(this.url('SearchTokens'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
468
458
|
return buildResponse(res).then(_data => {
|
|
469
459
|
return {
|
|
470
|
-
|
|
460
|
+
tokenMetadata: _data.tokenMetadata,
|
|
461
|
+
nextPage: _data.nextPage
|
|
471
462
|
};
|
|
472
463
|
});
|
|
473
464
|
}, error => {
|
|
@@ -476,11 +467,11 @@ class Metadata {
|
|
|
476
467
|
});
|
|
477
468
|
});
|
|
478
469
|
};
|
|
479
|
-
this.
|
|
480
|
-
return this.fetch(this.url('
|
|
470
|
+
this.tokenCollectionFilters = (args, headers, signal) => {
|
|
471
|
+
return this.fetch(this.url('TokenCollectionFilters'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
481
472
|
return buildResponse(res).then(_data => {
|
|
482
473
|
return {
|
|
483
|
-
|
|
474
|
+
filters: _data.filters
|
|
484
475
|
};
|
|
485
476
|
});
|
|
486
477
|
}, error => {
|
|
@@ -489,11 +480,11 @@ class Metadata {
|
|
|
489
480
|
});
|
|
490
481
|
});
|
|
491
482
|
};
|
|
492
|
-
this.
|
|
493
|
-
return this.fetch(this.url('
|
|
483
|
+
this.getTokenRefreshStatus = (args, headers, signal) => {
|
|
484
|
+
return this.fetch(this.url('GetTokenRefreshStatus'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
494
485
|
return buildResponse(res).then(_data => {
|
|
495
486
|
return {
|
|
496
|
-
|
|
487
|
+
status: _data.status
|
|
497
488
|
};
|
|
498
489
|
});
|
|
499
490
|
}, error => {
|
|
@@ -502,11 +493,12 @@ class Metadata {
|
|
|
502
493
|
});
|
|
503
494
|
});
|
|
504
495
|
};
|
|
505
|
-
this.
|
|
506
|
-
return this.fetch(this.url('
|
|
496
|
+
this.searchTokenIDs = (args, headers, signal) => {
|
|
497
|
+
return this.fetch(this.url('SearchTokenIDs'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
507
498
|
return buildResponse(res).then(_data => {
|
|
508
499
|
return {
|
|
509
|
-
|
|
500
|
+
page: _data.page,
|
|
501
|
+
tokenIds: _data.tokenIds
|
|
510
502
|
};
|
|
511
503
|
});
|
|
512
504
|
}, error => {
|
|
@@ -515,11 +507,12 @@ class Metadata {
|
|
|
515
507
|
});
|
|
516
508
|
});
|
|
517
509
|
};
|
|
518
|
-
this.
|
|
519
|
-
return this.fetch(this.url('
|
|
510
|
+
this.getTokenDirectory = (args, headers, signal) => {
|
|
511
|
+
return this.fetch(this.url('GetTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
520
512
|
return buildResponse(res).then(_data => {
|
|
521
513
|
return {
|
|
522
|
-
|
|
514
|
+
collections: _data.collections,
|
|
515
|
+
page: _data.page
|
|
523
516
|
};
|
|
524
517
|
});
|
|
525
518
|
}, error => {
|
|
@@ -528,11 +521,12 @@ class Metadata {
|
|
|
528
521
|
});
|
|
529
522
|
});
|
|
530
523
|
};
|
|
531
|
-
this.
|
|
532
|
-
return this.fetch(this.url('
|
|
524
|
+
this.searchTokenDirectory = (args, headers, signal) => {
|
|
525
|
+
return this.fetch(this.url('SearchTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
533
526
|
return buildResponse(res).then(_data => {
|
|
534
527
|
return {
|
|
535
|
-
|
|
528
|
+
collections: _data.collections,
|
|
529
|
+
page: _data.page
|
|
536
530
|
};
|
|
537
531
|
});
|
|
538
532
|
}, error => {
|
|
@@ -541,11 +535,12 @@ class Metadata {
|
|
|
541
535
|
});
|
|
542
536
|
});
|
|
543
537
|
};
|
|
544
|
-
this.
|
|
545
|
-
return this.fetch(this.url('
|
|
538
|
+
this.getTokenDirectoryNetworks = (args, headers, signal) => {
|
|
539
|
+
return this.fetch(this.url('GetTokenDirectoryNetworks'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
546
540
|
return buildResponse(res).then(_data => {
|
|
547
541
|
return {
|
|
548
|
-
|
|
542
|
+
chainIDs: _data.chainIDs,
|
|
543
|
+
networks: _data.networks
|
|
549
544
|
};
|
|
550
545
|
});
|
|
551
546
|
}, error => {
|
|
@@ -554,11 +549,11 @@ class Metadata {
|
|
|
554
549
|
});
|
|
555
550
|
});
|
|
556
551
|
};
|
|
557
|
-
this.
|
|
558
|
-
return this.fetch(this.url('
|
|
552
|
+
this.directoryGetNetworks = (args, headers, signal) => {
|
|
553
|
+
return this.fetch(this.url('DirectoryGetNetworks'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
559
554
|
return buildResponse(res).then(_data => {
|
|
560
555
|
return {
|
|
561
|
-
|
|
556
|
+
networks: _data.networks
|
|
562
557
|
};
|
|
563
558
|
});
|
|
564
559
|
}, error => {
|
|
@@ -567,11 +562,12 @@ class Metadata {
|
|
|
567
562
|
});
|
|
568
563
|
});
|
|
569
564
|
};
|
|
570
|
-
this.
|
|
571
|
-
return this.fetch(this.url('
|
|
565
|
+
this.directoryGetCollections = (args, headers, signal) => {
|
|
566
|
+
return this.fetch(this.url('DirectoryGetCollections'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
572
567
|
return buildResponse(res).then(_data => {
|
|
573
568
|
return {
|
|
574
|
-
|
|
569
|
+
collections: _data.collections,
|
|
570
|
+
page: _data.page
|
|
575
571
|
};
|
|
576
572
|
});
|
|
577
573
|
}, error => {
|
|
@@ -580,12 +576,12 @@ class Metadata {
|
|
|
580
576
|
});
|
|
581
577
|
});
|
|
582
578
|
};
|
|
583
|
-
this.
|
|
584
|
-
return this.fetch(this.url('
|
|
579
|
+
this.directorySearchCollections = (args, headers, signal) => {
|
|
580
|
+
return this.fetch(this.url('DirectorySearchCollections'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
585
581
|
return buildResponse(res).then(_data => {
|
|
586
582
|
return {
|
|
587
|
-
|
|
588
|
-
|
|
583
|
+
collections: _data.collections,
|
|
584
|
+
page: _data.page
|
|
589
585
|
};
|
|
590
586
|
});
|
|
591
587
|
}, error => {
|
|
@@ -594,11 +590,11 @@ class Metadata {
|
|
|
594
590
|
});
|
|
595
591
|
});
|
|
596
592
|
};
|
|
597
|
-
this.
|
|
598
|
-
return this.fetch(this.url('
|
|
593
|
+
this.getNiftyswapTokenQuantity = (args, headers, signal) => {
|
|
594
|
+
return this.fetch(this.url('GetNiftyswapTokenQuantity'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
599
595
|
return buildResponse(res).then(_data => {
|
|
600
596
|
return {
|
|
601
|
-
|
|
597
|
+
quantity: _data.quantity
|
|
602
598
|
};
|
|
603
599
|
});
|
|
604
600
|
}, error => {
|
|
@@ -607,12 +603,11 @@ class Metadata {
|
|
|
607
603
|
});
|
|
608
604
|
});
|
|
609
605
|
};
|
|
610
|
-
this.
|
|
611
|
-
return this.fetch(this.url('
|
|
606
|
+
this.getNiftyswapUnitPrices = (args, headers, signal) => {
|
|
607
|
+
return this.fetch(this.url('GetNiftyswapUnitPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
612
608
|
return buildResponse(res).then(_data => {
|
|
613
609
|
return {
|
|
614
|
-
|
|
615
|
-
page: _data.page
|
|
610
|
+
prices: _data.prices
|
|
616
611
|
};
|
|
617
612
|
});
|
|
618
613
|
}, error => {
|
|
@@ -621,12 +616,11 @@ class Metadata {
|
|
|
621
616
|
});
|
|
622
617
|
});
|
|
623
618
|
};
|
|
624
|
-
this.
|
|
625
|
-
return this.fetch(this.url('
|
|
619
|
+
this.getNiftyswapUnitPricesWithQuantities = (args, headers, signal) => {
|
|
620
|
+
return this.fetch(this.url('GetNiftyswapUnitPricesWithQuantities'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
626
621
|
return buildResponse(res).then(_data => {
|
|
627
622
|
return {
|
|
628
|
-
|
|
629
|
-
page: _data.page
|
|
623
|
+
prices: _data.prices
|
|
630
624
|
};
|
|
631
625
|
});
|
|
632
626
|
}, error => {
|
|
@@ -938,6 +932,66 @@ class Admin {
|
|
|
938
932
|
this.hostname = void 0;
|
|
939
933
|
this.fetch = void 0;
|
|
940
934
|
this.path = '/rpc/Admin/';
|
|
935
|
+
this.getContractInfoOverrides = (args, headers, signal) => {
|
|
936
|
+
return this.fetch(this.url('GetContractInfoOverrides'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
937
|
+
return buildResponse(res).then(_data => {
|
|
938
|
+
return {
|
|
939
|
+
contractInfoOverrides: _data.contractInfoOverrides,
|
|
940
|
+
page: _data.page
|
|
941
|
+
};
|
|
942
|
+
});
|
|
943
|
+
}, error => {
|
|
944
|
+
throw WebrpcRequestFailedError.new({
|
|
945
|
+
cause: `fetch(): ${error.message || ''}`
|
|
946
|
+
});
|
|
947
|
+
});
|
|
948
|
+
};
|
|
949
|
+
this.addContractInfoOverride = (args, headers, signal) => {
|
|
950
|
+
return this.fetch(this.url('AddContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
951
|
+
return buildResponse(res).then(_data => {
|
|
952
|
+
return {};
|
|
953
|
+
});
|
|
954
|
+
}, error => {
|
|
955
|
+
throw WebrpcRequestFailedError.new({
|
|
956
|
+
cause: `fetch(): ${error.message || ''}`
|
|
957
|
+
});
|
|
958
|
+
});
|
|
959
|
+
};
|
|
960
|
+
this.updateContractInfoOverride = (args, headers, signal) => {
|
|
961
|
+
return this.fetch(this.url('UpdateContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
962
|
+
return buildResponse(res).then(_data => {
|
|
963
|
+
return {};
|
|
964
|
+
});
|
|
965
|
+
}, error => {
|
|
966
|
+
throw WebrpcRequestFailedError.new({
|
|
967
|
+
cause: `fetch(): ${error.message || ''}`
|
|
968
|
+
});
|
|
969
|
+
});
|
|
970
|
+
};
|
|
971
|
+
this.removeContractInfoOverride = (args, headers, signal) => {
|
|
972
|
+
return this.fetch(this.url('RemoveContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
973
|
+
return buildResponse(res).then(_data => {
|
|
974
|
+
return {};
|
|
975
|
+
});
|
|
976
|
+
}, error => {
|
|
977
|
+
throw WebrpcRequestFailedError.new({
|
|
978
|
+
cause: `fetch(): ${error.message || ''}`
|
|
979
|
+
});
|
|
980
|
+
});
|
|
981
|
+
};
|
|
982
|
+
this.refreshTokenDirectory = (headers, signal) => {
|
|
983
|
+
return this.fetch(this.url('RefreshTokenDirectory'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
984
|
+
return buildResponse(res).then(_data => {
|
|
985
|
+
return {
|
|
986
|
+
taskID: _data.taskID
|
|
987
|
+
};
|
|
988
|
+
});
|
|
989
|
+
}, error => {
|
|
990
|
+
throw WebrpcRequestFailedError.new({
|
|
991
|
+
cause: `fetch(): ${error.message || ''}`
|
|
992
|
+
});
|
|
993
|
+
});
|
|
994
|
+
};
|
|
941
995
|
this.addContractsToTokenDirectory = (args, headers, signal) => {
|
|
942
996
|
return this.fetch(this.url('AddContractsToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
943
997
|
return buildResponse(res).then(_data => {
|
|
@@ -1076,67 +1130,67 @@ class WebrpcError extends Error {
|
|
|
1076
1130
|
// Webrpc errors
|
|
1077
1131
|
|
|
1078
1132
|
class WebrpcEndpointError extends WebrpcError {
|
|
1079
|
-
constructor(name = 'WebrpcEndpoint', code = 0, message =
|
|
1133
|
+
constructor(name = 'WebrpcEndpoint', code = 0, message = `endpoint error`, status = 0, cause) {
|
|
1080
1134
|
super(name, code, message, status, cause);
|
|
1081
1135
|
Object.setPrototypeOf(this, WebrpcEndpointError.prototype);
|
|
1082
1136
|
}
|
|
1083
1137
|
}
|
|
1084
1138
|
class WebrpcRequestFailedError extends WebrpcError {
|
|
1085
|
-
constructor(name = 'WebrpcRequestFailed', code = -1, message =
|
|
1139
|
+
constructor(name = 'WebrpcRequestFailed', code = -1, message = `request failed`, status = 0, cause) {
|
|
1086
1140
|
super(name, code, message, status, cause);
|
|
1087
1141
|
Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype);
|
|
1088
1142
|
}
|
|
1089
1143
|
}
|
|
1090
1144
|
class WebrpcBadRouteError extends WebrpcError {
|
|
1091
|
-
constructor(name = 'WebrpcBadRoute', code = -2, message =
|
|
1145
|
+
constructor(name = 'WebrpcBadRoute', code = -2, message = `bad route`, status = 0, cause) {
|
|
1092
1146
|
super(name, code, message, status, cause);
|
|
1093
1147
|
Object.setPrototypeOf(this, WebrpcBadRouteError.prototype);
|
|
1094
1148
|
}
|
|
1095
1149
|
}
|
|
1096
1150
|
class WebrpcBadMethodError extends WebrpcError {
|
|
1097
|
-
constructor(name = 'WebrpcBadMethod', code = -3, message =
|
|
1151
|
+
constructor(name = 'WebrpcBadMethod', code = -3, message = `bad method`, status = 0, cause) {
|
|
1098
1152
|
super(name, code, message, status, cause);
|
|
1099
1153
|
Object.setPrototypeOf(this, WebrpcBadMethodError.prototype);
|
|
1100
1154
|
}
|
|
1101
1155
|
}
|
|
1102
1156
|
class WebrpcBadRequestError extends WebrpcError {
|
|
1103
|
-
constructor(name = 'WebrpcBadRequest', code = -4, message =
|
|
1157
|
+
constructor(name = 'WebrpcBadRequest', code = -4, message = `bad request`, status = 0, cause) {
|
|
1104
1158
|
super(name, code, message, status, cause);
|
|
1105
1159
|
Object.setPrototypeOf(this, WebrpcBadRequestError.prototype);
|
|
1106
1160
|
}
|
|
1107
1161
|
}
|
|
1108
1162
|
class WebrpcBadResponseError extends WebrpcError {
|
|
1109
|
-
constructor(name = 'WebrpcBadResponse', code = -5, message =
|
|
1163
|
+
constructor(name = 'WebrpcBadResponse', code = -5, message = `bad response`, status = 0, cause) {
|
|
1110
1164
|
super(name, code, message, status, cause);
|
|
1111
1165
|
Object.setPrototypeOf(this, WebrpcBadResponseError.prototype);
|
|
1112
1166
|
}
|
|
1113
1167
|
}
|
|
1114
1168
|
class WebrpcServerPanicError extends WebrpcError {
|
|
1115
|
-
constructor(name = 'WebrpcServerPanic', code = -6, message =
|
|
1169
|
+
constructor(name = 'WebrpcServerPanic', code = -6, message = `server panic`, status = 0, cause) {
|
|
1116
1170
|
super(name, code, message, status, cause);
|
|
1117
1171
|
Object.setPrototypeOf(this, WebrpcServerPanicError.prototype);
|
|
1118
1172
|
}
|
|
1119
1173
|
}
|
|
1120
1174
|
class WebrpcInternalErrorError extends WebrpcError {
|
|
1121
|
-
constructor(name = 'WebrpcInternalError', code = -7, message =
|
|
1175
|
+
constructor(name = 'WebrpcInternalError', code = -7, message = `internal error`, status = 0, cause) {
|
|
1122
1176
|
super(name, code, message, status, cause);
|
|
1123
1177
|
Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype);
|
|
1124
1178
|
}
|
|
1125
1179
|
}
|
|
1126
1180
|
class WebrpcClientDisconnectedError extends WebrpcError {
|
|
1127
|
-
constructor(name = 'WebrpcClientDisconnected', code = -8, message =
|
|
1181
|
+
constructor(name = 'WebrpcClientDisconnected', code = -8, message = `client disconnected`, status = 0, cause) {
|
|
1128
1182
|
super(name, code, message, status, cause);
|
|
1129
1183
|
Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype);
|
|
1130
1184
|
}
|
|
1131
1185
|
}
|
|
1132
1186
|
class WebrpcStreamLostError extends WebrpcError {
|
|
1133
|
-
constructor(name = 'WebrpcStreamLost', code = -9, message =
|
|
1187
|
+
constructor(name = 'WebrpcStreamLost', code = -9, message = `stream lost`, status = 0, cause) {
|
|
1134
1188
|
super(name, code, message, status, cause);
|
|
1135
1189
|
Object.setPrototypeOf(this, WebrpcStreamLostError.prototype);
|
|
1136
1190
|
}
|
|
1137
1191
|
}
|
|
1138
1192
|
class WebrpcStreamFinishedError extends WebrpcError {
|
|
1139
|
-
constructor(name = 'WebrpcStreamFinished', code = -10, message =
|
|
1193
|
+
constructor(name = 'WebrpcStreamFinished', code = -10, message = `stream finished`, status = 0, cause) {
|
|
1140
1194
|
super(name, code, message, status, cause);
|
|
1141
1195
|
Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype);
|
|
1142
1196
|
}
|
|
@@ -1145,103 +1199,109 @@ class WebrpcStreamFinishedError extends WebrpcError {
|
|
|
1145
1199
|
// Schema errors
|
|
1146
1200
|
|
|
1147
1201
|
class UnauthorizedError extends WebrpcError {
|
|
1148
|
-
constructor(name = 'Unauthorized', code = 1000, message =
|
|
1202
|
+
constructor(name = 'Unauthorized', code = 1000, message = `Unauthorized access`, status = 0, cause) {
|
|
1149
1203
|
super(name, code, message, status, cause);
|
|
1150
1204
|
Object.setPrototypeOf(this, UnauthorizedError.prototype);
|
|
1151
1205
|
}
|
|
1152
1206
|
}
|
|
1153
1207
|
class PermissionDeniedError extends WebrpcError {
|
|
1154
|
-
constructor(name = 'PermissionDenied', code = 1001, message =
|
|
1208
|
+
constructor(name = 'PermissionDenied', code = 1001, message = `Permission denied`, status = 0, cause) {
|
|
1155
1209
|
super(name, code, message, status, cause);
|
|
1156
1210
|
Object.setPrototypeOf(this, PermissionDeniedError.prototype);
|
|
1157
1211
|
}
|
|
1158
1212
|
}
|
|
1159
1213
|
class SessionExpiredError extends WebrpcError {
|
|
1160
|
-
constructor(name = 'SessionExpired', code = 1002, message =
|
|
1214
|
+
constructor(name = 'SessionExpired', code = 1002, message = `Session expired`, status = 0, cause) {
|
|
1161
1215
|
super(name, code, message, status, cause);
|
|
1162
1216
|
Object.setPrototypeOf(this, SessionExpiredError.prototype);
|
|
1163
1217
|
}
|
|
1164
1218
|
}
|
|
1165
1219
|
class MethodNotFoundError extends WebrpcError {
|
|
1166
|
-
constructor(name = 'MethodNotFound', code = 1003, message =
|
|
1220
|
+
constructor(name = 'MethodNotFound', code = 1003, message = `Method not found`, status = 0, cause) {
|
|
1167
1221
|
super(name, code, message, status, cause);
|
|
1168
1222
|
Object.setPrototypeOf(this, MethodNotFoundError.prototype);
|
|
1169
1223
|
}
|
|
1170
1224
|
}
|
|
1171
1225
|
class RequestConflictError extends WebrpcError {
|
|
1172
|
-
constructor(name = 'RequestConflict', code = 1004, message =
|
|
1226
|
+
constructor(name = 'RequestConflict', code = 1004, message = `Conflict with target resource`, status = 0, cause) {
|
|
1173
1227
|
super(name, code, message, status, cause);
|
|
1174
1228
|
Object.setPrototypeOf(this, RequestConflictError.prototype);
|
|
1175
1229
|
}
|
|
1176
1230
|
}
|
|
1177
1231
|
class FailError extends WebrpcError {
|
|
1178
|
-
constructor(name = 'Fail', code = 1005, message =
|
|
1232
|
+
constructor(name = 'Fail', code = 1005, message = `Request Failed`, status = 0, cause) {
|
|
1179
1233
|
super(name, code, message, status, cause);
|
|
1180
1234
|
Object.setPrototypeOf(this, FailError.prototype);
|
|
1181
1235
|
}
|
|
1182
1236
|
}
|
|
1183
1237
|
class GeoblockedError extends WebrpcError {
|
|
1184
|
-
constructor(name = 'Geoblocked', code = 1006, message =
|
|
1238
|
+
constructor(name = 'Geoblocked', code = 1006, message = `Geoblocked region`, status = 0, cause) {
|
|
1185
1239
|
super(name, code, message, status, cause);
|
|
1186
1240
|
Object.setPrototypeOf(this, GeoblockedError.prototype);
|
|
1187
1241
|
}
|
|
1188
1242
|
}
|
|
1243
|
+
class TaskFailedError extends WebrpcError {
|
|
1244
|
+
constructor(name = 'TaskFailed', code = 1007, message = `Task failed`, status = 0, cause) {
|
|
1245
|
+
super(name, code, message, status, cause);
|
|
1246
|
+
Object.setPrototypeOf(this, TaskFailedError.prototype);
|
|
1247
|
+
}
|
|
1248
|
+
}
|
|
1189
1249
|
class TimeoutError extends WebrpcError {
|
|
1190
|
-
constructor(name = 'Timeout', code = 2000, message =
|
|
1250
|
+
constructor(name = 'Timeout', code = 2000, message = `Request timed out`, status = 0, cause) {
|
|
1191
1251
|
super(name, code, message, status, cause);
|
|
1192
1252
|
Object.setPrototypeOf(this, TimeoutError.prototype);
|
|
1193
1253
|
}
|
|
1194
1254
|
}
|
|
1195
1255
|
class InvalidArgumentError extends WebrpcError {
|
|
1196
|
-
constructor(name = 'InvalidArgument', code = 2001, message =
|
|
1256
|
+
constructor(name = 'InvalidArgument', code = 2001, message = `Invalid argument`, status = 0, cause) {
|
|
1197
1257
|
super(name, code, message, status, cause);
|
|
1198
1258
|
Object.setPrototypeOf(this, InvalidArgumentError.prototype);
|
|
1199
1259
|
}
|
|
1200
1260
|
}
|
|
1201
1261
|
class RequiredArgumentError extends WebrpcError {
|
|
1202
|
-
constructor(name = 'RequiredArgument', code = 2002, message =
|
|
1262
|
+
constructor(name = 'RequiredArgument', code = 2002, message = `Required argument missing`, status = 0, cause) {
|
|
1203
1263
|
super(name, code, message, status, cause);
|
|
1204
1264
|
Object.setPrototypeOf(this, RequiredArgumentError.prototype);
|
|
1205
1265
|
}
|
|
1206
1266
|
}
|
|
1207
1267
|
class QueryFailedError extends WebrpcError {
|
|
1208
|
-
constructor(name = 'QueryFailed', code = 2003, message =
|
|
1268
|
+
constructor(name = 'QueryFailed', code = 2003, message = `Query failed`, status = 0, cause) {
|
|
1209
1269
|
super(name, code, message, status, cause);
|
|
1210
1270
|
Object.setPrototypeOf(this, QueryFailedError.prototype);
|
|
1211
1271
|
}
|
|
1212
1272
|
}
|
|
1213
1273
|
class ValidationFailedError extends WebrpcError {
|
|
1214
|
-
constructor(name = 'ValidationFailed', code = 2004, message =
|
|
1274
|
+
constructor(name = 'ValidationFailed', code = 2004, message = `Validation failed`, status = 0, cause) {
|
|
1215
1275
|
super(name, code, message, status, cause);
|
|
1216
1276
|
Object.setPrototypeOf(this, ValidationFailedError.prototype);
|
|
1217
1277
|
}
|
|
1218
1278
|
}
|
|
1219
1279
|
class RateLimitedError extends WebrpcError {
|
|
1220
|
-
constructor(name = 'RateLimited', code = 2005, message =
|
|
1280
|
+
constructor(name = 'RateLimited', code = 2005, message = `Rate limited`, status = 0, cause) {
|
|
1221
1281
|
super(name, code, message, status, cause);
|
|
1222
1282
|
Object.setPrototypeOf(this, RateLimitedError.prototype);
|
|
1223
1283
|
}
|
|
1224
1284
|
}
|
|
1225
1285
|
class NotFoundError extends WebrpcError {
|
|
1226
|
-
constructor(name = 'NotFound', code = 3000, message =
|
|
1286
|
+
constructor(name = 'NotFound', code = 3000, message = `Resource not found`, status = 0, cause) {
|
|
1227
1287
|
super(name, code, message, status, cause);
|
|
1228
1288
|
Object.setPrototypeOf(this, NotFoundError.prototype);
|
|
1229
1289
|
}
|
|
1230
1290
|
}
|
|
1231
1291
|
class ProjectNotFoundError extends WebrpcError {
|
|
1232
|
-
constructor(name = 'ProjectNotFound', code = 3002, message =
|
|
1292
|
+
constructor(name = 'ProjectNotFound', code = 3002, message = `Project not found`, status = 0, cause) {
|
|
1233
1293
|
super(name, code, message, status, cause);
|
|
1234
1294
|
Object.setPrototypeOf(this, ProjectNotFoundError.prototype);
|
|
1235
1295
|
}
|
|
1236
1296
|
}
|
|
1237
1297
|
class ChainNotFoundError extends WebrpcError {
|
|
1238
|
-
constructor(name = 'ChainNotFound', code = 3003, message =
|
|
1298
|
+
constructor(name = 'ChainNotFound', code = 3003, message = `Chain not found`, status = 0, cause) {
|
|
1239
1299
|
super(name, code, message, status, cause);
|
|
1240
1300
|
Object.setPrototypeOf(this, ChainNotFoundError.prototype);
|
|
1241
1301
|
}
|
|
1242
1302
|
}
|
|
1243
1303
|
class TokenDirectoryDisabledError extends WebrpcError {
|
|
1244
|
-
constructor(name = 'TokenDirectoryDisabled', code = 4001, message =
|
|
1304
|
+
constructor(name = 'TokenDirectoryDisabled', code = 4001, message = `Token Directory is disabled`, status = 0, cause) {
|
|
1245
1305
|
super(name, code, message, status, cause);
|
|
1246
1306
|
Object.setPrototypeOf(this, TokenDirectoryDisabledError.prototype);
|
|
1247
1307
|
}
|
|
@@ -1265,6 +1325,7 @@ let errors = /*#__PURE__*/function (errors) {
|
|
|
1265
1325
|
errors["RequestConflict"] = "RequestConflict";
|
|
1266
1326
|
errors["Fail"] = "Fail";
|
|
1267
1327
|
errors["Geoblocked"] = "Geoblocked";
|
|
1328
|
+
errors["TaskFailed"] = "TaskFailed";
|
|
1268
1329
|
errors["Timeout"] = "Timeout";
|
|
1269
1330
|
errors["InvalidArgument"] = "InvalidArgument";
|
|
1270
1331
|
errors["RequiredArgument"] = "RequiredArgument";
|
|
@@ -1277,6 +1338,38 @@ let errors = /*#__PURE__*/function (errors) {
|
|
|
1277
1338
|
errors["TokenDirectoryDisabled"] = "TokenDirectoryDisabled";
|
|
1278
1339
|
return errors;
|
|
1279
1340
|
}({});
|
|
1341
|
+
let WebrpcErrorCodes = /*#__PURE__*/function (WebrpcErrorCodes) {
|
|
1342
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcEndpoint"] = 0] = "WebrpcEndpoint";
|
|
1343
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcRequestFailed"] = -1] = "WebrpcRequestFailed";
|
|
1344
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadRoute"] = -2] = "WebrpcBadRoute";
|
|
1345
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadMethod"] = -3] = "WebrpcBadMethod";
|
|
1346
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadRequest"] = -4] = "WebrpcBadRequest";
|
|
1347
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadResponse"] = -5] = "WebrpcBadResponse";
|
|
1348
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcServerPanic"] = -6] = "WebrpcServerPanic";
|
|
1349
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcInternalError"] = -7] = "WebrpcInternalError";
|
|
1350
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcClientDisconnected"] = -8] = "WebrpcClientDisconnected";
|
|
1351
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcStreamLost"] = -9] = "WebrpcStreamLost";
|
|
1352
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcStreamFinished"] = -10] = "WebrpcStreamFinished";
|
|
1353
|
+
WebrpcErrorCodes[WebrpcErrorCodes["Unauthorized"] = 1000] = "Unauthorized";
|
|
1354
|
+
WebrpcErrorCodes[WebrpcErrorCodes["PermissionDenied"] = 1001] = "PermissionDenied";
|
|
1355
|
+
WebrpcErrorCodes[WebrpcErrorCodes["SessionExpired"] = 1002] = "SessionExpired";
|
|
1356
|
+
WebrpcErrorCodes[WebrpcErrorCodes["MethodNotFound"] = 1003] = "MethodNotFound";
|
|
1357
|
+
WebrpcErrorCodes[WebrpcErrorCodes["RequestConflict"] = 1004] = "RequestConflict";
|
|
1358
|
+
WebrpcErrorCodes[WebrpcErrorCodes["Fail"] = 1005] = "Fail";
|
|
1359
|
+
WebrpcErrorCodes[WebrpcErrorCodes["Geoblocked"] = 1006] = "Geoblocked";
|
|
1360
|
+
WebrpcErrorCodes[WebrpcErrorCodes["TaskFailed"] = 1007] = "TaskFailed";
|
|
1361
|
+
WebrpcErrorCodes[WebrpcErrorCodes["Timeout"] = 2000] = "Timeout";
|
|
1362
|
+
WebrpcErrorCodes[WebrpcErrorCodes["InvalidArgument"] = 2001] = "InvalidArgument";
|
|
1363
|
+
WebrpcErrorCodes[WebrpcErrorCodes["RequiredArgument"] = 2002] = "RequiredArgument";
|
|
1364
|
+
WebrpcErrorCodes[WebrpcErrorCodes["QueryFailed"] = 2003] = "QueryFailed";
|
|
1365
|
+
WebrpcErrorCodes[WebrpcErrorCodes["ValidationFailed"] = 2004] = "ValidationFailed";
|
|
1366
|
+
WebrpcErrorCodes[WebrpcErrorCodes["RateLimited"] = 2005] = "RateLimited";
|
|
1367
|
+
WebrpcErrorCodes[WebrpcErrorCodes["NotFound"] = 3000] = "NotFound";
|
|
1368
|
+
WebrpcErrorCodes[WebrpcErrorCodes["ProjectNotFound"] = 3002] = "ProjectNotFound";
|
|
1369
|
+
WebrpcErrorCodes[WebrpcErrorCodes["ChainNotFound"] = 3003] = "ChainNotFound";
|
|
1370
|
+
WebrpcErrorCodes[WebrpcErrorCodes["TokenDirectoryDisabled"] = 4001] = "TokenDirectoryDisabled";
|
|
1371
|
+
return WebrpcErrorCodes;
|
|
1372
|
+
}({});
|
|
1280
1373
|
const webrpcErrorByCode = {
|
|
1281
1374
|
[0]: WebrpcEndpointError,
|
|
1282
1375
|
[-1]: WebrpcRequestFailedError,
|
|
@@ -1296,6 +1389,7 @@ const webrpcErrorByCode = {
|
|
|
1296
1389
|
[1004]: RequestConflictError,
|
|
1297
1390
|
[1005]: FailError,
|
|
1298
1391
|
[1006]: GeoblockedError,
|
|
1392
|
+
[1007]: TaskFailedError,
|
|
1299
1393
|
[2000]: TimeoutError,
|
|
1300
1394
|
[2001]: InvalidArgumentError,
|
|
1301
1395
|
[2002]: RequiredArgumentError,
|
|
@@ -1380,6 +1474,7 @@ exports.SequenceMetadata = SequenceMetadata;
|
|
|
1380
1474
|
exports.SessionExpiredError = SessionExpiredError;
|
|
1381
1475
|
exports.Source = Source;
|
|
1382
1476
|
exports.SwapType = SwapType;
|
|
1477
|
+
exports.TaskFailedError = TaskFailedError;
|
|
1383
1478
|
exports.TaskStatus = TaskStatus;
|
|
1384
1479
|
exports.TimeoutError = TimeoutError;
|
|
1385
1480
|
exports.TokenDirectoryDisabledError = TokenDirectoryDisabledError;
|
|
@@ -1396,6 +1491,7 @@ exports.WebrpcBadRouteError = WebrpcBadRouteError;
|
|
|
1396
1491
|
exports.WebrpcClientDisconnectedError = WebrpcClientDisconnectedError;
|
|
1397
1492
|
exports.WebrpcEndpointError = WebrpcEndpointError;
|
|
1398
1493
|
exports.WebrpcError = WebrpcError;
|
|
1494
|
+
exports.WebrpcErrorCodes = WebrpcErrorCodes;
|
|
1399
1495
|
exports.WebrpcHeader = WebrpcHeader;
|
|
1400
1496
|
exports.WebrpcHeaderValue = WebrpcHeaderValue;
|
|
1401
1497
|
exports.WebrpcInternalErrorError = WebrpcInternalErrorError;
|
|
@@ -1404,3 +1500,4 @@ exports.WebrpcServerPanicError = WebrpcServerPanicError;
|
|
|
1404
1500
|
exports.WebrpcStreamFinishedError = WebrpcStreamFinishedError;
|
|
1405
1501
|
exports.WebrpcStreamLostError = WebrpcStreamLostError;
|
|
1406
1502
|
exports.errors = errors;
|
|
1503
|
+
exports.webrpcErrorByCode = webrpcErrorByCode;
|