@0xsequence/api 1.10.10 → 1.10.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,9 +18,9 @@ function _extends() {
18
18
  }
19
19
 
20
20
  /* eslint-disable */
21
- // sequence-api v0.4.0 da72de09959c34a964bb84662ed6bd510f78f5cb
21
+ // sequence-api v0.4.0 d3f5f1338693d60d58f87bc408a076218201a097
22
22
  // --
23
- // Code generated by webrpc-gen@v0.18.6 with typescript generator. DO NOT EDIT.
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
 
@@ -31,7 +31,7 @@ const WebRPCVersion = 'v1';
31
31
  const WebRPCSchemaVersion = 'v0.4.0';
32
32
 
33
33
  // Schema hash generated from your RIDL schema
34
- const WebRPCSchemaHash = 'da72de09959c34a964bb84662ed6bd510f78f5cb';
34
+ const WebRPCSchemaHash = 'd3f5f1338693d60d58f87bc408a076218201a097';
35
35
 
36
36
  //
37
37
  // Types
@@ -42,6 +42,12 @@ let SortOrder = /*#__PURE__*/function (SortOrder) {
42
42
  SortOrder["ASC"] = "ASC";
43
43
  return SortOrder;
44
44
  }({});
45
+ let TokenType = /*#__PURE__*/function (TokenType) {
46
+ TokenType["ERC20"] = "ERC20";
47
+ TokenType["ERC721"] = "ERC721";
48
+ TokenType["ERC1155"] = "ERC1155";
49
+ return TokenType;
50
+ }({});
45
51
  //
46
52
  // Client
47
53
  //
@@ -621,6 +627,185 @@ class API {
621
627
  });
622
628
  });
623
629
  };
630
+ this.removeLinkedWallet = (args, headers, signal) => {
631
+ return this.fetch(this.url('RemoveLinkedWallet'), createHTTPRequest(args, headers, signal)).then(res => {
632
+ return buildResponse(res).then(_data => {
633
+ return {
634
+ status: _data.status
635
+ };
636
+ });
637
+ }, error => {
638
+ throw WebrpcRequestFailedError.new({
639
+ cause: `fetch(): ${error.message || ''}`
640
+ });
641
+ });
642
+ };
643
+ this.generateWaaSVerificationURL = (args, headers, signal) => {
644
+ return this.fetch(this.url('GenerateWaaSVerificationURL'), createHTTPRequest(args, headers, signal)).then(res => {
645
+ return buildResponse(res).then(_data => {
646
+ return {
647
+ nonce: _data.nonce,
648
+ verificationURL: _data.verificationURL
649
+ };
650
+ });
651
+ }, error => {
652
+ throw WebrpcRequestFailedError.new({
653
+ cause: `fetch(): ${error.message || ''}`
654
+ });
655
+ });
656
+ };
657
+ this.validateWaaSVerificationNonce = (args, headers, signal) => {
658
+ return this.fetch(this.url('ValidateWaaSVerificationNonce'), createHTTPRequest(args, headers, signal)).then(res => {
659
+ return buildResponse(res).then(_data => {
660
+ return {
661
+ walletAddress: _data.walletAddress
662
+ };
663
+ });
664
+ }, error => {
665
+ throw WebrpcRequestFailedError.new({
666
+ cause: `fetch(): ${error.message || ''}`
667
+ });
668
+ });
669
+ };
670
+ this.getSwapQuotes = (args, headers, signal) => {
671
+ return this.fetch(this.url('GetSwapQuotes'), createHTTPRequest(args, headers, signal)).then(res => {
672
+ return buildResponse(res).then(_data => {
673
+ return {
674
+ swapQuotes: _data.swapQuotes
675
+ };
676
+ });
677
+ }, error => {
678
+ throw WebrpcRequestFailedError.new({
679
+ cause: `fetch(): ${error.message || ''}`
680
+ });
681
+ });
682
+ };
683
+ this.addCurrencyGroup = (args, headers, signal) => {
684
+ return this.fetch(this.url('AddCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
685
+ return buildResponse(res).then(_data => {
686
+ return {
687
+ groupId: _data.groupId
688
+ };
689
+ });
690
+ }, error => {
691
+ throw WebrpcRequestFailedError.new({
692
+ cause: `fetch(): ${error.message || ''}`
693
+ });
694
+ });
695
+ };
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
+ this.listCurrencyGroups = (headers, signal) => {
708
+ return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(res => {
709
+ return buildResponse(res).then(_data => {
710
+ return {
711
+ currencyGroups: _data.currencyGroups
712
+ };
713
+ });
714
+ }, error => {
715
+ throw WebrpcRequestFailedError.new({
716
+ cause: `fetch(): ${error.message || ''}`
717
+ });
718
+ });
719
+ };
720
+ this.deleteCurrencyGroup = (args, headers, signal) => {
721
+ return this.fetch(this.url('DeleteCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
722
+ return buildResponse(res).then(_data => {
723
+ return {
724
+ ok: _data.ok
725
+ };
726
+ });
727
+ }, error => {
728
+ throw WebrpcRequestFailedError.new({
729
+ cause: `fetch(): ${error.message || ''}`
730
+ });
731
+ });
732
+ };
733
+ this.addInventoryPaymentConfig = (args, headers, signal) => {
734
+ return this.fetch(this.url('AddInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
735
+ return buildResponse(res).then(_data => {
736
+ return {
737
+ configId: _data.configId
738
+ };
739
+ });
740
+ }, error => {
741
+ throw WebrpcRequestFailedError.new({
742
+ cause: `fetch(): ${error.message || ''}`
743
+ });
744
+ });
745
+ };
746
+ this.getInventoryPaymentConfig = (args, headers, signal) => {
747
+ return this.fetch(this.url('GetInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
748
+ return buildResponse(res).then(_data => {
749
+ return {
750
+ config: _data.config
751
+ };
752
+ });
753
+ }, error => {
754
+ throw WebrpcRequestFailedError.new({
755
+ cause: `fetch(): ${error.message || ''}`
756
+ });
757
+ });
758
+ };
759
+ this.listInventoryPaymentConfigs = (args, headers, signal) => {
760
+ return this.fetch(this.url('ListInventoryPaymentConfigs'), createHTTPRequest(args, headers, signal)).then(res => {
761
+ return buildResponse(res).then(_data => {
762
+ return {
763
+ configs: _data.configs
764
+ };
765
+ });
766
+ }, error => {
767
+ throw WebrpcRequestFailedError.new({
768
+ cause: `fetch(): ${error.message || ''}`
769
+ });
770
+ });
771
+ };
772
+ this.updateInventoryPaymentConfig = (args, headers, signal) => {
773
+ return this.fetch(this.url('UpdateInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
774
+ return buildResponse(res).then(_data => {
775
+ return {};
776
+ });
777
+ }, error => {
778
+ throw WebrpcRequestFailedError.new({
779
+ cause: `fetch(): ${error.message || ''}`
780
+ });
781
+ });
782
+ };
783
+ this.deleteInventoryPaymentConfig = (args, headers, signal) => {
784
+ return this.fetch(this.url('DeleteInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
785
+ return buildResponse(res).then(_data => {
786
+ return {
787
+ ok: _data.ok
788
+ };
789
+ });
790
+ }, error => {
791
+ throw WebrpcRequestFailedError.new({
792
+ cause: `fetch(): ${error.message || ''}`
793
+ });
794
+ });
795
+ };
796
+ this.requestInventoryPayment = (args, headers, signal) => {
797
+ return this.fetch(this.url('RequestInventoryPayment'), createHTTPRequest(args, headers, signal)).then(res => {
798
+ return buildResponse(res).then(_data => {
799
+ return {
800
+ payment: _data.payment
801
+ };
802
+ });
803
+ }, error => {
804
+ throw WebrpcRequestFailedError.new({
805
+ cause: `fetch(): ${error.message || ''}`
806
+ });
807
+ });
808
+ };
624
809
  this.hostname = hostname;
625
810
  this.fetch = (input, init) => fetch(input, init);
626
811
  }
@@ -783,6 +968,12 @@ class AbortedError extends WebrpcError {
783
968
  Object.setPrototypeOf(this, AbortedError.prototype);
784
969
  }
785
970
  }
971
+ class GeoblockedError extends WebrpcError {
972
+ constructor(name = 'Geoblocked', code = 1006, message = 'Geoblocked region', status = 0, cause) {
973
+ super(name, code, message, status, cause);
974
+ Object.setPrototypeOf(this, GeoblockedError.prototype);
975
+ }
976
+ }
786
977
  class InvalidArgumentError extends WebrpcError {
787
978
  constructor(name = 'InvalidArgument', code = 2000, message = 'Invalid argument', status = 0, cause) {
788
979
  super(name, code, message, status, cause);
@@ -823,6 +1014,7 @@ let errors = /*#__PURE__*/function (errors) {
823
1014
  errors["PermissionDenied"] = "PermissionDenied";
824
1015
  errors["SessionExpired"] = "SessionExpired";
825
1016
  errors["Aborted"] = "Aborted";
1017
+ errors["Geoblocked"] = "Geoblocked";
826
1018
  errors["InvalidArgument"] = "InvalidArgument";
827
1019
  errors["Unavailable"] = "Unavailable";
828
1020
  errors["QueryFailed"] = "QueryFailed";
@@ -845,13 +1037,14 @@ const webrpcErrorByCode = {
845
1037
  [1001]: PermissionDeniedError,
846
1038
  [1002]: SessionExpiredError,
847
1039
  [1005]: AbortedError,
1040
+ [1006]: GeoblockedError,
848
1041
  [2000]: InvalidArgumentError,
849
1042
  [2002]: UnavailableError,
850
1043
  [2003]: QueryFailedError,
851
1044
  [3000]: NotFoundError
852
1045
  };
853
1046
 
854
- const fetch = typeof global === 'object' ? global.fetch : window.fetch;
1047
+ const fetch = globalThis.fetch;
855
1048
  class SequenceAPIClient extends API {
856
1049
  constructor(hostname, projectAccessKey, jwtAuth) {
857
1050
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
@@ -880,6 +1073,7 @@ class SequenceAPIClient extends API {
880
1073
 
881
1074
  exports.API = API;
882
1075
  exports.AbortedError = AbortedError;
1076
+ exports.GeoblockedError = GeoblockedError;
883
1077
  exports.InvalidArgumentError = InvalidArgumentError;
884
1078
  exports.NotFoundError = NotFoundError;
885
1079
  exports.PermissionDeniedError = PermissionDeniedError;
@@ -887,6 +1081,7 @@ exports.QueryFailedError = QueryFailedError;
887
1081
  exports.SequenceAPIClient = SequenceAPIClient;
888
1082
  exports.SessionExpiredError = SessionExpiredError;
889
1083
  exports.SortOrder = SortOrder;
1084
+ exports.TokenType = TokenType;
890
1085
  exports.UnauthorizedError = UnauthorizedError;
891
1086
  exports.UnavailableError = UnavailableError;
892
1087
  exports.WebRPCSchemaHash = WebRPCSchemaHash;
@@ -18,9 +18,9 @@ function _extends() {
18
18
  }
19
19
 
20
20
  /* eslint-disable */
21
- // sequence-api v0.4.0 da72de09959c34a964bb84662ed6bd510f78f5cb
21
+ // sequence-api v0.4.0 d3f5f1338693d60d58f87bc408a076218201a097
22
22
  // --
23
- // Code generated by webrpc-gen@v0.18.6 with typescript generator. DO NOT EDIT.
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
 
@@ -31,7 +31,7 @@ const WebRPCVersion = 'v1';
31
31
  const WebRPCSchemaVersion = 'v0.4.0';
32
32
 
33
33
  // Schema hash generated from your RIDL schema
34
- const WebRPCSchemaHash = 'da72de09959c34a964bb84662ed6bd510f78f5cb';
34
+ const WebRPCSchemaHash = 'd3f5f1338693d60d58f87bc408a076218201a097';
35
35
 
36
36
  //
37
37
  // Types
@@ -42,6 +42,12 @@ let SortOrder = /*#__PURE__*/function (SortOrder) {
42
42
  SortOrder["ASC"] = "ASC";
43
43
  return SortOrder;
44
44
  }({});
45
+ let TokenType = /*#__PURE__*/function (TokenType) {
46
+ TokenType["ERC20"] = "ERC20";
47
+ TokenType["ERC721"] = "ERC721";
48
+ TokenType["ERC1155"] = "ERC1155";
49
+ return TokenType;
50
+ }({});
45
51
  //
46
52
  // Client
47
53
  //
@@ -621,6 +627,185 @@ class API {
621
627
  });
622
628
  });
623
629
  };
630
+ this.removeLinkedWallet = (args, headers, signal) => {
631
+ return this.fetch(this.url('RemoveLinkedWallet'), createHTTPRequest(args, headers, signal)).then(res => {
632
+ return buildResponse(res).then(_data => {
633
+ return {
634
+ status: _data.status
635
+ };
636
+ });
637
+ }, error => {
638
+ throw WebrpcRequestFailedError.new({
639
+ cause: `fetch(): ${error.message || ''}`
640
+ });
641
+ });
642
+ };
643
+ this.generateWaaSVerificationURL = (args, headers, signal) => {
644
+ return this.fetch(this.url('GenerateWaaSVerificationURL'), createHTTPRequest(args, headers, signal)).then(res => {
645
+ return buildResponse(res).then(_data => {
646
+ return {
647
+ nonce: _data.nonce,
648
+ verificationURL: _data.verificationURL
649
+ };
650
+ });
651
+ }, error => {
652
+ throw WebrpcRequestFailedError.new({
653
+ cause: `fetch(): ${error.message || ''}`
654
+ });
655
+ });
656
+ };
657
+ this.validateWaaSVerificationNonce = (args, headers, signal) => {
658
+ return this.fetch(this.url('ValidateWaaSVerificationNonce'), createHTTPRequest(args, headers, signal)).then(res => {
659
+ return buildResponse(res).then(_data => {
660
+ return {
661
+ walletAddress: _data.walletAddress
662
+ };
663
+ });
664
+ }, error => {
665
+ throw WebrpcRequestFailedError.new({
666
+ cause: `fetch(): ${error.message || ''}`
667
+ });
668
+ });
669
+ };
670
+ this.getSwapQuotes = (args, headers, signal) => {
671
+ return this.fetch(this.url('GetSwapQuotes'), createHTTPRequest(args, headers, signal)).then(res => {
672
+ return buildResponse(res).then(_data => {
673
+ return {
674
+ swapQuotes: _data.swapQuotes
675
+ };
676
+ });
677
+ }, error => {
678
+ throw WebrpcRequestFailedError.new({
679
+ cause: `fetch(): ${error.message || ''}`
680
+ });
681
+ });
682
+ };
683
+ this.addCurrencyGroup = (args, headers, signal) => {
684
+ return this.fetch(this.url('AddCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
685
+ return buildResponse(res).then(_data => {
686
+ return {
687
+ groupId: _data.groupId
688
+ };
689
+ });
690
+ }, error => {
691
+ throw WebrpcRequestFailedError.new({
692
+ cause: `fetch(): ${error.message || ''}`
693
+ });
694
+ });
695
+ };
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
+ this.listCurrencyGroups = (headers, signal) => {
708
+ return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(res => {
709
+ return buildResponse(res).then(_data => {
710
+ return {
711
+ currencyGroups: _data.currencyGroups
712
+ };
713
+ });
714
+ }, error => {
715
+ throw WebrpcRequestFailedError.new({
716
+ cause: `fetch(): ${error.message || ''}`
717
+ });
718
+ });
719
+ };
720
+ this.deleteCurrencyGroup = (args, headers, signal) => {
721
+ return this.fetch(this.url('DeleteCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
722
+ return buildResponse(res).then(_data => {
723
+ return {
724
+ ok: _data.ok
725
+ };
726
+ });
727
+ }, error => {
728
+ throw WebrpcRequestFailedError.new({
729
+ cause: `fetch(): ${error.message || ''}`
730
+ });
731
+ });
732
+ };
733
+ this.addInventoryPaymentConfig = (args, headers, signal) => {
734
+ return this.fetch(this.url('AddInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
735
+ return buildResponse(res).then(_data => {
736
+ return {
737
+ configId: _data.configId
738
+ };
739
+ });
740
+ }, error => {
741
+ throw WebrpcRequestFailedError.new({
742
+ cause: `fetch(): ${error.message || ''}`
743
+ });
744
+ });
745
+ };
746
+ this.getInventoryPaymentConfig = (args, headers, signal) => {
747
+ return this.fetch(this.url('GetInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
748
+ return buildResponse(res).then(_data => {
749
+ return {
750
+ config: _data.config
751
+ };
752
+ });
753
+ }, error => {
754
+ throw WebrpcRequestFailedError.new({
755
+ cause: `fetch(): ${error.message || ''}`
756
+ });
757
+ });
758
+ };
759
+ this.listInventoryPaymentConfigs = (args, headers, signal) => {
760
+ return this.fetch(this.url('ListInventoryPaymentConfigs'), createHTTPRequest(args, headers, signal)).then(res => {
761
+ return buildResponse(res).then(_data => {
762
+ return {
763
+ configs: _data.configs
764
+ };
765
+ });
766
+ }, error => {
767
+ throw WebrpcRequestFailedError.new({
768
+ cause: `fetch(): ${error.message || ''}`
769
+ });
770
+ });
771
+ };
772
+ this.updateInventoryPaymentConfig = (args, headers, signal) => {
773
+ return this.fetch(this.url('UpdateInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
774
+ return buildResponse(res).then(_data => {
775
+ return {};
776
+ });
777
+ }, error => {
778
+ throw WebrpcRequestFailedError.new({
779
+ cause: `fetch(): ${error.message || ''}`
780
+ });
781
+ });
782
+ };
783
+ this.deleteInventoryPaymentConfig = (args, headers, signal) => {
784
+ return this.fetch(this.url('DeleteInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
785
+ return buildResponse(res).then(_data => {
786
+ return {
787
+ ok: _data.ok
788
+ };
789
+ });
790
+ }, error => {
791
+ throw WebrpcRequestFailedError.new({
792
+ cause: `fetch(): ${error.message || ''}`
793
+ });
794
+ });
795
+ };
796
+ this.requestInventoryPayment = (args, headers, signal) => {
797
+ return this.fetch(this.url('RequestInventoryPayment'), createHTTPRequest(args, headers, signal)).then(res => {
798
+ return buildResponse(res).then(_data => {
799
+ return {
800
+ payment: _data.payment
801
+ };
802
+ });
803
+ }, error => {
804
+ throw WebrpcRequestFailedError.new({
805
+ cause: `fetch(): ${error.message || ''}`
806
+ });
807
+ });
808
+ };
624
809
  this.hostname = hostname;
625
810
  this.fetch = (input, init) => fetch(input, init);
626
811
  }
@@ -783,6 +968,12 @@ class AbortedError extends WebrpcError {
783
968
  Object.setPrototypeOf(this, AbortedError.prototype);
784
969
  }
785
970
  }
971
+ class GeoblockedError extends WebrpcError {
972
+ constructor(name = 'Geoblocked', code = 1006, message = 'Geoblocked region', status = 0, cause) {
973
+ super(name, code, message, status, cause);
974
+ Object.setPrototypeOf(this, GeoblockedError.prototype);
975
+ }
976
+ }
786
977
  class InvalidArgumentError extends WebrpcError {
787
978
  constructor(name = 'InvalidArgument', code = 2000, message = 'Invalid argument', status = 0, cause) {
788
979
  super(name, code, message, status, cause);
@@ -823,6 +1014,7 @@ let errors = /*#__PURE__*/function (errors) {
823
1014
  errors["PermissionDenied"] = "PermissionDenied";
824
1015
  errors["SessionExpired"] = "SessionExpired";
825
1016
  errors["Aborted"] = "Aborted";
1017
+ errors["Geoblocked"] = "Geoblocked";
826
1018
  errors["InvalidArgument"] = "InvalidArgument";
827
1019
  errors["Unavailable"] = "Unavailable";
828
1020
  errors["QueryFailed"] = "QueryFailed";
@@ -845,13 +1037,14 @@ const webrpcErrorByCode = {
845
1037
  [1001]: PermissionDeniedError,
846
1038
  [1002]: SessionExpiredError,
847
1039
  [1005]: AbortedError,
1040
+ [1006]: GeoblockedError,
848
1041
  [2000]: InvalidArgumentError,
849
1042
  [2002]: UnavailableError,
850
1043
  [2003]: QueryFailedError,
851
1044
  [3000]: NotFoundError
852
1045
  };
853
1046
 
854
- const fetch = typeof global === 'object' ? global.fetch : window.fetch;
1047
+ const fetch = globalThis.fetch;
855
1048
  class SequenceAPIClient extends API {
856
1049
  constructor(hostname, projectAccessKey, jwtAuth) {
857
1050
  super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
@@ -880,6 +1073,7 @@ class SequenceAPIClient extends API {
880
1073
 
881
1074
  exports.API = API;
882
1075
  exports.AbortedError = AbortedError;
1076
+ exports.GeoblockedError = GeoblockedError;
883
1077
  exports.InvalidArgumentError = InvalidArgumentError;
884
1078
  exports.NotFoundError = NotFoundError;
885
1079
  exports.PermissionDeniedError = PermissionDeniedError;
@@ -887,6 +1081,7 @@ exports.QueryFailedError = QueryFailedError;
887
1081
  exports.SequenceAPIClient = SequenceAPIClient;
888
1082
  exports.SessionExpiredError = SessionExpiredError;
889
1083
  exports.SortOrder = SortOrder;
1084
+ exports.TokenType = TokenType;
890
1085
  exports.UnauthorizedError = UnauthorizedError;
891
1086
  exports.UnavailableError = UnavailableError;
892
1087
  exports.WebRPCSchemaHash = WebRPCSchemaHash;