@0xsequence/indexer 2.2.7 → 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
|
@@ -9,11 +9,14 @@ function _extends() {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
/* eslint-disable */
|
|
12
|
-
// sequence-indexer v0.4.0
|
|
12
|
+
// sequence-indexer v0.4.0 9d81c4f4d4f5fc770eebd69093322f3fa83b669a
|
|
13
13
|
// --
|
|
14
|
-
// Code generated by webrpc-gen@v0.
|
|
14
|
+
// Code generated by webrpc-gen@v0.21.1 with typescript generator. DO NOT EDIT.
|
|
15
15
|
//
|
|
16
|
-
// webrpc-gen -schema=indexer.ridl -target=typescript -client -out=./clients/indexer.gen.ts
|
|
16
|
+
// webrpc-gen -schema=indexer.ridl -service=Indexer -target=typescript -client -out=./clients/indexer.gen.ts
|
|
17
|
+
|
|
18
|
+
const WebrpcHeader$1 = 'Webrpc';
|
|
19
|
+
const WebrpcHeaderValue$1 = 'webrpc@v0.21.1;gen-typescript@v0.15.1;sequence-indexer@v0.4.0';
|
|
17
20
|
|
|
18
21
|
// WebRPC description and code-gen version
|
|
19
22
|
const WebRPCVersion$1 = 'v1';
|
|
@@ -22,12 +25,53 @@ const WebRPCVersion$1 = 'v1';
|
|
|
22
25
|
const WebRPCSchemaVersion$1 = 'v0.4.0';
|
|
23
26
|
|
|
24
27
|
// Schema hash generated from your RIDL schema
|
|
25
|
-
const WebRPCSchemaHash$1 = '
|
|
28
|
+
const WebRPCSchemaHash$1 = '9d81c4f4d4f5fc770eebd69093322f3fa83b669a';
|
|
29
|
+
function VersionFromHeader$1(headers) {
|
|
30
|
+
const headerValue = headers.get(WebrpcHeader$1);
|
|
31
|
+
if (!headerValue) {
|
|
32
|
+
return {
|
|
33
|
+
webrpcGenVersion: '',
|
|
34
|
+
codeGenName: '',
|
|
35
|
+
codeGenVersion: '',
|
|
36
|
+
schemaName: '',
|
|
37
|
+
schemaVersion: ''
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return parseWebrpcGenVersions$1(headerValue);
|
|
41
|
+
}
|
|
42
|
+
function parseWebrpcGenVersions$1(header) {
|
|
43
|
+
const versions = header.split(';');
|
|
44
|
+
if (versions.length < 3) {
|
|
45
|
+
return {
|
|
46
|
+
webrpcGenVersion: '',
|
|
47
|
+
codeGenName: '',
|
|
48
|
+
codeGenVersion: '',
|
|
49
|
+
schemaName: '',
|
|
50
|
+
schemaVersion: ''
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
const [_, webrpcGenVersion] = versions[0].split('@');
|
|
54
|
+
const [codeGenName, codeGenVersion] = versions[1].split('@');
|
|
55
|
+
const [schemaName, schemaVersion] = versions[2].split('@');
|
|
56
|
+
return {
|
|
57
|
+
webrpcGenVersion,
|
|
58
|
+
codeGenName,
|
|
59
|
+
codeGenVersion,
|
|
60
|
+
schemaName,
|
|
61
|
+
schemaVersion
|
|
62
|
+
};
|
|
63
|
+
}
|
|
26
64
|
|
|
27
65
|
//
|
|
28
66
|
// Types
|
|
29
67
|
//
|
|
30
68
|
|
|
69
|
+
let ResourceStatus$1 = /*#__PURE__*/function (ResourceStatus) {
|
|
70
|
+
ResourceStatus["NOT_AVAILABLE"] = "NOT_AVAILABLE";
|
|
71
|
+
ResourceStatus["STALE"] = "STALE";
|
|
72
|
+
ResourceStatus["AVAILABLE"] = "AVAILABLE";
|
|
73
|
+
return ResourceStatus;
|
|
74
|
+
}({});
|
|
31
75
|
let ContractType$1 = /*#__PURE__*/function (ContractType) {
|
|
32
76
|
ContractType["UNKNOWN"] = "UNKNOWN";
|
|
33
77
|
ContractType["NATIVE"] = "NATIVE";
|
|
@@ -179,6 +223,7 @@ class Indexer {
|
|
|
179
223
|
return buildResponse$1(res).then(_data => {
|
|
180
224
|
return {
|
|
181
225
|
page: _data.page,
|
|
226
|
+
nativeBalances: _data.nativeBalances,
|
|
182
227
|
balances: _data.balances
|
|
183
228
|
};
|
|
184
229
|
});
|
|
@@ -193,6 +238,7 @@ class Indexer {
|
|
|
193
238
|
return buildResponse$1(res).then(_data => {
|
|
194
239
|
return {
|
|
195
240
|
page: _data.page,
|
|
241
|
+
nativeBalances: _data.nativeBalances,
|
|
196
242
|
balances: _data.balances
|
|
197
243
|
};
|
|
198
244
|
});
|
|
@@ -258,12 +304,13 @@ class Indexer {
|
|
|
258
304
|
});
|
|
259
305
|
});
|
|
260
306
|
};
|
|
261
|
-
this.
|
|
262
|
-
return this.fetch(this.url('
|
|
307
|
+
this.getTokenIDs = (args, headers, signal) => {
|
|
308
|
+
return this.fetch(this.url('GetTokenIDs'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
263
309
|
return buildResponse$1(res).then(_data => {
|
|
264
310
|
return {
|
|
265
311
|
page: _data.page,
|
|
266
|
-
|
|
312
|
+
contractType: _data.contractType,
|
|
313
|
+
tokenIDs: _data.tokenIDs
|
|
267
314
|
};
|
|
268
315
|
});
|
|
269
316
|
}, error => {
|
|
@@ -272,12 +319,13 @@ class Indexer {
|
|
|
272
319
|
});
|
|
273
320
|
});
|
|
274
321
|
};
|
|
275
|
-
this.
|
|
276
|
-
return this.fetch(this.url('
|
|
322
|
+
this.getTokenIDRanges = (args, headers, signal) => {
|
|
323
|
+
return this.fetch(this.url('GetTokenIDRanges'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
277
324
|
return buildResponse$1(res).then(_data => {
|
|
278
325
|
return {
|
|
279
|
-
|
|
280
|
-
|
|
326
|
+
contractType: _data.contractType,
|
|
327
|
+
tokenIDRanges: _data.tokenIDRanges,
|
|
328
|
+
moreRanges: _data.moreRanges
|
|
281
329
|
};
|
|
282
330
|
});
|
|
283
331
|
}, error => {
|
|
@@ -286,10 +334,13 @@ class Indexer {
|
|
|
286
334
|
});
|
|
287
335
|
});
|
|
288
336
|
};
|
|
289
|
-
this.
|
|
290
|
-
return this.fetch(this.url('
|
|
337
|
+
this.getBalanceUpdates = (args, headers, signal) => {
|
|
338
|
+
return this.fetch(this.url('GetBalanceUpdates'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
291
339
|
return buildResponse$1(res).then(_data => {
|
|
292
|
-
return {
|
|
340
|
+
return {
|
|
341
|
+
page: _data.page,
|
|
342
|
+
balances: _data.balances
|
|
343
|
+
};
|
|
293
344
|
});
|
|
294
345
|
}, error => {
|
|
295
346
|
throw WebrpcRequestFailedError$1.new({
|
|
@@ -297,11 +348,12 @@ class Indexer {
|
|
|
297
348
|
});
|
|
298
349
|
});
|
|
299
350
|
};
|
|
300
|
-
this.
|
|
301
|
-
return this.fetch(this.url('
|
|
351
|
+
this.getTransactionHistory = (args, headers, signal) => {
|
|
352
|
+
return this.fetch(this.url('GetTransactionHistory'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
302
353
|
return buildResponse$1(res).then(_data => {
|
|
303
354
|
return {
|
|
304
|
-
|
|
355
|
+
page: _data.page,
|
|
356
|
+
transactions: _data.transactions
|
|
305
357
|
};
|
|
306
358
|
});
|
|
307
359
|
}, error => {
|
|
@@ -310,12 +362,11 @@ class Indexer {
|
|
|
310
362
|
});
|
|
311
363
|
});
|
|
312
364
|
};
|
|
313
|
-
this.
|
|
314
|
-
return this.fetch(this.url('
|
|
365
|
+
this.fetchTransactionReceipt = (args, headers, signal) => {
|
|
366
|
+
return this.fetch(this.url('FetchTransactionReceipt'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
315
367
|
return buildResponse$1(res).then(_data => {
|
|
316
368
|
return {
|
|
317
|
-
|
|
318
|
-
orders: _data.orders
|
|
369
|
+
receipt: _data.receipt
|
|
319
370
|
};
|
|
320
371
|
});
|
|
321
372
|
}, error => {
|
|
@@ -324,11 +375,11 @@ class Indexer {
|
|
|
324
375
|
});
|
|
325
376
|
});
|
|
326
377
|
};
|
|
327
|
-
this.
|
|
328
|
-
return this.fetch(this.url('
|
|
378
|
+
this.fetchTransactionReceiptWithFilter = (args, headers, signal) => {
|
|
379
|
+
return this.fetch(this.url('FetchTransactionReceiptWithFilter'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
329
380
|
return buildResponse$1(res).then(_data => {
|
|
330
381
|
return {
|
|
331
|
-
|
|
382
|
+
receipt: _data.receipt
|
|
332
383
|
};
|
|
333
384
|
});
|
|
334
385
|
}, error => {
|
|
@@ -337,12 +388,34 @@ class Indexer {
|
|
|
337
388
|
});
|
|
338
389
|
});
|
|
339
390
|
};
|
|
340
|
-
this.
|
|
341
|
-
|
|
391
|
+
this.subscribeReceipts = (args, options) => {
|
|
392
|
+
const _fetch = () => this.fetch(this.url('SubscribeReceipts'), createHTTPRequest$1(args, options.headers, options.signal)).then(async function (res) {
|
|
393
|
+
await sseResponse(res, options, _fetch);
|
|
394
|
+
}, error => {
|
|
395
|
+
options.onError(error, _fetch);
|
|
396
|
+
});
|
|
397
|
+
return _fetch();
|
|
398
|
+
};
|
|
399
|
+
this.subscribeEvents = (args, options) => {
|
|
400
|
+
const _fetch = () => this.fetch(this.url('SubscribeEvents'), createHTTPRequest$1(args, options.headers, options.signal)).then(async function (res) {
|
|
401
|
+
await sseResponse(res, options, _fetch);
|
|
402
|
+
}, error => {
|
|
403
|
+
options.onError(error, _fetch);
|
|
404
|
+
});
|
|
405
|
+
return _fetch();
|
|
406
|
+
};
|
|
407
|
+
this.subscribeBalanceUpdates = (args, options) => {
|
|
408
|
+
const _fetch = () => this.fetch(this.url('SubscribeBalanceUpdates'), createHTTPRequest$1(args, options.headers, options.signal)).then(async function (res) {
|
|
409
|
+
await sseResponse(res, options, _fetch);
|
|
410
|
+
}, error => {
|
|
411
|
+
options.onError(error, _fetch);
|
|
412
|
+
});
|
|
413
|
+
return _fetch();
|
|
414
|
+
};
|
|
415
|
+
this.syncBalance = (args, headers, signal) => {
|
|
416
|
+
return this.fetch(this.url('SyncBalance'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
342
417
|
return buildResponse$1(res).then(_data => {
|
|
343
|
-
return {
|
|
344
|
-
receipt: _data.receipt
|
|
345
|
-
};
|
|
418
|
+
return {};
|
|
346
419
|
});
|
|
347
420
|
}, error => {
|
|
348
421
|
throw WebrpcRequestFailedError$1.new({
|
|
@@ -416,6 +489,19 @@ class Indexer {
|
|
|
416
489
|
});
|
|
417
490
|
});
|
|
418
491
|
};
|
|
492
|
+
this.removeAllWebhookListeners = (args, headers, signal) => {
|
|
493
|
+
return this.fetch(this.url('RemoveAllWebhookListeners'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
494
|
+
return buildResponse$1(res).then(_data => {
|
|
495
|
+
return {
|
|
496
|
+
status: _data.status
|
|
497
|
+
};
|
|
498
|
+
});
|
|
499
|
+
}, error => {
|
|
500
|
+
throw WebrpcRequestFailedError$1.new({
|
|
501
|
+
cause: `fetch(): ${error.message || ''}`
|
|
502
|
+
});
|
|
503
|
+
});
|
|
504
|
+
};
|
|
419
505
|
this.toggleWebhookListener = (args, headers, signal) => {
|
|
420
506
|
return this.fetch(this.url('ToggleWebhookListener'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
421
507
|
return buildResponse$1(res).then(_data => {
|
|
@@ -455,29 +541,32 @@ class Indexer {
|
|
|
455
541
|
});
|
|
456
542
|
});
|
|
457
543
|
};
|
|
458
|
-
this.
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
this.subscribeEvents = (args, options) => {
|
|
467
|
-
const _fetch = () => this.fetch(this.url('SubscribeEvents'), createHTTPRequest$1(args, options.headers, options.signal)).then(async function (res) {
|
|
468
|
-
await sseResponse(res, options, _fetch);
|
|
544
|
+
this.getOrderbookOrders = (args, headers, signal) => {
|
|
545
|
+
return this.fetch(this.url('GetOrderbookOrders'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
546
|
+
return buildResponse$1(res).then(_data => {
|
|
547
|
+
return {
|
|
548
|
+
page: _data.page,
|
|
549
|
+
orders: _data.orders
|
|
550
|
+
};
|
|
551
|
+
});
|
|
469
552
|
}, error => {
|
|
470
|
-
|
|
553
|
+
throw WebrpcRequestFailedError$1.new({
|
|
554
|
+
cause: `fetch(): ${error.message || ''}`
|
|
555
|
+
});
|
|
471
556
|
});
|
|
472
|
-
return _fetch();
|
|
473
557
|
};
|
|
474
|
-
this.
|
|
475
|
-
|
|
476
|
-
|
|
558
|
+
this.getTopOrders = (args, headers, signal) => {
|
|
559
|
+
return this.fetch(this.url('GetTopOrders'), createHTTPRequest$1(args, headers, signal)).then(res => {
|
|
560
|
+
return buildResponse$1(res).then(_data => {
|
|
561
|
+
return {
|
|
562
|
+
orders: _data.orders
|
|
563
|
+
};
|
|
564
|
+
});
|
|
477
565
|
}, error => {
|
|
478
|
-
|
|
566
|
+
throw WebrpcRequestFailedError$1.new({
|
|
567
|
+
cause: `fetch(): ${error.message || ''}`
|
|
568
|
+
});
|
|
479
569
|
});
|
|
480
|
-
return _fetch();
|
|
481
570
|
};
|
|
482
571
|
this.hostname = hostname.replace(/\/*$/, '');
|
|
483
572
|
this.fetch = (input, init) => fetch(input, init);
|
|
@@ -591,11 +680,13 @@ const sseResponse = async (res, options, retryFetch) => {
|
|
|
591
680
|
}
|
|
592
681
|
};
|
|
593
682
|
const createHTTPRequest$1 = (body = {}, headers = {}, signal = null) => {
|
|
683
|
+
const reqHeaders = _extends({}, headers, {
|
|
684
|
+
'Content-Type': 'application/json'
|
|
685
|
+
});
|
|
686
|
+
reqHeaders[WebrpcHeader$1] = WebrpcHeaderValue$1;
|
|
594
687
|
return {
|
|
595
688
|
method: 'POST',
|
|
596
|
-
headers:
|
|
597
|
-
'Content-Type': 'application/json'
|
|
598
|
-
}),
|
|
689
|
+
headers: reqHeaders,
|
|
599
690
|
body: JSON.stringify(body || {}),
|
|
600
691
|
signal
|
|
601
692
|
};
|
|
@@ -757,8 +848,86 @@ class AbortedError$1 extends WebrpcError$1 {
|
|
|
757
848
|
Object.setPrototypeOf(this, AbortedError$1.prototype);
|
|
758
849
|
}
|
|
759
850
|
}
|
|
851
|
+
class GeoblockedError$1 extends WebrpcError$1 {
|
|
852
|
+
constructor(name = 'Geoblocked', code = 1006, message = 'Geoblocked region', status = 0, cause) {
|
|
853
|
+
super(name, code, message, status, cause);
|
|
854
|
+
Object.setPrototypeOf(this, GeoblockedError$1.prototype);
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
class RateLimitedError$1 extends WebrpcError$1 {
|
|
858
|
+
constructor(name = 'RateLimited', code = 1007, message = 'Rate-limited. Please slow down.', status = 0, cause) {
|
|
859
|
+
super(name, code, message, status, cause);
|
|
860
|
+
Object.setPrototypeOf(this, RateLimitedError$1.prototype);
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
class ProjectNotFoundError$1 extends WebrpcError$1 {
|
|
864
|
+
constructor(name = 'ProjectNotFound', code = 1100, message = 'Project not found', status = 0, cause) {
|
|
865
|
+
super(name, code, message, status, cause);
|
|
866
|
+
Object.setPrototypeOf(this, ProjectNotFoundError$1.prototype);
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
class AccessKeyNotFoundError$1 extends WebrpcError$1 {
|
|
870
|
+
constructor(name = 'AccessKeyNotFound', code = 1101, message = 'Access key not found', status = 0, cause) {
|
|
871
|
+
super(name, code, message, status, cause);
|
|
872
|
+
Object.setPrototypeOf(this, AccessKeyNotFoundError$1.prototype);
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
class AccessKeyMismatchError$1 extends WebrpcError$1 {
|
|
876
|
+
constructor(name = 'AccessKeyMismatch', code = 1102, message = 'Access key mismatch', status = 0, cause) {
|
|
877
|
+
super(name, code, message, status, cause);
|
|
878
|
+
Object.setPrototypeOf(this, AccessKeyMismatchError$1.prototype);
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
class InvalidOriginError$1 extends WebrpcError$1 {
|
|
882
|
+
constructor(name = 'InvalidOrigin', code = 1103, message = 'Invalid origin for Access Key', status = 0, cause) {
|
|
883
|
+
super(name, code, message, status, cause);
|
|
884
|
+
Object.setPrototypeOf(this, InvalidOriginError$1.prototype);
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
class InvalidServiceError$1 extends WebrpcError$1 {
|
|
888
|
+
constructor(name = 'InvalidService', code = 1104, message = 'Service not enabled for Access key', status = 0, cause) {
|
|
889
|
+
super(name, code, message, status, cause);
|
|
890
|
+
Object.setPrototypeOf(this, InvalidServiceError$1.prototype);
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
class UnauthorizedUserError$1 extends WebrpcError$1 {
|
|
894
|
+
constructor(name = 'UnauthorizedUser', code = 1105, message = 'Unauthorized user', status = 0, cause) {
|
|
895
|
+
super(name, code, message, status, cause);
|
|
896
|
+
Object.setPrototypeOf(this, UnauthorizedUserError$1.prototype);
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
class QuotaExceededError$1 extends WebrpcError$1 {
|
|
900
|
+
constructor(name = 'QuotaExceeded', code = 1200, message = 'Quota exceeded', status = 0, cause) {
|
|
901
|
+
super(name, code, message, status, cause);
|
|
902
|
+
Object.setPrototypeOf(this, QuotaExceededError$1.prototype);
|
|
903
|
+
}
|
|
904
|
+
}
|
|
905
|
+
class RateLimitError$1 extends WebrpcError$1 {
|
|
906
|
+
constructor(name = 'RateLimit', code = 1201, message = 'Rate limit exceeded', status = 0, cause) {
|
|
907
|
+
super(name, code, message, status, cause);
|
|
908
|
+
Object.setPrototypeOf(this, RateLimitError$1.prototype);
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
class NoDefaultKeyError$1 extends WebrpcError$1 {
|
|
912
|
+
constructor(name = 'NoDefaultKey', code = 1300, message = 'No default access key found', status = 0, cause) {
|
|
913
|
+
super(name, code, message, status, cause);
|
|
914
|
+
Object.setPrototypeOf(this, NoDefaultKeyError$1.prototype);
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
class MaxAccessKeysError$1 extends WebrpcError$1 {
|
|
918
|
+
constructor(name = 'MaxAccessKeys', code = 1301, message = 'Access keys limit reached', status = 0, cause) {
|
|
919
|
+
super(name, code, message, status, cause);
|
|
920
|
+
Object.setPrototypeOf(this, MaxAccessKeysError$1.prototype);
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
class AtLeastOneKeyError$1 extends WebrpcError$1 {
|
|
924
|
+
constructor(name = 'AtLeastOneKey', code = 1302, message = 'You need at least one Access Key', status = 0, cause) {
|
|
925
|
+
super(name, code, message, status, cause);
|
|
926
|
+
Object.setPrototypeOf(this, AtLeastOneKeyError$1.prototype);
|
|
927
|
+
}
|
|
928
|
+
}
|
|
760
929
|
class TimeoutError$1 extends WebrpcError$1 {
|
|
761
|
-
constructor(name = 'Timeout', code =
|
|
930
|
+
constructor(name = 'Timeout', code = 1900, message = 'Request timed out', status = 0, cause) {
|
|
762
931
|
super(name, code, message, status, cause);
|
|
763
932
|
Object.setPrototypeOf(this, TimeoutError$1.prototype);
|
|
764
933
|
}
|
|
@@ -793,12 +962,6 @@ class NotFoundError$1 extends WebrpcError$1 {
|
|
|
793
962
|
Object.setPrototypeOf(this, NotFoundError$1.prototype);
|
|
794
963
|
}
|
|
795
964
|
}
|
|
796
|
-
class ProjectNotFoundError$1 extends WebrpcError$1 {
|
|
797
|
-
constructor(name = 'ProjectNotFound', code = 3002, message = 'Project not found', status = 0, cause) {
|
|
798
|
-
super(name, code, message, status, cause);
|
|
799
|
-
Object.setPrototypeOf(this, ProjectNotFoundError$1.prototype);
|
|
800
|
-
}
|
|
801
|
-
}
|
|
802
965
|
class MetadataCallFailedError$1 extends WebrpcError$1 {
|
|
803
966
|
constructor(name = 'MetadataCallFailed', code = 3003, message = 'Metadata service call failed', status = 0, cause) {
|
|
804
967
|
super(name, code, message, status, cause);
|
|
@@ -823,13 +986,25 @@ let errors$1 = /*#__PURE__*/function (errors) {
|
|
|
823
986
|
errors["MethodNotFound"] = "MethodNotFound";
|
|
824
987
|
errors["RequestConflict"] = "RequestConflict";
|
|
825
988
|
errors["Aborted"] = "Aborted";
|
|
989
|
+
errors["Geoblocked"] = "Geoblocked";
|
|
990
|
+
errors["RateLimited"] = "RateLimited";
|
|
991
|
+
errors["ProjectNotFound"] = "ProjectNotFound";
|
|
992
|
+
errors["AccessKeyNotFound"] = "AccessKeyNotFound";
|
|
993
|
+
errors["AccessKeyMismatch"] = "AccessKeyMismatch";
|
|
994
|
+
errors["InvalidOrigin"] = "InvalidOrigin";
|
|
995
|
+
errors["InvalidService"] = "InvalidService";
|
|
996
|
+
errors["UnauthorizedUser"] = "UnauthorizedUser";
|
|
997
|
+
errors["QuotaExceeded"] = "QuotaExceeded";
|
|
998
|
+
errors["RateLimit"] = "RateLimit";
|
|
999
|
+
errors["NoDefaultKey"] = "NoDefaultKey";
|
|
1000
|
+
errors["MaxAccessKeys"] = "MaxAccessKeys";
|
|
1001
|
+
errors["AtLeastOneKey"] = "AtLeastOneKey";
|
|
826
1002
|
errors["Timeout"] = "Timeout";
|
|
827
1003
|
errors["InvalidArgument"] = "InvalidArgument";
|
|
828
1004
|
errors["Unavailable"] = "Unavailable";
|
|
829
1005
|
errors["QueryFailed"] = "QueryFailed";
|
|
830
1006
|
errors["ResourceExhausted"] = "ResourceExhausted";
|
|
831
1007
|
errors["NotFound"] = "NotFound";
|
|
832
|
-
errors["ProjectNotFound"] = "ProjectNotFound";
|
|
833
1008
|
errors["MetadataCallFailed"] = "MetadataCallFailed";
|
|
834
1009
|
return errors;
|
|
835
1010
|
}({});
|
|
@@ -851,22 +1026,34 @@ const webrpcErrorByCode$1 = {
|
|
|
851
1026
|
[1003]: MethodNotFoundError$1,
|
|
852
1027
|
[1004]: RequestConflictError$1,
|
|
853
1028
|
[1005]: AbortedError$1,
|
|
854
|
-
[
|
|
1029
|
+
[1006]: GeoblockedError$1,
|
|
1030
|
+
[1007]: RateLimitedError$1,
|
|
1031
|
+
[1100]: ProjectNotFoundError$1,
|
|
1032
|
+
[1101]: AccessKeyNotFoundError$1,
|
|
1033
|
+
[1102]: AccessKeyMismatchError$1,
|
|
1034
|
+
[1103]: InvalidOriginError$1,
|
|
1035
|
+
[1104]: InvalidServiceError$1,
|
|
1036
|
+
[1105]: UnauthorizedUserError$1,
|
|
1037
|
+
[1200]: QuotaExceededError$1,
|
|
1038
|
+
[1201]: RateLimitError$1,
|
|
1039
|
+
[1300]: NoDefaultKeyError$1,
|
|
1040
|
+
[1301]: MaxAccessKeysError$1,
|
|
1041
|
+
[1302]: AtLeastOneKeyError$1,
|
|
1042
|
+
[1900]: TimeoutError$1,
|
|
855
1043
|
[2001]: InvalidArgumentError$1,
|
|
856
1044
|
[2002]: UnavailableError$1,
|
|
857
1045
|
[2003]: QueryFailedError$1,
|
|
858
1046
|
[2004]: ResourceExhaustedError$1,
|
|
859
1047
|
[3000]: NotFoundError$1,
|
|
860
|
-
[3002]: ProjectNotFoundError$1,
|
|
861
1048
|
[3003]: MetadataCallFailedError$1
|
|
862
1049
|
};
|
|
863
1050
|
|
|
864
1051
|
/* eslint-disable */
|
|
865
|
-
// sequence-indexer v0.4.0
|
|
1052
|
+
// sequence-indexer v0.4.0 66abb6bfc9a1e09116bd84e9135fdda01da581aa
|
|
866
1053
|
// --
|
|
867
1054
|
// Code generated by webrpc-gen@v0.21.1 with typescript generator. DO NOT EDIT.
|
|
868
1055
|
//
|
|
869
|
-
// webrpc-gen -schema=indexer.ridl -service=IndexerGateway -target=typescript -client -out=./clients/indexergw
|
|
1056
|
+
// webrpc-gen -schema=indexer.ridl -service=IndexerGateway -target=typescript -client -out=./clients/indexergw.gen.ts
|
|
870
1057
|
|
|
871
1058
|
const WebrpcHeader = 'Webrpc';
|
|
872
1059
|
const WebrpcHeaderValue = 'webrpc@v0.21.1;gen-typescript@v0.15.1;sequence-indexer@v0.4.0';
|
|
@@ -878,7 +1065,7 @@ const WebRPCVersion = 'v1';
|
|
|
878
1065
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
879
1066
|
|
|
880
1067
|
// Schema hash generated from your RIDL schema
|
|
881
|
-
const WebRPCSchemaHash = '
|
|
1068
|
+
const WebRPCSchemaHash = '66abb6bfc9a1e09116bd84e9135fdda01da581aa';
|
|
882
1069
|
function VersionFromHeader(headers) {
|
|
883
1070
|
const headerValue = headers.get(WebrpcHeader);
|
|
884
1071
|
if (!headerValue) {
|
|
@@ -919,6 +1106,12 @@ function parseWebrpcGenVersions(header) {
|
|
|
919
1106
|
// Types
|
|
920
1107
|
//
|
|
921
1108
|
|
|
1109
|
+
let ResourceStatus = /*#__PURE__*/function (ResourceStatus) {
|
|
1110
|
+
ResourceStatus["NOT_AVAILABLE"] = "NOT_AVAILABLE";
|
|
1111
|
+
ResourceStatus["STALE"] = "STALE";
|
|
1112
|
+
ResourceStatus["AVAILABLE"] = "AVAILABLE";
|
|
1113
|
+
return ResourceStatus;
|
|
1114
|
+
}({});
|
|
922
1115
|
let ContractType = /*#__PURE__*/function (ContractType) {
|
|
923
1116
|
ContractType["UNKNOWN"] = "UNKNOWN";
|
|
924
1117
|
ContractType["NATIVE"] = "NATIVE";
|
|
@@ -1019,6 +1212,7 @@ class IndexerGateway {
|
|
|
1019
1212
|
return buildResponse(res).then(_data => {
|
|
1020
1213
|
return {
|
|
1021
1214
|
page: _data.page,
|
|
1215
|
+
nativeBalances: _data.nativeBalances,
|
|
1022
1216
|
balances: _data.balances
|
|
1023
1217
|
};
|
|
1024
1218
|
});
|
|
@@ -1033,6 +1227,7 @@ class IndexerGateway {
|
|
|
1033
1227
|
return buildResponse(res).then(_data => {
|
|
1034
1228
|
return {
|
|
1035
1229
|
page: _data.page,
|
|
1230
|
+
nativeBalances: _data.nativeBalances,
|
|
1036
1231
|
balances: _data.balances
|
|
1037
1232
|
};
|
|
1038
1233
|
});
|
|
@@ -1493,6 +1688,7 @@ var indexergw_gen = /*#__PURE__*/Object.freeze({
|
|
|
1493
1688
|
WebRPCSchemaVersion: WebRPCSchemaVersion,
|
|
1494
1689
|
WebRPCSchemaHash: WebRPCSchemaHash,
|
|
1495
1690
|
VersionFromHeader: VersionFromHeader,
|
|
1691
|
+
ResourceStatus: ResourceStatus,
|
|
1496
1692
|
ContractType: ContractType,
|
|
1497
1693
|
EventLogType: EventLogType,
|
|
1498
1694
|
EventLogDataType: EventLogDataType,
|
|
@@ -1595,4 +1791,4 @@ class SequenceIndexerGateway extends IndexerGateway {
|
|
|
1595
1791
|
}
|
|
1596
1792
|
}
|
|
1597
1793
|
|
|
1598
|
-
export { AbortedError$1 as AbortedError, ContractType$1 as ContractType, ContractVerificationStatus$1 as ContractVerificationStatus, EventLogDataType$1 as EventLogDataType, EventLogType$1 as EventLogType, Indexer, indexergw_gen as IndexerGateway, InvalidArgumentError$1 as InvalidArgumentError, MetadataCallFailedError$1 as MetadataCallFailedError, MethodNotFoundError$1 as MethodNotFoundError, NotFoundError$1 as NotFoundError, OrderStatus$1 as OrderStatus, PermissionDeniedError$1 as PermissionDeniedError, ProjectNotFoundError$1 as ProjectNotFoundError, QueryFailedError$1 as QueryFailedError, RequestConflictError$1 as RequestConflictError, ResourceExhaustedError$1 as ResourceExhaustedError, SequenceIndexer, SequenceIndexerGateway, SessionExpiredError$1 as SessionExpiredError, SortOrder$1 as SortOrder, TimeoutError$1 as TimeoutError, TransactionStatus$1 as TransactionStatus, TransactionType$1 as TransactionType, TxnTransferType$1 as TxnTransferType, UnauthorizedError$1 as UnauthorizedError, UnavailableError$1 as UnavailableError, WebRPCSchemaHash$1 as WebRPCSchemaHash, WebRPCSchemaVersion$1 as WebRPCSchemaVersion, WebRPCVersion$1 as WebRPCVersion, WebrpcBadMethodError$1 as WebrpcBadMethodError, WebrpcBadRequestError$1 as WebrpcBadRequestError, WebrpcBadResponseError$1 as WebrpcBadResponseError, WebrpcBadRouteError$1 as WebrpcBadRouteError, WebrpcClientDisconnectedError$1 as WebrpcClientDisconnectedError, WebrpcEndpointError$1 as WebrpcEndpointError, WebrpcError$1 as WebrpcError, WebrpcInternalErrorError$1 as WebrpcInternalErrorError, WebrpcRequestFailedError$1 as WebrpcRequestFailedError, WebrpcServerPanicError$1 as WebrpcServerPanicError, WebrpcStreamFinishedError$1 as WebrpcStreamFinishedError, WebrpcStreamLostError$1 as WebrpcStreamLostError, errors$1 as errors };
|
|
1794
|
+
export { AbortedError$1 as AbortedError, AccessKeyMismatchError$1 as AccessKeyMismatchError, AccessKeyNotFoundError$1 as AccessKeyNotFoundError, AtLeastOneKeyError$1 as AtLeastOneKeyError, ContractType$1 as ContractType, ContractVerificationStatus$1 as ContractVerificationStatus, EventLogDataType$1 as EventLogDataType, EventLogType$1 as EventLogType, GeoblockedError$1 as GeoblockedError, Indexer, indexergw_gen as IndexerGateway, InvalidArgumentError$1 as InvalidArgumentError, InvalidOriginError$1 as InvalidOriginError, InvalidServiceError$1 as InvalidServiceError, MaxAccessKeysError$1 as MaxAccessKeysError, MetadataCallFailedError$1 as MetadataCallFailedError, MethodNotFoundError$1 as MethodNotFoundError, NoDefaultKeyError$1 as NoDefaultKeyError, NotFoundError$1 as NotFoundError, OrderStatus$1 as OrderStatus, PermissionDeniedError$1 as PermissionDeniedError, ProjectNotFoundError$1 as ProjectNotFoundError, QueryFailedError$1 as QueryFailedError, QuotaExceededError$1 as QuotaExceededError, RateLimitError$1 as RateLimitError, RateLimitedError$1 as RateLimitedError, RequestConflictError$1 as RequestConflictError, ResourceExhaustedError$1 as ResourceExhaustedError, ResourceStatus$1 as ResourceStatus, SequenceIndexer, SequenceIndexerGateway, SessionExpiredError$1 as SessionExpiredError, SortOrder$1 as SortOrder, TimeoutError$1 as TimeoutError, TransactionStatus$1 as TransactionStatus, TransactionType$1 as TransactionType, TxnTransferType$1 as TxnTransferType, UnauthorizedError$1 as UnauthorizedError, UnauthorizedUserError$1 as UnauthorizedUserError, UnavailableError$1 as UnavailableError, VersionFromHeader$1 as VersionFromHeader, WebRPCSchemaHash$1 as WebRPCSchemaHash, WebRPCSchemaVersion$1 as WebRPCSchemaVersion, WebRPCVersion$1 as WebRPCVersion, WebrpcBadMethodError$1 as WebrpcBadMethodError, WebrpcBadRequestError$1 as WebrpcBadRequestError, WebrpcBadResponseError$1 as WebrpcBadResponseError, WebrpcBadRouteError$1 as WebrpcBadRouteError, WebrpcClientDisconnectedError$1 as WebrpcClientDisconnectedError, WebrpcEndpointError$1 as WebrpcEndpointError, WebrpcError$1 as WebrpcError, WebrpcHeader$1 as WebrpcHeader, WebrpcHeaderValue$1 as WebrpcHeaderValue, WebrpcInternalErrorError$1 as WebrpcInternalErrorError, WebrpcRequestFailedError$1 as WebrpcRequestFailedError, WebrpcServerPanicError$1 as WebrpcServerPanicError, WebrpcStreamFinishedError$1 as WebrpcStreamFinishedError, WebrpcStreamLostError$1 as WebrpcStreamLostError, errors$1 as errors };
|