@0xsequence/metadata 2.3.2 → 2.3.4
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 +25 -242
- package/dist/0xsequence-metadata.cjs.prod.js +25 -242
- package/dist/0xsequence-metadata.esm.js +25 -242
- package/dist/declarations/src/metadata.gen.d.ts +18 -239
- package/package.json +1 -1
- package/src/metadata.gen.ts +59 -607
|
@@ -9,11 +9,11 @@ function _extends() {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
/* eslint-disable */
|
|
12
|
-
// sequence-metadata v0.4.0
|
|
12
|
+
// sequence-metadata v0.4.0 272de60a6f0132e30ec4f29e8aa384109bc880e0
|
|
13
13
|
// --
|
|
14
14
|
// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
|
|
15
15
|
//
|
|
16
|
-
// webrpc-gen -schema=metadata.ridl -target=typescript -client -out=./clients/metadata.gen.ts
|
|
16
|
+
// webrpc-gen -schema=metadata.ridl -target=typescript -client -ignore=@deprecated -out=./clients/metadata.gen.ts
|
|
17
17
|
|
|
18
18
|
const WebrpcHeader = 'Webrpc';
|
|
19
19
|
const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-metadata@v0.4.0';
|
|
@@ -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 = '272de60a6f0132e30ec4f29e8aa384109bc880e0';
|
|
29
29
|
function VersionFromHeader(headers) {
|
|
30
30
|
const headerValue = headers.get(WebrpcHeader);
|
|
31
31
|
if (!headerValue) {
|
|
@@ -288,60 +288,6 @@ class Metadata {
|
|
|
288
288
|
});
|
|
289
289
|
});
|
|
290
290
|
};
|
|
291
|
-
this.searchContractInfo = (args, headers, signal) => {
|
|
292
|
-
return this.fetch(this.url('SearchContractInfo'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
293
|
-
return buildResponse(res).then(_data => {
|
|
294
|
-
return {
|
|
295
|
-
contractInfoList: _data.contractInfoList
|
|
296
|
-
};
|
|
297
|
-
});
|
|
298
|
-
}, error => {
|
|
299
|
-
throw WebrpcRequestFailedError.new({
|
|
300
|
-
cause: `fetch(): ${error.message || ''}`
|
|
301
|
-
});
|
|
302
|
-
});
|
|
303
|
-
};
|
|
304
|
-
this.searchContractInfoBatch = (args, headers, signal) => {
|
|
305
|
-
return this.fetch(this.url('SearchContractInfoBatch'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
306
|
-
return buildResponse(res).then(_data => {
|
|
307
|
-
return {
|
|
308
|
-
contractInfoByChain: _data.contractInfoByChain
|
|
309
|
-
};
|
|
310
|
-
});
|
|
311
|
-
}, error => {
|
|
312
|
-
throw WebrpcRequestFailedError.new({
|
|
313
|
-
cause: `fetch(): ${error.message || ''}`
|
|
314
|
-
});
|
|
315
|
-
});
|
|
316
|
-
};
|
|
317
|
-
this.searchContracts = (args, headers, signal) => {
|
|
318
|
-
return this.fetch(this.url('SearchContracts'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
319
|
-
return buildResponse(res).then(_data => {
|
|
320
|
-
return {
|
|
321
|
-
contractInfo: _data.contractInfo,
|
|
322
|
-
nextPage: _data.nextPage
|
|
323
|
-
};
|
|
324
|
-
});
|
|
325
|
-
}, error => {
|
|
326
|
-
throw WebrpcRequestFailedError.new({
|
|
327
|
-
cause: `fetch(): ${error.message || ''}`
|
|
328
|
-
});
|
|
329
|
-
});
|
|
330
|
-
};
|
|
331
|
-
this.searchMetadata = (args, headers, signal) => {
|
|
332
|
-
return this.fetch(this.url('SearchMetadata'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
333
|
-
return buildResponse(res).then(_data => {
|
|
334
|
-
return {
|
|
335
|
-
tokenMetadata: _data.tokenMetadata,
|
|
336
|
-
contractInfo: _data.contractInfo
|
|
337
|
-
};
|
|
338
|
-
});
|
|
339
|
-
}, error => {
|
|
340
|
-
throw WebrpcRequestFailedError.new({
|
|
341
|
-
cause: `fetch(): ${error.message || ''}`
|
|
342
|
-
});
|
|
343
|
-
});
|
|
344
|
-
};
|
|
345
291
|
this.getTokenMetadata = (args, headers, signal) => {
|
|
346
292
|
return this.fetch(this.url('GetTokenMetadata'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
347
293
|
return buildResponse(res).then(_data => {
|
|
@@ -438,102 +384,6 @@ class Metadata {
|
|
|
438
384
|
});
|
|
439
385
|
});
|
|
440
386
|
};
|
|
441
|
-
this.refreshAllContractTokens = (args, headers, signal) => {
|
|
442
|
-
return this.fetch(this.url('RefreshAllContractTokens'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
443
|
-
return buildResponse(res).then(_data => {
|
|
444
|
-
return {
|
|
445
|
-
taskID: _data.taskID,
|
|
446
|
-
retryAfter: _data.retryAfter
|
|
447
|
-
};
|
|
448
|
-
});
|
|
449
|
-
}, error => {
|
|
450
|
-
throw WebrpcRequestFailedError.new({
|
|
451
|
-
cause: `fetch(): ${error.message || ''}`
|
|
452
|
-
});
|
|
453
|
-
});
|
|
454
|
-
};
|
|
455
|
-
this.searchTokens = (args, headers, signal) => {
|
|
456
|
-
return this.fetch(this.url('SearchTokens'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
457
|
-
return buildResponse(res).then(_data => {
|
|
458
|
-
return {
|
|
459
|
-
tokenMetadata: _data.tokenMetadata,
|
|
460
|
-
nextPage: _data.nextPage
|
|
461
|
-
};
|
|
462
|
-
});
|
|
463
|
-
}, error => {
|
|
464
|
-
throw WebrpcRequestFailedError.new({
|
|
465
|
-
cause: `fetch(): ${error.message || ''}`
|
|
466
|
-
});
|
|
467
|
-
});
|
|
468
|
-
};
|
|
469
|
-
this.tokenCollectionFilters = (args, headers, signal) => {
|
|
470
|
-
return this.fetch(this.url('TokenCollectionFilters'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
471
|
-
return buildResponse(res).then(_data => {
|
|
472
|
-
return {
|
|
473
|
-
filters: _data.filters
|
|
474
|
-
};
|
|
475
|
-
});
|
|
476
|
-
}, error => {
|
|
477
|
-
throw WebrpcRequestFailedError.new({
|
|
478
|
-
cause: `fetch(): ${error.message || ''}`
|
|
479
|
-
});
|
|
480
|
-
});
|
|
481
|
-
};
|
|
482
|
-
this.getTokenRefreshStatus = (args, headers, signal) => {
|
|
483
|
-
return this.fetch(this.url('GetTokenRefreshStatus'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
484
|
-
return buildResponse(res).then(_data => {
|
|
485
|
-
return {
|
|
486
|
-
status: _data.status
|
|
487
|
-
};
|
|
488
|
-
});
|
|
489
|
-
}, error => {
|
|
490
|
-
throw WebrpcRequestFailedError.new({
|
|
491
|
-
cause: `fetch(): ${error.message || ''}`
|
|
492
|
-
});
|
|
493
|
-
});
|
|
494
|
-
};
|
|
495
|
-
this.searchTokenIDs = (args, headers, signal) => {
|
|
496
|
-
return this.fetch(this.url('SearchTokenIDs'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
497
|
-
return buildResponse(res).then(_data => {
|
|
498
|
-
return {
|
|
499
|
-
page: _data.page,
|
|
500
|
-
tokenIds: _data.tokenIds
|
|
501
|
-
};
|
|
502
|
-
});
|
|
503
|
-
}, error => {
|
|
504
|
-
throw WebrpcRequestFailedError.new({
|
|
505
|
-
cause: `fetch(): ${error.message || ''}`
|
|
506
|
-
});
|
|
507
|
-
});
|
|
508
|
-
};
|
|
509
|
-
this.getTokenDirectory = (args, headers, signal) => {
|
|
510
|
-
return this.fetch(this.url('GetTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
511
|
-
return buildResponse(res).then(_data => {
|
|
512
|
-
return {
|
|
513
|
-
collections: _data.collections,
|
|
514
|
-
page: _data.page
|
|
515
|
-
};
|
|
516
|
-
});
|
|
517
|
-
}, error => {
|
|
518
|
-
throw WebrpcRequestFailedError.new({
|
|
519
|
-
cause: `fetch(): ${error.message || ''}`
|
|
520
|
-
});
|
|
521
|
-
});
|
|
522
|
-
};
|
|
523
|
-
this.searchTokenDirectory = (args, headers, signal) => {
|
|
524
|
-
return this.fetch(this.url('SearchTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
525
|
-
return buildResponse(res).then(_data => {
|
|
526
|
-
return {
|
|
527
|
-
collections: _data.collections,
|
|
528
|
-
page: _data.page
|
|
529
|
-
};
|
|
530
|
-
});
|
|
531
|
-
}, error => {
|
|
532
|
-
throw WebrpcRequestFailedError.new({
|
|
533
|
-
cause: `fetch(): ${error.message || ''}`
|
|
534
|
-
});
|
|
535
|
-
});
|
|
536
|
-
};
|
|
537
387
|
this.getTokenDirectoryNetworks = (args, headers, signal) => {
|
|
538
388
|
return this.fetch(this.url('GetTokenDirectoryNetworks'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
539
389
|
return buildResponse(res).then(_data => {
|
|
@@ -548,24 +398,11 @@ class Metadata {
|
|
|
548
398
|
});
|
|
549
399
|
});
|
|
550
400
|
};
|
|
551
|
-
this.
|
|
552
|
-
return this.fetch(this.url('
|
|
553
|
-
return buildResponse(res).then(_data => {
|
|
554
|
-
return {
|
|
555
|
-
networks: _data.networks
|
|
556
|
-
};
|
|
557
|
-
});
|
|
558
|
-
}, error => {
|
|
559
|
-
throw WebrpcRequestFailedError.new({
|
|
560
|
-
cause: `fetch(): ${error.message || ''}`
|
|
561
|
-
});
|
|
562
|
-
});
|
|
563
|
-
};
|
|
564
|
-
this.directoryGetCollections = (args, headers, signal) => {
|
|
565
|
-
return this.fetch(this.url('DirectoryGetCollections'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
401
|
+
this.getTokenDirectory = (args, headers, signal) => {
|
|
402
|
+
return this.fetch(this.url('GetTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
566
403
|
return buildResponse(res).then(_data => {
|
|
567
404
|
return {
|
|
568
|
-
|
|
405
|
+
contracts: _data.contracts,
|
|
569
406
|
page: _data.page
|
|
570
407
|
};
|
|
571
408
|
});
|
|
@@ -575,11 +412,11 @@ class Metadata {
|
|
|
575
412
|
});
|
|
576
413
|
});
|
|
577
414
|
};
|
|
578
|
-
this.
|
|
579
|
-
return this.fetch(this.url('
|
|
415
|
+
this.searchTokenDirectory = (args, headers, signal) => {
|
|
416
|
+
return this.fetch(this.url('SearchTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
580
417
|
return buildResponse(res).then(_data => {
|
|
581
418
|
return {
|
|
582
|
-
|
|
419
|
+
contracts: _data.contracts,
|
|
583
420
|
page: _data.page
|
|
584
421
|
};
|
|
585
422
|
});
|
|
@@ -961,7 +798,9 @@ class Admin {
|
|
|
961
798
|
this.addContractInfoOverride = (args, headers, signal) => {
|
|
962
799
|
return this.fetch(this.url('AddContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
963
800
|
return buildResponse(res).then(_data => {
|
|
964
|
-
return {
|
|
801
|
+
return {
|
|
802
|
+
ok: _data.ok
|
|
803
|
+
};
|
|
965
804
|
});
|
|
966
805
|
}, error => {
|
|
967
806
|
throw WebrpcRequestFailedError.new({
|
|
@@ -972,7 +811,9 @@ class Admin {
|
|
|
972
811
|
this.updateContractInfoOverride = (args, headers, signal) => {
|
|
973
812
|
return this.fetch(this.url('UpdateContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
974
813
|
return buildResponse(res).then(_data => {
|
|
975
|
-
return {
|
|
814
|
+
return {
|
|
815
|
+
ok: _data.ok
|
|
816
|
+
};
|
|
976
817
|
});
|
|
977
818
|
}, error => {
|
|
978
819
|
throw WebrpcRequestFailedError.new({
|
|
@@ -983,7 +824,9 @@ class Admin {
|
|
|
983
824
|
this.removeContractInfoOverride = (args, headers, signal) => {
|
|
984
825
|
return this.fetch(this.url('RemoveContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
985
826
|
return buildResponse(res).then(_data => {
|
|
986
|
-
return {
|
|
827
|
+
return {
|
|
828
|
+
ok: _data.ok
|
|
829
|
+
};
|
|
987
830
|
});
|
|
988
831
|
}, error => {
|
|
989
832
|
throw WebrpcRequestFailedError.new({
|
|
@@ -1007,52 +850,6 @@ class Admin {
|
|
|
1007
850
|
};
|
|
1008
851
|
this.setTokenDirectoryFeatureIndex = (args, headers, signal) => {
|
|
1009
852
|
return this.fetch(this.url('SetTokenDirectoryFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1010
|
-
return buildResponse(res).then(_data => {
|
|
1011
|
-
return {};
|
|
1012
|
-
});
|
|
1013
|
-
}, error => {
|
|
1014
|
-
throw WebrpcRequestFailedError.new({
|
|
1015
|
-
cause: `fetch(): ${error.message || ''}`
|
|
1016
|
-
});
|
|
1017
|
-
});
|
|
1018
|
-
};
|
|
1019
|
-
this.addContractToTokenDirectory = (args, headers, signal) => {
|
|
1020
|
-
return this.fetch(this.url('AddContractToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1021
|
-
return buildResponse(res).then(_data => {
|
|
1022
|
-
return {};
|
|
1023
|
-
});
|
|
1024
|
-
}, error => {
|
|
1025
|
-
throw WebrpcRequestFailedError.new({
|
|
1026
|
-
cause: `fetch(): ${error.message || ''}`
|
|
1027
|
-
});
|
|
1028
|
-
});
|
|
1029
|
-
};
|
|
1030
|
-
this.removeContractFromTokenDirectory = (args, headers, signal) => {
|
|
1031
|
-
return this.fetch(this.url('RemoveContractFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1032
|
-
return buildResponse(res).then(_data => {
|
|
1033
|
-
return {};
|
|
1034
|
-
});
|
|
1035
|
-
}, error => {
|
|
1036
|
-
throw WebrpcRequestFailedError.new({
|
|
1037
|
-
cause: `fetch(): ${error.message || ''}`
|
|
1038
|
-
});
|
|
1039
|
-
});
|
|
1040
|
-
};
|
|
1041
|
-
this.refreshTokenDirectory = (headers, signal) => {
|
|
1042
|
-
return this.fetch(this.url('RefreshTokenDirectory'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
1043
|
-
return buildResponse(res).then(_data => {
|
|
1044
|
-
return {
|
|
1045
|
-
taskID: _data.taskID
|
|
1046
|
-
};
|
|
1047
|
-
});
|
|
1048
|
-
}, error => {
|
|
1049
|
-
throw WebrpcRequestFailedError.new({
|
|
1050
|
-
cause: `fetch(): ${error.message || ''}`
|
|
1051
|
-
});
|
|
1052
|
-
});
|
|
1053
|
-
};
|
|
1054
|
-
this.addContractsToTokenDirectory = (args, headers, signal) => {
|
|
1055
|
-
return this.fetch(this.url('AddContractsToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1056
853
|
return buildResponse(res).then(_data => {
|
|
1057
854
|
return {
|
|
1058
855
|
ok: _data.ok
|
|
@@ -1064,8 +861,8 @@ class Admin {
|
|
|
1064
861
|
});
|
|
1065
862
|
});
|
|
1066
863
|
};
|
|
1067
|
-
this.
|
|
1068
|
-
return this.fetch(this.url('
|
|
864
|
+
this.addContractToTokenDirectory = (args, headers, signal) => {
|
|
865
|
+
return this.fetch(this.url('AddContractToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1069
866
|
return buildResponse(res).then(_data => {
|
|
1070
867
|
return {
|
|
1071
868
|
ok: _data.ok
|
|
@@ -1077,8 +874,8 @@ class Admin {
|
|
|
1077
874
|
});
|
|
1078
875
|
});
|
|
1079
876
|
};
|
|
1080
|
-
this.
|
|
1081
|
-
return this.fetch(this.url('
|
|
877
|
+
this.removeContractFromTokenDirectory = (args, headers, signal) => {
|
|
878
|
+
return this.fetch(this.url('RemoveContractFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1082
879
|
return buildResponse(res).then(_data => {
|
|
1083
880
|
return {
|
|
1084
881
|
ok: _data.ok
|
|
@@ -1090,25 +887,11 @@ class Admin {
|
|
|
1090
887
|
});
|
|
1091
888
|
});
|
|
1092
889
|
};
|
|
1093
|
-
this.
|
|
1094
|
-
return this.fetch(this.url('
|
|
1095
|
-
return buildResponse(res).then(_data => {
|
|
1096
|
-
return {
|
|
1097
|
-
featured: _data.featured
|
|
1098
|
-
};
|
|
1099
|
-
});
|
|
1100
|
-
}, error => {
|
|
1101
|
-
throw WebrpcRequestFailedError.new({
|
|
1102
|
-
cause: `fetch(): ${error.message || ''}`
|
|
1103
|
-
});
|
|
1104
|
-
});
|
|
1105
|
-
};
|
|
1106
|
-
this.listTokenDirectory = (args, headers, signal) => {
|
|
1107
|
-
return this.fetch(this.url('ListTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
890
|
+
this.refreshTokenDirectory = (headers, signal) => {
|
|
891
|
+
return this.fetch(this.url('RefreshTokenDirectory'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
1108
892
|
return buildResponse(res).then(_data => {
|
|
1109
893
|
return {
|
|
1110
|
-
|
|
1111
|
-
collections: _data.collections
|
|
894
|
+
taskID: _data.taskID
|
|
1112
895
|
};
|
|
1113
896
|
});
|
|
1114
897
|
}, error => {
|