@0xsequence/api 0.0.0-20240923135602 → 0.0.0-20241107182529
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/0xsequence-api.cjs.d.ts +1 -1
- package/dist/0xsequence-api.cjs.dev.js +40 -55
- package/dist/0xsequence-api.cjs.prod.js +40 -55
- package/dist/0xsequence-api.esm.js +40 -55
- package/dist/declarations/src/api.gen.d.ts +129 -126
- package/package.json +1 -1
- package/src/api.gen.ts +1257 -1044
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./declarations/src/index";
|
|
1
|
+
export * from "./declarations/src/index.js";
|
|
2
2
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMHhzZXF1ZW5jZS1hcGkuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuL2RlY2xhcmF0aW9ucy9zcmMvaW5kZXguZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9
|
|
@@ -3,35 +3,30 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
function _extends() {
|
|
6
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
7
|
-
for (var
|
|
8
|
-
var
|
|
9
|
-
for (var
|
|
10
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
11
|
-
target[key] = source[key];
|
|
12
|
-
}
|
|
13
|
-
}
|
|
6
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
7
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
8
|
+
var t = arguments[e];
|
|
9
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
14
10
|
}
|
|
15
|
-
return
|
|
16
|
-
};
|
|
17
|
-
return _extends.apply(this, arguments);
|
|
11
|
+
return n;
|
|
12
|
+
}, _extends.apply(null, arguments);
|
|
18
13
|
}
|
|
19
14
|
|
|
20
15
|
/* eslint-disable */
|
|
21
|
-
// sequence-api v0.4.0
|
|
16
|
+
// sequence-api v0.4.0 470a0f88ea399c2a57ff8c22da54358c033ed5f0
|
|
22
17
|
// --
|
|
23
18
|
// Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
|
|
24
19
|
//
|
|
25
20
|
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
26
21
|
|
|
27
22
|
// WebRPC description and code-gen version
|
|
28
|
-
const WebRPCVersion =
|
|
23
|
+
const WebRPCVersion = 'v1';
|
|
29
24
|
|
|
30
25
|
// Schema version of your RIDL schema
|
|
31
|
-
const WebRPCSchemaVersion =
|
|
26
|
+
const WebRPCSchemaVersion = 'v0.4.0';
|
|
32
27
|
|
|
33
28
|
// Schema hash generated from your RIDL schema
|
|
34
|
-
const WebRPCSchemaHash =
|
|
29
|
+
const WebRPCSchemaHash = '470a0f88ea399c2a57ff8c22da54358c033ed5f0';
|
|
35
30
|
|
|
36
31
|
//
|
|
37
32
|
// Types
|
|
@@ -784,11 +779,11 @@ class API {
|
|
|
784
779
|
});
|
|
785
780
|
});
|
|
786
781
|
};
|
|
787
|
-
this.
|
|
788
|
-
return this.fetch(this.url('
|
|
782
|
+
this.getSwapPrices = (args, headers, signal) => {
|
|
783
|
+
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
789
784
|
return buildResponse(res).then(_data => {
|
|
790
785
|
return {
|
|
791
|
-
|
|
786
|
+
swapPrices: _data.swapPrices
|
|
792
787
|
};
|
|
793
788
|
});
|
|
794
789
|
}, error => {
|
|
@@ -797,11 +792,11 @@ class API {
|
|
|
797
792
|
});
|
|
798
793
|
});
|
|
799
794
|
};
|
|
800
|
-
this.
|
|
801
|
-
return this.fetch(this.url('
|
|
795
|
+
this.getSwapQuote = (args, headers, signal) => {
|
|
796
|
+
return this.fetch(this.url('GetSwapQuote'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
802
797
|
return buildResponse(res).then(_data => {
|
|
803
798
|
return {
|
|
804
|
-
|
|
799
|
+
swapQuote: _data.swapQuote
|
|
805
800
|
};
|
|
806
801
|
});
|
|
807
802
|
}, error => {
|
|
@@ -810,17 +805,6 @@ class API {
|
|
|
810
805
|
});
|
|
811
806
|
});
|
|
812
807
|
};
|
|
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
808
|
this.listCurrencyGroups = (headers, signal) => {
|
|
825
809
|
return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
826
810
|
return buildResponse(res).then(_data => {
|
|
@@ -834,11 +818,11 @@ class API {
|
|
|
834
818
|
});
|
|
835
819
|
});
|
|
836
820
|
};
|
|
837
|
-
this.
|
|
838
|
-
return this.fetch(this.url('
|
|
821
|
+
this.addOffchainInventory = (args, headers, signal) => {
|
|
822
|
+
return this.fetch(this.url('AddOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
839
823
|
return buildResponse(res).then(_data => {
|
|
840
824
|
return {
|
|
841
|
-
|
|
825
|
+
inventoryId: _data.inventoryId
|
|
842
826
|
};
|
|
843
827
|
});
|
|
844
828
|
}, error => {
|
|
@@ -847,11 +831,11 @@ class API {
|
|
|
847
831
|
});
|
|
848
832
|
});
|
|
849
833
|
};
|
|
850
|
-
this.
|
|
851
|
-
return this.fetch(this.url('
|
|
834
|
+
this.getOffchainInventory = (args, headers, signal) => {
|
|
835
|
+
return this.fetch(this.url('GetOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
852
836
|
return buildResponse(res).then(_data => {
|
|
853
837
|
return {
|
|
854
|
-
|
|
838
|
+
inventory: _data.inventory
|
|
855
839
|
};
|
|
856
840
|
});
|
|
857
841
|
}, error => {
|
|
@@ -860,11 +844,11 @@ class API {
|
|
|
860
844
|
});
|
|
861
845
|
});
|
|
862
846
|
};
|
|
863
|
-
this.
|
|
864
|
-
return this.fetch(this.url('
|
|
847
|
+
this.listOffchainInventories = (args, headers, signal) => {
|
|
848
|
+
return this.fetch(this.url('ListOffchainInventories'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
865
849
|
return buildResponse(res).then(_data => {
|
|
866
850
|
return {
|
|
867
|
-
|
|
851
|
+
inventory: _data.inventory
|
|
868
852
|
};
|
|
869
853
|
});
|
|
870
854
|
}, error => {
|
|
@@ -873,12 +857,10 @@ class API {
|
|
|
873
857
|
});
|
|
874
858
|
});
|
|
875
859
|
};
|
|
876
|
-
this.
|
|
877
|
-
return this.fetch(this.url('
|
|
860
|
+
this.updateOffchainInventory = (args, headers, signal) => {
|
|
861
|
+
return this.fetch(this.url('UpdateOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
878
862
|
return buildResponse(res).then(_data => {
|
|
879
|
-
return {
|
|
880
|
-
configs: _data.configs
|
|
881
|
-
};
|
|
863
|
+
return {};
|
|
882
864
|
});
|
|
883
865
|
}, error => {
|
|
884
866
|
throw WebrpcRequestFailedError.new({
|
|
@@ -886,10 +868,12 @@ class API {
|
|
|
886
868
|
});
|
|
887
869
|
});
|
|
888
870
|
};
|
|
889
|
-
this.
|
|
890
|
-
return this.fetch(this.url('
|
|
871
|
+
this.deleteOffchainInventory = (args, headers, signal) => {
|
|
872
|
+
return this.fetch(this.url('DeleteOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
891
873
|
return buildResponse(res).then(_data => {
|
|
892
|
-
return {
|
|
874
|
+
return {
|
|
875
|
+
ok: _data.ok
|
|
876
|
+
};
|
|
893
877
|
});
|
|
894
878
|
}, error => {
|
|
895
879
|
throw WebrpcRequestFailedError.new({
|
|
@@ -897,11 +881,11 @@ class API {
|
|
|
897
881
|
});
|
|
898
882
|
});
|
|
899
883
|
};
|
|
900
|
-
this.
|
|
901
|
-
return this.fetch(this.url('
|
|
884
|
+
this.requestOffchainPayment = (args, headers, signal) => {
|
|
885
|
+
return this.fetch(this.url('RequestOffchainPayment'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
902
886
|
return buildResponse(res).then(_data => {
|
|
903
887
|
return {
|
|
904
|
-
|
|
888
|
+
payment: _data.payment
|
|
905
889
|
};
|
|
906
890
|
});
|
|
907
891
|
}, error => {
|
|
@@ -910,11 +894,12 @@ class API {
|
|
|
910
894
|
});
|
|
911
895
|
});
|
|
912
896
|
};
|
|
913
|
-
this.
|
|
914
|
-
return this.fetch(this.url('
|
|
897
|
+
this.listOffchainPayments = (args, headers, signal) => {
|
|
898
|
+
return this.fetch(this.url('ListOffchainPayments'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
915
899
|
return buildResponse(res).then(_data => {
|
|
916
900
|
return {
|
|
917
|
-
|
|
901
|
+
page: _data.page,
|
|
902
|
+
payments: _data.payments
|
|
918
903
|
};
|
|
919
904
|
});
|
|
920
905
|
}, error => {
|
|
@@ -3,35 +3,30 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
function _extends() {
|
|
6
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
7
|
-
for (var
|
|
8
|
-
var
|
|
9
|
-
for (var
|
|
10
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
11
|
-
target[key] = source[key];
|
|
12
|
-
}
|
|
13
|
-
}
|
|
6
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
7
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
8
|
+
var t = arguments[e];
|
|
9
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
14
10
|
}
|
|
15
|
-
return
|
|
16
|
-
};
|
|
17
|
-
return _extends.apply(this, arguments);
|
|
11
|
+
return n;
|
|
12
|
+
}, _extends.apply(null, arguments);
|
|
18
13
|
}
|
|
19
14
|
|
|
20
15
|
/* eslint-disable */
|
|
21
|
-
// sequence-api v0.4.0
|
|
16
|
+
// sequence-api v0.4.0 470a0f88ea399c2a57ff8c22da54358c033ed5f0
|
|
22
17
|
// --
|
|
23
18
|
// Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
|
|
24
19
|
//
|
|
25
20
|
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
26
21
|
|
|
27
22
|
// WebRPC description and code-gen version
|
|
28
|
-
const WebRPCVersion =
|
|
23
|
+
const WebRPCVersion = 'v1';
|
|
29
24
|
|
|
30
25
|
// Schema version of your RIDL schema
|
|
31
|
-
const WebRPCSchemaVersion =
|
|
26
|
+
const WebRPCSchemaVersion = 'v0.4.0';
|
|
32
27
|
|
|
33
28
|
// Schema hash generated from your RIDL schema
|
|
34
|
-
const WebRPCSchemaHash =
|
|
29
|
+
const WebRPCSchemaHash = '470a0f88ea399c2a57ff8c22da54358c033ed5f0';
|
|
35
30
|
|
|
36
31
|
//
|
|
37
32
|
// Types
|
|
@@ -784,11 +779,11 @@ class API {
|
|
|
784
779
|
});
|
|
785
780
|
});
|
|
786
781
|
};
|
|
787
|
-
this.
|
|
788
|
-
return this.fetch(this.url('
|
|
782
|
+
this.getSwapPrices = (args, headers, signal) => {
|
|
783
|
+
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
789
784
|
return buildResponse(res).then(_data => {
|
|
790
785
|
return {
|
|
791
|
-
|
|
786
|
+
swapPrices: _data.swapPrices
|
|
792
787
|
};
|
|
793
788
|
});
|
|
794
789
|
}, error => {
|
|
@@ -797,11 +792,11 @@ class API {
|
|
|
797
792
|
});
|
|
798
793
|
});
|
|
799
794
|
};
|
|
800
|
-
this.
|
|
801
|
-
return this.fetch(this.url('
|
|
795
|
+
this.getSwapQuote = (args, headers, signal) => {
|
|
796
|
+
return this.fetch(this.url('GetSwapQuote'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
802
797
|
return buildResponse(res).then(_data => {
|
|
803
798
|
return {
|
|
804
|
-
|
|
799
|
+
swapQuote: _data.swapQuote
|
|
805
800
|
};
|
|
806
801
|
});
|
|
807
802
|
}, error => {
|
|
@@ -810,17 +805,6 @@ class API {
|
|
|
810
805
|
});
|
|
811
806
|
});
|
|
812
807
|
};
|
|
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
808
|
this.listCurrencyGroups = (headers, signal) => {
|
|
825
809
|
return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
826
810
|
return buildResponse(res).then(_data => {
|
|
@@ -834,11 +818,11 @@ class API {
|
|
|
834
818
|
});
|
|
835
819
|
});
|
|
836
820
|
};
|
|
837
|
-
this.
|
|
838
|
-
return this.fetch(this.url('
|
|
821
|
+
this.addOffchainInventory = (args, headers, signal) => {
|
|
822
|
+
return this.fetch(this.url('AddOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
839
823
|
return buildResponse(res).then(_data => {
|
|
840
824
|
return {
|
|
841
|
-
|
|
825
|
+
inventoryId: _data.inventoryId
|
|
842
826
|
};
|
|
843
827
|
});
|
|
844
828
|
}, error => {
|
|
@@ -847,11 +831,11 @@ class API {
|
|
|
847
831
|
});
|
|
848
832
|
});
|
|
849
833
|
};
|
|
850
|
-
this.
|
|
851
|
-
return this.fetch(this.url('
|
|
834
|
+
this.getOffchainInventory = (args, headers, signal) => {
|
|
835
|
+
return this.fetch(this.url('GetOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
852
836
|
return buildResponse(res).then(_data => {
|
|
853
837
|
return {
|
|
854
|
-
|
|
838
|
+
inventory: _data.inventory
|
|
855
839
|
};
|
|
856
840
|
});
|
|
857
841
|
}, error => {
|
|
@@ -860,11 +844,11 @@ class API {
|
|
|
860
844
|
});
|
|
861
845
|
});
|
|
862
846
|
};
|
|
863
|
-
this.
|
|
864
|
-
return this.fetch(this.url('
|
|
847
|
+
this.listOffchainInventories = (args, headers, signal) => {
|
|
848
|
+
return this.fetch(this.url('ListOffchainInventories'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
865
849
|
return buildResponse(res).then(_data => {
|
|
866
850
|
return {
|
|
867
|
-
|
|
851
|
+
inventory: _data.inventory
|
|
868
852
|
};
|
|
869
853
|
});
|
|
870
854
|
}, error => {
|
|
@@ -873,12 +857,10 @@ class API {
|
|
|
873
857
|
});
|
|
874
858
|
});
|
|
875
859
|
};
|
|
876
|
-
this.
|
|
877
|
-
return this.fetch(this.url('
|
|
860
|
+
this.updateOffchainInventory = (args, headers, signal) => {
|
|
861
|
+
return this.fetch(this.url('UpdateOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
878
862
|
return buildResponse(res).then(_data => {
|
|
879
|
-
return {
|
|
880
|
-
configs: _data.configs
|
|
881
|
-
};
|
|
863
|
+
return {};
|
|
882
864
|
});
|
|
883
865
|
}, error => {
|
|
884
866
|
throw WebrpcRequestFailedError.new({
|
|
@@ -886,10 +868,12 @@ class API {
|
|
|
886
868
|
});
|
|
887
869
|
});
|
|
888
870
|
};
|
|
889
|
-
this.
|
|
890
|
-
return this.fetch(this.url('
|
|
871
|
+
this.deleteOffchainInventory = (args, headers, signal) => {
|
|
872
|
+
return this.fetch(this.url('DeleteOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
891
873
|
return buildResponse(res).then(_data => {
|
|
892
|
-
return {
|
|
874
|
+
return {
|
|
875
|
+
ok: _data.ok
|
|
876
|
+
};
|
|
893
877
|
});
|
|
894
878
|
}, error => {
|
|
895
879
|
throw WebrpcRequestFailedError.new({
|
|
@@ -897,11 +881,11 @@ class API {
|
|
|
897
881
|
});
|
|
898
882
|
});
|
|
899
883
|
};
|
|
900
|
-
this.
|
|
901
|
-
return this.fetch(this.url('
|
|
884
|
+
this.requestOffchainPayment = (args, headers, signal) => {
|
|
885
|
+
return this.fetch(this.url('RequestOffchainPayment'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
902
886
|
return buildResponse(res).then(_data => {
|
|
903
887
|
return {
|
|
904
|
-
|
|
888
|
+
payment: _data.payment
|
|
905
889
|
};
|
|
906
890
|
});
|
|
907
891
|
}, error => {
|
|
@@ -910,11 +894,12 @@ class API {
|
|
|
910
894
|
});
|
|
911
895
|
});
|
|
912
896
|
};
|
|
913
|
-
this.
|
|
914
|
-
return this.fetch(this.url('
|
|
897
|
+
this.listOffchainPayments = (args, headers, signal) => {
|
|
898
|
+
return this.fetch(this.url('ListOffchainPayments'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
915
899
|
return buildResponse(res).then(_data => {
|
|
916
900
|
return {
|
|
917
|
-
|
|
901
|
+
page: _data.page,
|
|
902
|
+
payments: _data.payments
|
|
918
903
|
};
|
|
919
904
|
});
|
|
920
905
|
}, error => {
|
|
@@ -1,33 +1,28 @@
|
|
|
1
1
|
function _extends() {
|
|
2
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
3
|
-
for (var
|
|
4
|
-
var
|
|
5
|
-
for (var
|
|
6
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7
|
-
target[key] = source[key];
|
|
8
|
-
}
|
|
9
|
-
}
|
|
2
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
3
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
4
|
+
var t = arguments[e];
|
|
5
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
10
6
|
}
|
|
11
|
-
return
|
|
12
|
-
};
|
|
13
|
-
return _extends.apply(this, arguments);
|
|
7
|
+
return n;
|
|
8
|
+
}, _extends.apply(null, arguments);
|
|
14
9
|
}
|
|
15
10
|
|
|
16
11
|
/* eslint-disable */
|
|
17
|
-
// sequence-api v0.4.0
|
|
12
|
+
// sequence-api v0.4.0 470a0f88ea399c2a57ff8c22da54358c033ed5f0
|
|
18
13
|
// --
|
|
19
14
|
// Code generated by webrpc-gen@v0.18.7 with typescript generator. DO NOT EDIT.
|
|
20
15
|
//
|
|
21
16
|
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
22
17
|
|
|
23
18
|
// WebRPC description and code-gen version
|
|
24
|
-
const WebRPCVersion =
|
|
19
|
+
const WebRPCVersion = 'v1';
|
|
25
20
|
|
|
26
21
|
// Schema version of your RIDL schema
|
|
27
|
-
const WebRPCSchemaVersion =
|
|
22
|
+
const WebRPCSchemaVersion = 'v0.4.0';
|
|
28
23
|
|
|
29
24
|
// Schema hash generated from your RIDL schema
|
|
30
|
-
const WebRPCSchemaHash =
|
|
25
|
+
const WebRPCSchemaHash = '470a0f88ea399c2a57ff8c22da54358c033ed5f0';
|
|
31
26
|
|
|
32
27
|
//
|
|
33
28
|
// Types
|
|
@@ -780,11 +775,11 @@ class API {
|
|
|
780
775
|
});
|
|
781
776
|
});
|
|
782
777
|
};
|
|
783
|
-
this.
|
|
784
|
-
return this.fetch(this.url('
|
|
778
|
+
this.getSwapPrices = (args, headers, signal) => {
|
|
779
|
+
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
785
780
|
return buildResponse(res).then(_data => {
|
|
786
781
|
return {
|
|
787
|
-
|
|
782
|
+
swapPrices: _data.swapPrices
|
|
788
783
|
};
|
|
789
784
|
});
|
|
790
785
|
}, error => {
|
|
@@ -793,11 +788,11 @@ class API {
|
|
|
793
788
|
});
|
|
794
789
|
});
|
|
795
790
|
};
|
|
796
|
-
this.
|
|
797
|
-
return this.fetch(this.url('
|
|
791
|
+
this.getSwapQuote = (args, headers, signal) => {
|
|
792
|
+
return this.fetch(this.url('GetSwapQuote'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
798
793
|
return buildResponse(res).then(_data => {
|
|
799
794
|
return {
|
|
800
|
-
|
|
795
|
+
swapQuote: _data.swapQuote
|
|
801
796
|
};
|
|
802
797
|
});
|
|
803
798
|
}, error => {
|
|
@@ -806,17 +801,6 @@ class API {
|
|
|
806
801
|
});
|
|
807
802
|
});
|
|
808
803
|
};
|
|
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
804
|
this.listCurrencyGroups = (headers, signal) => {
|
|
821
805
|
return this.fetch(this.url('ListCurrencyGroups'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
822
806
|
return buildResponse(res).then(_data => {
|
|
@@ -830,11 +814,11 @@ class API {
|
|
|
830
814
|
});
|
|
831
815
|
});
|
|
832
816
|
};
|
|
833
|
-
this.
|
|
834
|
-
return this.fetch(this.url('
|
|
817
|
+
this.addOffchainInventory = (args, headers, signal) => {
|
|
818
|
+
return this.fetch(this.url('AddOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
835
819
|
return buildResponse(res).then(_data => {
|
|
836
820
|
return {
|
|
837
|
-
|
|
821
|
+
inventoryId: _data.inventoryId
|
|
838
822
|
};
|
|
839
823
|
});
|
|
840
824
|
}, error => {
|
|
@@ -843,11 +827,11 @@ class API {
|
|
|
843
827
|
});
|
|
844
828
|
});
|
|
845
829
|
};
|
|
846
|
-
this.
|
|
847
|
-
return this.fetch(this.url('
|
|
830
|
+
this.getOffchainInventory = (args, headers, signal) => {
|
|
831
|
+
return this.fetch(this.url('GetOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
848
832
|
return buildResponse(res).then(_data => {
|
|
849
833
|
return {
|
|
850
|
-
|
|
834
|
+
inventory: _data.inventory
|
|
851
835
|
};
|
|
852
836
|
});
|
|
853
837
|
}, error => {
|
|
@@ -856,11 +840,11 @@ class API {
|
|
|
856
840
|
});
|
|
857
841
|
});
|
|
858
842
|
};
|
|
859
|
-
this.
|
|
860
|
-
return this.fetch(this.url('
|
|
843
|
+
this.listOffchainInventories = (args, headers, signal) => {
|
|
844
|
+
return this.fetch(this.url('ListOffchainInventories'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
861
845
|
return buildResponse(res).then(_data => {
|
|
862
846
|
return {
|
|
863
|
-
|
|
847
|
+
inventory: _data.inventory
|
|
864
848
|
};
|
|
865
849
|
});
|
|
866
850
|
}, error => {
|
|
@@ -869,12 +853,10 @@ class API {
|
|
|
869
853
|
});
|
|
870
854
|
});
|
|
871
855
|
};
|
|
872
|
-
this.
|
|
873
|
-
return this.fetch(this.url('
|
|
856
|
+
this.updateOffchainInventory = (args, headers, signal) => {
|
|
857
|
+
return this.fetch(this.url('UpdateOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
874
858
|
return buildResponse(res).then(_data => {
|
|
875
|
-
return {
|
|
876
|
-
configs: _data.configs
|
|
877
|
-
};
|
|
859
|
+
return {};
|
|
878
860
|
});
|
|
879
861
|
}, error => {
|
|
880
862
|
throw WebrpcRequestFailedError.new({
|
|
@@ -882,10 +864,12 @@ class API {
|
|
|
882
864
|
});
|
|
883
865
|
});
|
|
884
866
|
};
|
|
885
|
-
this.
|
|
886
|
-
return this.fetch(this.url('
|
|
867
|
+
this.deleteOffchainInventory = (args, headers, signal) => {
|
|
868
|
+
return this.fetch(this.url('DeleteOffchainInventory'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
887
869
|
return buildResponse(res).then(_data => {
|
|
888
|
-
return {
|
|
870
|
+
return {
|
|
871
|
+
ok: _data.ok
|
|
872
|
+
};
|
|
889
873
|
});
|
|
890
874
|
}, error => {
|
|
891
875
|
throw WebrpcRequestFailedError.new({
|
|
@@ -893,11 +877,11 @@ class API {
|
|
|
893
877
|
});
|
|
894
878
|
});
|
|
895
879
|
};
|
|
896
|
-
this.
|
|
897
|
-
return this.fetch(this.url('
|
|
880
|
+
this.requestOffchainPayment = (args, headers, signal) => {
|
|
881
|
+
return this.fetch(this.url('RequestOffchainPayment'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
898
882
|
return buildResponse(res).then(_data => {
|
|
899
883
|
return {
|
|
900
|
-
|
|
884
|
+
payment: _data.payment
|
|
901
885
|
};
|
|
902
886
|
});
|
|
903
887
|
}, error => {
|
|
@@ -906,11 +890,12 @@ class API {
|
|
|
906
890
|
});
|
|
907
891
|
});
|
|
908
892
|
};
|
|
909
|
-
this.
|
|
910
|
-
return this.fetch(this.url('
|
|
893
|
+
this.listOffchainPayments = (args, headers, signal) => {
|
|
894
|
+
return this.fetch(this.url('ListOffchainPayments'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
911
895
|
return buildResponse(res).then(_data => {
|
|
912
896
|
return {
|
|
913
|
-
|
|
897
|
+
page: _data.page,
|
|
898
|
+
payments: _data.payments
|
|
914
899
|
};
|
|
915
900
|
});
|
|
916
901
|
}, error => {
|