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