@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
|
@@ -9,56 +9,56 @@ function _extends() {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
/* eslint-disable */
|
|
12
|
-
// sequence-api v0.4.0
|
|
12
|
+
// sequence-api v0.4.0 ab3b6841bf983fa51a24df4cee18536199f115c3
|
|
13
13
|
// --
|
|
14
|
-
// Code generated by webrpc-gen@v0.
|
|
14
|
+
// Code generated by webrpc-gen@v0.25.3 with typescript generator. DO NOT EDIT.
|
|
15
15
|
//
|
|
16
16
|
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
17
17
|
|
|
18
|
-
const WebrpcHeader =
|
|
19
|
-
const WebrpcHeaderValue =
|
|
18
|
+
const WebrpcHeader = "Webrpc";
|
|
19
|
+
const WebrpcHeaderValue = "webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-api@v0.4.0";
|
|
20
20
|
|
|
21
21
|
// WebRPC description and code-gen version
|
|
22
|
-
const WebRPCVersion =
|
|
22
|
+
const WebRPCVersion = "v1";
|
|
23
23
|
|
|
24
24
|
// Schema version of your RIDL schema
|
|
25
|
-
const WebRPCSchemaVersion =
|
|
25
|
+
const WebRPCSchemaVersion = "v0.4.0";
|
|
26
26
|
|
|
27
27
|
// Schema hash generated from your RIDL schema
|
|
28
|
-
const WebRPCSchemaHash =
|
|
28
|
+
const WebRPCSchemaHash = "ab3b6841bf983fa51a24df4cee18536199f115c3";
|
|
29
29
|
function VersionFromHeader(headers) {
|
|
30
30
|
const headerValue = headers.get(WebrpcHeader);
|
|
31
31
|
if (!headerValue) {
|
|
32
32
|
return {
|
|
33
|
-
webrpcGenVersion:
|
|
34
|
-
codeGenName:
|
|
35
|
-
codeGenVersion:
|
|
36
|
-
schemaName:
|
|
37
|
-
schemaVersion:
|
|
33
|
+
webrpcGenVersion: "",
|
|
34
|
+
codeGenName: "",
|
|
35
|
+
codeGenVersion: "",
|
|
36
|
+
schemaName: "",
|
|
37
|
+
schemaVersion: ""
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
return parseWebrpcGenVersions(headerValue);
|
|
41
41
|
}
|
|
42
42
|
function parseWebrpcGenVersions(header) {
|
|
43
|
-
const versions = header.split(
|
|
43
|
+
const versions = header.split(";");
|
|
44
44
|
if (versions.length < 3) {
|
|
45
45
|
return {
|
|
46
|
-
webrpcGenVersion:
|
|
47
|
-
codeGenName:
|
|
48
|
-
codeGenVersion:
|
|
49
|
-
schemaName:
|
|
50
|
-
schemaVersion:
|
|
46
|
+
webrpcGenVersion: "",
|
|
47
|
+
codeGenName: "",
|
|
48
|
+
codeGenVersion: "",
|
|
49
|
+
schemaName: "",
|
|
50
|
+
schemaVersion: ""
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
const [_, webrpcGenVersion] = versions[0].split(
|
|
54
|
-
const [codeGenName, codeGenVersion] = versions[1].split(
|
|
55
|
-
const [schemaName, schemaVersion] = versions[2].split(
|
|
53
|
+
const [_, webrpcGenVersion] = versions[0].split("@");
|
|
54
|
+
const [codeGenName, codeGenVersion] = versions[1].split("@");
|
|
55
|
+
const [schemaName, schemaVersion] = versions[2].split("@");
|
|
56
56
|
return {
|
|
57
|
-
webrpcGenVersion: webrpcGenVersion != null ? webrpcGenVersion :
|
|
58
|
-
codeGenName: codeGenName != null ? codeGenName :
|
|
59
|
-
codeGenVersion: codeGenVersion != null ? codeGenVersion :
|
|
60
|
-
schemaName: schemaName != null ? schemaName :
|
|
61
|
-
schemaVersion: schemaVersion != null ? schemaVersion :
|
|
57
|
+
webrpcGenVersion: webrpcGenVersion != null ? webrpcGenVersion : "",
|
|
58
|
+
codeGenName: codeGenName != null ? codeGenName : "",
|
|
59
|
+
codeGenVersion: codeGenVersion != null ? codeGenVersion : "",
|
|
60
|
+
schemaName: schemaName != null ? schemaName : "",
|
|
61
|
+
schemaVersion: schemaVersion != null ? schemaVersion : ""
|
|
62
62
|
};
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -97,6 +97,29 @@ let TransakBuySell = /*#__PURE__*/function (TransakBuySell) {
|
|
|
97
97
|
TransakBuySell["SELL"] = "SELL";
|
|
98
98
|
return TransakBuySell;
|
|
99
99
|
}({});
|
|
100
|
+
let CheckoutOptionCrypto = /*#__PURE__*/function (CheckoutOptionCrypto) {
|
|
101
|
+
CheckoutOptionCrypto["none"] = "none";
|
|
102
|
+
CheckoutOptionCrypto["partially"] = "partially";
|
|
103
|
+
CheckoutOptionCrypto["all"] = "all";
|
|
104
|
+
return CheckoutOptionCrypto;
|
|
105
|
+
}({});
|
|
106
|
+
let CheckoutOptionNFTCheckoutProvider = /*#__PURE__*/function (CheckoutOptionNFTCheckoutProvider) {
|
|
107
|
+
CheckoutOptionNFTCheckoutProvider["unknown"] = "unknown";
|
|
108
|
+
CheckoutOptionNFTCheckoutProvider["sardine"] = "sardine";
|
|
109
|
+
CheckoutOptionNFTCheckoutProvider["transak"] = "transak";
|
|
110
|
+
return CheckoutOptionNFTCheckoutProvider;
|
|
111
|
+
}({});
|
|
112
|
+
let CheckoutOptionOnRampProvider = /*#__PURE__*/function (CheckoutOptionOnRampProvider) {
|
|
113
|
+
CheckoutOptionOnRampProvider["unknown"] = "unknown";
|
|
114
|
+
CheckoutOptionOnRampProvider["sardine"] = "sardine";
|
|
115
|
+
CheckoutOptionOnRampProvider["transak"] = "transak";
|
|
116
|
+
return CheckoutOptionOnRampProvider;
|
|
117
|
+
}({});
|
|
118
|
+
let CheckoutOptionSwapProvider = /*#__PURE__*/function (CheckoutOptionSwapProvider) {
|
|
119
|
+
CheckoutOptionSwapProvider["unknown"] = "unknown";
|
|
120
|
+
CheckoutOptionSwapProvider["lifi"] = "lifi";
|
|
121
|
+
return CheckoutOptionSwapProvider;
|
|
122
|
+
}({});
|
|
100
123
|
//
|
|
101
124
|
// Client
|
|
102
125
|
//
|
|
@@ -937,63 +960,11 @@ class API {
|
|
|
937
960
|
});
|
|
938
961
|
});
|
|
939
962
|
};
|
|
940
|
-
this.
|
|
941
|
-
return this.fetch(this.url('
|
|
942
|
-
return buildResponse(res).then(_data => {
|
|
943
|
-
return {
|
|
944
|
-
swapPermit2Price: _data.swapPermit2Price
|
|
945
|
-
};
|
|
946
|
-
});
|
|
947
|
-
}, error => {
|
|
948
|
-
throw WebrpcRequestFailedError.new({
|
|
949
|
-
cause: `fetch(): ${error.message || ''}`
|
|
950
|
-
});
|
|
951
|
-
});
|
|
952
|
-
};
|
|
953
|
-
this.getSwapPermit2Prices = (args, headers, signal) => {
|
|
954
|
-
return this.fetch(this.url('GetSwapPermit2Prices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
955
|
-
return buildResponse(res).then(_data => {
|
|
956
|
-
return {
|
|
957
|
-
swapPermit2Prices: _data.swapPermit2Prices
|
|
958
|
-
};
|
|
959
|
-
});
|
|
960
|
-
}, error => {
|
|
961
|
-
throw WebrpcRequestFailedError.new({
|
|
962
|
-
cause: `fetch(): ${error.message || ''}`
|
|
963
|
-
});
|
|
964
|
-
});
|
|
965
|
-
};
|
|
966
|
-
this.getSwapPermit2Quote = (args, headers, signal) => {
|
|
967
|
-
return this.fetch(this.url('GetSwapPermit2Quote'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
968
|
-
return buildResponse(res).then(_data => {
|
|
969
|
-
return {
|
|
970
|
-
swapPermit2Quote: _data.swapPermit2Quote
|
|
971
|
-
};
|
|
972
|
-
});
|
|
973
|
-
}, error => {
|
|
974
|
-
throw WebrpcRequestFailedError.new({
|
|
975
|
-
cause: `fetch(): ${error.message || ''}`
|
|
976
|
-
});
|
|
977
|
-
});
|
|
978
|
-
};
|
|
979
|
-
this.getSwapPrice = (args, headers, signal) => {
|
|
980
|
-
return this.fetch(this.url('GetSwapPrice'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
963
|
+
this.getLifiChains = (headers, signal) => {
|
|
964
|
+
return this.fetch(this.url('GetLifiChains'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
981
965
|
return buildResponse(res).then(_data => {
|
|
982
966
|
return {
|
|
983
|
-
|
|
984
|
-
};
|
|
985
|
-
});
|
|
986
|
-
}, error => {
|
|
987
|
-
throw WebrpcRequestFailedError.new({
|
|
988
|
-
cause: `fetch(): ${error.message || ''}`
|
|
989
|
-
});
|
|
990
|
-
});
|
|
991
|
-
};
|
|
992
|
-
this.getSwapPrices = (args, headers, signal) => {
|
|
993
|
-
return this.fetch(this.url('GetSwapPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
994
|
-
return buildResponse(res).then(_data => {
|
|
995
|
-
return {
|
|
996
|
-
swapPrices: _data.swapPrices
|
|
967
|
+
chains: _data.chains
|
|
997
968
|
};
|
|
998
969
|
});
|
|
999
970
|
}, error => {
|
|
@@ -1002,11 +973,11 @@ class API {
|
|
|
1002
973
|
});
|
|
1003
974
|
});
|
|
1004
975
|
};
|
|
1005
|
-
this.
|
|
1006
|
-
return this.fetch(this.url('
|
|
976
|
+
this.getLifiTokens = (args, headers, signal) => {
|
|
977
|
+
return this.fetch(this.url('GetLifiTokens'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1007
978
|
return buildResponse(res).then(_data => {
|
|
1008
979
|
return {
|
|
1009
|
-
|
|
980
|
+
tokens: _data.tokens
|
|
1010
981
|
};
|
|
1011
982
|
});
|
|
1012
983
|
}, error => {
|
|
@@ -1015,11 +986,11 @@ class API {
|
|
|
1015
986
|
});
|
|
1016
987
|
});
|
|
1017
988
|
};
|
|
1018
|
-
this.
|
|
1019
|
-
return this.fetch(this.url('
|
|
989
|
+
this.getLifiSwapRoutes = (args, headers, signal) => {
|
|
990
|
+
return this.fetch(this.url('GetLifiSwapRoutes'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1020
991
|
return buildResponse(res).then(_data => {
|
|
1021
992
|
return {
|
|
1022
|
-
|
|
993
|
+
routes: _data.routes
|
|
1023
994
|
};
|
|
1024
995
|
});
|
|
1025
996
|
}, error => {
|
|
@@ -1028,11 +999,11 @@ class API {
|
|
|
1028
999
|
});
|
|
1029
1000
|
});
|
|
1030
1001
|
};
|
|
1031
|
-
this.
|
|
1032
|
-
return this.fetch(this.url('
|
|
1002
|
+
this.getLifiSwapQuote = (args, headers, signal) => {
|
|
1003
|
+
return this.fetch(this.url('GetLifiSwapQuote'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1033
1004
|
return buildResponse(res).then(_data => {
|
|
1034
1005
|
return {
|
|
1035
|
-
|
|
1006
|
+
quote: _data.quote
|
|
1036
1007
|
};
|
|
1037
1008
|
});
|
|
1038
1009
|
}, error => {
|
|
@@ -1196,6 +1167,32 @@ class API {
|
|
|
1196
1167
|
});
|
|
1197
1168
|
});
|
|
1198
1169
|
};
|
|
1170
|
+
this.checkoutOptionsSecondary = (args, headers, signal) => {
|
|
1171
|
+
return this.fetch(this.url('CheckoutOptionsSecondary'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1172
|
+
return buildResponse(res).then(_data => {
|
|
1173
|
+
return {
|
|
1174
|
+
options: _data.options
|
|
1175
|
+
};
|
|
1176
|
+
});
|
|
1177
|
+
}, error => {
|
|
1178
|
+
throw WebrpcRequestFailedError.new({
|
|
1179
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1180
|
+
});
|
|
1181
|
+
});
|
|
1182
|
+
};
|
|
1183
|
+
this.checkoutOptionsGetTransakContractID = (args, headers, signal) => {
|
|
1184
|
+
return this.fetch(this.url('CheckoutOptionsGetTransakContractID'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1185
|
+
return buildResponse(res).then(_data => {
|
|
1186
|
+
return {
|
|
1187
|
+
contractId: _data.contractId
|
|
1188
|
+
};
|
|
1189
|
+
});
|
|
1190
|
+
}, error => {
|
|
1191
|
+
throw WebrpcRequestFailedError.new({
|
|
1192
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1193
|
+
});
|
|
1194
|
+
});
|
|
1195
|
+
};
|
|
1199
1196
|
this.hostname = hostname.replace(/\/*$/, '');
|
|
1200
1197
|
this.fetch = (input, init) => fetch(input, init);
|
|
1201
1198
|
}
|
|
@@ -1629,4 +1626,4 @@ class SequenceAPIClient extends API {
|
|
|
1629
1626
|
}
|
|
1630
1627
|
}
|
|
1631
1628
|
|
|
1632
|
-
export { API, AbortedError, AccessKeyMismatchError, AccessKeyNotFoundError, AtLeastOneKeyError, GeoblockedError, InvalidArgumentError, InvalidOriginError, InvalidServiceError, MaxAccessKeysError, MethodNotFoundError, NoDefaultKeyError, NotFoundError, PermissionDeniedError, ProjectNotFoundError, QueryFailedError, QuotaExceededError, QuotaRateLimitError, RateLimitedError, RequestConflictError, SardinePaymentType, SardineQuoteType, SequenceAPIClient, SessionExpiredError, SortOrder, TimeoutError, TokenType, TransakBuySell, UnauthorizedError, UnauthorizedUserError, UnavailableError, UnsupportedNetworkError, VersionFromHeader, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion, WebrpcBadMethodError, WebrpcBadRequestError, WebrpcBadResponseError, WebrpcBadRouteError, WebrpcClientDisconnectedError, WebrpcEndpointError, WebrpcError, WebrpcErrorCodes, WebrpcHeader, WebrpcHeaderValue, WebrpcInternalErrorError, WebrpcRequestFailedError, WebrpcServerPanicError, WebrpcStreamFinishedError, WebrpcStreamLostError, errors, webrpcErrorByCode };
|
|
1629
|
+
export { API, AbortedError, AccessKeyMismatchError, AccessKeyNotFoundError, AtLeastOneKeyError, CheckoutOptionCrypto, CheckoutOptionNFTCheckoutProvider, CheckoutOptionOnRampProvider, CheckoutOptionSwapProvider, GeoblockedError, InvalidArgumentError, InvalidOriginError, InvalidServiceError, MaxAccessKeysError, MethodNotFoundError, NoDefaultKeyError, NotFoundError, PermissionDeniedError, ProjectNotFoundError, QueryFailedError, QuotaExceededError, QuotaRateLimitError, RateLimitedError, RequestConflictError, SardinePaymentType, SardineQuoteType, SequenceAPIClient, SessionExpiredError, SortOrder, TimeoutError, TokenType, TransakBuySell, UnauthorizedError, UnauthorizedUserError, UnavailableError, UnsupportedNetworkError, VersionFromHeader, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion, WebrpcBadMethodError, WebrpcBadRequestError, WebrpcBadResponseError, WebrpcBadRouteError, WebrpcClientDisconnectedError, WebrpcEndpointError, WebrpcError, WebrpcErrorCodes, WebrpcHeader, WebrpcHeaderValue, WebrpcInternalErrorError, WebrpcRequestFailedError, WebrpcServerPanicError, WebrpcStreamFinishedError, WebrpcStreamLostError, errors, webrpcErrorByCode };
|