@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
|
@@ -13,11 +13,11 @@ function _extends() {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/* eslint-disable */
|
|
16
|
-
// sequence-metadata v0.4.0
|
|
16
|
+
// sequence-metadata v0.4.0 272de60a6f0132e30ec4f29e8aa384109bc880e0
|
|
17
17
|
// --
|
|
18
18
|
// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
|
|
19
19
|
//
|
|
20
|
-
// webrpc-gen -schema=metadata.ridl -target=typescript -client -out=./clients/metadata.gen.ts
|
|
20
|
+
// webrpc-gen -schema=metadata.ridl -target=typescript -client -ignore=@deprecated -out=./clients/metadata.gen.ts
|
|
21
21
|
|
|
22
22
|
const WebrpcHeader = 'Webrpc';
|
|
23
23
|
const WebrpcHeaderValue = 'webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-metadata@v0.4.0';
|
|
@@ -29,7 +29,7 @@ const WebRPCVersion = 'v1';
|
|
|
29
29
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
30
30
|
|
|
31
31
|
// Schema hash generated from your RIDL schema
|
|
32
|
-
const WebRPCSchemaHash = '
|
|
32
|
+
const WebRPCSchemaHash = '272de60a6f0132e30ec4f29e8aa384109bc880e0';
|
|
33
33
|
function VersionFromHeader(headers) {
|
|
34
34
|
const headerValue = headers.get(WebrpcHeader);
|
|
35
35
|
if (!headerValue) {
|
|
@@ -292,60 +292,6 @@ class Metadata {
|
|
|
292
292
|
});
|
|
293
293
|
});
|
|
294
294
|
};
|
|
295
|
-
this.searchContractInfo = (args, headers, signal) => {
|
|
296
|
-
return this.fetch(this.url('SearchContractInfo'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
297
|
-
return buildResponse(res).then(_data => {
|
|
298
|
-
return {
|
|
299
|
-
contractInfoList: _data.contractInfoList
|
|
300
|
-
};
|
|
301
|
-
});
|
|
302
|
-
}, error => {
|
|
303
|
-
throw WebrpcRequestFailedError.new({
|
|
304
|
-
cause: `fetch(): ${error.message || ''}`
|
|
305
|
-
});
|
|
306
|
-
});
|
|
307
|
-
};
|
|
308
|
-
this.searchContractInfoBatch = (args, headers, signal) => {
|
|
309
|
-
return this.fetch(this.url('SearchContractInfoBatch'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
310
|
-
return buildResponse(res).then(_data => {
|
|
311
|
-
return {
|
|
312
|
-
contractInfoByChain: _data.contractInfoByChain
|
|
313
|
-
};
|
|
314
|
-
});
|
|
315
|
-
}, error => {
|
|
316
|
-
throw WebrpcRequestFailedError.new({
|
|
317
|
-
cause: `fetch(): ${error.message || ''}`
|
|
318
|
-
});
|
|
319
|
-
});
|
|
320
|
-
};
|
|
321
|
-
this.searchContracts = (args, headers, signal) => {
|
|
322
|
-
return this.fetch(this.url('SearchContracts'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
323
|
-
return buildResponse(res).then(_data => {
|
|
324
|
-
return {
|
|
325
|
-
contractInfo: _data.contractInfo,
|
|
326
|
-
nextPage: _data.nextPage
|
|
327
|
-
};
|
|
328
|
-
});
|
|
329
|
-
}, error => {
|
|
330
|
-
throw WebrpcRequestFailedError.new({
|
|
331
|
-
cause: `fetch(): ${error.message || ''}`
|
|
332
|
-
});
|
|
333
|
-
});
|
|
334
|
-
};
|
|
335
|
-
this.searchMetadata = (args, headers, signal) => {
|
|
336
|
-
return this.fetch(this.url('SearchMetadata'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
337
|
-
return buildResponse(res).then(_data => {
|
|
338
|
-
return {
|
|
339
|
-
tokenMetadata: _data.tokenMetadata,
|
|
340
|
-
contractInfo: _data.contractInfo
|
|
341
|
-
};
|
|
342
|
-
});
|
|
343
|
-
}, error => {
|
|
344
|
-
throw WebrpcRequestFailedError.new({
|
|
345
|
-
cause: `fetch(): ${error.message || ''}`
|
|
346
|
-
});
|
|
347
|
-
});
|
|
348
|
-
};
|
|
349
295
|
this.getTokenMetadata = (args, headers, signal) => {
|
|
350
296
|
return this.fetch(this.url('GetTokenMetadata'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
351
297
|
return buildResponse(res).then(_data => {
|
|
@@ -442,102 +388,6 @@ class Metadata {
|
|
|
442
388
|
});
|
|
443
389
|
});
|
|
444
390
|
};
|
|
445
|
-
this.refreshAllContractTokens = (args, headers, signal) => {
|
|
446
|
-
return this.fetch(this.url('RefreshAllContractTokens'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
447
|
-
return buildResponse(res).then(_data => {
|
|
448
|
-
return {
|
|
449
|
-
taskID: _data.taskID,
|
|
450
|
-
retryAfter: _data.retryAfter
|
|
451
|
-
};
|
|
452
|
-
});
|
|
453
|
-
}, error => {
|
|
454
|
-
throw WebrpcRequestFailedError.new({
|
|
455
|
-
cause: `fetch(): ${error.message || ''}`
|
|
456
|
-
});
|
|
457
|
-
});
|
|
458
|
-
};
|
|
459
|
-
this.searchTokens = (args, headers, signal) => {
|
|
460
|
-
return this.fetch(this.url('SearchTokens'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
461
|
-
return buildResponse(res).then(_data => {
|
|
462
|
-
return {
|
|
463
|
-
tokenMetadata: _data.tokenMetadata,
|
|
464
|
-
nextPage: _data.nextPage
|
|
465
|
-
};
|
|
466
|
-
});
|
|
467
|
-
}, error => {
|
|
468
|
-
throw WebrpcRequestFailedError.new({
|
|
469
|
-
cause: `fetch(): ${error.message || ''}`
|
|
470
|
-
});
|
|
471
|
-
});
|
|
472
|
-
};
|
|
473
|
-
this.tokenCollectionFilters = (args, headers, signal) => {
|
|
474
|
-
return this.fetch(this.url('TokenCollectionFilters'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
475
|
-
return buildResponse(res).then(_data => {
|
|
476
|
-
return {
|
|
477
|
-
filters: _data.filters
|
|
478
|
-
};
|
|
479
|
-
});
|
|
480
|
-
}, error => {
|
|
481
|
-
throw WebrpcRequestFailedError.new({
|
|
482
|
-
cause: `fetch(): ${error.message || ''}`
|
|
483
|
-
});
|
|
484
|
-
});
|
|
485
|
-
};
|
|
486
|
-
this.getTokenRefreshStatus = (args, headers, signal) => {
|
|
487
|
-
return this.fetch(this.url('GetTokenRefreshStatus'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
488
|
-
return buildResponse(res).then(_data => {
|
|
489
|
-
return {
|
|
490
|
-
status: _data.status
|
|
491
|
-
};
|
|
492
|
-
});
|
|
493
|
-
}, error => {
|
|
494
|
-
throw WebrpcRequestFailedError.new({
|
|
495
|
-
cause: `fetch(): ${error.message || ''}`
|
|
496
|
-
});
|
|
497
|
-
});
|
|
498
|
-
};
|
|
499
|
-
this.searchTokenIDs = (args, headers, signal) => {
|
|
500
|
-
return this.fetch(this.url('SearchTokenIDs'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
501
|
-
return buildResponse(res).then(_data => {
|
|
502
|
-
return {
|
|
503
|
-
page: _data.page,
|
|
504
|
-
tokenIds: _data.tokenIds
|
|
505
|
-
};
|
|
506
|
-
});
|
|
507
|
-
}, error => {
|
|
508
|
-
throw WebrpcRequestFailedError.new({
|
|
509
|
-
cause: `fetch(): ${error.message || ''}`
|
|
510
|
-
});
|
|
511
|
-
});
|
|
512
|
-
};
|
|
513
|
-
this.getTokenDirectory = (args, headers, signal) => {
|
|
514
|
-
return this.fetch(this.url('GetTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
515
|
-
return buildResponse(res).then(_data => {
|
|
516
|
-
return {
|
|
517
|
-
collections: _data.collections,
|
|
518
|
-
page: _data.page
|
|
519
|
-
};
|
|
520
|
-
});
|
|
521
|
-
}, error => {
|
|
522
|
-
throw WebrpcRequestFailedError.new({
|
|
523
|
-
cause: `fetch(): ${error.message || ''}`
|
|
524
|
-
});
|
|
525
|
-
});
|
|
526
|
-
};
|
|
527
|
-
this.searchTokenDirectory = (args, headers, signal) => {
|
|
528
|
-
return this.fetch(this.url('SearchTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
529
|
-
return buildResponse(res).then(_data => {
|
|
530
|
-
return {
|
|
531
|
-
collections: _data.collections,
|
|
532
|
-
page: _data.page
|
|
533
|
-
};
|
|
534
|
-
});
|
|
535
|
-
}, error => {
|
|
536
|
-
throw WebrpcRequestFailedError.new({
|
|
537
|
-
cause: `fetch(): ${error.message || ''}`
|
|
538
|
-
});
|
|
539
|
-
});
|
|
540
|
-
};
|
|
541
391
|
this.getTokenDirectoryNetworks = (args, headers, signal) => {
|
|
542
392
|
return this.fetch(this.url('GetTokenDirectoryNetworks'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
543
393
|
return buildResponse(res).then(_data => {
|
|
@@ -552,24 +402,11 @@ class Metadata {
|
|
|
552
402
|
});
|
|
553
403
|
});
|
|
554
404
|
};
|
|
555
|
-
this.
|
|
556
|
-
return this.fetch(this.url('
|
|
557
|
-
return buildResponse(res).then(_data => {
|
|
558
|
-
return {
|
|
559
|
-
networks: _data.networks
|
|
560
|
-
};
|
|
561
|
-
});
|
|
562
|
-
}, error => {
|
|
563
|
-
throw WebrpcRequestFailedError.new({
|
|
564
|
-
cause: `fetch(): ${error.message || ''}`
|
|
565
|
-
});
|
|
566
|
-
});
|
|
567
|
-
};
|
|
568
|
-
this.directoryGetCollections = (args, headers, signal) => {
|
|
569
|
-
return this.fetch(this.url('DirectoryGetCollections'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
405
|
+
this.getTokenDirectory = (args, headers, signal) => {
|
|
406
|
+
return this.fetch(this.url('GetTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
570
407
|
return buildResponse(res).then(_data => {
|
|
571
408
|
return {
|
|
572
|
-
|
|
409
|
+
contracts: _data.contracts,
|
|
573
410
|
page: _data.page
|
|
574
411
|
};
|
|
575
412
|
});
|
|
@@ -579,11 +416,11 @@ class Metadata {
|
|
|
579
416
|
});
|
|
580
417
|
});
|
|
581
418
|
};
|
|
582
|
-
this.
|
|
583
|
-
return this.fetch(this.url('
|
|
419
|
+
this.searchTokenDirectory = (args, headers, signal) => {
|
|
420
|
+
return this.fetch(this.url('SearchTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
584
421
|
return buildResponse(res).then(_data => {
|
|
585
422
|
return {
|
|
586
|
-
|
|
423
|
+
contracts: _data.contracts,
|
|
587
424
|
page: _data.page
|
|
588
425
|
};
|
|
589
426
|
});
|
|
@@ -965,7 +802,9 @@ class Admin {
|
|
|
965
802
|
this.addContractInfoOverride = (args, headers, signal) => {
|
|
966
803
|
return this.fetch(this.url('AddContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
967
804
|
return buildResponse(res).then(_data => {
|
|
968
|
-
return {
|
|
805
|
+
return {
|
|
806
|
+
ok: _data.ok
|
|
807
|
+
};
|
|
969
808
|
});
|
|
970
809
|
}, error => {
|
|
971
810
|
throw WebrpcRequestFailedError.new({
|
|
@@ -976,7 +815,9 @@ class Admin {
|
|
|
976
815
|
this.updateContractInfoOverride = (args, headers, signal) => {
|
|
977
816
|
return this.fetch(this.url('UpdateContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
978
817
|
return buildResponse(res).then(_data => {
|
|
979
|
-
return {
|
|
818
|
+
return {
|
|
819
|
+
ok: _data.ok
|
|
820
|
+
};
|
|
980
821
|
});
|
|
981
822
|
}, error => {
|
|
982
823
|
throw WebrpcRequestFailedError.new({
|
|
@@ -987,7 +828,9 @@ class Admin {
|
|
|
987
828
|
this.removeContractInfoOverride = (args, headers, signal) => {
|
|
988
829
|
return this.fetch(this.url('RemoveContractInfoOverride'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
989
830
|
return buildResponse(res).then(_data => {
|
|
990
|
-
return {
|
|
831
|
+
return {
|
|
832
|
+
ok: _data.ok
|
|
833
|
+
};
|
|
991
834
|
});
|
|
992
835
|
}, error => {
|
|
993
836
|
throw WebrpcRequestFailedError.new({
|
|
@@ -1011,52 +854,6 @@ class Admin {
|
|
|
1011
854
|
};
|
|
1012
855
|
this.setTokenDirectoryFeatureIndex = (args, headers, signal) => {
|
|
1013
856
|
return this.fetch(this.url('SetTokenDirectoryFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1014
|
-
return buildResponse(res).then(_data => {
|
|
1015
|
-
return {};
|
|
1016
|
-
});
|
|
1017
|
-
}, error => {
|
|
1018
|
-
throw WebrpcRequestFailedError.new({
|
|
1019
|
-
cause: `fetch(): ${error.message || ''}`
|
|
1020
|
-
});
|
|
1021
|
-
});
|
|
1022
|
-
};
|
|
1023
|
-
this.addContractToTokenDirectory = (args, headers, signal) => {
|
|
1024
|
-
return this.fetch(this.url('AddContractToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1025
|
-
return buildResponse(res).then(_data => {
|
|
1026
|
-
return {};
|
|
1027
|
-
});
|
|
1028
|
-
}, error => {
|
|
1029
|
-
throw WebrpcRequestFailedError.new({
|
|
1030
|
-
cause: `fetch(): ${error.message || ''}`
|
|
1031
|
-
});
|
|
1032
|
-
});
|
|
1033
|
-
};
|
|
1034
|
-
this.removeContractFromTokenDirectory = (args, headers, signal) => {
|
|
1035
|
-
return this.fetch(this.url('RemoveContractFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1036
|
-
return buildResponse(res).then(_data => {
|
|
1037
|
-
return {};
|
|
1038
|
-
});
|
|
1039
|
-
}, error => {
|
|
1040
|
-
throw WebrpcRequestFailedError.new({
|
|
1041
|
-
cause: `fetch(): ${error.message || ''}`
|
|
1042
|
-
});
|
|
1043
|
-
});
|
|
1044
|
-
};
|
|
1045
|
-
this.refreshTokenDirectory = (headers, signal) => {
|
|
1046
|
-
return this.fetch(this.url('RefreshTokenDirectory'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
1047
|
-
return buildResponse(res).then(_data => {
|
|
1048
|
-
return {
|
|
1049
|
-
taskID: _data.taskID
|
|
1050
|
-
};
|
|
1051
|
-
});
|
|
1052
|
-
}, error => {
|
|
1053
|
-
throw WebrpcRequestFailedError.new({
|
|
1054
|
-
cause: `fetch(): ${error.message || ''}`
|
|
1055
|
-
});
|
|
1056
|
-
});
|
|
1057
|
-
};
|
|
1058
|
-
this.addContractsToTokenDirectory = (args, headers, signal) => {
|
|
1059
|
-
return this.fetch(this.url('AddContractsToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1060
857
|
return buildResponse(res).then(_data => {
|
|
1061
858
|
return {
|
|
1062
859
|
ok: _data.ok
|
|
@@ -1068,8 +865,8 @@ class Admin {
|
|
|
1068
865
|
});
|
|
1069
866
|
});
|
|
1070
867
|
};
|
|
1071
|
-
this.
|
|
1072
|
-
return this.fetch(this.url('
|
|
868
|
+
this.addContractToTokenDirectory = (args, headers, signal) => {
|
|
869
|
+
return this.fetch(this.url('AddContractToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1073
870
|
return buildResponse(res).then(_data => {
|
|
1074
871
|
return {
|
|
1075
872
|
ok: _data.ok
|
|
@@ -1081,8 +878,8 @@ class Admin {
|
|
|
1081
878
|
});
|
|
1082
879
|
});
|
|
1083
880
|
};
|
|
1084
|
-
this.
|
|
1085
|
-
return this.fetch(this.url('
|
|
881
|
+
this.removeContractFromTokenDirectory = (args, headers, signal) => {
|
|
882
|
+
return this.fetch(this.url('RemoveContractFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1086
883
|
return buildResponse(res).then(_data => {
|
|
1087
884
|
return {
|
|
1088
885
|
ok: _data.ok
|
|
@@ -1094,25 +891,11 @@ class Admin {
|
|
|
1094
891
|
});
|
|
1095
892
|
});
|
|
1096
893
|
};
|
|
1097
|
-
this.
|
|
1098
|
-
return this.fetch(this.url('
|
|
1099
|
-
return buildResponse(res).then(_data => {
|
|
1100
|
-
return {
|
|
1101
|
-
featured: _data.featured
|
|
1102
|
-
};
|
|
1103
|
-
});
|
|
1104
|
-
}, error => {
|
|
1105
|
-
throw WebrpcRequestFailedError.new({
|
|
1106
|
-
cause: `fetch(): ${error.message || ''}`
|
|
1107
|
-
});
|
|
1108
|
-
});
|
|
1109
|
-
};
|
|
1110
|
-
this.listTokenDirectory = (args, headers, signal) => {
|
|
1111
|
-
return this.fetch(this.url('ListTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
894
|
+
this.refreshTokenDirectory = (headers, signal) => {
|
|
895
|
+
return this.fetch(this.url('RefreshTokenDirectory'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
1112
896
|
return buildResponse(res).then(_data => {
|
|
1113
897
|
return {
|
|
1114
|
-
|
|
1115
|
-
collections: _data.collections
|
|
898
|
+
taskID: _data.taskID
|
|
1116
899
|
};
|
|
1117
900
|
});
|
|
1118
901
|
}, error => {
|