@0xsequence/api 2.0.10 → 2.0.12

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.
@@ -18,20 +18,20 @@ function _extends() {
18
18
  }
19
19
 
20
20
  /* eslint-disable */
21
- // sequence-api v0.4.0 d3f5f1338693d60d58f87bc408a076218201a097
21
+ // sequence-api v0.4.0 470a0f88ea399c2a57ff8c22da54358c033ed5f0
22
22
  // --
23
23
  // Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
24
24
  //
25
25
  // webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
26
26
 
27
27
  // WebRPC description and code-gen version
28
- const WebRPCVersion = 'v1';
28
+ const WebRPCVersion = "v1";
29
29
 
30
30
  // Schema version of your RIDL schema
31
- const WebRPCSchemaVersion = 'v0.4.0';
31
+ const WebRPCSchemaVersion = "v0.4.0";
32
32
 
33
33
  // Schema hash generated from your RIDL schema
34
- const WebRPCSchemaHash = 'd3f5f1338693d60d58f87bc408a076218201a097';
34
+ const WebRPCSchemaHash = "470a0f88ea399c2a57ff8c22da54358c033ed5f0";
35
35
 
36
36
  //
37
37
  // Types
@@ -42,6 +42,20 @@ let SortOrder = /*#__PURE__*/function (SortOrder) {
42
42
  SortOrder["ASC"] = "ASC";
43
43
  return SortOrder;
44
44
  }({});
45
+ let SardinePaymentType = /*#__PURE__*/function (SardinePaymentType) {
46
+ SardinePaymentType["ach"] = "ach";
47
+ SardinePaymentType["debit"] = "debit";
48
+ SardinePaymentType["credit"] = "credit";
49
+ SardinePaymentType["us_debit"] = "us_debit";
50
+ SardinePaymentType["international_debit"] = "international_debit";
51
+ SardinePaymentType["international_credit"] = "international_credit";
52
+ return SardinePaymentType;
53
+ }({});
54
+ let SardineQuoteType = /*#__PURE__*/function (SardineQuoteType) {
55
+ SardineQuoteType["buy"] = "buy";
56
+ SardineQuoteType["sell"] = "sell";
57
+ return SardineQuoteType;
58
+ }({});
45
59
  let TokenType = /*#__PURE__*/function (TokenType) {
46
60
  TokenType["ERC20"] = "ERC20";
47
61
  TokenType["ERC721"] = "ERC721";
@@ -352,8 +366,74 @@ class API {
352
366
  });
353
367
  });
354
368
  };
355
- this.getSardineClientToken = (headers, signal) => {
356
- return this.fetch(this.url('GetSardineClientToken'), createHTTPRequest({}, headers, signal)).then(res => {
369
+ this.resolveENSAddress = (args, headers, signal) => {
370
+ return this.fetch(this.url('ResolveENSAddress'), createHTTPRequest(args, headers, signal)).then(res => {
371
+ return buildResponse(res).then(_data => {
372
+ return {
373
+ address: _data.address,
374
+ ok: _data.ok
375
+ };
376
+ });
377
+ }, error => {
378
+ throw WebrpcRequestFailedError.new({
379
+ cause: `fetch(): ${error.message || ''}`
380
+ });
381
+ });
382
+ };
383
+ this.isValidSignature = (args, headers, signal) => {
384
+ return this.fetch(this.url('IsValidSignature'), createHTTPRequest(args, headers, signal)).then(res => {
385
+ return buildResponse(res).then(_data => {
386
+ return {
387
+ isValid: _data.isValid
388
+ };
389
+ });
390
+ }, error => {
391
+ throw WebrpcRequestFailedError.new({
392
+ cause: `fetch(): ${error.message || ''}`
393
+ });
394
+ });
395
+ };
396
+ this.isValidMessageSignature = (args, headers, signal) => {
397
+ return this.fetch(this.url('IsValidMessageSignature'), createHTTPRequest(args, headers, signal)).then(res => {
398
+ return buildResponse(res).then(_data => {
399
+ return {
400
+ isValid: _data.isValid
401
+ };
402
+ });
403
+ }, error => {
404
+ throw WebrpcRequestFailedError.new({
405
+ cause: `fetch(): ${error.message || ''}`
406
+ });
407
+ });
408
+ };
409
+ this.isValidTypedDataSignature = (args, headers, signal) => {
410
+ return this.fetch(this.url('IsValidTypedDataSignature'), createHTTPRequest(args, headers, signal)).then(res => {
411
+ return buildResponse(res).then(_data => {
412
+ return {
413
+ isValid: _data.isValid
414
+ };
415
+ });
416
+ }, error => {
417
+ throw WebrpcRequestFailedError.new({
418
+ cause: `fetch(): ${error.message || ''}`
419
+ });
420
+ });
421
+ };
422
+ this.isValidETHAuthProof = (args, headers, signal) => {
423
+ return this.fetch(this.url('IsValidETHAuthProof'), createHTTPRequest(args, headers, signal)).then(res => {
424
+ return buildResponse(res).then(_data => {
425
+ return {
426
+ isValid: _data.isValid
427
+ };
428
+ });
429
+ }, error => {
430
+ throw WebrpcRequestFailedError.new({
431
+ cause: `fetch(): ${error.message || ''}`
432
+ });
433
+ });
434
+ };
435
+ this.sardineGetClientToken = (headers, signal) => {
436
+ return this.fetch(this.url('SardineGetClientToken'), createHTTPRequest({}, headers, signal)).then(res => {
357
437
  return buildResponse(res).then(_data => {
358
438
  return {
359
439
  token: _data.token
@@ -365,8 +445,8 @@ class API {
365
445
  });
366
446
  });
367
447
  };
368
- this.getSardineNFTCheckoutToken = (args, headers, signal) => {
369
- return this.fetch(this.url('GetSardineNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then(res => {
448
+ this.sardineGetNFTCheckoutToken = (args, headers, signal) => {
449
+ return this.fetch(this.url('SardineGetNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then(res => {
370
450
  return buildResponse(res).then(_data => {
371
451
  return {
372
452
  resp: _data.resp
@@ -378,8 +458,8 @@ class API {
378
458
  });
379
459
  });
380
460
  };
381
- this.getSardineNFTCheckoutOrderStatus = (args, headers, signal) => {
382
- return this.fetch(this.url('GetSardineNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then(res => {
461
+ this.sardineGetNFTCheckoutOrderStatus = (args, headers, signal) => {
462
+ return this.fetch(this.url('SardineGetNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then(res => {
383
463
  return buildResponse(res).then(_data => {
384
464
  return {
385
465
  resp: _data.resp
@@ -391,12 +471,11 @@ class API {
391
471
  });
392
472
  });
393
473
  };
394
- this.resolveENSAddress = (args, headers, signal) => {
395
- return this.fetch(this.url('ResolveENSAddress'), createHTTPRequest(args, headers, signal)).then(res => {
474
+ this.sardineGetSupportedRegions = (headers, signal) => {
475
+ return this.fetch(this.url('SardineGetSupportedRegions'), createHTTPRequest({}, headers, signal)).then(res => {
396
476
  return buildResponse(res).then(_data => {
397
477
  return {
398
- address: _data.address,
399
- ok: _data.ok
478
+ regions: _data.regions
400
479
  };
401
480
  });
402
481
  }, error => {
@@ -405,11 +484,11 @@ class API {
405
484
  });
406
485
  });
407
486
  };
408
- this.isValidSignature = (args, headers, signal) => {
409
- return this.fetch(this.url('IsValidSignature'), createHTTPRequest(args, headers, signal)).then(res => {
487
+ this.sardineGetSupportedFiatCurrencies = (headers, signal) => {
488
+ return this.fetch(this.url('SardineGetSupportedFiatCurrencies'), createHTTPRequest({}, headers, signal)).then(res => {
410
489
  return buildResponse(res).then(_data => {
411
490
  return {
412
- isValid: _data.isValid
491
+ tokens: _data.tokens
413
492
  };
414
493
  });
415
494
  }, error => {
@@ -418,11 +497,11 @@ class API {
418
497
  });
419
498
  });
420
499
  };
421
- this.isValidMessageSignature = (args, headers, signal) => {
422
- return this.fetch(this.url('IsValidMessageSignature'), createHTTPRequest(args, headers, signal)).then(res => {
500
+ this.sardineGetSupportedTokens = (headers, signal) => {
501
+ return this.fetch(this.url('SardineGetSupportedTokens'), createHTTPRequest({}, headers, signal)).then(res => {
423
502
  return buildResponse(res).then(_data => {
424
503
  return {
425
- isValid: _data.isValid
504
+ tokens: _data.tokens
426
505
  };
427
506
  });
428
507
  }, error => {
@@ -431,11 +510,11 @@ class API {
431
510
  });
432
511
  });
433
512
  };
434
- this.isValidTypedDataSignature = (args, headers, signal) => {
435
- return this.fetch(this.url('IsValidTypedDataSignature'), createHTTPRequest(args, headers, signal)).then(res => {
513
+ this.sardineGetEnabledTokens = (headers, signal) => {
514
+ return this.fetch(this.url('SardineGetEnabledTokens'), createHTTPRequest({}, headers, signal)).then(res => {
436
515
  return buildResponse(res).then(_data => {
437
516
  return {
438
- isValid: _data.isValid
517
+ tokens: _data.tokens
439
518
  };
440
519
  });
441
520
  }, error => {
@@ -444,11 +523,50 @@ class API {
444
523
  });
445
524
  });
446
525
  };
447
- this.isValidETHAuthProof = (args, headers, signal) => {
448
- return this.fetch(this.url('IsValidETHAuthProof'), createHTTPRequest(args, headers, signal)).then(res => {
526
+ this.sardineGetQuote = (args, headers, signal) => {
527
+ return this.fetch(this.url('SardineGetQuote'), createHTTPRequest(args, headers, signal)).then(res => {
449
528
  return buildResponse(res).then(_data => {
450
529
  return {
451
- isValid: _data.isValid
530
+ quote: _data.quote
531
+ };
532
+ });
533
+ }, error => {
534
+ throw WebrpcRequestFailedError.new({
535
+ cause: `fetch(): ${error.message || ''}`
536
+ });
537
+ });
538
+ };
539
+ this.getSardineClientToken = (headers, signal) => {
540
+ return this.fetch(this.url('GetSardineClientToken'), createHTTPRequest({}, headers, signal)).then(res => {
541
+ return buildResponse(res).then(_data => {
542
+ return {
543
+ token: _data.token
544
+ };
545
+ });
546
+ }, error => {
547
+ throw WebrpcRequestFailedError.new({
548
+ cause: `fetch(): ${error.message || ''}`
549
+ });
550
+ });
551
+ };
552
+ this.getSardineNFTCheckoutToken = (args, headers, signal) => {
553
+ return this.fetch(this.url('GetSardineNFTCheckoutToken'), createHTTPRequest(args, headers, signal)).then(res => {
554
+ return buildResponse(res).then(_data => {
555
+ return {
556
+ resp: _data.resp
557
+ };
558
+ });
559
+ }, error => {
560
+ throw WebrpcRequestFailedError.new({
561
+ cause: `fetch(): ${error.message || ''}`
562
+ });
563
+ });
564
+ };
565
+ this.getSardineNFTCheckoutOrderStatus = (args, headers, signal) => {
566
+ return this.fetch(this.url('GetSardineNFTCheckoutOrderStatus'), createHTTPRequest(args, headers, signal)).then(res => {
567
+ return buildResponse(res).then(_data => {
568
+ return {
569
+ resp: _data.resp
452
570
  };
453
571
  });
454
572
  }, error => {
@@ -604,8 +722,7 @@ class API {
604
722
  return this.fetch(this.url('LinkWallet'), createHTTPRequest(args, headers, signal)).then(res => {
605
723
  return buildResponse(res).then(_data => {
606
724
  return {
607
- status: _data.status,
608
- linkedWalletAddress: _data.linkedWalletAddress
725
+ status: _data.status
609
726
  };
610
727
  });
611
728
  }, error => {
@@ -667,11 +784,11 @@ class API {
667
784
  });
668
785
  });
669
786
  };
670
- this.getSwapQuotes = (args, headers, signal) => {
671
- return this.fetch(this.url('GetSwapQuotes'), createHTTPRequest(args, headers, signal)).then(res => {
787
+ this.getSwapPrices = (args, headers, signal) => {
788
+ return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
672
789
  return buildResponse(res).then(_data => {
673
790
  return {
674
- swapQuotes: _data.swapQuotes
791
+ swapPrices: _data.swapPrices
675
792
  };
676
793
  });
677
794
  }, error => {
@@ -680,11 +797,11 @@ class API {
680
797
  });
681
798
  });
682
799
  };
683
- this.addCurrencyGroup = (args, headers, signal) => {
684
- return this.fetch(this.url('AddCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
800
+ this.getSwapQuote = (args, headers, signal) => {
801
+ return this.fetch(this.url('GetSwapQuote'), createHTTPRequest(args, headers, signal)).then(res => {
685
802
  return buildResponse(res).then(_data => {
686
803
  return {
687
- groupId: _data.groupId
804
+ swapQuote: _data.swapQuote
688
805
  };
689
806
  });
690
807
  }, error => {
@@ -693,17 +810,6 @@ class API {
693
810
  });
694
811
  });
695
812
  };
696
- this.updateCurrencyGroup = (args, headers, signal) => {
697
- return this.fetch(this.url('UpdateCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
698
- return buildResponse(res).then(_data => {
699
- return {};
700
- });
701
- }, error => {
702
- throw WebrpcRequestFailedError.new({
703
- cause: `fetch(): ${error.message || ''}`
704
- });
705
- });
706
- };
707
813
  this.listCurrencyGroups = (headers, signal) => {
708
814
  return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(res => {
709
815
  return buildResponse(res).then(_data => {
@@ -717,11 +823,11 @@ class API {
717
823
  });
718
824
  });
719
825
  };
720
- this.deleteCurrencyGroup = (args, headers, signal) => {
721
- return this.fetch(this.url('DeleteCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
826
+ this.addOffchainInventory = (args, headers, signal) => {
827
+ return this.fetch(this.url('AddOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
722
828
  return buildResponse(res).then(_data => {
723
829
  return {
724
- ok: _data.ok
830
+ inventoryId: _data.inventoryId
725
831
  };
726
832
  });
727
833
  }, error => {
@@ -730,11 +836,11 @@ class API {
730
836
  });
731
837
  });
732
838
  };
733
- this.addInventoryPaymentConfig = (args, headers, signal) => {
734
- return this.fetch(this.url('AddInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
839
+ this.getOffchainInventory = (args, headers, signal) => {
840
+ return this.fetch(this.url('GetOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
735
841
  return buildResponse(res).then(_data => {
736
842
  return {
737
- configId: _data.configId
843
+ inventory: _data.inventory
738
844
  };
739
845
  });
740
846
  }, error => {
@@ -743,11 +849,11 @@ class API {
743
849
  });
744
850
  });
745
851
  };
746
- this.getInventoryPaymentConfig = (args, headers, signal) => {
747
- return this.fetch(this.url('GetInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
852
+ this.listOffchainInventories = (args, headers, signal) => {
853
+ return this.fetch(this.url('ListOffchainInventories'), createHTTPRequest(args, headers, signal)).then(res => {
748
854
  return buildResponse(res).then(_data => {
749
855
  return {
750
- config: _data.config
856
+ inventory: _data.inventory
751
857
  };
752
858
  });
753
859
  }, error => {
@@ -756,12 +862,10 @@ class API {
756
862
  });
757
863
  });
758
864
  };
759
- this.listInventoryPaymentConfigs = (args, headers, signal) => {
760
- return this.fetch(this.url('ListInventoryPaymentConfigs'), createHTTPRequest(args, headers, signal)).then(res => {
865
+ this.updateOffchainInventory = (args, headers, signal) => {
866
+ return this.fetch(this.url('UpdateOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
761
867
  return buildResponse(res).then(_data => {
762
- return {
763
- configs: _data.configs
764
- };
868
+ return {};
765
869
  });
766
870
  }, error => {
767
871
  throw WebrpcRequestFailedError.new({
@@ -769,10 +873,12 @@ class API {
769
873
  });
770
874
  });
771
875
  };
772
- this.updateInventoryPaymentConfig = (args, headers, signal) => {
773
- return this.fetch(this.url('UpdateInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
876
+ this.deleteOffchainInventory = (args, headers, signal) => {
877
+ return this.fetch(this.url('DeleteOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
774
878
  return buildResponse(res).then(_data => {
775
- return {};
879
+ return {
880
+ ok: _data.ok
881
+ };
776
882
  });
777
883
  }, error => {
778
884
  throw WebrpcRequestFailedError.new({
@@ -780,11 +886,11 @@ class API {
780
886
  });
781
887
  });
782
888
  };
783
- this.deleteInventoryPaymentConfig = (args, headers, signal) => {
784
- return this.fetch(this.url('DeleteInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
889
+ this.requestOffchainPayment = (args, headers, signal) => {
890
+ return this.fetch(this.url('RequestOffchainPayment'), createHTTPRequest(args, headers, signal)).then(res => {
785
891
  return buildResponse(res).then(_data => {
786
892
  return {
787
- ok: _data.ok
893
+ payment: _data.payment
788
894
  };
789
895
  });
790
896
  }, error => {
@@ -793,11 +899,12 @@ class API {
793
899
  });
794
900
  });
795
901
  };
796
- this.requestInventoryPayment = (args, headers, signal) => {
797
- return this.fetch(this.url('RequestInventoryPayment'), createHTTPRequest(args, headers, signal)).then(res => {
902
+ this.listOffchainPayments = (args, headers, signal) => {
903
+ return this.fetch(this.url('ListOffchainPayments'), createHTTPRequest(args, headers, signal)).then(res => {
798
904
  return buildResponse(res).then(_data => {
799
905
  return {
800
- payment: _data.payment
906
+ page: _data.page,
907
+ payments: _data.payments
801
908
  };
802
909
  });
803
910
  }, error => {
@@ -1078,6 +1185,8 @@ exports.InvalidArgumentError = InvalidArgumentError;
1078
1185
  exports.NotFoundError = NotFoundError;
1079
1186
  exports.PermissionDeniedError = PermissionDeniedError;
1080
1187
  exports.QueryFailedError = QueryFailedError;
1188
+ exports.SardinePaymentType = SardinePaymentType;
1189
+ exports.SardineQuoteType = SardineQuoteType;
1081
1190
  exports.SequenceAPIClient = SequenceAPIClient;
1082
1191
  exports.SessionExpiredError = SessionExpiredError;
1083
1192
  exports.SortOrder = SortOrder;