@0xsequence/api 0.0.0-20241218203257 → 0.0.0-20250429150836
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 +520 -36
- package/dist/0xsequence-api.cjs.prod.js +520 -36
- package/dist/0xsequence-api.esm.js +495 -37
- package/dist/declarations/src/api.gen.d.ts +616 -32
- package/package.json +1 -1
- package/src/api.gen.ts +2114 -1258
|
@@ -13,20 +13,58 @@ function _extends() {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/* eslint-disable */
|
|
16
|
-
// sequence-api v0.4.0
|
|
16
|
+
// sequence-api v0.4.0 db246758d7ea850abc8ab1cb76d5ac014944b0bd
|
|
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 = "Webrpc";
|
|
23
|
+
const WebrpcHeaderValue = "webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-api@v0.4.0";
|
|
24
|
+
|
|
22
25
|
// WebRPC description and code-gen version
|
|
23
|
-
const WebRPCVersion =
|
|
26
|
+
const WebRPCVersion = "v1";
|
|
24
27
|
|
|
25
28
|
// Schema version of your RIDL schema
|
|
26
|
-
const WebRPCSchemaVersion =
|
|
29
|
+
const WebRPCSchemaVersion = "v0.4.0";
|
|
27
30
|
|
|
28
31
|
// Schema hash generated from your RIDL schema
|
|
29
|
-
const WebRPCSchemaHash =
|
|
32
|
+
const WebRPCSchemaHash = "db246758d7ea850abc8ab1cb76d5ac014944b0bd";
|
|
33
|
+
function VersionFromHeader(headers) {
|
|
34
|
+
const headerValue = headers.get(WebrpcHeader);
|
|
35
|
+
if (!headerValue) {
|
|
36
|
+
return {
|
|
37
|
+
webrpcGenVersion: "",
|
|
38
|
+
codeGenName: "",
|
|
39
|
+
codeGenVersion: "",
|
|
40
|
+
schemaName: "",
|
|
41
|
+
schemaVersion: ""
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
return parseWebrpcGenVersions(headerValue);
|
|
45
|
+
}
|
|
46
|
+
function parseWebrpcGenVersions(header) {
|
|
47
|
+
const versions = header.split(";");
|
|
48
|
+
if (versions.length < 3) {
|
|
49
|
+
return {
|
|
50
|
+
webrpcGenVersion: "",
|
|
51
|
+
codeGenName: "",
|
|
52
|
+
codeGenVersion: "",
|
|
53
|
+
schemaName: "",
|
|
54
|
+
schemaVersion: ""
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const [_, webrpcGenVersion] = versions[0].split("@");
|
|
58
|
+
const [codeGenName, codeGenVersion] = versions[1].split("@");
|
|
59
|
+
const [schemaName, schemaVersion] = versions[2].split("@");
|
|
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 : ""
|
|
66
|
+
};
|
|
67
|
+
}
|
|
30
68
|
|
|
31
69
|
//
|
|
32
70
|
// Types
|
|
@@ -57,6 +95,35 @@ let TokenType = /*#__PURE__*/function (TokenType) {
|
|
|
57
95
|
TokenType["ERC1155"] = "ERC1155";
|
|
58
96
|
return TokenType;
|
|
59
97
|
}({});
|
|
98
|
+
let TransakBuySell = /*#__PURE__*/function (TransakBuySell) {
|
|
99
|
+
TransakBuySell["UNKNOWN"] = "UNKNOWN";
|
|
100
|
+
TransakBuySell["BUY"] = "BUY";
|
|
101
|
+
TransakBuySell["SELL"] = "SELL";
|
|
102
|
+
return TransakBuySell;
|
|
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
|
+
}({});
|
|
60
127
|
//
|
|
61
128
|
// Client
|
|
62
129
|
//
|
|
@@ -175,6 +242,32 @@ class API {
|
|
|
175
242
|
});
|
|
176
243
|
});
|
|
177
244
|
};
|
|
245
|
+
this.registerPublicKey = (args, headers, signal) => {
|
|
246
|
+
return this.fetch(this.url('RegisterPublicKey'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
247
|
+
return buildResponse(res).then(_data => {
|
|
248
|
+
return {
|
|
249
|
+
status: _data.status
|
|
250
|
+
};
|
|
251
|
+
});
|
|
252
|
+
}, error => {
|
|
253
|
+
throw WebrpcRequestFailedError.new({
|
|
254
|
+
cause: `fetch(): ${error.message || ''}`
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
this.getPublicKey = (args, headers, signal) => {
|
|
259
|
+
return this.fetch(this.url('GetPublicKey'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
260
|
+
return buildResponse(res).then(_data => {
|
|
261
|
+
return {
|
|
262
|
+
publicKey: _data.publicKey
|
|
263
|
+
};
|
|
264
|
+
});
|
|
265
|
+
}, error => {
|
|
266
|
+
throw WebrpcRequestFailedError.new({
|
|
267
|
+
cause: `fetch(): ${error.message || ''}`
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
};
|
|
178
271
|
this.friendList = (args, headers, signal) => {
|
|
179
272
|
return this.fetch(this.url('FriendList'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
180
273
|
return buildResponse(res).then(_data => {
|
|
@@ -505,6 +598,19 @@ class API {
|
|
|
505
598
|
});
|
|
506
599
|
});
|
|
507
600
|
};
|
|
601
|
+
this.sardineGetSupportedTokenForSwap = (args, headers, signal) => {
|
|
602
|
+
return this.fetch(this.url('SardineGetSupportedTokenForSwap'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
603
|
+
return buildResponse(res).then(_data => {
|
|
604
|
+
return {
|
|
605
|
+
token: _data.token
|
|
606
|
+
};
|
|
607
|
+
});
|
|
608
|
+
}, error => {
|
|
609
|
+
throw WebrpcRequestFailedError.new({
|
|
610
|
+
cause: `fetch(): ${error.message || ''}`
|
|
611
|
+
});
|
|
612
|
+
});
|
|
613
|
+
};
|
|
508
614
|
this.sardineGetEnabledTokens = (headers, signal) => {
|
|
509
615
|
return this.fetch(this.url('SardineGetEnabledTokens'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
510
616
|
return buildResponse(res).then(_data => {
|
|
@@ -570,6 +676,71 @@ class API {
|
|
|
570
676
|
});
|
|
571
677
|
});
|
|
572
678
|
};
|
|
679
|
+
this.transakGetCountries = (headers, signal) => {
|
|
680
|
+
return this.fetch(this.url('TransakGetCountries'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
681
|
+
return buildResponse(res).then(_data => {
|
|
682
|
+
return {
|
|
683
|
+
regions: _data.regions
|
|
684
|
+
};
|
|
685
|
+
});
|
|
686
|
+
}, error => {
|
|
687
|
+
throw WebrpcRequestFailedError.new({
|
|
688
|
+
cause: `fetch(): ${error.message || ''}`
|
|
689
|
+
});
|
|
690
|
+
});
|
|
691
|
+
};
|
|
692
|
+
this.transakGetCryptoCurrencies = (headers, signal) => {
|
|
693
|
+
return this.fetch(this.url('TransakGetCryptoCurrencies'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
694
|
+
return buildResponse(res).then(_data => {
|
|
695
|
+
return {
|
|
696
|
+
currencies: _data.currencies
|
|
697
|
+
};
|
|
698
|
+
});
|
|
699
|
+
}, error => {
|
|
700
|
+
throw WebrpcRequestFailedError.new({
|
|
701
|
+
cause: `fetch(): ${error.message || ''}`
|
|
702
|
+
});
|
|
703
|
+
});
|
|
704
|
+
};
|
|
705
|
+
this.transakGetFiatCurrencies = (headers, signal) => {
|
|
706
|
+
return this.fetch(this.url('TransakGetFiatCurrencies'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
707
|
+
return buildResponse(res).then(_data => {
|
|
708
|
+
return {
|
|
709
|
+
currencies: _data.currencies
|
|
710
|
+
};
|
|
711
|
+
});
|
|
712
|
+
}, error => {
|
|
713
|
+
throw WebrpcRequestFailedError.new({
|
|
714
|
+
cause: `fetch(): ${error.message || ''}`
|
|
715
|
+
});
|
|
716
|
+
});
|
|
717
|
+
};
|
|
718
|
+
this.transakGetPrice = (args, headers, signal) => {
|
|
719
|
+
return this.fetch(this.url('TransakGetPrice'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
720
|
+
return buildResponse(res).then(_data => {
|
|
721
|
+
return {
|
|
722
|
+
price: _data.price
|
|
723
|
+
};
|
|
724
|
+
});
|
|
725
|
+
}, error => {
|
|
726
|
+
throw WebrpcRequestFailedError.new({
|
|
727
|
+
cause: `fetch(): ${error.message || ''}`
|
|
728
|
+
});
|
|
729
|
+
});
|
|
730
|
+
};
|
|
731
|
+
this.transakGetSupportedNFTCheckoutChains = (headers, signal) => {
|
|
732
|
+
return this.fetch(this.url('TransakGetSupportedNFTCheckoutChains'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
733
|
+
return buildResponse(res).then(_data => {
|
|
734
|
+
return {
|
|
735
|
+
chains: _data.chains
|
|
736
|
+
};
|
|
737
|
+
});
|
|
738
|
+
}, error => {
|
|
739
|
+
throw WebrpcRequestFailedError.new({
|
|
740
|
+
cause: `fetch(): ${error.message || ''}`
|
|
741
|
+
});
|
|
742
|
+
});
|
|
743
|
+
};
|
|
573
744
|
this.getCoinPrices = (args, headers, signal) => {
|
|
574
745
|
return this.fetch(this.url('GetCoinPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
575
746
|
return buildResponse(res).then(_data => {
|
|
@@ -779,11 +950,25 @@ class API {
|
|
|
779
950
|
});
|
|
780
951
|
});
|
|
781
952
|
};
|
|
782
|
-
this.
|
|
783
|
-
return this.fetch(this.url('
|
|
953
|
+
this.listAdoptedWallets = (args, headers, signal) => {
|
|
954
|
+
return this.fetch(this.url('ListAdoptedWallets'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
955
|
+
return buildResponse(res).then(_data => {
|
|
956
|
+
return {
|
|
957
|
+
page: _data.page,
|
|
958
|
+
wallets: _data.wallets
|
|
959
|
+
};
|
|
960
|
+
});
|
|
961
|
+
}, error => {
|
|
962
|
+
throw WebrpcRequestFailedError.new({
|
|
963
|
+
cause: `fetch(): ${error.message || ''}`
|
|
964
|
+
});
|
|
965
|
+
});
|
|
966
|
+
};
|
|
967
|
+
this.getLifiChains = (headers, signal) => {
|
|
968
|
+
return this.fetch(this.url('GetLifiChains'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
784
969
|
return buildResponse(res).then(_data => {
|
|
785
970
|
return {
|
|
786
|
-
|
|
971
|
+
chains: _data.chains
|
|
787
972
|
};
|
|
788
973
|
});
|
|
789
974
|
}, error => {
|
|
@@ -792,11 +977,37 @@ class API {
|
|
|
792
977
|
});
|
|
793
978
|
});
|
|
794
979
|
};
|
|
795
|
-
this.
|
|
796
|
-
return this.fetch(this.url('
|
|
980
|
+
this.getLifiTokens = (args, headers, signal) => {
|
|
981
|
+
return this.fetch(this.url('GetLifiTokens'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
797
982
|
return buildResponse(res).then(_data => {
|
|
798
983
|
return {
|
|
799
|
-
|
|
984
|
+
tokens: _data.tokens
|
|
985
|
+
};
|
|
986
|
+
});
|
|
987
|
+
}, error => {
|
|
988
|
+
throw WebrpcRequestFailedError.new({
|
|
989
|
+
cause: `fetch(): ${error.message || ''}`
|
|
990
|
+
});
|
|
991
|
+
});
|
|
992
|
+
};
|
|
993
|
+
this.getLifiSwapRoutes = (args, headers, signal) => {
|
|
994
|
+
return this.fetch(this.url('GetLifiSwapRoutes'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
995
|
+
return buildResponse(res).then(_data => {
|
|
996
|
+
return {
|
|
997
|
+
routes: _data.routes
|
|
998
|
+
};
|
|
999
|
+
});
|
|
1000
|
+
}, error => {
|
|
1001
|
+
throw WebrpcRequestFailedError.new({
|
|
1002
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1003
|
+
});
|
|
1004
|
+
});
|
|
1005
|
+
};
|
|
1006
|
+
this.getLifiSwapQuote = (args, headers, signal) => {
|
|
1007
|
+
return this.fetch(this.url('GetLifiSwapQuote'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1008
|
+
return buildResponse(res).then(_data => {
|
|
1009
|
+
return {
|
|
1010
|
+
quote: _data.quote
|
|
800
1011
|
};
|
|
801
1012
|
});
|
|
802
1013
|
}, error => {
|
|
@@ -908,7 +1119,85 @@ class API {
|
|
|
908
1119
|
});
|
|
909
1120
|
});
|
|
910
1121
|
};
|
|
911
|
-
this.
|
|
1122
|
+
this.savePack = (args, headers, signal) => {
|
|
1123
|
+
return this.fetch(this.url('SavePack'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1124
|
+
return buildResponse(res).then(_data => {
|
|
1125
|
+
return {
|
|
1126
|
+
merkleRoot: _data.merkleRoot
|
|
1127
|
+
};
|
|
1128
|
+
});
|
|
1129
|
+
}, error => {
|
|
1130
|
+
throw WebrpcRequestFailedError.new({
|
|
1131
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1132
|
+
});
|
|
1133
|
+
});
|
|
1134
|
+
};
|
|
1135
|
+
this.getPack = (args, headers, signal) => {
|
|
1136
|
+
return this.fetch(this.url('GetPack'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1137
|
+
return buildResponse(res).then(_data => {
|
|
1138
|
+
return {
|
|
1139
|
+
pack: _data.pack
|
|
1140
|
+
};
|
|
1141
|
+
});
|
|
1142
|
+
}, error => {
|
|
1143
|
+
throw WebrpcRequestFailedError.new({
|
|
1144
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1145
|
+
});
|
|
1146
|
+
});
|
|
1147
|
+
};
|
|
1148
|
+
this.deletePack = (args, headers, signal) => {
|
|
1149
|
+
return this.fetch(this.url('DeletePack'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1150
|
+
return buildResponse(res).then(_data => {
|
|
1151
|
+
return {
|
|
1152
|
+
status: _data.status
|
|
1153
|
+
};
|
|
1154
|
+
});
|
|
1155
|
+
}, error => {
|
|
1156
|
+
throw WebrpcRequestFailedError.new({
|
|
1157
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1158
|
+
});
|
|
1159
|
+
});
|
|
1160
|
+
};
|
|
1161
|
+
this.updatePackContent = (args, headers, signal) => {
|
|
1162
|
+
return this.fetch(this.url('UpdatePackContent'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
1163
|
+
return buildResponse(res).then(_data => {
|
|
1164
|
+
return {
|
|
1165
|
+
merkleRoot: _data.merkleRoot
|
|
1166
|
+
};
|
|
1167
|
+
});
|
|
1168
|
+
}, error => {
|
|
1169
|
+
throw WebrpcRequestFailedError.new({
|
|
1170
|
+
cause: `fetch(): ${error.message || ''}`
|
|
1171
|
+
});
|
|
1172
|
+
});
|
|
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
|
+
};
|
|
1200
|
+
this.hostname = hostname.replace(/\/*$/, '');
|
|
912
1201
|
this.fetch = (input, init) => fetch(input, init);
|
|
913
1202
|
}
|
|
914
1203
|
url(name) {
|
|
@@ -916,11 +1205,13 @@ class API {
|
|
|
916
1205
|
}
|
|
917
1206
|
}
|
|
918
1207
|
const createHTTPRequest = (body = {}, headers = {}, signal = null) => {
|
|
1208
|
+
const reqHeaders = _extends({}, headers, {
|
|
1209
|
+
'Content-Type': 'application/json'
|
|
1210
|
+
});
|
|
1211
|
+
reqHeaders[WebrpcHeader] = WebrpcHeaderValue;
|
|
919
1212
|
return {
|
|
920
1213
|
method: 'POST',
|
|
921
|
-
headers:
|
|
922
|
-
'Content-Type': 'application/json'
|
|
923
|
-
}),
|
|
1214
|
+
headers: reqHeaders,
|
|
924
1215
|
body: JSON.stringify(body || {}),
|
|
925
1216
|
signal
|
|
926
1217
|
};
|
|
@@ -978,67 +1269,67 @@ class WebrpcError extends Error {
|
|
|
978
1269
|
// Webrpc errors
|
|
979
1270
|
|
|
980
1271
|
class WebrpcEndpointError extends WebrpcError {
|
|
981
|
-
constructor(name = 'WebrpcEndpoint', code = 0, message =
|
|
1272
|
+
constructor(name = 'WebrpcEndpoint', code = 0, message = `endpoint error`, status = 0, cause) {
|
|
982
1273
|
super(name, code, message, status, cause);
|
|
983
1274
|
Object.setPrototypeOf(this, WebrpcEndpointError.prototype);
|
|
984
1275
|
}
|
|
985
1276
|
}
|
|
986
1277
|
class WebrpcRequestFailedError extends WebrpcError {
|
|
987
|
-
constructor(name = 'WebrpcRequestFailed', code = -1, message =
|
|
1278
|
+
constructor(name = 'WebrpcRequestFailed', code = -1, message = `request failed`, status = 0, cause) {
|
|
988
1279
|
super(name, code, message, status, cause);
|
|
989
1280
|
Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype);
|
|
990
1281
|
}
|
|
991
1282
|
}
|
|
992
1283
|
class WebrpcBadRouteError extends WebrpcError {
|
|
993
|
-
constructor(name = 'WebrpcBadRoute', code = -2, message =
|
|
1284
|
+
constructor(name = 'WebrpcBadRoute', code = -2, message = `bad route`, status = 0, cause) {
|
|
994
1285
|
super(name, code, message, status, cause);
|
|
995
1286
|
Object.setPrototypeOf(this, WebrpcBadRouteError.prototype);
|
|
996
1287
|
}
|
|
997
1288
|
}
|
|
998
1289
|
class WebrpcBadMethodError extends WebrpcError {
|
|
999
|
-
constructor(name = 'WebrpcBadMethod', code = -3, message =
|
|
1290
|
+
constructor(name = 'WebrpcBadMethod', code = -3, message = `bad method`, status = 0, cause) {
|
|
1000
1291
|
super(name, code, message, status, cause);
|
|
1001
1292
|
Object.setPrototypeOf(this, WebrpcBadMethodError.prototype);
|
|
1002
1293
|
}
|
|
1003
1294
|
}
|
|
1004
1295
|
class WebrpcBadRequestError extends WebrpcError {
|
|
1005
|
-
constructor(name = 'WebrpcBadRequest', code = -4, message =
|
|
1296
|
+
constructor(name = 'WebrpcBadRequest', code = -4, message = `bad request`, status = 0, cause) {
|
|
1006
1297
|
super(name, code, message, status, cause);
|
|
1007
1298
|
Object.setPrototypeOf(this, WebrpcBadRequestError.prototype);
|
|
1008
1299
|
}
|
|
1009
1300
|
}
|
|
1010
1301
|
class WebrpcBadResponseError extends WebrpcError {
|
|
1011
|
-
constructor(name = 'WebrpcBadResponse', code = -5, message =
|
|
1302
|
+
constructor(name = 'WebrpcBadResponse', code = -5, message = `bad response`, status = 0, cause) {
|
|
1012
1303
|
super(name, code, message, status, cause);
|
|
1013
1304
|
Object.setPrototypeOf(this, WebrpcBadResponseError.prototype);
|
|
1014
1305
|
}
|
|
1015
1306
|
}
|
|
1016
1307
|
class WebrpcServerPanicError extends WebrpcError {
|
|
1017
|
-
constructor(name = 'WebrpcServerPanic', code = -6, message =
|
|
1308
|
+
constructor(name = 'WebrpcServerPanic', code = -6, message = `server panic`, status = 0, cause) {
|
|
1018
1309
|
super(name, code, message, status, cause);
|
|
1019
1310
|
Object.setPrototypeOf(this, WebrpcServerPanicError.prototype);
|
|
1020
1311
|
}
|
|
1021
1312
|
}
|
|
1022
1313
|
class WebrpcInternalErrorError extends WebrpcError {
|
|
1023
|
-
constructor(name = 'WebrpcInternalError', code = -7, message =
|
|
1314
|
+
constructor(name = 'WebrpcInternalError', code = -7, message = `internal error`, status = 0, cause) {
|
|
1024
1315
|
super(name, code, message, status, cause);
|
|
1025
1316
|
Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype);
|
|
1026
1317
|
}
|
|
1027
1318
|
}
|
|
1028
1319
|
class WebrpcClientDisconnectedError extends WebrpcError {
|
|
1029
|
-
constructor(name = 'WebrpcClientDisconnected', code = -8, message =
|
|
1320
|
+
constructor(name = 'WebrpcClientDisconnected', code = -8, message = `client disconnected`, status = 0, cause) {
|
|
1030
1321
|
super(name, code, message, status, cause);
|
|
1031
1322
|
Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype);
|
|
1032
1323
|
}
|
|
1033
1324
|
}
|
|
1034
1325
|
class WebrpcStreamLostError extends WebrpcError {
|
|
1035
|
-
constructor(name = 'WebrpcStreamLost', code = -9, message =
|
|
1326
|
+
constructor(name = 'WebrpcStreamLost', code = -9, message = `stream lost`, status = 0, cause) {
|
|
1036
1327
|
super(name, code, message, status, cause);
|
|
1037
1328
|
Object.setPrototypeOf(this, WebrpcStreamLostError.prototype);
|
|
1038
1329
|
}
|
|
1039
1330
|
}
|
|
1040
1331
|
class WebrpcStreamFinishedError extends WebrpcError {
|
|
1041
|
-
constructor(name = 'WebrpcStreamFinished', code = -10, message =
|
|
1332
|
+
constructor(name = 'WebrpcStreamFinished', code = -10, message = `stream finished`, status = 0, cause) {
|
|
1042
1333
|
super(name, code, message, status, cause);
|
|
1043
1334
|
Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype);
|
|
1044
1335
|
}
|
|
@@ -1047,59 +1338,155 @@ class WebrpcStreamFinishedError extends WebrpcError {
|
|
|
1047
1338
|
// Schema errors
|
|
1048
1339
|
|
|
1049
1340
|
class UnauthorizedError extends WebrpcError {
|
|
1050
|
-
constructor(name = 'Unauthorized', code = 1000, message =
|
|
1341
|
+
constructor(name = 'Unauthorized', code = 1000, message = `Unauthorized access`, status = 0, cause) {
|
|
1051
1342
|
super(name, code, message, status, cause);
|
|
1052
1343
|
Object.setPrototypeOf(this, UnauthorizedError.prototype);
|
|
1053
1344
|
}
|
|
1054
1345
|
}
|
|
1055
1346
|
class PermissionDeniedError extends WebrpcError {
|
|
1056
|
-
constructor(name = 'PermissionDenied', code = 1001, message =
|
|
1347
|
+
constructor(name = 'PermissionDenied', code = 1001, message = `Permission denied`, status = 0, cause) {
|
|
1057
1348
|
super(name, code, message, status, cause);
|
|
1058
1349
|
Object.setPrototypeOf(this, PermissionDeniedError.prototype);
|
|
1059
1350
|
}
|
|
1060
1351
|
}
|
|
1061
1352
|
class SessionExpiredError extends WebrpcError {
|
|
1062
|
-
constructor(name = 'SessionExpired', code = 1002, message =
|
|
1353
|
+
constructor(name = 'SessionExpired', code = 1002, message = `Session expired`, status = 0, cause) {
|
|
1063
1354
|
super(name, code, message, status, cause);
|
|
1064
1355
|
Object.setPrototypeOf(this, SessionExpiredError.prototype);
|
|
1065
1356
|
}
|
|
1066
1357
|
}
|
|
1358
|
+
class MethodNotFoundError extends WebrpcError {
|
|
1359
|
+
constructor(name = 'MethodNotFound', code = 1003, message = `Method not found`, status = 0, cause) {
|
|
1360
|
+
super(name, code, message, status, cause);
|
|
1361
|
+
Object.setPrototypeOf(this, MethodNotFoundError.prototype);
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
class RequestConflictError extends WebrpcError {
|
|
1365
|
+
constructor(name = 'RequestConflict', code = 1004, message = `Conflict with target resource`, status = 0, cause) {
|
|
1366
|
+
super(name, code, message, status, cause);
|
|
1367
|
+
Object.setPrototypeOf(this, RequestConflictError.prototype);
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1067
1370
|
class AbortedError extends WebrpcError {
|
|
1068
|
-
constructor(name = 'Aborted', code = 1005, message =
|
|
1371
|
+
constructor(name = 'Aborted', code = 1005, message = `Request aborted`, status = 0, cause) {
|
|
1069
1372
|
super(name, code, message, status, cause);
|
|
1070
1373
|
Object.setPrototypeOf(this, AbortedError.prototype);
|
|
1071
1374
|
}
|
|
1072
1375
|
}
|
|
1073
1376
|
class GeoblockedError extends WebrpcError {
|
|
1074
|
-
constructor(name = 'Geoblocked', code = 1006, message =
|
|
1377
|
+
constructor(name = 'Geoblocked', code = 1006, message = `Geoblocked region`, status = 0, cause) {
|
|
1075
1378
|
super(name, code, message, status, cause);
|
|
1076
1379
|
Object.setPrototypeOf(this, GeoblockedError.prototype);
|
|
1077
1380
|
}
|
|
1078
1381
|
}
|
|
1382
|
+
class RateLimitedError extends WebrpcError {
|
|
1383
|
+
constructor(name = 'RateLimited', code = 1007, message = `Rate-limited. Please slow down.`, status = 0, cause) {
|
|
1384
|
+
super(name, code, message, status, cause);
|
|
1385
|
+
Object.setPrototypeOf(this, RateLimitedError.prototype);
|
|
1386
|
+
}
|
|
1387
|
+
}
|
|
1388
|
+
class ProjectNotFoundError extends WebrpcError {
|
|
1389
|
+
constructor(name = 'ProjectNotFound', code = 1008, message = `Project not found`, status = 0, cause) {
|
|
1390
|
+
super(name, code, message, status, cause);
|
|
1391
|
+
Object.setPrototypeOf(this, ProjectNotFoundError.prototype);
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
class AccessKeyNotFoundError extends WebrpcError {
|
|
1395
|
+
constructor(name = 'AccessKeyNotFound', code = 1101, message = `Access key not found`, status = 0, cause) {
|
|
1396
|
+
super(name, code, message, status, cause);
|
|
1397
|
+
Object.setPrototypeOf(this, AccessKeyNotFoundError.prototype);
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
class AccessKeyMismatchError extends WebrpcError {
|
|
1401
|
+
constructor(name = 'AccessKeyMismatch', code = 1102, message = `Access key mismatch`, status = 0, cause) {
|
|
1402
|
+
super(name, code, message, status, cause);
|
|
1403
|
+
Object.setPrototypeOf(this, AccessKeyMismatchError.prototype);
|
|
1404
|
+
}
|
|
1405
|
+
}
|
|
1406
|
+
class InvalidOriginError extends WebrpcError {
|
|
1407
|
+
constructor(name = 'InvalidOrigin', code = 1103, message = `Invalid origin for Access Key`, status = 0, cause) {
|
|
1408
|
+
super(name, code, message, status, cause);
|
|
1409
|
+
Object.setPrototypeOf(this, InvalidOriginError.prototype);
|
|
1410
|
+
}
|
|
1411
|
+
}
|
|
1412
|
+
class InvalidServiceError extends WebrpcError {
|
|
1413
|
+
constructor(name = 'InvalidService', code = 1104, message = `Service not enabled for Access key`, status = 0, cause) {
|
|
1414
|
+
super(name, code, message, status, cause);
|
|
1415
|
+
Object.setPrototypeOf(this, InvalidServiceError.prototype);
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
class UnauthorizedUserError extends WebrpcError {
|
|
1419
|
+
constructor(name = 'UnauthorizedUser', code = 1105, message = `Unauthorized user`, status = 0, cause) {
|
|
1420
|
+
super(name, code, message, status, cause);
|
|
1421
|
+
Object.setPrototypeOf(this, UnauthorizedUserError.prototype);
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
class QuotaExceededError extends WebrpcError {
|
|
1425
|
+
constructor(name = 'QuotaExceeded', code = 1200, message = `Quota request exceeded`, status = 0, cause) {
|
|
1426
|
+
super(name, code, message, status, cause);
|
|
1427
|
+
Object.setPrototypeOf(this, QuotaExceededError.prototype);
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
class QuotaRateLimitError extends WebrpcError {
|
|
1431
|
+
constructor(name = 'QuotaRateLimit', code = 1201, message = `Quota rate limit exceeded`, status = 0, cause) {
|
|
1432
|
+
super(name, code, message, status, cause);
|
|
1433
|
+
Object.setPrototypeOf(this, QuotaRateLimitError.prototype);
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
class NoDefaultKeyError extends WebrpcError {
|
|
1437
|
+
constructor(name = 'NoDefaultKey', code = 1300, message = `No default access key found`, status = 0, cause) {
|
|
1438
|
+
super(name, code, message, status, cause);
|
|
1439
|
+
Object.setPrototypeOf(this, NoDefaultKeyError.prototype);
|
|
1440
|
+
}
|
|
1441
|
+
}
|
|
1442
|
+
class MaxAccessKeysError extends WebrpcError {
|
|
1443
|
+
constructor(name = 'MaxAccessKeys', code = 1301, message = `Access keys limit reached`, status = 0, cause) {
|
|
1444
|
+
super(name, code, message, status, cause);
|
|
1445
|
+
Object.setPrototypeOf(this, MaxAccessKeysError.prototype);
|
|
1446
|
+
}
|
|
1447
|
+
}
|
|
1448
|
+
class AtLeastOneKeyError extends WebrpcError {
|
|
1449
|
+
constructor(name = 'AtLeastOneKey', code = 1302, message = `You need at least one Access Key`, status = 0, cause) {
|
|
1450
|
+
super(name, code, message, status, cause);
|
|
1451
|
+
Object.setPrototypeOf(this, AtLeastOneKeyError.prototype);
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
class TimeoutError extends WebrpcError {
|
|
1455
|
+
constructor(name = 'Timeout', code = 1900, message = `Request timed out`, status = 0, cause) {
|
|
1456
|
+
super(name, code, message, status, cause);
|
|
1457
|
+
Object.setPrototypeOf(this, TimeoutError.prototype);
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1079
1460
|
class InvalidArgumentError extends WebrpcError {
|
|
1080
|
-
constructor(name = 'InvalidArgument', code = 2000, message =
|
|
1461
|
+
constructor(name = 'InvalidArgument', code = 2000, message = `Invalid argument`, status = 0, cause) {
|
|
1081
1462
|
super(name, code, message, status, cause);
|
|
1082
1463
|
Object.setPrototypeOf(this, InvalidArgumentError.prototype);
|
|
1083
1464
|
}
|
|
1084
1465
|
}
|
|
1085
1466
|
class UnavailableError extends WebrpcError {
|
|
1086
|
-
constructor(name = 'Unavailable', code = 2002, message =
|
|
1467
|
+
constructor(name = 'Unavailable', code = 2002, message = `Unavailable resource`, status = 0, cause) {
|
|
1087
1468
|
super(name, code, message, status, cause);
|
|
1088
1469
|
Object.setPrototypeOf(this, UnavailableError.prototype);
|
|
1089
1470
|
}
|
|
1090
1471
|
}
|
|
1091
1472
|
class QueryFailedError extends WebrpcError {
|
|
1092
|
-
constructor(name = 'QueryFailed', code = 2003, message =
|
|
1473
|
+
constructor(name = 'QueryFailed', code = 2003, message = `Query failed`, status = 0, cause) {
|
|
1093
1474
|
super(name, code, message, status, cause);
|
|
1094
1475
|
Object.setPrototypeOf(this, QueryFailedError.prototype);
|
|
1095
1476
|
}
|
|
1096
1477
|
}
|
|
1097
1478
|
class NotFoundError extends WebrpcError {
|
|
1098
|
-
constructor(name = 'NotFound', code = 3000, message =
|
|
1479
|
+
constructor(name = 'NotFound', code = 3000, message = `Resource not found`, status = 0, cause) {
|
|
1099
1480
|
super(name, code, message, status, cause);
|
|
1100
1481
|
Object.setPrototypeOf(this, NotFoundError.prototype);
|
|
1101
1482
|
}
|
|
1102
1483
|
}
|
|
1484
|
+
class UnsupportedNetworkError extends WebrpcError {
|
|
1485
|
+
constructor(name = 'UnsupportedNetwork', code = 3008, message = `Unsupported network`, status = 0, cause) {
|
|
1486
|
+
super(name, code, message, status, cause);
|
|
1487
|
+
Object.setPrototypeOf(this, UnsupportedNetworkError.prototype);
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1103
1490
|
let errors = /*#__PURE__*/function (errors) {
|
|
1104
1491
|
errors["WebrpcEndpoint"] = "WebrpcEndpoint";
|
|
1105
1492
|
errors["WebrpcRequestFailed"] = "WebrpcRequestFailed";
|
|
@@ -1115,14 +1502,69 @@ let errors = /*#__PURE__*/function (errors) {
|
|
|
1115
1502
|
errors["Unauthorized"] = "Unauthorized";
|
|
1116
1503
|
errors["PermissionDenied"] = "PermissionDenied";
|
|
1117
1504
|
errors["SessionExpired"] = "SessionExpired";
|
|
1505
|
+
errors["MethodNotFound"] = "MethodNotFound";
|
|
1506
|
+
errors["RequestConflict"] = "RequestConflict";
|
|
1118
1507
|
errors["Aborted"] = "Aborted";
|
|
1119
1508
|
errors["Geoblocked"] = "Geoblocked";
|
|
1509
|
+
errors["RateLimited"] = "RateLimited";
|
|
1510
|
+
errors["ProjectNotFound"] = "ProjectNotFound";
|
|
1511
|
+
errors["AccessKeyNotFound"] = "AccessKeyNotFound";
|
|
1512
|
+
errors["AccessKeyMismatch"] = "AccessKeyMismatch";
|
|
1513
|
+
errors["InvalidOrigin"] = "InvalidOrigin";
|
|
1514
|
+
errors["InvalidService"] = "InvalidService";
|
|
1515
|
+
errors["UnauthorizedUser"] = "UnauthorizedUser";
|
|
1516
|
+
errors["QuotaExceeded"] = "QuotaExceeded";
|
|
1517
|
+
errors["QuotaRateLimit"] = "QuotaRateLimit";
|
|
1518
|
+
errors["NoDefaultKey"] = "NoDefaultKey";
|
|
1519
|
+
errors["MaxAccessKeys"] = "MaxAccessKeys";
|
|
1520
|
+
errors["AtLeastOneKey"] = "AtLeastOneKey";
|
|
1521
|
+
errors["Timeout"] = "Timeout";
|
|
1120
1522
|
errors["InvalidArgument"] = "InvalidArgument";
|
|
1121
1523
|
errors["Unavailable"] = "Unavailable";
|
|
1122
1524
|
errors["QueryFailed"] = "QueryFailed";
|
|
1123
1525
|
errors["NotFound"] = "NotFound";
|
|
1526
|
+
errors["UnsupportedNetwork"] = "UnsupportedNetwork";
|
|
1124
1527
|
return errors;
|
|
1125
1528
|
}({});
|
|
1529
|
+
let WebrpcErrorCodes = /*#__PURE__*/function (WebrpcErrorCodes) {
|
|
1530
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcEndpoint"] = 0] = "WebrpcEndpoint";
|
|
1531
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcRequestFailed"] = -1] = "WebrpcRequestFailed";
|
|
1532
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadRoute"] = -2] = "WebrpcBadRoute";
|
|
1533
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadMethod"] = -3] = "WebrpcBadMethod";
|
|
1534
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadRequest"] = -4] = "WebrpcBadRequest";
|
|
1535
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadResponse"] = -5] = "WebrpcBadResponse";
|
|
1536
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcServerPanic"] = -6] = "WebrpcServerPanic";
|
|
1537
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcInternalError"] = -7] = "WebrpcInternalError";
|
|
1538
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcClientDisconnected"] = -8] = "WebrpcClientDisconnected";
|
|
1539
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcStreamLost"] = -9] = "WebrpcStreamLost";
|
|
1540
|
+
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcStreamFinished"] = -10] = "WebrpcStreamFinished";
|
|
1541
|
+
WebrpcErrorCodes[WebrpcErrorCodes["Unauthorized"] = 1000] = "Unauthorized";
|
|
1542
|
+
WebrpcErrorCodes[WebrpcErrorCodes["PermissionDenied"] = 1001] = "PermissionDenied";
|
|
1543
|
+
WebrpcErrorCodes[WebrpcErrorCodes["SessionExpired"] = 1002] = "SessionExpired";
|
|
1544
|
+
WebrpcErrorCodes[WebrpcErrorCodes["MethodNotFound"] = 1003] = "MethodNotFound";
|
|
1545
|
+
WebrpcErrorCodes[WebrpcErrorCodes["RequestConflict"] = 1004] = "RequestConflict";
|
|
1546
|
+
WebrpcErrorCodes[WebrpcErrorCodes["Aborted"] = 1005] = "Aborted";
|
|
1547
|
+
WebrpcErrorCodes[WebrpcErrorCodes["Geoblocked"] = 1006] = "Geoblocked";
|
|
1548
|
+
WebrpcErrorCodes[WebrpcErrorCodes["RateLimited"] = 1007] = "RateLimited";
|
|
1549
|
+
WebrpcErrorCodes[WebrpcErrorCodes["ProjectNotFound"] = 1008] = "ProjectNotFound";
|
|
1550
|
+
WebrpcErrorCodes[WebrpcErrorCodes["AccessKeyNotFound"] = 1101] = "AccessKeyNotFound";
|
|
1551
|
+
WebrpcErrorCodes[WebrpcErrorCodes["AccessKeyMismatch"] = 1102] = "AccessKeyMismatch";
|
|
1552
|
+
WebrpcErrorCodes[WebrpcErrorCodes["InvalidOrigin"] = 1103] = "InvalidOrigin";
|
|
1553
|
+
WebrpcErrorCodes[WebrpcErrorCodes["InvalidService"] = 1104] = "InvalidService";
|
|
1554
|
+
WebrpcErrorCodes[WebrpcErrorCodes["UnauthorizedUser"] = 1105] = "UnauthorizedUser";
|
|
1555
|
+
WebrpcErrorCodes[WebrpcErrorCodes["QuotaExceeded"] = 1200] = "QuotaExceeded";
|
|
1556
|
+
WebrpcErrorCodes[WebrpcErrorCodes["QuotaRateLimit"] = 1201] = "QuotaRateLimit";
|
|
1557
|
+
WebrpcErrorCodes[WebrpcErrorCodes["NoDefaultKey"] = 1300] = "NoDefaultKey";
|
|
1558
|
+
WebrpcErrorCodes[WebrpcErrorCodes["MaxAccessKeys"] = 1301] = "MaxAccessKeys";
|
|
1559
|
+
WebrpcErrorCodes[WebrpcErrorCodes["AtLeastOneKey"] = 1302] = "AtLeastOneKey";
|
|
1560
|
+
WebrpcErrorCodes[WebrpcErrorCodes["Timeout"] = 1900] = "Timeout";
|
|
1561
|
+
WebrpcErrorCodes[WebrpcErrorCodes["InvalidArgument"] = 2000] = "InvalidArgument";
|
|
1562
|
+
WebrpcErrorCodes[WebrpcErrorCodes["Unavailable"] = 2002] = "Unavailable";
|
|
1563
|
+
WebrpcErrorCodes[WebrpcErrorCodes["QueryFailed"] = 2003] = "QueryFailed";
|
|
1564
|
+
WebrpcErrorCodes[WebrpcErrorCodes["NotFound"] = 3000] = "NotFound";
|
|
1565
|
+
WebrpcErrorCodes[WebrpcErrorCodes["UnsupportedNetwork"] = 3008] = "UnsupportedNetwork";
|
|
1566
|
+
return WebrpcErrorCodes;
|
|
1567
|
+
}({});
|
|
1126
1568
|
const webrpcErrorByCode = {
|
|
1127
1569
|
[0]: WebrpcEndpointError,
|
|
1128
1570
|
[-1]: WebrpcRequestFailedError,
|
|
@@ -1138,12 +1580,28 @@ const webrpcErrorByCode = {
|
|
|
1138
1580
|
[1000]: UnauthorizedError,
|
|
1139
1581
|
[1001]: PermissionDeniedError,
|
|
1140
1582
|
[1002]: SessionExpiredError,
|
|
1583
|
+
[1003]: MethodNotFoundError,
|
|
1584
|
+
[1004]: RequestConflictError,
|
|
1141
1585
|
[1005]: AbortedError,
|
|
1142
1586
|
[1006]: GeoblockedError,
|
|
1587
|
+
[1007]: RateLimitedError,
|
|
1588
|
+
[1008]: ProjectNotFoundError,
|
|
1589
|
+
[1101]: AccessKeyNotFoundError,
|
|
1590
|
+
[1102]: AccessKeyMismatchError,
|
|
1591
|
+
[1103]: InvalidOriginError,
|
|
1592
|
+
[1104]: InvalidServiceError,
|
|
1593
|
+
[1105]: UnauthorizedUserError,
|
|
1594
|
+
[1200]: QuotaExceededError,
|
|
1595
|
+
[1201]: QuotaRateLimitError,
|
|
1596
|
+
[1300]: NoDefaultKeyError,
|
|
1597
|
+
[1301]: MaxAccessKeysError,
|
|
1598
|
+
[1302]: AtLeastOneKeyError,
|
|
1599
|
+
[1900]: TimeoutError,
|
|
1143
1600
|
[2000]: InvalidArgumentError,
|
|
1144
1601
|
[2002]: UnavailableError,
|
|
1145
1602
|
[2003]: QueryFailedError,
|
|
1146
|
-
[3000]: NotFoundError
|
|
1603
|
+
[3000]: NotFoundError,
|
|
1604
|
+
[3008]: UnsupportedNetworkError
|
|
1147
1605
|
};
|
|
1148
1606
|
|
|
1149
1607
|
class SequenceAPIClient extends API {
|
|
@@ -1174,19 +1632,41 @@ class SequenceAPIClient extends API {
|
|
|
1174
1632
|
|
|
1175
1633
|
exports.API = API;
|
|
1176
1634
|
exports.AbortedError = AbortedError;
|
|
1635
|
+
exports.AccessKeyMismatchError = AccessKeyMismatchError;
|
|
1636
|
+
exports.AccessKeyNotFoundError = AccessKeyNotFoundError;
|
|
1637
|
+
exports.AtLeastOneKeyError = AtLeastOneKeyError;
|
|
1638
|
+
exports.CheckoutOptionCrypto = CheckoutOptionCrypto;
|
|
1639
|
+
exports.CheckoutOptionNFTCheckoutProvider = CheckoutOptionNFTCheckoutProvider;
|
|
1640
|
+
exports.CheckoutOptionOnRampProvider = CheckoutOptionOnRampProvider;
|
|
1641
|
+
exports.CheckoutOptionSwapProvider = CheckoutOptionSwapProvider;
|
|
1177
1642
|
exports.GeoblockedError = GeoblockedError;
|
|
1178
1643
|
exports.InvalidArgumentError = InvalidArgumentError;
|
|
1644
|
+
exports.InvalidOriginError = InvalidOriginError;
|
|
1645
|
+
exports.InvalidServiceError = InvalidServiceError;
|
|
1646
|
+
exports.MaxAccessKeysError = MaxAccessKeysError;
|
|
1647
|
+
exports.MethodNotFoundError = MethodNotFoundError;
|
|
1648
|
+
exports.NoDefaultKeyError = NoDefaultKeyError;
|
|
1179
1649
|
exports.NotFoundError = NotFoundError;
|
|
1180
1650
|
exports.PermissionDeniedError = PermissionDeniedError;
|
|
1651
|
+
exports.ProjectNotFoundError = ProjectNotFoundError;
|
|
1181
1652
|
exports.QueryFailedError = QueryFailedError;
|
|
1653
|
+
exports.QuotaExceededError = QuotaExceededError;
|
|
1654
|
+
exports.QuotaRateLimitError = QuotaRateLimitError;
|
|
1655
|
+
exports.RateLimitedError = RateLimitedError;
|
|
1656
|
+
exports.RequestConflictError = RequestConflictError;
|
|
1182
1657
|
exports.SardinePaymentType = SardinePaymentType;
|
|
1183
1658
|
exports.SardineQuoteType = SardineQuoteType;
|
|
1184
1659
|
exports.SequenceAPIClient = SequenceAPIClient;
|
|
1185
1660
|
exports.SessionExpiredError = SessionExpiredError;
|
|
1186
1661
|
exports.SortOrder = SortOrder;
|
|
1662
|
+
exports.TimeoutError = TimeoutError;
|
|
1187
1663
|
exports.TokenType = TokenType;
|
|
1664
|
+
exports.TransakBuySell = TransakBuySell;
|
|
1188
1665
|
exports.UnauthorizedError = UnauthorizedError;
|
|
1666
|
+
exports.UnauthorizedUserError = UnauthorizedUserError;
|
|
1189
1667
|
exports.UnavailableError = UnavailableError;
|
|
1668
|
+
exports.UnsupportedNetworkError = UnsupportedNetworkError;
|
|
1669
|
+
exports.VersionFromHeader = VersionFromHeader;
|
|
1190
1670
|
exports.WebRPCSchemaHash = WebRPCSchemaHash;
|
|
1191
1671
|
exports.WebRPCSchemaVersion = WebRPCSchemaVersion;
|
|
1192
1672
|
exports.WebRPCVersion = WebRPCVersion;
|
|
@@ -1197,9 +1677,13 @@ exports.WebrpcBadRouteError = WebrpcBadRouteError;
|
|
|
1197
1677
|
exports.WebrpcClientDisconnectedError = WebrpcClientDisconnectedError;
|
|
1198
1678
|
exports.WebrpcEndpointError = WebrpcEndpointError;
|
|
1199
1679
|
exports.WebrpcError = WebrpcError;
|
|
1680
|
+
exports.WebrpcErrorCodes = WebrpcErrorCodes;
|
|
1681
|
+
exports.WebrpcHeader = WebrpcHeader;
|
|
1682
|
+
exports.WebrpcHeaderValue = WebrpcHeaderValue;
|
|
1200
1683
|
exports.WebrpcInternalErrorError = WebrpcInternalErrorError;
|
|
1201
1684
|
exports.WebrpcRequestFailedError = WebrpcRequestFailedError;
|
|
1202
1685
|
exports.WebrpcServerPanicError = WebrpcServerPanicError;
|
|
1203
1686
|
exports.WebrpcStreamFinishedError = WebrpcStreamFinishedError;
|
|
1204
1687
|
exports.WebrpcStreamLostError = WebrpcStreamLostError;
|
|
1205
1688
|
exports.errors = errors;
|
|
1689
|
+
exports.webrpcErrorByCode = webrpcErrorByCode;
|