@0xsequence/api 0.0.0-20240923135602 → 0.0.0-20241007154931

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,7 +18,7 @@ function _extends() {
18
18
  }
19
19
 
20
20
  /* eslint-disable */
21
- // sequence-api v0.4.0 9ed28977ef1572bcc09e507f04c1ec92aab12865
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
  //
@@ -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 = "9ed28977ef1572bcc09e507f04c1ec92aab12865";
34
+ const WebRPCSchemaHash = "470a0f88ea399c2a57ff8c22da54358c033ed5f0";
35
35
 
36
36
  //
37
37
  // Types
@@ -784,11 +784,11 @@ class API {
784
784
  });
785
785
  });
786
786
  };
787
- this.getSwapQuotes = (args, headers, signal) => {
788
- 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 => {
789
789
  return buildResponse(res).then(_data => {
790
790
  return {
791
- swapQuotes: _data.swapQuotes
791
+ swapPrices: _data.swapPrices
792
792
  };
793
793
  });
794
794
  }, error => {
@@ -797,11 +797,11 @@ class API {
797
797
  });
798
798
  });
799
799
  };
800
- this.addCurrencyGroup = (args, headers, signal) => {
801
- 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 => {
802
802
  return buildResponse(res).then(_data => {
803
803
  return {
804
- groupId: _data.groupId
804
+ swapQuote: _data.swapQuote
805
805
  };
806
806
  });
807
807
  }, error => {
@@ -810,17 +810,6 @@ class API {
810
810
  });
811
811
  });
812
812
  };
813
- this.updateCurrencyGroup = (args, headers, signal) => {
814
- return this.fetch(this.url('UpdateCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
815
- return buildResponse(res).then(_data => {
816
- return {};
817
- });
818
- }, error => {
819
- throw WebrpcRequestFailedError.new({
820
- cause: `fetch(): ${error.message || ''}`
821
- });
822
- });
823
- };
824
813
  this.listCurrencyGroups = (headers, signal) => {
825
814
  return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(res => {
826
815
  return buildResponse(res).then(_data => {
@@ -834,11 +823,11 @@ class API {
834
823
  });
835
824
  });
836
825
  };
837
- this.deleteCurrencyGroup = (args, headers, signal) => {
838
- 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 => {
839
828
  return buildResponse(res).then(_data => {
840
829
  return {
841
- ok: _data.ok
830
+ inventoryId: _data.inventoryId
842
831
  };
843
832
  });
844
833
  }, error => {
@@ -847,11 +836,11 @@ class API {
847
836
  });
848
837
  });
849
838
  };
850
- this.addInventoryPaymentConfig = (args, headers, signal) => {
851
- 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 => {
852
841
  return buildResponse(res).then(_data => {
853
842
  return {
854
- configId: _data.configId
843
+ inventory: _data.inventory
855
844
  };
856
845
  });
857
846
  }, error => {
@@ -860,11 +849,11 @@ class API {
860
849
  });
861
850
  });
862
851
  };
863
- this.getInventoryPaymentConfig = (args, headers, signal) => {
864
- 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 => {
865
854
  return buildResponse(res).then(_data => {
866
855
  return {
867
- config: _data.config
856
+ inventory: _data.inventory
868
857
  };
869
858
  });
870
859
  }, error => {
@@ -873,12 +862,10 @@ class API {
873
862
  });
874
863
  });
875
864
  };
876
- this.listInventoryPaymentConfigs = (args, headers, signal) => {
877
- 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 => {
878
867
  return buildResponse(res).then(_data => {
879
- return {
880
- configs: _data.configs
881
- };
868
+ return {};
882
869
  });
883
870
  }, error => {
884
871
  throw WebrpcRequestFailedError.new({
@@ -886,10 +873,12 @@ class API {
886
873
  });
887
874
  });
888
875
  };
889
- this.updateInventoryPaymentConfig = (args, headers, signal) => {
890
- 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 => {
891
878
  return buildResponse(res).then(_data => {
892
- return {};
879
+ return {
880
+ ok: _data.ok
881
+ };
893
882
  });
894
883
  }, error => {
895
884
  throw WebrpcRequestFailedError.new({
@@ -897,11 +886,11 @@ class API {
897
886
  });
898
887
  });
899
888
  };
900
- this.deleteInventoryPaymentConfig = (args, headers, signal) => {
901
- 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 => {
902
891
  return buildResponse(res).then(_data => {
903
892
  return {
904
- ok: _data.ok
893
+ payment: _data.payment
905
894
  };
906
895
  });
907
896
  }, error => {
@@ -910,11 +899,12 @@ class API {
910
899
  });
911
900
  });
912
901
  };
913
- this.requestInventoryPayment = (args, headers, signal) => {
914
- 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 => {
915
904
  return buildResponse(res).then(_data => {
916
905
  return {
917
- payment: _data.payment
906
+ page: _data.page,
907
+ payments: _data.payments
918
908
  };
919
909
  });
920
910
  }, error => {
@@ -18,7 +18,7 @@ function _extends() {
18
18
  }
19
19
 
20
20
  /* eslint-disable */
21
- // sequence-api v0.4.0 9ed28977ef1572bcc09e507f04c1ec92aab12865
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
  //
@@ -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 = "9ed28977ef1572bcc09e507f04c1ec92aab12865";
34
+ const WebRPCSchemaHash = "470a0f88ea399c2a57ff8c22da54358c033ed5f0";
35
35
 
36
36
  //
37
37
  // Types
@@ -784,11 +784,11 @@ class API {
784
784
  });
785
785
  });
786
786
  };
787
- this.getSwapQuotes = (args, headers, signal) => {
788
- 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 => {
789
789
  return buildResponse(res).then(_data => {
790
790
  return {
791
- swapQuotes: _data.swapQuotes
791
+ swapPrices: _data.swapPrices
792
792
  };
793
793
  });
794
794
  }, error => {
@@ -797,11 +797,11 @@ class API {
797
797
  });
798
798
  });
799
799
  };
800
- this.addCurrencyGroup = (args, headers, signal) => {
801
- 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 => {
802
802
  return buildResponse(res).then(_data => {
803
803
  return {
804
- groupId: _data.groupId
804
+ swapQuote: _data.swapQuote
805
805
  };
806
806
  });
807
807
  }, error => {
@@ -810,17 +810,6 @@ class API {
810
810
  });
811
811
  });
812
812
  };
813
- this.updateCurrencyGroup = (args, headers, signal) => {
814
- return this.fetch(this.url('UpdateCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
815
- return buildResponse(res).then(_data => {
816
- return {};
817
- });
818
- }, error => {
819
- throw WebrpcRequestFailedError.new({
820
- cause: `fetch(): ${error.message || ''}`
821
- });
822
- });
823
- };
824
813
  this.listCurrencyGroups = (headers, signal) => {
825
814
  return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(res => {
826
815
  return buildResponse(res).then(_data => {
@@ -834,11 +823,11 @@ class API {
834
823
  });
835
824
  });
836
825
  };
837
- this.deleteCurrencyGroup = (args, headers, signal) => {
838
- 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 => {
839
828
  return buildResponse(res).then(_data => {
840
829
  return {
841
- ok: _data.ok
830
+ inventoryId: _data.inventoryId
842
831
  };
843
832
  });
844
833
  }, error => {
@@ -847,11 +836,11 @@ class API {
847
836
  });
848
837
  });
849
838
  };
850
- this.addInventoryPaymentConfig = (args, headers, signal) => {
851
- 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 => {
852
841
  return buildResponse(res).then(_data => {
853
842
  return {
854
- configId: _data.configId
843
+ inventory: _data.inventory
855
844
  };
856
845
  });
857
846
  }, error => {
@@ -860,11 +849,11 @@ class API {
860
849
  });
861
850
  });
862
851
  };
863
- this.getInventoryPaymentConfig = (args, headers, signal) => {
864
- 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 => {
865
854
  return buildResponse(res).then(_data => {
866
855
  return {
867
- config: _data.config
856
+ inventory: _data.inventory
868
857
  };
869
858
  });
870
859
  }, error => {
@@ -873,12 +862,10 @@ class API {
873
862
  });
874
863
  });
875
864
  };
876
- this.listInventoryPaymentConfigs = (args, headers, signal) => {
877
- 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 => {
878
867
  return buildResponse(res).then(_data => {
879
- return {
880
- configs: _data.configs
881
- };
868
+ return {};
882
869
  });
883
870
  }, error => {
884
871
  throw WebrpcRequestFailedError.new({
@@ -886,10 +873,12 @@ class API {
886
873
  });
887
874
  });
888
875
  };
889
- this.updateInventoryPaymentConfig = (args, headers, signal) => {
890
- 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 => {
891
878
  return buildResponse(res).then(_data => {
892
- return {};
879
+ return {
880
+ ok: _data.ok
881
+ };
893
882
  });
894
883
  }, error => {
895
884
  throw WebrpcRequestFailedError.new({
@@ -897,11 +886,11 @@ class API {
897
886
  });
898
887
  });
899
888
  };
900
- this.deleteInventoryPaymentConfig = (args, headers, signal) => {
901
- 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 => {
902
891
  return buildResponse(res).then(_data => {
903
892
  return {
904
- ok: _data.ok
893
+ payment: _data.payment
905
894
  };
906
895
  });
907
896
  }, error => {
@@ -910,11 +899,12 @@ class API {
910
899
  });
911
900
  });
912
901
  };
913
- this.requestInventoryPayment = (args, headers, signal) => {
914
- 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 => {
915
904
  return buildResponse(res).then(_data => {
916
905
  return {
917
- payment: _data.payment
906
+ page: _data.page,
907
+ payments: _data.payments
918
908
  };
919
909
  });
920
910
  }, error => {
@@ -14,7 +14,7 @@ function _extends() {
14
14
  }
15
15
 
16
16
  /* eslint-disable */
17
- // sequence-api v0.4.0 9ed28977ef1572bcc09e507f04c1ec92aab12865
17
+ // sequence-api v0.4.0 470a0f88ea399c2a57ff8c22da54358c033ed5f0
18
18
  // --
19
19
  // Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
20
20
  //
@@ -27,7 +27,7 @@ const WebRPCVersion = "v1";
27
27
  const WebRPCSchemaVersion = "v0.4.0";
28
28
 
29
29
  // Schema hash generated from your RIDL schema
30
- const WebRPCSchemaHash = "9ed28977ef1572bcc09e507f04c1ec92aab12865";
30
+ const WebRPCSchemaHash = "470a0f88ea399c2a57ff8c22da54358c033ed5f0";
31
31
 
32
32
  //
33
33
  // Types
@@ -780,11 +780,11 @@ class API {
780
780
  });
781
781
  });
782
782
  };
783
- this.getSwapQuotes = (args, headers, signal) => {
784
- return this.fetch(this.url('GetSwapQuotes'), createHTTPRequest(args, headers, signal)).then(res => {
783
+ this.getSwapPrices = (args, headers, signal) => {
784
+ return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
785
785
  return buildResponse(res).then(_data => {
786
786
  return {
787
- swapQuotes: _data.swapQuotes
787
+ swapPrices: _data.swapPrices
788
788
  };
789
789
  });
790
790
  }, error => {
@@ -793,11 +793,11 @@ class API {
793
793
  });
794
794
  });
795
795
  };
796
- this.addCurrencyGroup = (args, headers, signal) => {
797
- return this.fetch(this.url('AddCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
796
+ this.getSwapQuote = (args, headers, signal) => {
797
+ return this.fetch(this.url('GetSwapQuote'), createHTTPRequest(args, headers, signal)).then(res => {
798
798
  return buildResponse(res).then(_data => {
799
799
  return {
800
- groupId: _data.groupId
800
+ swapQuote: _data.swapQuote
801
801
  };
802
802
  });
803
803
  }, error => {
@@ -806,17 +806,6 @@ class API {
806
806
  });
807
807
  });
808
808
  };
809
- this.updateCurrencyGroup = (args, headers, signal) => {
810
- return this.fetch(this.url('UpdateCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
811
- return buildResponse(res).then(_data => {
812
- return {};
813
- });
814
- }, error => {
815
- throw WebrpcRequestFailedError.new({
816
- cause: `fetch(): ${error.message || ''}`
817
- });
818
- });
819
- };
820
809
  this.listCurrencyGroups = (headers, signal) => {
821
810
  return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(res => {
822
811
  return buildResponse(res).then(_data => {
@@ -830,11 +819,11 @@ class API {
830
819
  });
831
820
  });
832
821
  };
833
- this.deleteCurrencyGroup = (args, headers, signal) => {
834
- return this.fetch(this.url('DeleteCurrencyGroup'), createHTTPRequest(args, headers, signal)).then(res => {
822
+ this.addOffchainInventory = (args, headers, signal) => {
823
+ return this.fetch(this.url('AddOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
835
824
  return buildResponse(res).then(_data => {
836
825
  return {
837
- ok: _data.ok
826
+ inventoryId: _data.inventoryId
838
827
  };
839
828
  });
840
829
  }, error => {
@@ -843,11 +832,11 @@ class API {
843
832
  });
844
833
  });
845
834
  };
846
- this.addInventoryPaymentConfig = (args, headers, signal) => {
847
- return this.fetch(this.url('AddInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
835
+ this.getOffchainInventory = (args, headers, signal) => {
836
+ return this.fetch(this.url('GetOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
848
837
  return buildResponse(res).then(_data => {
849
838
  return {
850
- configId: _data.configId
839
+ inventory: _data.inventory
851
840
  };
852
841
  });
853
842
  }, error => {
@@ -856,11 +845,11 @@ class API {
856
845
  });
857
846
  });
858
847
  };
859
- this.getInventoryPaymentConfig = (args, headers, signal) => {
860
- return this.fetch(this.url('GetInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
848
+ this.listOffchainInventories = (args, headers, signal) => {
849
+ return this.fetch(this.url('ListOffchainInventories'), createHTTPRequest(args, headers, signal)).then(res => {
861
850
  return buildResponse(res).then(_data => {
862
851
  return {
863
- config: _data.config
852
+ inventory: _data.inventory
864
853
  };
865
854
  });
866
855
  }, error => {
@@ -869,12 +858,10 @@ class API {
869
858
  });
870
859
  });
871
860
  };
872
- this.listInventoryPaymentConfigs = (args, headers, signal) => {
873
- return this.fetch(this.url('ListInventoryPaymentConfigs'), createHTTPRequest(args, headers, signal)).then(res => {
861
+ this.updateOffchainInventory = (args, headers, signal) => {
862
+ return this.fetch(this.url('UpdateOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
874
863
  return buildResponse(res).then(_data => {
875
- return {
876
- configs: _data.configs
877
- };
864
+ return {};
878
865
  });
879
866
  }, error => {
880
867
  throw WebrpcRequestFailedError.new({
@@ -882,10 +869,12 @@ class API {
882
869
  });
883
870
  });
884
871
  };
885
- this.updateInventoryPaymentConfig = (args, headers, signal) => {
886
- return this.fetch(this.url('UpdateInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
872
+ this.deleteOffchainInventory = (args, headers, signal) => {
873
+ return this.fetch(this.url('DeleteOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
887
874
  return buildResponse(res).then(_data => {
888
- return {};
875
+ return {
876
+ ok: _data.ok
877
+ };
889
878
  });
890
879
  }, error => {
891
880
  throw WebrpcRequestFailedError.new({
@@ -893,11 +882,11 @@ class API {
893
882
  });
894
883
  });
895
884
  };
896
- this.deleteInventoryPaymentConfig = (args, headers, signal) => {
897
- return this.fetch(this.url('DeleteInventoryPaymentConfig'), createHTTPRequest(args, headers, signal)).then(res => {
885
+ this.requestOffchainPayment = (args, headers, signal) => {
886
+ return this.fetch(this.url('RequestOffchainPayment'), createHTTPRequest(args, headers, signal)).then(res => {
898
887
  return buildResponse(res).then(_data => {
899
888
  return {
900
- ok: _data.ok
889
+ payment: _data.payment
901
890
  };
902
891
  });
903
892
  }, error => {
@@ -906,11 +895,12 @@ class API {
906
895
  });
907
896
  });
908
897
  };
909
- this.requestInventoryPayment = (args, headers, signal) => {
910
- return this.fetch(this.url('RequestInventoryPayment'), createHTTPRequest(args, headers, signal)).then(res => {
898
+ this.listOffchainPayments = (args, headers, signal) => {
899
+ return this.fetch(this.url('ListOffchainPayments'), createHTTPRequest(args, headers, signal)).then(res => {
911
900
  return buildResponse(res).then(_data => {
912
901
  return {
913
- payment: _data.payment
902
+ page: _data.page,
903
+ payments: _data.payments
914
904
  };
915
905
  });
916
906
  }, error => {
@@ -1,6 +1,6 @@
1
1
  export declare const WebRPCVersion = "v1";
2
2
  export declare const WebRPCSchemaVersion = "v0.4.0";
3
- export declare const WebRPCSchemaHash = "9ed28977ef1572bcc09e507f04c1ec92aab12865";
3
+ export declare const WebRPCSchemaHash = "470a0f88ea399c2a57ff8c22da54358c033ed5f0";
4
4
  export declare enum SortOrder {
5
5
  DESC = "DESC",
6
6
  ASC = "ASC"
@@ -306,6 +306,13 @@ export interface SardinePaymentOption {
306
306
  subType: string;
307
307
  processingTime: string;
308
308
  }
309
+ export interface SwapPrice {
310
+ currencyAddress: string;
311
+ currencyBalance: string;
312
+ price: string;
313
+ to: string;
314
+ transactionValue: string;
315
+ }
309
316
  export interface SwapQuote {
310
317
  currencyAddress: string;
311
318
  currencyBalance: string;
@@ -317,17 +324,14 @@ export interface SwapQuote {
317
324
  approveData: string;
318
325
  }
319
326
  export interface CurrencyGroup {
320
- id: number;
321
327
  name: string;
322
328
  tokens: Array<CurrencyGroupToken>;
323
329
  }
324
330
  export interface CurrencyGroupToken {
325
- id: number;
326
- currencyGroupId: number;
327
331
  chainId: number;
328
332
  tokenAddress: string;
329
333
  }
330
- export interface InventoryPaymentConfig {
334
+ export interface OffchainInventory {
331
335
  id: number;
332
336
  projectId: number;
333
337
  chainId: number;
@@ -344,9 +348,9 @@ export interface InventoryPaymentConfig {
344
348
  createdAt: string;
345
349
  deletedAt?: string;
346
350
  }
347
- export interface InventoryPayment {
351
+ export interface OffchainPayment {
348
352
  id: number;
349
- inventoryPaymentConfigId: number;
353
+ offchainInventoryId: number;
350
354
  productRecipient: string;
351
355
  paymentChainId: number;
352
356
  paymentTokenAddress: string;
@@ -355,9 +359,9 @@ export interface InventoryPayment {
355
359
  completedAt?: string;
356
360
  processedAt?: string;
357
361
  }
358
- export interface InventoryPaymentResponse {
362
+ export interface PaymentResponse {
359
363
  paymentId: number;
360
- inventoryPaymentConfigId: number;
364
+ offchainInventoryId: number;
361
365
  chainId: number;
362
366
  externalProductId: string;
363
367
  paymentTokenAddress: string;
@@ -424,17 +428,16 @@ export interface API {
424
428
  removeLinkedWallet(args: RemoveLinkedWalletArgs, headers?: object, signal?: AbortSignal): Promise<RemoveLinkedWalletReturn>;
425
429
  generateWaaSVerificationURL(args: GenerateWaaSVerificationURLArgs, headers?: object, signal?: AbortSignal): Promise<GenerateWaaSVerificationURLReturn>;
426
430
  validateWaaSVerificationNonce(args: ValidateWaaSVerificationNonceArgs, headers?: object, signal?: AbortSignal): Promise<ValidateWaaSVerificationNonceReturn>;
427
- getSwapQuotes(args: GetSwapQuotesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuotesReturn>;
428
- addCurrencyGroup(args: AddCurrencyGroupArgs, headers?: object, signal?: AbortSignal): Promise<AddCurrencyGroupReturn>;
429
- updateCurrencyGroup(args: UpdateCurrencyGroupArgs, headers?: object, signal?: AbortSignal): Promise<UpdateCurrencyGroupReturn>;
431
+ getSwapPrices(args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPricesReturn>;
432
+ getSwapQuote(args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuoteReturn>;
430
433
  listCurrencyGroups(headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsReturn>;
431
- deleteCurrencyGroup(args: DeleteCurrencyGroupArgs, headers?: object, signal?: AbortSignal): Promise<DeleteCurrencyGroupReturn>;
432
- addInventoryPaymentConfig(args: AddInventoryPaymentConfigArgs, headers?: object, signal?: AbortSignal): Promise<AddInventoryPaymentConfigReturn>;
433
- getInventoryPaymentConfig(args: GetInventoryPaymentConfigArgs, headers?: object, signal?: AbortSignal): Promise<GetInventoryPaymentConfigReturn>;
434
- listInventoryPaymentConfigs(args: ListInventoryPaymentConfigsArgs, headers?: object, signal?: AbortSignal): Promise<ListInventoryPaymentConfigsReturn>;
435
- updateInventoryPaymentConfig(args: UpdateInventoryPaymentConfigArgs, headers?: object, signal?: AbortSignal): Promise<UpdateInventoryPaymentConfigReturn>;
436
- deleteInventoryPaymentConfig(args: DeleteInventoryPaymentConfigArgs, headers?: object, signal?: AbortSignal): Promise<DeleteInventoryPaymentConfigReturn>;
437
- requestInventoryPayment(args: RequestInventoryPaymentArgs, headers?: object, signal?: AbortSignal): Promise<RequestInventoryPaymentReturn>;
434
+ addOffchainInventory(args: AddOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<AddOffchainInventoryReturn>;
435
+ getOffchainInventory(args: GetOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<GetOffchainInventoryReturn>;
436
+ listOffchainInventories(args: ListOffchainInventoriesArgs, headers?: object, signal?: AbortSignal): Promise<ListOffchainInventoriesReturn>;
437
+ updateOffchainInventory(args: UpdateOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<UpdateOffchainInventoryReturn>;
438
+ deleteOffchainInventory(args: DeleteOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<DeleteOffchainInventoryReturn>;
439
+ requestOffchainPayment(args: RequestOffchainPaymentArgs, headers?: object, signal?: AbortSignal): Promise<RequestOffchainPaymentReturn>;
440
+ listOffchainPayments(args: ListOffchainPaymentsArgs, headers?: object, signal?: AbortSignal): Promise<ListOffchainPaymentsReturn>;
438
441
  }
439
442
  export interface PingArgs {
440
443
  }
@@ -814,75 +817,76 @@ export interface ValidateWaaSVerificationNonceArgs {
814
817
  export interface ValidateWaaSVerificationNonceReturn {
815
818
  walletAddress: string;
816
819
  }
817
- export interface GetSwapQuotesArgs {
820
+ export interface GetSwapPricesArgs {
818
821
  userAddress: string;
819
- currencyAddress: string;
820
- currencyAmount: string;
822
+ buyCurrencyAddress: string;
823
+ buyAmount: string;
821
824
  chainId: number;
822
- includeApprove: boolean;
823
- }
824
- export interface GetSwapQuotesReturn {
825
- swapQuotes: Array<SwapQuote>;
826
825
  }
827
- export interface AddCurrencyGroupArgs {
828
- currencyGroup: CurrencyGroup;
826
+ export interface GetSwapPricesReturn {
827
+ swapPrices: Array<SwapPrice>;
829
828
  }
830
- export interface AddCurrencyGroupReturn {
831
- groupId: number;
832
- }
833
- export interface UpdateCurrencyGroupArgs {
834
- currencyGroup: CurrencyGroup;
829
+ export interface GetSwapQuoteArgs {
830
+ userAddress: string;
831
+ buyCurrencyAddress: string;
832
+ sellCurrencyAddress: string;
833
+ buyAmount: string;
834
+ chainId: number;
835
+ includeApprove: boolean;
835
836
  }
836
- export interface UpdateCurrencyGroupReturn {
837
+ export interface GetSwapQuoteReturn {
838
+ swapQuote: SwapQuote;
837
839
  }
838
840
  export interface ListCurrencyGroupsArgs {
839
841
  }
840
842
  export interface ListCurrencyGroupsReturn {
841
843
  currencyGroups: Array<CurrencyGroup>;
842
844
  }
843
- export interface DeleteCurrencyGroupArgs {
844
- groupId: number;
845
- }
846
- export interface DeleteCurrencyGroupReturn {
847
- ok: boolean;
845
+ export interface AddOffchainInventoryArgs {
846
+ inventory: OffchainInventory;
848
847
  }
849
- export interface AddInventoryPaymentConfigArgs {
850
- config: InventoryPaymentConfig;
848
+ export interface AddOffchainInventoryReturn {
849
+ inventoryId: number;
851
850
  }
852
- export interface AddInventoryPaymentConfigReturn {
853
- configId: number;
851
+ export interface GetOffchainInventoryArgs {
852
+ inventoryId: number;
854
853
  }
855
- export interface GetInventoryPaymentConfigArgs {
856
- configId: number;
854
+ export interface GetOffchainInventoryReturn {
855
+ inventory: OffchainInventory;
857
856
  }
858
- export interface GetInventoryPaymentConfigReturn {
859
- config: InventoryPaymentConfig;
860
- }
861
- export interface ListInventoryPaymentConfigsArgs {
857
+ export interface ListOffchainInventoriesArgs {
862
858
  projectId: number;
863
859
  }
864
- export interface ListInventoryPaymentConfigsReturn {
865
- configs: Array<InventoryPaymentConfig>;
860
+ export interface ListOffchainInventoriesReturn {
861
+ inventory: Array<OffchainInventory>;
866
862
  }
867
- export interface UpdateInventoryPaymentConfigArgs {
868
- config: InventoryPaymentConfig;
863
+ export interface UpdateOffchainInventoryArgs {
864
+ inventory: OffchainInventory;
869
865
  }
870
- export interface UpdateInventoryPaymentConfigReturn {
866
+ export interface UpdateOffchainInventoryReturn {
871
867
  }
872
- export interface DeleteInventoryPaymentConfigArgs {
873
- configId: number;
868
+ export interface DeleteOffchainInventoryArgs {
869
+ inventoryId: number;
874
870
  }
875
- export interface DeleteInventoryPaymentConfigReturn {
871
+ export interface DeleteOffchainInventoryReturn {
876
872
  ok: boolean;
877
873
  }
878
- export interface RequestInventoryPaymentArgs {
879
- configId: number;
874
+ export interface RequestOffchainPaymentArgs {
875
+ inventoryId: number;
880
876
  recipient: string;
881
877
  chainId?: number;
882
878
  tokenAddress?: string;
883
879
  }
884
- export interface RequestInventoryPaymentReturn {
885
- payment: InventoryPaymentResponse;
880
+ export interface RequestOffchainPaymentReturn {
881
+ payment: PaymentResponse;
882
+ }
883
+ export interface ListOffchainPaymentsArgs {
884
+ inventoryId: number;
885
+ page?: Page;
886
+ }
887
+ export interface ListOffchainPaymentsReturn {
888
+ page: Page;
889
+ payments: Array<OffchainPayment>;
886
890
  }
887
891
  export declare class API implements API {
888
892
  protected hostname: string;
@@ -944,17 +948,16 @@ export declare class API implements API {
944
948
  removeLinkedWallet: (args: RemoveLinkedWalletArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<RemoveLinkedWalletReturn>;
945
949
  generateWaaSVerificationURL: (args: GenerateWaaSVerificationURLArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<GenerateWaaSVerificationURLReturn>;
946
950
  validateWaaSVerificationNonce: (args: ValidateWaaSVerificationNonceArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<ValidateWaaSVerificationNonceReturn>;
947
- getSwapQuotes: (args: GetSwapQuotesArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<GetSwapQuotesReturn>;
948
- addCurrencyGroup: (args: AddCurrencyGroupArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<AddCurrencyGroupReturn>;
949
- updateCurrencyGroup: (args: UpdateCurrencyGroupArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<UpdateCurrencyGroupReturn>;
951
+ getSwapPrices: (args: GetSwapPricesArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<GetSwapPricesReturn>;
952
+ getSwapQuote: (args: GetSwapQuoteArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<GetSwapQuoteReturn>;
950
953
  listCurrencyGroups: (headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<ListCurrencyGroupsReturn>;
951
- deleteCurrencyGroup: (args: DeleteCurrencyGroupArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<DeleteCurrencyGroupReturn>;
952
- addInventoryPaymentConfig: (args: AddInventoryPaymentConfigArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<AddInventoryPaymentConfigReturn>;
953
- getInventoryPaymentConfig: (args: GetInventoryPaymentConfigArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<GetInventoryPaymentConfigReturn>;
954
- listInventoryPaymentConfigs: (args: ListInventoryPaymentConfigsArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<ListInventoryPaymentConfigsReturn>;
955
- updateInventoryPaymentConfig: (args: UpdateInventoryPaymentConfigArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<UpdateInventoryPaymentConfigReturn>;
956
- deleteInventoryPaymentConfig: (args: DeleteInventoryPaymentConfigArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<DeleteInventoryPaymentConfigReturn>;
957
- requestInventoryPayment: (args: RequestInventoryPaymentArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<RequestInventoryPaymentReturn>;
954
+ addOffchainInventory: (args: AddOffchainInventoryArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<AddOffchainInventoryReturn>;
955
+ getOffchainInventory: (args: GetOffchainInventoryArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<GetOffchainInventoryReturn>;
956
+ listOffchainInventories: (args: ListOffchainInventoriesArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<ListOffchainInventoriesReturn>;
957
+ updateOffchainInventory: (args: UpdateOffchainInventoryArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<UpdateOffchainInventoryReturn>;
958
+ deleteOffchainInventory: (args: DeleteOffchainInventoryArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<DeleteOffchainInventoryReturn>;
959
+ requestOffchainPayment: (args: RequestOffchainPaymentArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<RequestOffchainPaymentReturn>;
960
+ listOffchainPayments: (args: ListOffchainPaymentsArgs, headers?: object | undefined, signal?: AbortSignal | undefined) => Promise<ListOffchainPaymentsReturn>;
958
961
  }
959
962
  export declare class WebrpcError extends Error {
960
963
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xsequence/api",
3
- "version": "0.0.0-20240923135602",
3
+ "version": "0.0.0-20241007154931",
4
4
  "description": "api sub-package for Sequence",
5
5
  "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/api",
6
6
  "source": "src/index.ts",
package/src/api.gen.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable */
2
- // sequence-api v0.4.0 9ed28977ef1572bcc09e507f04c1ec92aab12865
2
+ // sequence-api v0.4.0 470a0f88ea399c2a57ff8c22da54358c033ed5f0
3
3
  // --
4
4
  // Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
5
5
  //
@@ -12,7 +12,7 @@ export const WebRPCVersion = "v1"
12
12
  export const WebRPCSchemaVersion = "v0.4.0"
13
13
 
14
14
  // Schema hash generated from your RIDL schema
15
- export const WebRPCSchemaHash = "9ed28977ef1572bcc09e507f04c1ec92aab12865"
15
+ export const WebRPCSchemaHash = "470a0f88ea399c2a57ff8c22da54358c033ed5f0"
16
16
 
17
17
  //
18
18
  // Types
@@ -360,6 +360,14 @@ export interface SardinePaymentOption {
360
360
  processingTime: string
361
361
  }
362
362
 
363
+ export interface SwapPrice {
364
+ currencyAddress: string
365
+ currencyBalance: string
366
+ price: string
367
+ to: string
368
+ transactionValue: string
369
+ }
370
+
363
371
  export interface SwapQuote {
364
372
  currencyAddress: string
365
373
  currencyBalance: string
@@ -372,19 +380,16 @@ export interface SwapQuote {
372
380
  }
373
381
 
374
382
  export interface CurrencyGroup {
375
- id: number
376
383
  name: string
377
384
  tokens: Array<CurrencyGroupToken>
378
385
  }
379
386
 
380
387
  export interface CurrencyGroupToken {
381
- id: number
382
- currencyGroupId: number
383
388
  chainId: number
384
389
  tokenAddress: string
385
390
  }
386
391
 
387
- export interface InventoryPaymentConfig {
392
+ export interface OffchainInventory {
388
393
  id: number
389
394
  projectId: number
390
395
  chainId: number
@@ -402,9 +407,9 @@ export interface InventoryPaymentConfig {
402
407
  deletedAt?: string
403
408
  }
404
409
 
405
- export interface InventoryPayment {
410
+ export interface OffchainPayment {
406
411
  id: number
407
- inventoryPaymentConfigId: number
412
+ offchainInventoryId: number
408
413
  productRecipient: string
409
414
  paymentChainId: number
410
415
  paymentTokenAddress: string
@@ -414,9 +419,9 @@ export interface InventoryPayment {
414
419
  processedAt?: string
415
420
  }
416
421
 
417
- export interface InventoryPaymentResponse {
422
+ export interface PaymentResponse {
418
423
  paymentId: number
419
- inventoryPaymentConfigId: number
424
+ offchainInventoryId: number
420
425
  chainId: number
421
426
  externalProductId: string
422
427
  paymentTokenAddress: string
@@ -484,17 +489,16 @@ export interface API {
484
489
  removeLinkedWallet(args: RemoveLinkedWalletArgs, headers?: object, signal?: AbortSignal): Promise<RemoveLinkedWalletReturn>
485
490
  generateWaaSVerificationURL(args: GenerateWaaSVerificationURLArgs, headers?: object, signal?: AbortSignal): Promise<GenerateWaaSVerificationURLReturn>
486
491
  validateWaaSVerificationNonce(args: ValidateWaaSVerificationNonceArgs, headers?: object, signal?: AbortSignal): Promise<ValidateWaaSVerificationNonceReturn>
487
- getSwapQuotes(args: GetSwapQuotesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuotesReturn>
488
- addCurrencyGroup(args: AddCurrencyGroupArgs, headers?: object, signal?: AbortSignal): Promise<AddCurrencyGroupReturn>
489
- updateCurrencyGroup(args: UpdateCurrencyGroupArgs, headers?: object, signal?: AbortSignal): Promise<UpdateCurrencyGroupReturn>
492
+ getSwapPrices(args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPricesReturn>
493
+ getSwapQuote(args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuoteReturn>
490
494
  listCurrencyGroups(headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsReturn>
491
- deleteCurrencyGroup(args: DeleteCurrencyGroupArgs, headers?: object, signal?: AbortSignal): Promise<DeleteCurrencyGroupReturn>
492
- addInventoryPaymentConfig(args: AddInventoryPaymentConfigArgs, headers?: object, signal?: AbortSignal): Promise<AddInventoryPaymentConfigReturn>
493
- getInventoryPaymentConfig(args: GetInventoryPaymentConfigArgs, headers?: object, signal?: AbortSignal): Promise<GetInventoryPaymentConfigReturn>
494
- listInventoryPaymentConfigs(args: ListInventoryPaymentConfigsArgs, headers?: object, signal?: AbortSignal): Promise<ListInventoryPaymentConfigsReturn>
495
- updateInventoryPaymentConfig(args: UpdateInventoryPaymentConfigArgs, headers?: object, signal?: AbortSignal): Promise<UpdateInventoryPaymentConfigReturn>
496
- deleteInventoryPaymentConfig(args: DeleteInventoryPaymentConfigArgs, headers?: object, signal?: AbortSignal): Promise<DeleteInventoryPaymentConfigReturn>
497
- requestInventoryPayment(args: RequestInventoryPaymentArgs, headers?: object, signal?: AbortSignal): Promise<RequestInventoryPaymentReturn>
495
+ addOffchainInventory(args: AddOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<AddOffchainInventoryReturn>
496
+ getOffchainInventory(args: GetOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<GetOffchainInventoryReturn>
497
+ listOffchainInventories(args: ListOffchainInventoriesArgs, headers?: object, signal?: AbortSignal): Promise<ListOffchainInventoriesReturn>
498
+ updateOffchainInventory(args: UpdateOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<UpdateOffchainInventoryReturn>
499
+ deleteOffchainInventory(args: DeleteOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<DeleteOffchainInventoryReturn>
500
+ requestOffchainPayment(args: RequestOffchainPaymentArgs, headers?: object, signal?: AbortSignal): Promise<RequestOffchainPaymentReturn>
501
+ listOffchainPayments(args: ListOffchainPaymentsArgs, headers?: object, signal?: AbortSignal): Promise<ListOffchainPaymentsReturn>
498
502
  }
499
503
 
500
504
  export interface PingArgs {
@@ -927,29 +931,27 @@ export interface ValidateWaaSVerificationNonceArgs {
927
931
  export interface ValidateWaaSVerificationNonceReturn {
928
932
  walletAddress: string
929
933
  }
930
- export interface GetSwapQuotesArgs {
934
+ export interface GetSwapPricesArgs {
931
935
  userAddress: string
932
- currencyAddress: string
933
- currencyAmount: string
936
+ buyCurrencyAddress: string
937
+ buyAmount: string
934
938
  chainId: number
935
- includeApprove: boolean
936
939
  }
937
940
 
938
- export interface GetSwapQuotesReturn {
939
- swapQuotes: Array<SwapQuote>
940
- }
941
- export interface AddCurrencyGroupArgs {
942
- currencyGroup: CurrencyGroup
941
+ export interface GetSwapPricesReturn {
942
+ swapPrices: Array<SwapPrice>
943
943
  }
944
-
945
- export interface AddCurrencyGroupReturn {
946
- groupId: number
947
- }
948
- export interface UpdateCurrencyGroupArgs {
949
- currencyGroup: CurrencyGroup
944
+ export interface GetSwapQuoteArgs {
945
+ userAddress: string
946
+ buyCurrencyAddress: string
947
+ sellCurrencyAddress: string
948
+ buyAmount: string
949
+ chainId: number
950
+ includeApprove: boolean
950
951
  }
951
952
 
952
- export interface UpdateCurrencyGroupReturn {
953
+ export interface GetSwapQuoteReturn {
954
+ swapQuote: SwapQuote
953
955
  }
954
956
  export interface ListCurrencyGroupsArgs {
955
957
  }
@@ -957,56 +959,58 @@ export interface ListCurrencyGroupsArgs {
957
959
  export interface ListCurrencyGroupsReturn {
958
960
  currencyGroups: Array<CurrencyGroup>
959
961
  }
960
- export interface DeleteCurrencyGroupArgs {
961
- groupId: number
962
+ export interface AddOffchainInventoryArgs {
963
+ inventory: OffchainInventory
962
964
  }
963
965
 
964
- export interface DeleteCurrencyGroupReturn {
965
- ok: boolean
966
+ export interface AddOffchainInventoryReturn {
967
+ inventoryId: number
966
968
  }
967
- export interface AddInventoryPaymentConfigArgs {
968
- config: InventoryPaymentConfig
969
+ export interface GetOffchainInventoryArgs {
970
+ inventoryId: number
969
971
  }
970
972
 
971
- export interface AddInventoryPaymentConfigReturn {
972
- configId: number
973
+ export interface GetOffchainInventoryReturn {
974
+ inventory: OffchainInventory
973
975
  }
974
- export interface GetInventoryPaymentConfigArgs {
975
- configId: number
976
- }
977
-
978
- export interface GetInventoryPaymentConfigReturn {
979
- config: InventoryPaymentConfig
980
- }
981
- export interface ListInventoryPaymentConfigsArgs {
976
+ export interface ListOffchainInventoriesArgs {
982
977
  projectId: number
983
978
  }
984
979
 
985
- export interface ListInventoryPaymentConfigsReturn {
986
- configs: Array<InventoryPaymentConfig>
980
+ export interface ListOffchainInventoriesReturn {
981
+ inventory: Array<OffchainInventory>
987
982
  }
988
- export interface UpdateInventoryPaymentConfigArgs {
989
- config: InventoryPaymentConfig
983
+ export interface UpdateOffchainInventoryArgs {
984
+ inventory: OffchainInventory
990
985
  }
991
986
 
992
- export interface UpdateInventoryPaymentConfigReturn {
987
+ export interface UpdateOffchainInventoryReturn {
993
988
  }
994
- export interface DeleteInventoryPaymentConfigArgs {
995
- configId: number
989
+ export interface DeleteOffchainInventoryArgs {
990
+ inventoryId: number
996
991
  }
997
992
 
998
- export interface DeleteInventoryPaymentConfigReturn {
993
+ export interface DeleteOffchainInventoryReturn {
999
994
  ok: boolean
1000
995
  }
1001
- export interface RequestInventoryPaymentArgs {
1002
- configId: number
996
+ export interface RequestOffchainPaymentArgs {
997
+ inventoryId: number
1003
998
  recipient: string
1004
999
  chainId?: number
1005
1000
  tokenAddress?: string
1006
1001
  }
1007
1002
 
1008
- export interface RequestInventoryPaymentReturn {
1009
- payment: InventoryPaymentResponse
1003
+ export interface RequestOffchainPaymentReturn {
1004
+ payment: PaymentResponse
1005
+ }
1006
+ export interface ListOffchainPaymentsArgs {
1007
+ inventoryId: number
1008
+ page?: Page
1009
+ }
1010
+
1011
+ export interface ListOffchainPaymentsReturn {
1012
+ page: Page
1013
+ payments: Array<OffchainPayment>
1010
1014
  }
1011
1015
 
1012
1016
 
@@ -1808,13 +1812,13 @@ export class API implements API {
1808
1812
  })
1809
1813
  }
1810
1814
 
1811
- getSwapQuotes = (args: GetSwapQuotesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuotesReturn> => {
1815
+ getSwapPrices = (args: GetSwapPricesArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapPricesReturn> => {
1812
1816
  return this.fetch(
1813
- this.url('GetSwapQuotes'),
1817
+ this.url('GetSwapPrices'),
1814
1818
  createHTTPRequest(args, headers, signal)).then((res) => {
1815
1819
  return buildResponse(res).then(_data => {
1816
1820
  return {
1817
- swapQuotes: <Array<SwapQuote>>(_data.swapQuotes),
1821
+ swapPrices: <Array<SwapPrice>>(_data.swapPrices),
1818
1822
  }
1819
1823
  })
1820
1824
  }, (error) => {
@@ -1822,13 +1826,13 @@ export class API implements API {
1822
1826
  })
1823
1827
  }
1824
1828
 
1825
- addCurrencyGroup = (args: AddCurrencyGroupArgs, headers?: object, signal?: AbortSignal): Promise<AddCurrencyGroupReturn> => {
1829
+ getSwapQuote = (args: GetSwapQuoteArgs, headers?: object, signal?: AbortSignal): Promise<GetSwapQuoteReturn> => {
1826
1830
  return this.fetch(
1827
- this.url('AddCurrencyGroup'),
1831
+ this.url('GetSwapQuote'),
1828
1832
  createHTTPRequest(args, headers, signal)).then((res) => {
1829
1833
  return buildResponse(res).then(_data => {
1830
1834
  return {
1831
- groupId: <number>(_data.groupId),
1835
+ swapQuote: <SwapQuote>(_data.swapQuote),
1832
1836
  }
1833
1837
  })
1834
1838
  }, (error) => {
@@ -1836,18 +1840,6 @@ export class API implements API {
1836
1840
  })
1837
1841
  }
1838
1842
 
1839
- updateCurrencyGroup = (args: UpdateCurrencyGroupArgs, headers?: object, signal?: AbortSignal): Promise<UpdateCurrencyGroupReturn> => {
1840
- return this.fetch(
1841
- this.url('UpdateCurrencyGroup'),
1842
- createHTTPRequest(args, headers, signal)).then((res) => {
1843
- return buildResponse(res).then(_data => {
1844
- return {}
1845
- })
1846
- }, (error) => {
1847
- throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1848
- })
1849
- }
1850
-
1851
1843
  listCurrencyGroups = (headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsReturn> => {
1852
1844
  return this.fetch(
1853
1845
  this.url('ListCurrencyGroups'),
@@ -1863,13 +1855,13 @@ export class API implements API {
1863
1855
  })
1864
1856
  }
1865
1857
 
1866
- deleteCurrencyGroup = (args: DeleteCurrencyGroupArgs, headers?: object, signal?: AbortSignal): Promise<DeleteCurrencyGroupReturn> => {
1858
+ addOffchainInventory = (args: AddOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<AddOffchainInventoryReturn> => {
1867
1859
  return this.fetch(
1868
- this.url('DeleteCurrencyGroup'),
1860
+ this.url('AddOffchainInventory'),
1869
1861
  createHTTPRequest(args, headers, signal)).then((res) => {
1870
1862
  return buildResponse(res).then(_data => {
1871
1863
  return {
1872
- ok: <boolean>(_data.ok),
1864
+ inventoryId: <number>(_data.inventoryId),
1873
1865
  }
1874
1866
  })
1875
1867
  }, (error) => {
@@ -1877,13 +1869,13 @@ export class API implements API {
1877
1869
  })
1878
1870
  }
1879
1871
 
1880
- addInventoryPaymentConfig = (args: AddInventoryPaymentConfigArgs, headers?: object, signal?: AbortSignal): Promise<AddInventoryPaymentConfigReturn> => {
1872
+ getOffchainInventory = (args: GetOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<GetOffchainInventoryReturn> => {
1881
1873
  return this.fetch(
1882
- this.url('AddInventoryPaymentConfig'),
1874
+ this.url('GetOffchainInventory'),
1883
1875
  createHTTPRequest(args, headers, signal)).then((res) => {
1884
1876
  return buildResponse(res).then(_data => {
1885
1877
  return {
1886
- configId: <number>(_data.configId),
1878
+ inventory: <OffchainInventory>(_data.inventory),
1887
1879
  }
1888
1880
  })
1889
1881
  }, (error) => {
@@ -1891,13 +1883,13 @@ export class API implements API {
1891
1883
  })
1892
1884
  }
1893
1885
 
1894
- getInventoryPaymentConfig = (args: GetInventoryPaymentConfigArgs, headers?: object, signal?: AbortSignal): Promise<GetInventoryPaymentConfigReturn> => {
1886
+ listOffchainInventories = (args: ListOffchainInventoriesArgs, headers?: object, signal?: AbortSignal): Promise<ListOffchainInventoriesReturn> => {
1895
1887
  return this.fetch(
1896
- this.url('GetInventoryPaymentConfig'),
1888
+ this.url('ListOffchainInventories'),
1897
1889
  createHTTPRequest(args, headers, signal)).then((res) => {
1898
1890
  return buildResponse(res).then(_data => {
1899
1891
  return {
1900
- config: <InventoryPaymentConfig>(_data.config),
1892
+ inventory: <Array<OffchainInventory>>(_data.inventory),
1901
1893
  }
1902
1894
  })
1903
1895
  }, (error) => {
@@ -1905,39 +1897,39 @@ export class API implements API {
1905
1897
  })
1906
1898
  }
1907
1899
 
1908
- listInventoryPaymentConfigs = (args: ListInventoryPaymentConfigsArgs, headers?: object, signal?: AbortSignal): Promise<ListInventoryPaymentConfigsReturn> => {
1900
+ updateOffchainInventory = (args: UpdateOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<UpdateOffchainInventoryReturn> => {
1909
1901
  return this.fetch(
1910
- this.url('ListInventoryPaymentConfigs'),
1902
+ this.url('UpdateOffchainInventory'),
1911
1903
  createHTTPRequest(args, headers, signal)).then((res) => {
1912
1904
  return buildResponse(res).then(_data => {
1913
- return {
1914
- configs: <Array<InventoryPaymentConfig>>(_data.configs),
1915
- }
1905
+ return {}
1916
1906
  })
1917
1907
  }, (error) => {
1918
1908
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1919
1909
  })
1920
1910
  }
1921
1911
 
1922
- updateInventoryPaymentConfig = (args: UpdateInventoryPaymentConfigArgs, headers?: object, signal?: AbortSignal): Promise<UpdateInventoryPaymentConfigReturn> => {
1912
+ deleteOffchainInventory = (args: DeleteOffchainInventoryArgs, headers?: object, signal?: AbortSignal): Promise<DeleteOffchainInventoryReturn> => {
1923
1913
  return this.fetch(
1924
- this.url('UpdateInventoryPaymentConfig'),
1914
+ this.url('DeleteOffchainInventory'),
1925
1915
  createHTTPRequest(args, headers, signal)).then((res) => {
1926
1916
  return buildResponse(res).then(_data => {
1927
- return {}
1917
+ return {
1918
+ ok: <boolean>(_data.ok),
1919
+ }
1928
1920
  })
1929
1921
  }, (error) => {
1930
1922
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error.message || ''}` })
1931
1923
  })
1932
1924
  }
1933
1925
 
1934
- deleteInventoryPaymentConfig = (args: DeleteInventoryPaymentConfigArgs, headers?: object, signal?: AbortSignal): Promise<DeleteInventoryPaymentConfigReturn> => {
1926
+ requestOffchainPayment = (args: RequestOffchainPaymentArgs, headers?: object, signal?: AbortSignal): Promise<RequestOffchainPaymentReturn> => {
1935
1927
  return this.fetch(
1936
- this.url('DeleteInventoryPaymentConfig'),
1928
+ this.url('RequestOffchainPayment'),
1937
1929
  createHTTPRequest(args, headers, signal)).then((res) => {
1938
1930
  return buildResponse(res).then(_data => {
1939
1931
  return {
1940
- ok: <boolean>(_data.ok),
1932
+ payment: <PaymentResponse>(_data.payment),
1941
1933
  }
1942
1934
  })
1943
1935
  }, (error) => {
@@ -1945,13 +1937,14 @@ export class API implements API {
1945
1937
  })
1946
1938
  }
1947
1939
 
1948
- requestInventoryPayment = (args: RequestInventoryPaymentArgs, headers?: object, signal?: AbortSignal): Promise<RequestInventoryPaymentReturn> => {
1940
+ listOffchainPayments = (args: ListOffchainPaymentsArgs, headers?: object, signal?: AbortSignal): Promise<ListOffchainPaymentsReturn> => {
1949
1941
  return this.fetch(
1950
- this.url('RequestInventoryPayment'),
1942
+ this.url('ListOffchainPayments'),
1951
1943
  createHTTPRequest(args, headers, signal)).then((res) => {
1952
1944
  return buildResponse(res).then(_data => {
1953
1945
  return {
1954
- payment: <InventoryPaymentResponse>(_data.payment),
1946
+ page: <Page>(_data.page),
1947
+ payments: <Array<OffchainPayment>>(_data.payments),
1955
1948
  }
1956
1949
  })
1957
1950
  }, (error) => {