@0xsequence/api 2.3.9 → 2.3.11
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.dev.js +91 -90
- package/dist/0xsequence-api.cjs.prod.js +91 -90
- package/dist/0xsequence-api.esm.js +88 -91
- package/dist/declarations/src/api.gen.d.ts +216 -116
- package/package.json +1 -1
- package/src/api.gen.ts +1478 -1664
|
@@ -13,56 +13,56 @@ function _extends() {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/* eslint-disable */
|
|
16
|
-
// sequence-api v0.4.0
|
|
16
|
+
// sequence-api v0.4.0 ab3b6841bf983fa51a24df4cee18536199f115c3
|
|
17
17
|
// --
|
|
18
|
-
// Code generated by webrpc-gen@v0.
|
|
18
|
+
// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
|
|
19
19
|
//
|
|
20
20
|
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
21
21
|
|
|
22
|
-
const WebrpcHeader =
|
|
23
|
-
const WebrpcHeaderValue =
|
|
22
|
+
const WebrpcHeader = "Webrpc";
|
|
23
|
+
const WebrpcHeaderValue = "webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-api@v0.4.0";
|
|
24
24
|
|
|
25
25
|
// WebRPC description and code-gen version
|
|
26
|
-
const WebRPCVersion =
|
|
26
|
+
const WebRPCVersion = "v1";
|
|
27
27
|
|
|
28
28
|
// Schema version of your RIDL schema
|
|
29
|
-
const WebRPCSchemaVersion =
|
|
29
|
+
const WebRPCSchemaVersion = "v0.4.0";
|
|
30
30
|
|
|
31
31
|
// Schema hash generated from your RIDL schema
|
|
32
|
-
const WebRPCSchemaHash =
|
|
32
|
+
const WebRPCSchemaHash = "ab3b6841bf983fa51a24df4cee18536199f115c3";
|
|
33
33
|
function VersionFromHeader(headers) {
|
|
34
34
|
const headerValue = headers.get(WebrpcHeader);
|
|
35
35
|
if (!headerValue) {
|
|
36
36
|
return {
|
|
37
|
-
webrpcGenVersion:
|
|
38
|
-
codeGenName:
|
|
39
|
-
codeGenVersion:
|
|
40
|
-
schemaName:
|
|
41
|
-
schemaVersion:
|
|
37
|
+
webrpcGenVersion: "",
|
|
38
|
+
codeGenName: "",
|
|
39
|
+
codeGenVersion: "",
|
|
40
|
+
schemaName: "",
|
|
41
|
+
schemaVersion: ""
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
return parseWebrpcGenVersions(headerValue);
|
|
45
45
|
}
|
|
46
46
|
function parseWebrpcGenVersions(header) {
|
|
47
|
-
const versions = header.split(
|
|
47
|
+
const versions = header.split(";");
|
|
48
48
|
if (versions.length < 3) {
|
|
49
49
|
return {
|
|
50
|
-
webrpcGenVersion:
|
|
51
|
-
codeGenName:
|
|
52
|
-
codeGenVersion:
|
|
53
|
-
schemaName:
|
|
54
|
-
schemaVersion:
|
|
50
|
+
webrpcGenVersion: "",
|
|
51
|
+
codeGenName: "",
|
|
52
|
+
codeGenVersion: "",
|
|
53
|
+
schemaName: "",
|
|
54
|
+
schemaVersion: ""
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
const [_, webrpcGenVersion] = versions[0].split(
|
|
58
|
-
const [codeGenName, codeGenVersion] = versions[1].split(
|
|
59
|
-
const [schemaName, schemaVersion] = versions[2].split(
|
|
57
|
+
const [_, webrpcGenVersion] = versions[0].split("@");
|
|
58
|
+
const [codeGenName, codeGenVersion] = versions[1].split("@");
|
|
59
|
+
const [schemaName, schemaVersion] = versions[2].split("@");
|
|
60
60
|
return {
|
|
61
|
-
webrpcGenVersion: webrpcGenVersion != null ? webrpcGenVersion :
|
|
62
|
-
codeGenName: codeGenName != null ? codeGenName :
|
|
63
|
-
codeGenVersion: codeGenVersion != null ? codeGenVersion :
|
|
64
|
-
schemaName: schemaName != null ? schemaName :
|
|
65
|
-
schemaVersion: schemaVersion != null ? schemaVersion :
|
|
61
|
+
webrpcGenVersion: webrpcGenVersion != null ? webrpcGenVersion : "",
|
|
62
|
+
codeGenName: codeGenName != null ? codeGenName : "",
|
|
63
|
+
codeGenVersion: codeGenVersion != null ? codeGenVersion : "",
|
|
64
|
+
schemaName: schemaName != null ? schemaName : "",
|
|
65
|
+
schemaVersion: schemaVersion != null ? schemaVersion : ""
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -101,6 +101,29 @@ let TransakBuySell = /*#__PURE__*/function (TransakBuySell) {
|
|
|
101
101
|
TransakBuySell["SELL"] = "SELL";
|
|
102
102
|
return TransakBuySell;
|
|
103
103
|
}({});
|
|
104
|
+
let CheckoutOptionCrypto = /*#__PURE__*/function (CheckoutOptionCrypto) {
|
|
105
|
+
CheckoutOptionCrypto["none"] = "none";
|
|
106
|
+
CheckoutOptionCrypto["partially"] = "partially";
|
|
107
|
+
CheckoutOptionCrypto["all"] = "all";
|
|
108
|
+
return CheckoutOptionCrypto;
|
|
109
|
+
}({});
|
|
110
|
+
let CheckoutOptionNFTCheckoutProvider = /*#__PURE__*/function (CheckoutOptionNFTCheckoutProvider) {
|
|
111
|
+
CheckoutOptionNFTCheckoutProvider["unknown"] = "unknown";
|
|
112
|
+
CheckoutOptionNFTCheckoutProvider["sardine"] = "sardine";
|
|
113
|
+
CheckoutOptionNFTCheckoutProvider["transak"] = "transak";
|
|
114
|
+
return CheckoutOptionNFTCheckoutProvider;
|
|
115
|
+
}({});
|
|
116
|
+
let CheckoutOptionOnRampProvider = /*#__PURE__*/function (CheckoutOptionOnRampProvider) {
|
|
117
|
+
CheckoutOptionOnRampProvider["unknown"] = "unknown";
|
|
118
|
+
CheckoutOptionOnRampProvider["sardine"] = "sardine";
|
|
119
|
+
CheckoutOptionOnRampProvider["transak"] = "transak";
|
|
120
|
+
return CheckoutOptionOnRampProvider;
|
|
121
|
+
}({});
|
|
122
|
+
let CheckoutOptionSwapProvider = /*#__PURE__*/function (CheckoutOptionSwapProvider) {
|
|
123
|
+
CheckoutOptionSwapProvider["unknown"] = "unknown";
|
|
124
|
+
CheckoutOptionSwapProvider["lifi"] = "lifi";
|
|
125
|
+
return CheckoutOptionSwapProvider;
|
|
126
|
+
}({});
|
|
104
127
|
//
|
|
105
128
|
// Client
|
|
106
129
|
//
|
|
@@ -941,63 +964,11 @@ class API {
|
|
|
941
964
|
});
|
|
942
965
|
});
|
|
943
966
|
};
|
|
944
|
-
this.
|
|
945
|
-
return this.fetch(this.url('
|
|
946
|
-
return buildResponse(res).then(_data => {
|
|
947
|
-
return {
|
|
948
|
-
swapPermit2Price: _data.swapPermit2Price
|
|
949
|
-
};
|
|
950
|
-
});
|
|
951
|
-
}, error => {
|
|
952
|
-
throw WebrpcRequestFailedError.new({
|
|
953
|
-
cause: `fetch(): ${error.message || ''}`
|
|
954
|
-
});
|
|
955
|
-
});
|
|
956
|
-
};
|
|
957
|
-
this.getSwapPermit2Prices = (args, headers, signal) => {
|
|
958
|
-
return this.fetch(this.url('GetSwapPermit2Prices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
959
|
-
return buildResponse(res).then(_data => {
|
|
960
|
-
return {
|
|
961
|
-
swapPermit2Prices: _data.swapPermit2Prices
|
|
962
|
-
};
|
|
963
|
-
});
|
|
964
|
-
}, error => {
|
|
965
|
-
throw WebrpcRequestFailedError.new({
|
|
966
|
-
cause: `fetch(): ${error.message || ''}`
|
|
967
|
-
});
|
|
968
|
-
});
|
|
969
|
-
};
|
|
970
|
-
this.getSwapPermit2Quote = (args, headers, signal) => {
|
|
971
|
-
return this.fetch(this.url('GetSwapPermit2Quote'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
972
|
-
return buildResponse(res).then(_data => {
|
|
973
|
-
return {
|
|
974
|
-
swapPermit2Quote: _data.swapPermit2Quote
|
|
975
|
-
};
|
|
976
|
-
});
|
|
977
|
-
}, error => {
|
|
978
|
-
throw WebrpcRequestFailedError.new({
|
|
979
|
-
cause: `fetch(): ${error.message || ''}`
|
|
980
|
-
});
|
|
981
|
-
});
|
|
982
|
-
};
|
|
983
|
-
this.getSwapPrice = (args, headers, signal) => {
|
|
984
|
-
return this.fetch(this.url('GetSwapPrice'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
967
|
+
this.getLifiChains = (headers, signal) => {
|
|
968
|
+
return this.fetch(this.url('GetLifiChains'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
985
969
|
return buildResponse(res).then(_data => {
|
|
986
970
|
return {
|
|
987
|
-
|
|
988
|
-
};
|
|
989
|
-
});
|
|
990
|
-
}, error => {
|
|
991
|
-
throw WebrpcRequestFailedError.new({
|
|
992
|
-
cause: `fetch(): ${error.message || ''}`
|
|
993
|
-
});
|
|
994
|
-
});
|
|
995
|
-
};
|
|
996
|
-
this.getSwapPrices = (args, headers, signal) => {
|
|
997
|
-
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
998
|
-
return buildResponse(res).then(_data => {
|
|
999
|
-
return {
|
|
1000
|
-
swapPrices: _data.swapPrices
|
|
971
|
+
chains: _data.chains
|
|
1001
972
|
};
|
|
1002
973
|
});
|
|
1003
974
|
}, error => {
|
|
@@ -1006,11 +977,11 @@ class API {
|
|
|
1006
977
|
});
|
|
1007
978
|
});
|
|
1008
979
|
};
|
|
1009
|
-
this.
|
|
1010
|
-
return this.fetch(this.url('
|
|
980
|
+
this.getLifiTokens = (args, headers, signal) => {
|
|
981
|
+
return this.fetch(this.url('GetLifiTokens'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1011
982
|
return buildResponse(res).then(_data => {
|
|
1012
983
|
return {
|
|
1013
|
-
|
|
984
|
+
tokens: _data.tokens
|
|
1014
985
|
};
|
|
1015
986
|
});
|
|
1016
987
|
}, error => {
|
|
@@ -1019,11 +990,11 @@ class API {
|
|
|
1019
990
|
});
|
|
1020
991
|
});
|
|
1021
992
|
};
|
|
1022
|
-
this.
|
|
1023
|
-
return this.fetch(this.url('
|
|
993
|
+
this.getLifiSwapRoutes = (args, headers, signal) => {
|
|
994
|
+
return this.fetch(this.url('GetLifiSwapRoutes'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1024
995
|
return buildResponse(res).then(_data => {
|
|
1025
996
|
return {
|
|
1026
|
-
|
|
997
|
+
routes: _data.routes
|
|
1027
998
|
};
|
|
1028
999
|
});
|
|
1029
1000
|
}, error => {
|
|
@@ -1032,11 +1003,11 @@ class API {
|
|
|
1032
1003
|
});
|
|
1033
1004
|
});
|
|
1034
1005
|
};
|
|
1035
|
-
this.
|
|
1036
|
-
return this.fetch(this.url('
|
|
1006
|
+
this.getLifiSwapQuote = (args, headers, signal) => {
|
|
1007
|
+
return this.fetch(this.url('GetLifiSwapQuote'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1037
1008
|
return buildResponse(res).then(_data => {
|
|
1038
1009
|
return {
|
|
1039
|
-
|
|
1010
|
+
quote: _data.quote
|
|
1040
1011
|
};
|
|
1041
1012
|
});
|
|
1042
1013
|
}, error => {
|
|
@@ -1200,6 +1171,32 @@ class API {
|
|
|
1200
1171
|
});
|
|
1201
1172
|
});
|
|
1202
1173
|
};
|
|
1174
|
+
this.checkoutOptionsSecondary = (args, headers, signal) => {
|
|
1175
|
+
return this.fetch(this.url('CheckoutOptionsSecondary'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1176
|
+
return buildResponse(res).then(_data => {
|
|
1177
|
+
return {
|
|
1178
|
+
options: _data.options
|
|
1179
|
+
};
|
|
1180
|
+
});
|
|
1181
|
+
}, error => {
|
|
1182
|
+
throw WebrpcRequestFailedError.new({
|
|
1183
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1184
|
+
});
|
|
1185
|
+
});
|
|
1186
|
+
};
|
|
1187
|
+
this.checkoutOptionsGetTransakContractID = (args, headers, signal) => {
|
|
1188
|
+
return this.fetch(this.url('CheckoutOptionsGetTransakContractID'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1189
|
+
return buildResponse(res).then(_data => {
|
|
1190
|
+
return {
|
|
1191
|
+
contractId: _data.contractId
|
|
1192
|
+
};
|
|
1193
|
+
});
|
|
1194
|
+
}, error => {
|
|
1195
|
+
throw WebrpcRequestFailedError.new({
|
|
1196
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1197
|
+
});
|
|
1198
|
+
});
|
|
1199
|
+
};
|
|
1203
1200
|
this.hostname = hostname.replace(/\/*$/, '');
|
|
1204
1201
|
this.fetch = (input, init) => fetch(input, init);
|
|
1205
1202
|
}
|
|
@@ -1638,6 +1635,10 @@ exports.AbortedError = AbortedError;
|
|
|
1638
1635
|
exports.AccessKeyMismatchError = AccessKeyMismatchError;
|
|
1639
1636
|
exports.AccessKeyNotFoundError = AccessKeyNotFoundError;
|
|
1640
1637
|
exports.AtLeastOneKeyError = AtLeastOneKeyError;
|
|
1638
|
+
exports.CheckoutOptionCrypto = CheckoutOptionCrypto;
|
|
1639
|
+
exports.CheckoutOptionNFTCheckoutProvider = CheckoutOptionNFTCheckoutProvider;
|
|
1640
|
+
exports.CheckoutOptionOnRampProvider = CheckoutOptionOnRampProvider;
|
|
1641
|
+
exports.CheckoutOptionSwapProvider = CheckoutOptionSwapProvider;
|
|
1641
1642
|
exports.GeoblockedError = GeoblockedError;
|
|
1642
1643
|
exports.InvalidArgumentError = InvalidArgumentError;
|
|
1643
1644
|
exports.InvalidOriginError = InvalidOriginError;
|
|
@@ -13,56 +13,56 @@ function _extends() {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/* eslint-disable */
|
|
16
|
-
// sequence-api v0.4.0
|
|
16
|
+
// sequence-api v0.4.0 ab3b6841bf983fa51a24df4cee18536199f115c3
|
|
17
17
|
// --
|
|
18
|
-
// Code generated by webrpc-gen@v0.
|
|
18
|
+
// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
|
|
19
19
|
//
|
|
20
20
|
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
21
21
|
|
|
22
|
-
const WebrpcHeader =
|
|
23
|
-
const WebrpcHeaderValue =
|
|
22
|
+
const WebrpcHeader = "Webrpc";
|
|
23
|
+
const WebrpcHeaderValue = "webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-api@v0.4.0";
|
|
24
24
|
|
|
25
25
|
// WebRPC description and code-gen version
|
|
26
|
-
const WebRPCVersion =
|
|
26
|
+
const WebRPCVersion = "v1";
|
|
27
27
|
|
|
28
28
|
// Schema version of your RIDL schema
|
|
29
|
-
const WebRPCSchemaVersion =
|
|
29
|
+
const WebRPCSchemaVersion = "v0.4.0";
|
|
30
30
|
|
|
31
31
|
// Schema hash generated from your RIDL schema
|
|
32
|
-
const WebRPCSchemaHash =
|
|
32
|
+
const WebRPCSchemaHash = "ab3b6841bf983fa51a24df4cee18536199f115c3";
|
|
33
33
|
function VersionFromHeader(headers) {
|
|
34
34
|
const headerValue = headers.get(WebrpcHeader);
|
|
35
35
|
if (!headerValue) {
|
|
36
36
|
return {
|
|
37
|
-
webrpcGenVersion:
|
|
38
|
-
codeGenName:
|
|
39
|
-
codeGenVersion:
|
|
40
|
-
schemaName:
|
|
41
|
-
schemaVersion:
|
|
37
|
+
webrpcGenVersion: "",
|
|
38
|
+
codeGenName: "",
|
|
39
|
+
codeGenVersion: "",
|
|
40
|
+
schemaName: "",
|
|
41
|
+
schemaVersion: ""
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
return parseWebrpcGenVersions(headerValue);
|
|
45
45
|
}
|
|
46
46
|
function parseWebrpcGenVersions(header) {
|
|
47
|
-
const versions = header.split(
|
|
47
|
+
const versions = header.split(";");
|
|
48
48
|
if (versions.length < 3) {
|
|
49
49
|
return {
|
|
50
|
-
webrpcGenVersion:
|
|
51
|
-
codeGenName:
|
|
52
|
-
codeGenVersion:
|
|
53
|
-
schemaName:
|
|
54
|
-
schemaVersion:
|
|
50
|
+
webrpcGenVersion: "",
|
|
51
|
+
codeGenName: "",
|
|
52
|
+
codeGenVersion: "",
|
|
53
|
+
schemaName: "",
|
|
54
|
+
schemaVersion: ""
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
const [_, webrpcGenVersion] = versions[0].split(
|
|
58
|
-
const [codeGenName, codeGenVersion] = versions[1].split(
|
|
59
|
-
const [schemaName, schemaVersion] = versions[2].split(
|
|
57
|
+
const [_, webrpcGenVersion] = versions[0].split("@");
|
|
58
|
+
const [codeGenName, codeGenVersion] = versions[1].split("@");
|
|
59
|
+
const [schemaName, schemaVersion] = versions[2].split("@");
|
|
60
60
|
return {
|
|
61
|
-
webrpcGenVersion: webrpcGenVersion != null ? webrpcGenVersion :
|
|
62
|
-
codeGenName: codeGenName != null ? codeGenName :
|
|
63
|
-
codeGenVersion: codeGenVersion != null ? codeGenVersion :
|
|
64
|
-
schemaName: schemaName != null ? schemaName :
|
|
65
|
-
schemaVersion: schemaVersion != null ? schemaVersion :
|
|
61
|
+
webrpcGenVersion: webrpcGenVersion != null ? webrpcGenVersion : "",
|
|
62
|
+
codeGenName: codeGenName != null ? codeGenName : "",
|
|
63
|
+
codeGenVersion: codeGenVersion != null ? codeGenVersion : "",
|
|
64
|
+
schemaName: schemaName != null ? schemaName : "",
|
|
65
|
+
schemaVersion: schemaVersion != null ? schemaVersion : ""
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
|
|
@@ -101,6 +101,29 @@ let TransakBuySell = /*#__PURE__*/function (TransakBuySell) {
|
|
|
101
101
|
TransakBuySell["SELL"] = "SELL";
|
|
102
102
|
return TransakBuySell;
|
|
103
103
|
}({});
|
|
104
|
+
let CheckoutOptionCrypto = /*#__PURE__*/function (CheckoutOptionCrypto) {
|
|
105
|
+
CheckoutOptionCrypto["none"] = "none";
|
|
106
|
+
CheckoutOptionCrypto["partially"] = "partially";
|
|
107
|
+
CheckoutOptionCrypto["all"] = "all";
|
|
108
|
+
return CheckoutOptionCrypto;
|
|
109
|
+
}({});
|
|
110
|
+
let CheckoutOptionNFTCheckoutProvider = /*#__PURE__*/function (CheckoutOptionNFTCheckoutProvider) {
|
|
111
|
+
CheckoutOptionNFTCheckoutProvider["unknown"] = "unknown";
|
|
112
|
+
CheckoutOptionNFTCheckoutProvider["sardine"] = "sardine";
|
|
113
|
+
CheckoutOptionNFTCheckoutProvider["transak"] = "transak";
|
|
114
|
+
return CheckoutOptionNFTCheckoutProvider;
|
|
115
|
+
}({});
|
|
116
|
+
let CheckoutOptionOnRampProvider = /*#__PURE__*/function (CheckoutOptionOnRampProvider) {
|
|
117
|
+
CheckoutOptionOnRampProvider["unknown"] = "unknown";
|
|
118
|
+
CheckoutOptionOnRampProvider["sardine"] = "sardine";
|
|
119
|
+
CheckoutOptionOnRampProvider["transak"] = "transak";
|
|
120
|
+
return CheckoutOptionOnRampProvider;
|
|
121
|
+
}({});
|
|
122
|
+
let CheckoutOptionSwapProvider = /*#__PURE__*/function (CheckoutOptionSwapProvider) {
|
|
123
|
+
CheckoutOptionSwapProvider["unknown"] = "unknown";
|
|
124
|
+
CheckoutOptionSwapProvider["lifi"] = "lifi";
|
|
125
|
+
return CheckoutOptionSwapProvider;
|
|
126
|
+
}({});
|
|
104
127
|
//
|
|
105
128
|
// Client
|
|
106
129
|
//
|
|
@@ -941,63 +964,11 @@ class API {
|
|
|
941
964
|
});
|
|
942
965
|
});
|
|
943
966
|
};
|
|
944
|
-
this.
|
|
945
|
-
return this.fetch(this.url('
|
|
946
|
-
return buildResponse(res).then(_data => {
|
|
947
|
-
return {
|
|
948
|
-
swapPermit2Price: _data.swapPermit2Price
|
|
949
|
-
};
|
|
950
|
-
});
|
|
951
|
-
}, error => {
|
|
952
|
-
throw WebrpcRequestFailedError.new({
|
|
953
|
-
cause: `fetch(): ${error.message || ''}`
|
|
954
|
-
});
|
|
955
|
-
});
|
|
956
|
-
};
|
|
957
|
-
this.getSwapPermit2Prices = (args, headers, signal) => {
|
|
958
|
-
return this.fetch(this.url('GetSwapPermit2Prices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
959
|
-
return buildResponse(res).then(_data => {
|
|
960
|
-
return {
|
|
961
|
-
swapPermit2Prices: _data.swapPermit2Prices
|
|
962
|
-
};
|
|
963
|
-
});
|
|
964
|
-
}, error => {
|
|
965
|
-
throw WebrpcRequestFailedError.new({
|
|
966
|
-
cause: `fetch(): ${error.message || ''}`
|
|
967
|
-
});
|
|
968
|
-
});
|
|
969
|
-
};
|
|
970
|
-
this.getSwapPermit2Quote = (args, headers, signal) => {
|
|
971
|
-
return this.fetch(this.url('GetSwapPermit2Quote'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
972
|
-
return buildResponse(res).then(_data => {
|
|
973
|
-
return {
|
|
974
|
-
swapPermit2Quote: _data.swapPermit2Quote
|
|
975
|
-
};
|
|
976
|
-
});
|
|
977
|
-
}, error => {
|
|
978
|
-
throw WebrpcRequestFailedError.new({
|
|
979
|
-
cause: `fetch(): ${error.message || ''}`
|
|
980
|
-
});
|
|
981
|
-
});
|
|
982
|
-
};
|
|
983
|
-
this.getSwapPrice = (args, headers, signal) => {
|
|
984
|
-
return this.fetch(this.url('GetSwapPrice'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
967
|
+
this.getLifiChains = (headers, signal) => {
|
|
968
|
+
return this.fetch(this.url('GetLifiChains'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
985
969
|
return buildResponse(res).then(_data => {
|
|
986
970
|
return {
|
|
987
|
-
|
|
988
|
-
};
|
|
989
|
-
});
|
|
990
|
-
}, error => {
|
|
991
|
-
throw WebrpcRequestFailedError.new({
|
|
992
|
-
cause: `fetch(): ${error.message || ''}`
|
|
993
|
-
});
|
|
994
|
-
});
|
|
995
|
-
};
|
|
996
|
-
this.getSwapPrices = (args, headers, signal) => {
|
|
997
|
-
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
998
|
-
return buildResponse(res).then(_data => {
|
|
999
|
-
return {
|
|
1000
|
-
swapPrices: _data.swapPrices
|
|
971
|
+
chains: _data.chains
|
|
1001
972
|
};
|
|
1002
973
|
});
|
|
1003
974
|
}, error => {
|
|
@@ -1006,11 +977,11 @@ class API {
|
|
|
1006
977
|
});
|
|
1007
978
|
});
|
|
1008
979
|
};
|
|
1009
|
-
this.
|
|
1010
|
-
return this.fetch(this.url('
|
|
980
|
+
this.getLifiTokens = (args, headers, signal) => {
|
|
981
|
+
return this.fetch(this.url('GetLifiTokens'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1011
982
|
return buildResponse(res).then(_data => {
|
|
1012
983
|
return {
|
|
1013
|
-
|
|
984
|
+
tokens: _data.tokens
|
|
1014
985
|
};
|
|
1015
986
|
});
|
|
1016
987
|
}, error => {
|
|
@@ -1019,11 +990,11 @@ class API {
|
|
|
1019
990
|
});
|
|
1020
991
|
});
|
|
1021
992
|
};
|
|
1022
|
-
this.
|
|
1023
|
-
return this.fetch(this.url('
|
|
993
|
+
this.getLifiSwapRoutes = (args, headers, signal) => {
|
|
994
|
+
return this.fetch(this.url('GetLifiSwapRoutes'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1024
995
|
return buildResponse(res).then(_data => {
|
|
1025
996
|
return {
|
|
1026
|
-
|
|
997
|
+
routes: _data.routes
|
|
1027
998
|
};
|
|
1028
999
|
});
|
|
1029
1000
|
}, error => {
|
|
@@ -1032,11 +1003,11 @@ class API {
|
|
|
1032
1003
|
});
|
|
1033
1004
|
});
|
|
1034
1005
|
};
|
|
1035
|
-
this.
|
|
1036
|
-
return this.fetch(this.url('
|
|
1006
|
+
this.getLifiSwapQuote = (args, headers, signal) => {
|
|
1007
|
+
return this.fetch(this.url('GetLifiSwapQuote'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1037
1008
|
return buildResponse(res).then(_data => {
|
|
1038
1009
|
return {
|
|
1039
|
-
|
|
1010
|
+
quote: _data.quote
|
|
1040
1011
|
};
|
|
1041
1012
|
});
|
|
1042
1013
|
}, error => {
|
|
@@ -1200,6 +1171,32 @@ class API {
|
|
|
1200
1171
|
});
|
|
1201
1172
|
});
|
|
1202
1173
|
};
|
|
1174
|
+
this.checkoutOptionsSecondary = (args, headers, signal) => {
|
|
1175
|
+
return this.fetch(this.url('CheckoutOptionsSecondary'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1176
|
+
return buildResponse(res).then(_data => {
|
|
1177
|
+
return {
|
|
1178
|
+
options: _data.options
|
|
1179
|
+
};
|
|
1180
|
+
});
|
|
1181
|
+
}, error => {
|
|
1182
|
+
throw WebrpcRequestFailedError.new({
|
|
1183
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1184
|
+
});
|
|
1185
|
+
});
|
|
1186
|
+
};
|
|
1187
|
+
this.checkoutOptionsGetTransakContractID = (args, headers, signal) => {
|
|
1188
|
+
return this.fetch(this.url('CheckoutOptionsGetTransakContractID'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1189
|
+
return buildResponse(res).then(_data => {
|
|
1190
|
+
return {
|
|
1191
|
+
contractId: _data.contractId
|
|
1192
|
+
};
|
|
1193
|
+
});
|
|
1194
|
+
}, error => {
|
|
1195
|
+
throw WebrpcRequestFailedError.new({
|
|
1196
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1197
|
+
});
|
|
1198
|
+
});
|
|
1199
|
+
};
|
|
1203
1200
|
this.hostname = hostname.replace(/\/*$/, '');
|
|
1204
1201
|
this.fetch = (input, init) => fetch(input, init);
|
|
1205
1202
|
}
|
|
@@ -1638,6 +1635,10 @@ exports.AbortedError = AbortedError;
|
|
|
1638
1635
|
exports.AccessKeyMismatchError = AccessKeyMismatchError;
|
|
1639
1636
|
exports.AccessKeyNotFoundError = AccessKeyNotFoundError;
|
|
1640
1637
|
exports.AtLeastOneKeyError = AtLeastOneKeyError;
|
|
1638
|
+
exports.CheckoutOptionCrypto = CheckoutOptionCrypto;
|
|
1639
|
+
exports.CheckoutOptionNFTCheckoutProvider = CheckoutOptionNFTCheckoutProvider;
|
|
1640
|
+
exports.CheckoutOptionOnRampProvider = CheckoutOptionOnRampProvider;
|
|
1641
|
+
exports.CheckoutOptionSwapProvider = CheckoutOptionSwapProvider;
|
|
1641
1642
|
exports.GeoblockedError = GeoblockedError;
|
|
1642
1643
|
exports.InvalidArgumentError = InvalidArgumentError;
|
|
1643
1644
|
exports.InvalidOriginError = InvalidOriginError;
|