@0xsequence/metadata 2.3.3 → 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.
@@ -13,11 +13,11 @@ function _extends() {
13
13
  }
14
14
 
15
15
  /* eslint-disable */
16
- // sequence-metadata v0.4.0 136240089e035d0bcdadfa59508ddbf164efd5e7
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 = '136240089e035d0bcdadfa59508ddbf164efd5e7';
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,74 +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
391
  this.getTokenDirectoryNetworks = (args, headers, signal) => {
514
392
  return this.fetch(this.url('GetTokenDirectoryNetworks'), createHTTPRequest(args, headers, signal)).then(res => {
515
393
  return buildResponse(res).then(_data => {
@@ -552,47 +430,6 @@ class Metadata {
552
430
  });
553
431
  });
554
432
  };
555
- this.directoryGetNetworks = (args, headers, signal) => {
556
- return this.fetch(this.url('DirectoryGetNetworks'), createHTTPRequest(args, headers, signal)).then(res => {
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 => {
570
- return buildResponse(res).then(_data => {
571
- return {
572
- collections: _data.collections,
573
- page: _data.page
574
- };
575
- });
576
- }, error => {
577
- throw WebrpcRequestFailedError.new({
578
- cause: `fetch(): ${error.message || ''}`
579
- });
580
- });
581
- };
582
- this.directorySearchCollections = (args, headers, signal) => {
583
- return this.fetch(this.url('DirectorySearchCollections'), createHTTPRequest(args, headers, signal)).then(res => {
584
- return buildResponse(res).then(_data => {
585
- return {
586
- collections: _data.collections,
587
- page: _data.page
588
- };
589
- });
590
- }, error => {
591
- throw WebrpcRequestFailedError.new({
592
- cause: `fetch(): ${error.message || ''}`
593
- });
594
- });
595
- };
596
433
  this.getNiftyswapTokenQuantity = (args, headers, signal) => {
597
434
  return this.fetch(this.url('GetNiftyswapTokenQuantity'), createHTTPRequest(args, headers, signal)).then(res => {
598
435
  return buildResponse(res).then(_data => {
@@ -1067,72 +904,6 @@ class Admin {
1067
904
  });
1068
905
  });
1069
906
  };
1070
- this.addContractsToTokenDirectory = (args, headers, signal) => {
1071
- return this.fetch(this.url('AddContractsToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
1072
- return buildResponse(res).then(_data => {
1073
- return {
1074
- ok: _data.ok
1075
- };
1076
- });
1077
- }, error => {
1078
- throw WebrpcRequestFailedError.new({
1079
- cause: `fetch(): ${error.message || ''}`
1080
- });
1081
- });
1082
- };
1083
- this.removeContractsFromTokenDirectory = (args, headers, signal) => {
1084
- return this.fetch(this.url('RemoveContractsFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
1085
- return buildResponse(res).then(_data => {
1086
- return {
1087
- ok: _data.ok
1088
- };
1089
- });
1090
- }, error => {
1091
- throw WebrpcRequestFailedError.new({
1092
- cause: `fetch(): ${error.message || ''}`
1093
- });
1094
- });
1095
- };
1096
- this.modifyFeatureIndex = (args, headers, signal) => {
1097
- return this.fetch(this.url('ModifyFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => {
1098
- return buildResponse(res).then(_data => {
1099
- return {
1100
- ok: _data.ok
1101
- };
1102
- });
1103
- }, error => {
1104
- throw WebrpcRequestFailedError.new({
1105
- cause: `fetch(): ${error.message || ''}`
1106
- });
1107
- });
1108
- };
1109
- this.getFeatureIndex = (args, headers, signal) => {
1110
- return this.fetch(this.url('GetFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => {
1111
- return buildResponse(res).then(_data => {
1112
- return {
1113
- featured: _data.featured
1114
- };
1115
- });
1116
- }, error => {
1117
- throw WebrpcRequestFailedError.new({
1118
- cause: `fetch(): ${error.message || ''}`
1119
- });
1120
- });
1121
- };
1122
- this.listTokenDirectory = (args, headers, signal) => {
1123
- return this.fetch(this.url('ListTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
1124
- return buildResponse(res).then(_data => {
1125
- return {
1126
- page: _data.page,
1127
- collections: _data.collections
1128
- };
1129
- });
1130
- }, error => {
1131
- throw WebrpcRequestFailedError.new({
1132
- cause: `fetch(): ${error.message || ''}`
1133
- });
1134
- });
1135
- };
1136
907
  this.hostname = hostname.replace(/\/*$/, '');
1137
908
  this.fetch = (input, init) => fetch(input, init);
1138
909
  }
@@ -13,11 +13,11 @@ function _extends() {
13
13
  }
14
14
 
15
15
  /* eslint-disable */
16
- // sequence-metadata v0.4.0 136240089e035d0bcdadfa59508ddbf164efd5e7
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 = '136240089e035d0bcdadfa59508ddbf164efd5e7';
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,74 +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
391
  this.getTokenDirectoryNetworks = (args, headers, signal) => {
514
392
  return this.fetch(this.url('GetTokenDirectoryNetworks'), createHTTPRequest(args, headers, signal)).then(res => {
515
393
  return buildResponse(res).then(_data => {
@@ -552,47 +430,6 @@ class Metadata {
552
430
  });
553
431
  });
554
432
  };
555
- this.directoryGetNetworks = (args, headers, signal) => {
556
- return this.fetch(this.url('DirectoryGetNetworks'), createHTTPRequest(args, headers, signal)).then(res => {
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 => {
570
- return buildResponse(res).then(_data => {
571
- return {
572
- collections: _data.collections,
573
- page: _data.page
574
- };
575
- });
576
- }, error => {
577
- throw WebrpcRequestFailedError.new({
578
- cause: `fetch(): ${error.message || ''}`
579
- });
580
- });
581
- };
582
- this.directorySearchCollections = (args, headers, signal) => {
583
- return this.fetch(this.url('DirectorySearchCollections'), createHTTPRequest(args, headers, signal)).then(res => {
584
- return buildResponse(res).then(_data => {
585
- return {
586
- collections: _data.collections,
587
- page: _data.page
588
- };
589
- });
590
- }, error => {
591
- throw WebrpcRequestFailedError.new({
592
- cause: `fetch(): ${error.message || ''}`
593
- });
594
- });
595
- };
596
433
  this.getNiftyswapTokenQuantity = (args, headers, signal) => {
597
434
  return this.fetch(this.url('GetNiftyswapTokenQuantity'), createHTTPRequest(args, headers, signal)).then(res => {
598
435
  return buildResponse(res).then(_data => {
@@ -1067,72 +904,6 @@ class Admin {
1067
904
  });
1068
905
  });
1069
906
  };
1070
- this.addContractsToTokenDirectory = (args, headers, signal) => {
1071
- return this.fetch(this.url('AddContractsToTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
1072
- return buildResponse(res).then(_data => {
1073
- return {
1074
- ok: _data.ok
1075
- };
1076
- });
1077
- }, error => {
1078
- throw WebrpcRequestFailedError.new({
1079
- cause: `fetch(): ${error.message || ''}`
1080
- });
1081
- });
1082
- };
1083
- this.removeContractsFromTokenDirectory = (args, headers, signal) => {
1084
- return this.fetch(this.url('RemoveContractsFromTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
1085
- return buildResponse(res).then(_data => {
1086
- return {
1087
- ok: _data.ok
1088
- };
1089
- });
1090
- }, error => {
1091
- throw WebrpcRequestFailedError.new({
1092
- cause: `fetch(): ${error.message || ''}`
1093
- });
1094
- });
1095
- };
1096
- this.modifyFeatureIndex = (args, headers, signal) => {
1097
- return this.fetch(this.url('ModifyFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => {
1098
- return buildResponse(res).then(_data => {
1099
- return {
1100
- ok: _data.ok
1101
- };
1102
- });
1103
- }, error => {
1104
- throw WebrpcRequestFailedError.new({
1105
- cause: `fetch(): ${error.message || ''}`
1106
- });
1107
- });
1108
- };
1109
- this.getFeatureIndex = (args, headers, signal) => {
1110
- return this.fetch(this.url('GetFeatureIndex'), createHTTPRequest(args, headers, signal)).then(res => {
1111
- return buildResponse(res).then(_data => {
1112
- return {
1113
- featured: _data.featured
1114
- };
1115
- });
1116
- }, error => {
1117
- throw WebrpcRequestFailedError.new({
1118
- cause: `fetch(): ${error.message || ''}`
1119
- });
1120
- });
1121
- };
1122
- this.listTokenDirectory = (args, headers, signal) => {
1123
- return this.fetch(this.url('ListTokenDirectory'), createHTTPRequest(args, headers, signal)).then(res => {
1124
- return buildResponse(res).then(_data => {
1125
- return {
1126
- page: _data.page,
1127
- collections: _data.collections
1128
- };
1129
- });
1130
- }, error => {
1131
- throw WebrpcRequestFailedError.new({
1132
- cause: `fetch(): ${error.message || ''}`
1133
- });
1134
- });
1135
- };
1136
907
  this.hostname = hostname.replace(/\/*$/, '');
1137
908
  this.fetch = (input, init) => fetch(input, init);
1138
909
  }