@0xsequence/indexer 2.2.8 → 2.2.9
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-indexer.cjs.dev.js +275 -63
- package/dist/0xsequence-indexer.cjs.prod.js +275 -63
- package/dist/0xsequence-indexer.esm.js +260 -64
- package/dist/declarations/src/indexer.gen.d.ts +200 -71
- package/dist/declarations/src/indexergw.gen.d.ts +23 -1
- package/package.json +1 -1
- package/src/indexer.gen.ts +530 -161
- package/src/indexergw.gen.ts +29 -3
|
@@ -13,11 +13,14 @@ function _extends() {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/* eslint-disable */
|
|
16
|
-
// sequence-indexer v0.4.0
|
|
16
|
+
// sequence-indexer v0.4.0 9d81c4f4d4f5fc770eebd69093322f3fa83b669a
|
|
17
17
|
// --
|
|
18
|
-
// Code generated by webrpc-gen@v0.
|
|
18
|
+
// Code generated by webrpc-gen@v0.21.1 with typescript generator. DO NOT EDIT.
|
|
19
19
|
//
|
|
20
|
-
// webrpc-gen -schema=indexer.ridl -target=typescript -client -out=./clients/indexer.gen.ts
|
|
20
|
+
// webrpc-gen -schema=indexer.ridl -service=Indexer -target=typescript -client -out=./clients/indexer.gen.ts
|
|
21
|
+
|
|
22
|
+
const WebrpcHeader$1 = 'Webrpc';
|
|
23
|
+
const WebrpcHeaderValue$1 = 'webrpc@v0.21.1;gen-typescript@v0.15.1;sequence-indexer@v0.4.0';
|
|
21
24
|
|
|
22
25
|
// WebRPC description and code-gen version
|
|
23
26
|
const WebRPCVersion$1 = 'v1';
|
|
@@ -26,12 +29,53 @@ const WebRPCVersion$1 = 'v1';
|
|
|
26
29
|
const WebRPCSchemaVersion$1 = 'v0.4.0';
|
|
27
30
|
|
|
28
31
|
// Schema hash generated from your RIDL schema
|
|
29
|
-
const WebRPCSchemaHash$1 = '
|
|
32
|
+
const WebRPCSchemaHash$1 = '9d81c4f4d4f5fc770eebd69093322f3fa83b669a';
|
|
33
|
+
function VersionFromHeader$1(headers) {
|
|
34
|
+
const headerValue = headers.get(WebrpcHeader$1);
|
|
35
|
+
if (!headerValue) {
|
|
36
|
+
return {
|
|
37
|
+
webrpcGenVersion: '',
|
|
38
|
+
codeGenName: '',
|
|
39
|
+
codeGenVersion: '',
|
|
40
|
+
schemaName: '',
|
|
41
|
+
schemaVersion: ''
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
return parseWebrpcGenVersions$1(headerValue);
|
|
45
|
+
}
|
|
46
|
+
function parseWebrpcGenVersions$1(header) {
|
|
47
|
+
const versions = header.split(';');
|
|
48
|
+
if (versions.length < 3) {
|
|
49
|
+
return {
|
|
50
|
+
webrpcGenVersion: '',
|
|
51
|
+
codeGenName: '',
|
|
52
|
+
codeGenVersion: '',
|
|
53
|
+
schemaName: '',
|
|
54
|
+
schemaVersion: ''
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const [_, webrpcGenVersion] = versions[0].split('@');
|
|
58
|
+
const [codeGenName, codeGenVersion] = versions[1].split('@');
|
|
59
|
+
const [schemaName, schemaVersion] = versions[2].split('@');
|
|
60
|
+
return {
|
|
61
|
+
webrpcGenVersion,
|
|
62
|
+
codeGenName,
|
|
63
|
+
codeGenVersion,
|
|
64
|
+
schemaName,
|
|
65
|
+
schemaVersion
|
|
66
|
+
};
|
|
67
|
+
}
|
|
30
68
|
|
|
31
69
|
//
|
|
32
70
|
// Types
|
|
33
71
|
//
|
|
34
72
|
|
|
73
|
+
let ResourceStatus$1 = /*#__PURE__*/function (ResourceStatus) {
|
|
74
|
+
ResourceStatus["NOT_AVAILABLE"] = "NOT_AVAILABLE";
|
|
75
|
+
ResourceStatus["STALE"] = "STALE";
|
|
76
|
+
ResourceStatus["AVAILABLE"] = "AVAILABLE";
|
|
77
|
+
return ResourceStatus;
|
|
78
|
+
}({});
|
|
35
79
|
let ContractType$1 = /*#__PURE__*/function (ContractType) {
|
|
36
80
|
ContractType["UNKNOWN"] = "UNKNOWN";
|
|
37
81
|
ContractType["NATIVE"] = "NATIVE";
|
|
@@ -183,6 +227,7 @@ class Indexer {
|
|
|
183
227
|
return buildResponse$1(res).then(_data => {
|
|
184
228
|
return {
|
|
185
229
|
page: _data.page,
|
|
230
|
+
nativeBalances: _data.nativeBalances,
|
|
186
231
|
balances: _data.balances
|
|
187
232
|
};
|
|
188
233
|
});
|
|
@@ -197,6 +242,7 @@ class Indexer {
|
|
|
197
242
|
return buildResponse$1(res).then(_data => {
|
|
198
243
|
return {
|
|
199
244
|
page: _data.page,
|
|
245
|
+
nativeBalances: _data.nativeBalances,
|
|
200
246
|
balances: _data.balances
|
|
201
247
|
};
|
|
202
248
|
});
|
|
@@ -262,12 +308,13 @@ class Indexer {
|
|
|
262
308
|
});
|
|
263
309
|
});
|
|
264
310
|
};
|
|
265
|
-
this.
|
|
266
|
-
return this.fetch(this.url('
|
|
311
|
+
this.getTokenIDs = (args, headers, signal) => {
|
|
312
|
+
return this.fetch(this.url('GetTokenIDs'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
267
313
|
return buildResponse$1(res).then(_data => {
|
|
268
314
|
return {
|
|
269
315
|
page: _data.page,
|
|
270
|
-
|
|
316
|
+
contractType: _data.contractType,
|
|
317
|
+
tokenIDs: _data.tokenIDs
|
|
271
318
|
};
|
|
272
319
|
});
|
|
273
320
|
}, error => {
|
|
@@ -276,12 +323,13 @@ class Indexer {
|
|
|
276
323
|
});
|
|
277
324
|
});
|
|
278
325
|
};
|
|
279
|
-
this.
|
|
280
|
-
return this.fetch(this.url('
|
|
326
|
+
this.getTokenIDRanges = (args, headers, signal) => {
|
|
327
|
+
return this.fetch(this.url('GetTokenIDRanges'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
281
328
|
return buildResponse$1(res).then(_data => {
|
|
282
329
|
return {
|
|
283
|
-
|
|
284
|
-
|
|
330
|
+
contractType: _data.contractType,
|
|
331
|
+
tokenIDRanges: _data.tokenIDRanges,
|
|
332
|
+
moreRanges: _data.moreRanges
|
|
285
333
|
};
|
|
286
334
|
});
|
|
287
335
|
}, error => {
|
|
@@ -290,10 +338,13 @@ class Indexer {
|
|
|
290
338
|
});
|
|
291
339
|
});
|
|
292
340
|
};
|
|
293
|
-
this.
|
|
294
|
-
return this.fetch(this.url('
|
|
341
|
+
this.getBalanceUpdates = (args, headers, signal) => {
|
|
342
|
+
return this.fetch(this.url('GetBalanceUpdates'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
295
343
|
return buildResponse$1(res).then(_data => {
|
|
296
|
-
return {
|
|
344
|
+
return {
|
|
345
|
+
page: _data.page,
|
|
346
|
+
balances: _data.balances
|
|
347
|
+
};
|
|
297
348
|
});
|
|
298
349
|
}, error => {
|
|
299
350
|
throw WebrpcRequestFailedError$1.new({
|
|
@@ -301,11 +352,12 @@ class Indexer {
|
|
|
301
352
|
});
|
|
302
353
|
});
|
|
303
354
|
};
|
|
304
|
-
this.
|
|
305
|
-
return this.fetch(this.url('
|
|
355
|
+
this.getTransactionHistory = (args, headers, signal) => {
|
|
356
|
+
return this.fetch(this.url('GetTransactionHistory'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
306
357
|
return buildResponse$1(res).then(_data => {
|
|
307
358
|
return {
|
|
308
|
-
|
|
359
|
+
page: _data.page,
|
|
360
|
+
transactions: _data.transactions
|
|
309
361
|
};
|
|
310
362
|
});
|
|
311
363
|
}, error => {
|
|
@@ -314,12 +366,11 @@ class Indexer {
|
|
|
314
366
|
});
|
|
315
367
|
});
|
|
316
368
|
};
|
|
317
|
-
this.
|
|
318
|
-
return this.fetch(this.url('
|
|
369
|
+
this.fetchTransactionReceipt = (args, headers, signal) => {
|
|
370
|
+
return this.fetch(this.url('FetchTransactionReceipt'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
319
371
|
return buildResponse$1(res).then(_data => {
|
|
320
372
|
return {
|
|
321
|
-
|
|
322
|
-
orders: _data.orders
|
|
373
|
+
receipt: _data.receipt
|
|
323
374
|
};
|
|
324
375
|
});
|
|
325
376
|
}, error => {
|
|
@@ -328,11 +379,11 @@ class Indexer {
|
|
|
328
379
|
});
|
|
329
380
|
});
|
|
330
381
|
};
|
|
331
|
-
this.
|
|
332
|
-
return this.fetch(this.url('
|
|
382
|
+
this.fetchTransactionReceiptWithFilter = (args, headers, signal) => {
|
|
383
|
+
return this.fetch(this.url('FetchTransactionReceiptWithFilter'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
333
384
|
return buildResponse$1(res).then(_data => {
|
|
334
385
|
return {
|
|
335
|
-
|
|
386
|
+
receipt: _data.receipt
|
|
336
387
|
};
|
|
337
388
|
});
|
|
338
389
|
}, error => {
|
|
@@ -341,12 +392,34 @@ class Indexer {
|
|
|
341
392
|
});
|
|
342
393
|
});
|
|
343
394
|
};
|
|
344
|
-
this.
|
|
345
|
-
|
|
395
|
+
this.subscribeReceipts = (args, options) => {
|
|
396
|
+
const _fetch = () => this.fetch(this.url('SubscribeReceipts'), createHTTPRequest$1(args, options.headers, options.signal)).then(async function (res) {
|
|
397
|
+
await sseResponse(res, options, _fetch);
|
|
398
|
+
}, error => {
|
|
399
|
+
options.onError(error, _fetch);
|
|
400
|
+
});
|
|
401
|
+
return _fetch();
|
|
402
|
+
};
|
|
403
|
+
this.subscribeEvents = (args, options) => {
|
|
404
|
+
const _fetch = () => this.fetch(this.url('SubscribeEvents'), createHTTPRequest$1(args, options.headers, options.signal)).then(async function (res) {
|
|
405
|
+
await sseResponse(res, options, _fetch);
|
|
406
|
+
}, error => {
|
|
407
|
+
options.onError(error, _fetch);
|
|
408
|
+
});
|
|
409
|
+
return _fetch();
|
|
410
|
+
};
|
|
411
|
+
this.subscribeBalanceUpdates = (args, options) => {
|
|
412
|
+
const _fetch = () => this.fetch(this.url('SubscribeBalanceUpdates'), createHTTPRequest$1(args, options.headers, options.signal)).then(async function (res) {
|
|
413
|
+
await sseResponse(res, options, _fetch);
|
|
414
|
+
}, error => {
|
|
415
|
+
options.onError(error, _fetch);
|
|
416
|
+
});
|
|
417
|
+
return _fetch();
|
|
418
|
+
};
|
|
419
|
+
this.syncBalance = (args, headers, signal) => {
|
|
420
|
+
return this.fetch(this.url('SyncBalance'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
346
421
|
return buildResponse$1(res).then(_data => {
|
|
347
|
-
return {
|
|
348
|
-
receipt: _data.receipt
|
|
349
|
-
};
|
|
422
|
+
return {};
|
|
350
423
|
});
|
|
351
424
|
}, error => {
|
|
352
425
|
throw WebrpcRequestFailedError$1.new({
|
|
@@ -420,6 +493,19 @@ class Indexer {
|
|
|
420
493
|
});
|
|
421
494
|
});
|
|
422
495
|
};
|
|
496
|
+
this.removeAllWebhookListeners = (args, headers, signal) => {
|
|
497
|
+
return this.fetch(this.url('RemoveAllWebhookListeners'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
498
|
+
return buildResponse$1(res).then(_data => {
|
|
499
|
+
return {
|
|
500
|
+
status: _data.status
|
|
501
|
+
};
|
|
502
|
+
});
|
|
503
|
+
}, error => {
|
|
504
|
+
throw WebrpcRequestFailedError$1.new({
|
|
505
|
+
cause: `fetch(): ${error.message || ''}`
|
|
506
|
+
});
|
|
507
|
+
});
|
|
508
|
+
};
|
|
423
509
|
this.toggleWebhookListener = (args, headers, signal) => {
|
|
424
510
|
return this.fetch(this.url('ToggleWebhookListener'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
425
511
|
return buildResponse$1(res).then(_data => {
|
|
@@ -459,29 +545,32 @@ class Indexer {
|
|
|
459
545
|
});
|
|
460
546
|
});
|
|
461
547
|
};
|
|
462
|
-
this.
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
this.subscribeEvents = (args, options) => {
|
|
471
|
-
const _fetch = () => this.fetch(this.url('SubscribeEvents'), createHTTPRequest$1(args, options.headers, options.signal)).then(async function (res) {
|
|
472
|
-
await sseResponse(res, options, _fetch);
|
|
548
|
+
this.getOrderbookOrders = (args, headers, signal) => {
|
|
549
|
+
return this.fetch(this.url('GetOrderbookOrders'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
550
|
+
return buildResponse$1(res).then(_data => {
|
|
551
|
+
return {
|
|
552
|
+
page: _data.page,
|
|
553
|
+
orders: _data.orders
|
|
554
|
+
};
|
|
555
|
+
});
|
|
473
556
|
}, error => {
|
|
474
|
-
|
|
557
|
+
throw WebrpcRequestFailedError$1.new({
|
|
558
|
+
cause: `fetch(): ${error.message || ''}`
|
|
559
|
+
});
|
|
475
560
|
});
|
|
476
|
-
return _fetch();
|
|
477
561
|
};
|
|
478
|
-
this.
|
|
479
|
-
|
|
480
|
-
|
|
562
|
+
this.getTopOrders = (args, headers, signal) => {
|
|
563
|
+
return this.fetch(this.url('GetTopOrders'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
564
|
+
return buildResponse$1(res).then(_data => {
|
|
565
|
+
return {
|
|
566
|
+
orders: _data.orders
|
|
567
|
+
};
|
|
568
|
+
});
|
|
481
569
|
}, error => {
|
|
482
|
-
|
|
570
|
+
throw WebrpcRequestFailedError$1.new({
|
|
571
|
+
cause: `fetch(): ${error.message || ''}`
|
|
572
|
+
});
|
|
483
573
|
});
|
|
484
|
-
return _fetch();
|
|
485
574
|
};
|
|
486
575
|
this.hostname = hostname.replace(/\/*$/, '');
|
|
487
576
|
this.fetch = (input, init) => fetch(input, init);
|
|
@@ -595,11 +684,13 @@ const sseResponse = async (res, options, retryFetch) => {
|
|
|
595
684
|
}
|
|
596
685
|
};
|
|
597
686
|
const createHTTPRequest$1 = (body = {}, headers = {}, signal = null) => {
|
|
687
|
+
const reqHeaders = _extends({}, headers, {
|
|
688
|
+
'Content-Type': 'application/json'
|
|
689
|
+
});
|
|
690
|
+
reqHeaders[WebrpcHeader$1] = WebrpcHeaderValue$1;
|
|
598
691
|
return {
|
|
599
692
|
method: 'POST',
|
|
600
|
-
headers:
|
|
601
|
-
'Content-Type': 'application/json'
|
|
602
|
-
}),
|
|
693
|
+
headers: reqHeaders,
|
|
603
694
|
body: JSON.stringify(body || {}),
|
|
604
695
|
signal
|
|
605
696
|
};
|
|
@@ -761,8 +852,86 @@ class AbortedError$1 extends WebrpcError$1 {
|
|
|
761
852
|
Object.setPrototypeOf(this, AbortedError$1.prototype);
|
|
762
853
|
}
|
|
763
854
|
}
|
|
855
|
+
class GeoblockedError$1 extends WebrpcError$1 {
|
|
856
|
+
constructor(name = 'Geoblocked', code = 1006, message = 'Geoblocked region', status = 0, cause) {
|
|
857
|
+
super(name, code, message, status, cause);
|
|
858
|
+
Object.setPrototypeOf(this, GeoblockedError$1.prototype);
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
class RateLimitedError$1 extends WebrpcError$1 {
|
|
862
|
+
constructor(name = 'RateLimited', code = 1007, message = 'Rate-limited. Please slow down.', status = 0, cause) {
|
|
863
|
+
super(name, code, message, status, cause);
|
|
864
|
+
Object.setPrototypeOf(this, RateLimitedError$1.prototype);
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
class ProjectNotFoundError$1 extends WebrpcError$1 {
|
|
868
|
+
constructor(name = 'ProjectNotFound', code = 1100, message = 'Project not found', status = 0, cause) {
|
|
869
|
+
super(name, code, message, status, cause);
|
|
870
|
+
Object.setPrototypeOf(this, ProjectNotFoundError$1.prototype);
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
class AccessKeyNotFoundError$1 extends WebrpcError$1 {
|
|
874
|
+
constructor(name = 'AccessKeyNotFound', code = 1101, message = 'Access key not found', status = 0, cause) {
|
|
875
|
+
super(name, code, message, status, cause);
|
|
876
|
+
Object.setPrototypeOf(this, AccessKeyNotFoundError$1.prototype);
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
class AccessKeyMismatchError$1 extends WebrpcError$1 {
|
|
880
|
+
constructor(name = 'AccessKeyMismatch', code = 1102, message = 'Access key mismatch', status = 0, cause) {
|
|
881
|
+
super(name, code, message, status, cause);
|
|
882
|
+
Object.setPrototypeOf(this, AccessKeyMismatchError$1.prototype);
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
class InvalidOriginError$1 extends WebrpcError$1 {
|
|
886
|
+
constructor(name = 'InvalidOrigin', code = 1103, message = 'Invalid origin for Access Key', status = 0, cause) {
|
|
887
|
+
super(name, code, message, status, cause);
|
|
888
|
+
Object.setPrototypeOf(this, InvalidOriginError$1.prototype);
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
class InvalidServiceError$1 extends WebrpcError$1 {
|
|
892
|
+
constructor(name = 'InvalidService', code = 1104, message = 'Service not enabled for Access key', status = 0, cause) {
|
|
893
|
+
super(name, code, message, status, cause);
|
|
894
|
+
Object.setPrototypeOf(this, InvalidServiceError$1.prototype);
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
class UnauthorizedUserError$1 extends WebrpcError$1 {
|
|
898
|
+
constructor(name = 'UnauthorizedUser', code = 1105, message = 'Unauthorized user', status = 0, cause) {
|
|
899
|
+
super(name, code, message, status, cause);
|
|
900
|
+
Object.setPrototypeOf(this, UnauthorizedUserError$1.prototype);
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
class QuotaExceededError$1 extends WebrpcError$1 {
|
|
904
|
+
constructor(name = 'QuotaExceeded', code = 1200, message = 'Quota exceeded', status = 0, cause) {
|
|
905
|
+
super(name, code, message, status, cause);
|
|
906
|
+
Object.setPrototypeOf(this, QuotaExceededError$1.prototype);
|
|
907
|
+
}
|
|
908
|
+
}
|
|
909
|
+
class RateLimitError$1 extends WebrpcError$1 {
|
|
910
|
+
constructor(name = 'RateLimit', code = 1201, message = 'Rate limit exceeded', status = 0, cause) {
|
|
911
|
+
super(name, code, message, status, cause);
|
|
912
|
+
Object.setPrototypeOf(this, RateLimitError$1.prototype);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
class NoDefaultKeyError$1 extends WebrpcError$1 {
|
|
916
|
+
constructor(name = 'NoDefaultKey', code = 1300, message = 'No default access key found', status = 0, cause) {
|
|
917
|
+
super(name, code, message, status, cause);
|
|
918
|
+
Object.setPrototypeOf(this, NoDefaultKeyError$1.prototype);
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
class MaxAccessKeysError$1 extends WebrpcError$1 {
|
|
922
|
+
constructor(name = 'MaxAccessKeys', code = 1301, message = 'Access keys limit reached', status = 0, cause) {
|
|
923
|
+
super(name, code, message, status, cause);
|
|
924
|
+
Object.setPrototypeOf(this, MaxAccessKeysError$1.prototype);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
class AtLeastOneKeyError$1 extends WebrpcError$1 {
|
|
928
|
+
constructor(name = 'AtLeastOneKey', code = 1302, message = 'You need at least one Access Key', status = 0, cause) {
|
|
929
|
+
super(name, code, message, status, cause);
|
|
930
|
+
Object.setPrototypeOf(this, AtLeastOneKeyError$1.prototype);
|
|
931
|
+
}
|
|
932
|
+
}
|
|
764
933
|
class TimeoutError$1 extends WebrpcError$1 {
|
|
765
|
-
constructor(name = 'Timeout', code =
|
|
934
|
+
constructor(name = 'Timeout', code = 1900, message = 'Request timed out', status = 0, cause) {
|
|
766
935
|
super(name, code, message, status, cause);
|
|
767
936
|
Object.setPrototypeOf(this, TimeoutError$1.prototype);
|
|
768
937
|
}
|
|
@@ -797,12 +966,6 @@ class NotFoundError$1 extends WebrpcError$1 {
|
|
|
797
966
|
Object.setPrototypeOf(this, NotFoundError$1.prototype);
|
|
798
967
|
}
|
|
799
968
|
}
|
|
800
|
-
class ProjectNotFoundError$1 extends WebrpcError$1 {
|
|
801
|
-
constructor(name = 'ProjectNotFound', code = 3002, message = 'Project not found', status = 0, cause) {
|
|
802
|
-
super(name, code, message, status, cause);
|
|
803
|
-
Object.setPrototypeOf(this, ProjectNotFoundError$1.prototype);
|
|
804
|
-
}
|
|
805
|
-
}
|
|
806
969
|
class MetadataCallFailedError$1 extends WebrpcError$1 {
|
|
807
970
|
constructor(name = 'MetadataCallFailed', code = 3003, message = 'Metadata service call failed', status = 0, cause) {
|
|
808
971
|
super(name, code, message, status, cause);
|
|
@@ -827,13 +990,25 @@ let errors$1 = /*#__PURE__*/function (errors) {
|
|
|
827
990
|
errors["MethodNotFound"] = "MethodNotFound";
|
|
828
991
|
errors["RequestConflict"] = "RequestConflict";
|
|
829
992
|
errors["Aborted"] = "Aborted";
|
|
993
|
+
errors["Geoblocked"] = "Geoblocked";
|
|
994
|
+
errors["RateLimited"] = "RateLimited";
|
|
995
|
+
errors["ProjectNotFound"] = "ProjectNotFound";
|
|
996
|
+
errors["AccessKeyNotFound"] = "AccessKeyNotFound";
|
|
997
|
+
errors["AccessKeyMismatch"] = "AccessKeyMismatch";
|
|
998
|
+
errors["InvalidOrigin"] = "InvalidOrigin";
|
|
999
|
+
errors["InvalidService"] = "InvalidService";
|
|
1000
|
+
errors["UnauthorizedUser"] = "UnauthorizedUser";
|
|
1001
|
+
errors["QuotaExceeded"] = "QuotaExceeded";
|
|
1002
|
+
errors["RateLimit"] = "RateLimit";
|
|
1003
|
+
errors["NoDefaultKey"] = "NoDefaultKey";
|
|
1004
|
+
errors["MaxAccessKeys"] = "MaxAccessKeys";
|
|
1005
|
+
errors["AtLeastOneKey"] = "AtLeastOneKey";
|
|
830
1006
|
errors["Timeout"] = "Timeout";
|
|
831
1007
|
errors["InvalidArgument"] = "InvalidArgument";
|
|
832
1008
|
errors["Unavailable"] = "Unavailable";
|
|
833
1009
|
errors["QueryFailed"] = "QueryFailed";
|
|
834
1010
|
errors["ResourceExhausted"] = "ResourceExhausted";
|
|
835
1011
|
errors["NotFound"] = "NotFound";
|
|
836
|
-
errors["ProjectNotFound"] = "ProjectNotFound";
|
|
837
1012
|
errors["MetadataCallFailed"] = "MetadataCallFailed";
|
|
838
1013
|
return errors;
|
|
839
1014
|
}({});
|
|
@@ -855,22 +1030,34 @@ const webrpcErrorByCode$1 = {
|
|
|
855
1030
|
[1003]: MethodNotFoundError$1,
|
|
856
1031
|
[1004]: RequestConflictError$1,
|
|
857
1032
|
[1005]: AbortedError$1,
|
|
858
|
-
[
|
|
1033
|
+
[1006]: GeoblockedError$1,
|
|
1034
|
+
[1007]: RateLimitedError$1,
|
|
1035
|
+
[1100]: ProjectNotFoundError$1,
|
|
1036
|
+
[1101]: AccessKeyNotFoundError$1,
|
|
1037
|
+
[1102]: AccessKeyMismatchError$1,
|
|
1038
|
+
[1103]: InvalidOriginError$1,
|
|
1039
|
+
[1104]: InvalidServiceError$1,
|
|
1040
|
+
[1105]: UnauthorizedUserError$1,
|
|
1041
|
+
[1200]: QuotaExceededError$1,
|
|
1042
|
+
[1201]: RateLimitError$1,
|
|
1043
|
+
[1300]: NoDefaultKeyError$1,
|
|
1044
|
+
[1301]: MaxAccessKeysError$1,
|
|
1045
|
+
[1302]: AtLeastOneKeyError$1,
|
|
1046
|
+
[1900]: TimeoutError$1,
|
|
859
1047
|
[2001]: InvalidArgumentError$1,
|
|
860
1048
|
[2002]: UnavailableError$1,
|
|
861
1049
|
[2003]: QueryFailedError$1,
|
|
862
1050
|
[2004]: ResourceExhaustedError$1,
|
|
863
1051
|
[3000]: NotFoundError$1,
|
|
864
|
-
[3002]: ProjectNotFoundError$1,
|
|
865
1052
|
[3003]: MetadataCallFailedError$1
|
|
866
1053
|
};
|
|
867
1054
|
|
|
868
1055
|
/* eslint-disable */
|
|
869
|
-
// sequence-indexer v0.4.0
|
|
1056
|
+
// sequence-indexer v0.4.0 66abb6bfc9a1e09116bd84e9135fdda01da581aa
|
|
870
1057
|
// --
|
|
871
1058
|
// Code generated by webrpc-gen@v0.21.1 with typescript generator. DO NOT EDIT.
|
|
872
1059
|
//
|
|
873
|
-
// webrpc-gen -schema=indexer.ridl -service=IndexerGateway -target=typescript -client -out=./clients/indexergw
|
|
1060
|
+
// webrpc-gen -schema=indexer.ridl -service=IndexerGateway -target=typescript -client -out=./clients/indexergw.gen.ts
|
|
874
1061
|
|
|
875
1062
|
const WebrpcHeader = 'Webrpc';
|
|
876
1063
|
const WebrpcHeaderValue = 'webrpc@v0.21.1;gen-typescript@v0.15.1;sequence-indexer@v0.4.0';
|
|
@@ -882,7 +1069,7 @@ const WebRPCVersion = 'v1';
|
|
|
882
1069
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
883
1070
|
|
|
884
1071
|
// Schema hash generated from your RIDL schema
|
|
885
|
-
const WebRPCSchemaHash = '
|
|
1072
|
+
const WebRPCSchemaHash = '66abb6bfc9a1e09116bd84e9135fdda01da581aa';
|
|
886
1073
|
function VersionFromHeader(headers) {
|
|
887
1074
|
const headerValue = headers.get(WebrpcHeader);
|
|
888
1075
|
if (!headerValue) {
|
|
@@ -923,6 +1110,12 @@ function parseWebrpcGenVersions(header) {
|
|
|
923
1110
|
// Types
|
|
924
1111
|
//
|
|
925
1112
|
|
|
1113
|
+
let ResourceStatus = /*#__PURE__*/function (ResourceStatus) {
|
|
1114
|
+
ResourceStatus["NOT_AVAILABLE"] = "NOT_AVAILABLE";
|
|
1115
|
+
ResourceStatus["STALE"] = "STALE";
|
|
1116
|
+
ResourceStatus["AVAILABLE"] = "AVAILABLE";
|
|
1117
|
+
return ResourceStatus;
|
|
1118
|
+
}({});
|
|
926
1119
|
let ContractType = /*#__PURE__*/function (ContractType) {
|
|
927
1120
|
ContractType["UNKNOWN"] = "UNKNOWN";
|
|
928
1121
|
ContractType["NATIVE"] = "NATIVE";
|
|
@@ -1023,6 +1216,7 @@ class IndexerGateway {
|
|
|
1023
1216
|
return buildResponse(res).then(_data => {
|
|
1024
1217
|
return {
|
|
1025
1218
|
page: _data.page,
|
|
1219
|
+
nativeBalances: _data.nativeBalances,
|
|
1026
1220
|
balances: _data.balances
|
|
1027
1221
|
};
|
|
1028
1222
|
});
|
|
@@ -1037,6 +1231,7 @@ class IndexerGateway {
|
|
|
1037
1231
|
return buildResponse(res).then(_data => {
|
|
1038
1232
|
return {
|
|
1039
1233
|
page: _data.page,
|
|
1234
|
+
nativeBalances: _data.nativeBalances,
|
|
1040
1235
|
balances: _data.balances
|
|
1041
1236
|
};
|
|
1042
1237
|
});
|
|
@@ -1497,6 +1692,7 @@ var indexergw_gen = /*#__PURE__*/Object.freeze({
|
|
|
1497
1692
|
WebRPCSchemaVersion: WebRPCSchemaVersion,
|
|
1498
1693
|
WebRPCSchemaHash: WebRPCSchemaHash,
|
|
1499
1694
|
VersionFromHeader: VersionFromHeader,
|
|
1695
|
+
ResourceStatus: ResourceStatus,
|
|
1500
1696
|
ContractType: ContractType,
|
|
1501
1697
|
EventLogType: EventLogType,
|
|
1502
1698
|
EventLogDataType: EventLogDataType,
|
|
@@ -1600,22 +1796,34 @@ class SequenceIndexerGateway extends IndexerGateway {
|
|
|
1600
1796
|
}
|
|
1601
1797
|
|
|
1602
1798
|
exports.AbortedError = AbortedError$1;
|
|
1799
|
+
exports.AccessKeyMismatchError = AccessKeyMismatchError$1;
|
|
1800
|
+
exports.AccessKeyNotFoundError = AccessKeyNotFoundError$1;
|
|
1801
|
+
exports.AtLeastOneKeyError = AtLeastOneKeyError$1;
|
|
1603
1802
|
exports.ContractType = ContractType$1;
|
|
1604
1803
|
exports.ContractVerificationStatus = ContractVerificationStatus$1;
|
|
1605
1804
|
exports.EventLogDataType = EventLogDataType$1;
|
|
1606
1805
|
exports.EventLogType = EventLogType$1;
|
|
1806
|
+
exports.GeoblockedError = GeoblockedError$1;
|
|
1607
1807
|
exports.Indexer = Indexer;
|
|
1608
1808
|
exports.IndexerGateway = indexergw_gen;
|
|
1609
1809
|
exports.InvalidArgumentError = InvalidArgumentError$1;
|
|
1810
|
+
exports.InvalidOriginError = InvalidOriginError$1;
|
|
1811
|
+
exports.InvalidServiceError = InvalidServiceError$1;
|
|
1812
|
+
exports.MaxAccessKeysError = MaxAccessKeysError$1;
|
|
1610
1813
|
exports.MetadataCallFailedError = MetadataCallFailedError$1;
|
|
1611
1814
|
exports.MethodNotFoundError = MethodNotFoundError$1;
|
|
1815
|
+
exports.NoDefaultKeyError = NoDefaultKeyError$1;
|
|
1612
1816
|
exports.NotFoundError = NotFoundError$1;
|
|
1613
1817
|
exports.OrderStatus = OrderStatus$1;
|
|
1614
1818
|
exports.PermissionDeniedError = PermissionDeniedError$1;
|
|
1615
1819
|
exports.ProjectNotFoundError = ProjectNotFoundError$1;
|
|
1616
1820
|
exports.QueryFailedError = QueryFailedError$1;
|
|
1821
|
+
exports.QuotaExceededError = QuotaExceededError$1;
|
|
1822
|
+
exports.RateLimitError = RateLimitError$1;
|
|
1823
|
+
exports.RateLimitedError = RateLimitedError$1;
|
|
1617
1824
|
exports.RequestConflictError = RequestConflictError$1;
|
|
1618
1825
|
exports.ResourceExhaustedError = ResourceExhaustedError$1;
|
|
1826
|
+
exports.ResourceStatus = ResourceStatus$1;
|
|
1619
1827
|
exports.SequenceIndexer = SequenceIndexer;
|
|
1620
1828
|
exports.SequenceIndexerGateway = SequenceIndexerGateway;
|
|
1621
1829
|
exports.SessionExpiredError = SessionExpiredError$1;
|
|
@@ -1625,7 +1833,9 @@ exports.TransactionStatus = TransactionStatus$1;
|
|
|
1625
1833
|
exports.TransactionType = TransactionType$1;
|
|
1626
1834
|
exports.TxnTransferType = TxnTransferType$1;
|
|
1627
1835
|
exports.UnauthorizedError = UnauthorizedError$1;
|
|
1836
|
+
exports.UnauthorizedUserError = UnauthorizedUserError$1;
|
|
1628
1837
|
exports.UnavailableError = UnavailableError$1;
|
|
1838
|
+
exports.VersionFromHeader = VersionFromHeader$1;
|
|
1629
1839
|
exports.WebRPCSchemaHash = WebRPCSchemaHash$1;
|
|
1630
1840
|
exports.WebRPCSchemaVersion = WebRPCSchemaVersion$1;
|
|
1631
1841
|
exports.WebRPCVersion = WebRPCVersion$1;
|
|
@@ -1636,6 +1846,8 @@ exports.WebrpcBadRouteError = WebrpcBadRouteError$1;
|
|
|
1636
1846
|
exports.WebrpcClientDisconnectedError = WebrpcClientDisconnectedError$1;
|
|
1637
1847
|
exports.WebrpcEndpointError = WebrpcEndpointError$1;
|
|
1638
1848
|
exports.WebrpcError = WebrpcError$1;
|
|
1849
|
+
exports.WebrpcHeader = WebrpcHeader$1;
|
|
1850
|
+
exports.WebrpcHeaderValue = WebrpcHeaderValue$1;
|
|
1639
1851
|
exports.WebrpcInternalErrorError = WebrpcInternalErrorError$1;
|
|
1640
1852
|
exports.WebrpcRequestFailedError = WebrpcRequestFailedError$1;
|
|
1641
1853
|
exports.WebrpcServerPanicError = WebrpcServerPanicError$1;
|