@0xsequence/api 0.0.0-20241216114019 → 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 +489 -49
- package/dist/0xsequence-api.cjs.prod.js +489 -49
- package/dist/0xsequence-api.esm.js +464 -50
- package/dist/declarations/src/api.gen.d.ts +593 -42
- package/package.json +1 -1
- package/src/api.gen.ts +2087 -1310
|
@@ -3,35 +3,68 @@
|
|
|
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 db246758d7ea850abc8ab1cb76d5ac014944b0bd
|
|
22
17
|
// --
|
|
23
|
-
// Code generated by webrpc-gen@v0.
|
|
18
|
+
// Code generated by webrpc-gen@v0.25.3 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
|
|
|
22
|
+
const WebrpcHeader = "Webrpc";
|
|
23
|
+
const WebrpcHeaderValue = "webrpc@v0.25.3;gen-typescript@v0.17.0;sequence-api@v0.4.0";
|
|
24
|
+
|
|
27
25
|
// WebRPC description and code-gen version
|
|
28
|
-
const WebRPCVersion =
|
|
26
|
+
const WebRPCVersion = "v1";
|
|
29
27
|
|
|
30
28
|
// Schema version of your RIDL schema
|
|
31
|
-
const WebRPCSchemaVersion =
|
|
29
|
+
const WebRPCSchemaVersion = "v0.4.0";
|
|
32
30
|
|
|
33
31
|
// Schema hash generated from your RIDL schema
|
|
34
|
-
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
|
+
}
|
|
35
68
|
|
|
36
69
|
//
|
|
37
70
|
// Types
|
|
@@ -62,6 +95,35 @@ let TokenType = /*#__PURE__*/function (TokenType) {
|
|
|
62
95
|
TokenType["ERC1155"] = "ERC1155";
|
|
63
96
|
return TokenType;
|
|
64
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
|
+
}({});
|
|
65
127
|
//
|
|
66
128
|
// Client
|
|
67
129
|
//
|
|
@@ -536,6 +598,19 @@ class API {
|
|
|
536
598
|
});
|
|
537
599
|
});
|
|
538
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
|
+
};
|
|
539
614
|
this.sardineGetEnabledTokens = (headers, signal) => {
|
|
540
615
|
return this.fetch(this.url('SardineGetEnabledTokens'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
541
616
|
return buildResponse(res).then(_data => {
|
|
@@ -601,6 +676,71 @@ class API {
|
|
|
601
676
|
});
|
|
602
677
|
});
|
|
603
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
|
+
};
|
|
604
744
|
this.getCoinPrices = (args, headers, signal) => {
|
|
605
745
|
return this.fetch(this.url('GetCoinPrices'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
606
746
|
return buildResponse(res).then(_data => {
|
|
@@ -810,11 +950,12 @@ class API {
|
|
|
810
950
|
});
|
|
811
951
|
});
|
|
812
952
|
};
|
|
813
|
-
this.
|
|
814
|
-
return this.fetch(this.url('
|
|
953
|
+
this.listAdoptedWallets = (args, headers, signal) => {
|
|
954
|
+
return this.fetch(this.url('ListAdoptedWallets'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
815
955
|
return buildResponse(res).then(_data => {
|
|
816
956
|
return {
|
|
817
|
-
|
|
957
|
+
page: _data.page,
|
|
958
|
+
wallets: _data.wallets
|
|
818
959
|
};
|
|
819
960
|
});
|
|
820
961
|
}, error => {
|
|
@@ -823,11 +964,11 @@ class API {
|
|
|
823
964
|
});
|
|
824
965
|
});
|
|
825
966
|
};
|
|
826
|
-
this.
|
|
827
|
-
return this.fetch(this.url('
|
|
967
|
+
this.getLifiChains = (headers, signal) => {
|
|
968
|
+
return this.fetch(this.url('GetLifiChains'), createHTTPRequest({}, headers, signal)).then(res => {
|
|
828
969
|
return buildResponse(res).then(_data => {
|
|
829
970
|
return {
|
|
830
|
-
|
|
971
|
+
chains: _data.chains
|
|
831
972
|
};
|
|
832
973
|
});
|
|
833
974
|
}, error => {
|
|
@@ -836,11 +977,37 @@ class API {
|
|
|
836
977
|
});
|
|
837
978
|
});
|
|
838
979
|
};
|
|
839
|
-
this.
|
|
840
|
-
return this.fetch(this.url('
|
|
980
|
+
this.getLifiTokens = (args, headers, signal) => {
|
|
981
|
+
return this.fetch(this.url('GetLifiTokens'), createHTTPRequest(args, headers, signal)).then(res => {
|
|
841
982
|
return buildResponse(res).then(_data => {
|
|
842
983
|
return {
|
|
843
|
-
|
|
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
|
|
844
1011
|
};
|
|
845
1012
|
});
|
|
846
1013
|
}, error => {
|
|
@@ -952,6 +1119,84 @@ class API {
|
|
|
952
1119
|
});
|
|
953
1120
|
});
|
|
954
1121
|
};
|
|
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
|
+
};
|
|
955
1200
|
this.hostname = hostname.replace(/\/*$/, '');
|
|
956
1201
|
this.fetch = (input, init) => fetch(input, init);
|
|
957
1202
|
}
|
|
@@ -960,11 +1205,13 @@ class API {
|
|
|
960
1205
|
}
|
|
961
1206
|
}
|
|
962
1207
|
const createHTTPRequest = (body = {}, headers = {}, signal = null) => {
|
|
1208
|
+
const reqHeaders = _extends({}, headers, {
|
|
1209
|
+
'Content-Type': 'application/json'
|
|
1210
|
+
});
|
|
1211
|
+
reqHeaders[WebrpcHeader] = WebrpcHeaderValue;
|
|
963
1212
|
return {
|
|
964
1213
|
method: 'POST',
|
|
965
|
-
headers:
|
|
966
|
-
'Content-Type': 'application/json'
|
|
967
|
-
}),
|
|
1214
|
+
headers: reqHeaders,
|
|
968
1215
|
body: JSON.stringify(body || {}),
|
|
969
1216
|
signal
|
|
970
1217
|
};
|
|
@@ -1022,67 +1269,67 @@ class WebrpcError extends Error {
|
|
|
1022
1269
|
// Webrpc errors
|
|
1023
1270
|
|
|
1024
1271
|
class WebrpcEndpointError extends WebrpcError {
|
|
1025
|
-
constructor(name = 'WebrpcEndpoint', code = 0, message =
|
|
1272
|
+
constructor(name = 'WebrpcEndpoint', code = 0, message = `endpoint error`, status = 0, cause) {
|
|
1026
1273
|
super(name, code, message, status, cause);
|
|
1027
1274
|
Object.setPrototypeOf(this, WebrpcEndpointError.prototype);
|
|
1028
1275
|
}
|
|
1029
1276
|
}
|
|
1030
1277
|
class WebrpcRequestFailedError extends WebrpcError {
|
|
1031
|
-
constructor(name = 'WebrpcRequestFailed', code = -1, message =
|
|
1278
|
+
constructor(name = 'WebrpcRequestFailed', code = -1, message = `request failed`, status = 0, cause) {
|
|
1032
1279
|
super(name, code, message, status, cause);
|
|
1033
1280
|
Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype);
|
|
1034
1281
|
}
|
|
1035
1282
|
}
|
|
1036
1283
|
class WebrpcBadRouteError extends WebrpcError {
|
|
1037
|
-
constructor(name = 'WebrpcBadRoute', code = -2, message =
|
|
1284
|
+
constructor(name = 'WebrpcBadRoute', code = -2, message = `bad route`, status = 0, cause) {
|
|
1038
1285
|
super(name, code, message, status, cause);
|
|
1039
1286
|
Object.setPrototypeOf(this, WebrpcBadRouteError.prototype);
|
|
1040
1287
|
}
|
|
1041
1288
|
}
|
|
1042
1289
|
class WebrpcBadMethodError extends WebrpcError {
|
|
1043
|
-
constructor(name = 'WebrpcBadMethod', code = -3, message =
|
|
1290
|
+
constructor(name = 'WebrpcBadMethod', code = -3, message = `bad method`, status = 0, cause) {
|
|
1044
1291
|
super(name, code, message, status, cause);
|
|
1045
1292
|
Object.setPrototypeOf(this, WebrpcBadMethodError.prototype);
|
|
1046
1293
|
}
|
|
1047
1294
|
}
|
|
1048
1295
|
class WebrpcBadRequestError extends WebrpcError {
|
|
1049
|
-
constructor(name = 'WebrpcBadRequest', code = -4, message =
|
|
1296
|
+
constructor(name = 'WebrpcBadRequest', code = -4, message = `bad request`, status = 0, cause) {
|
|
1050
1297
|
super(name, code, message, status, cause);
|
|
1051
1298
|
Object.setPrototypeOf(this, WebrpcBadRequestError.prototype);
|
|
1052
1299
|
}
|
|
1053
1300
|
}
|
|
1054
1301
|
class WebrpcBadResponseError extends WebrpcError {
|
|
1055
|
-
constructor(name = 'WebrpcBadResponse', code = -5, message =
|
|
1302
|
+
constructor(name = 'WebrpcBadResponse', code = -5, message = `bad response`, status = 0, cause) {
|
|
1056
1303
|
super(name, code, message, status, cause);
|
|
1057
1304
|
Object.setPrototypeOf(this, WebrpcBadResponseError.prototype);
|
|
1058
1305
|
}
|
|
1059
1306
|
}
|
|
1060
1307
|
class WebrpcServerPanicError extends WebrpcError {
|
|
1061
|
-
constructor(name = 'WebrpcServerPanic', code = -6, message =
|
|
1308
|
+
constructor(name = 'WebrpcServerPanic', code = -6, message = `server panic`, status = 0, cause) {
|
|
1062
1309
|
super(name, code, message, status, cause);
|
|
1063
1310
|
Object.setPrototypeOf(this, WebrpcServerPanicError.prototype);
|
|
1064
1311
|
}
|
|
1065
1312
|
}
|
|
1066
1313
|
class WebrpcInternalErrorError extends WebrpcError {
|
|
1067
|
-
constructor(name = 'WebrpcInternalError', code = -7, message =
|
|
1314
|
+
constructor(name = 'WebrpcInternalError', code = -7, message = `internal error`, status = 0, cause) {
|
|
1068
1315
|
super(name, code, message, status, cause);
|
|
1069
1316
|
Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype);
|
|
1070
1317
|
}
|
|
1071
1318
|
}
|
|
1072
1319
|
class WebrpcClientDisconnectedError extends WebrpcError {
|
|
1073
|
-
constructor(name = 'WebrpcClientDisconnected', code = -8, message =
|
|
1320
|
+
constructor(name = 'WebrpcClientDisconnected', code = -8, message = `client disconnected`, status = 0, cause) {
|
|
1074
1321
|
super(name, code, message, status, cause);
|
|
1075
1322
|
Object.setPrototypeOf(this, WebrpcClientDisconnectedError.prototype);
|
|
1076
1323
|
}
|
|
1077
1324
|
}
|
|
1078
1325
|
class WebrpcStreamLostError extends WebrpcError {
|
|
1079
|
-
constructor(name = 'WebrpcStreamLost', code = -9, message =
|
|
1326
|
+
constructor(name = 'WebrpcStreamLost', code = -9, message = `stream lost`, status = 0, cause) {
|
|
1080
1327
|
super(name, code, message, status, cause);
|
|
1081
1328
|
Object.setPrototypeOf(this, WebrpcStreamLostError.prototype);
|
|
1082
1329
|
}
|
|
1083
1330
|
}
|
|
1084
1331
|
class WebrpcStreamFinishedError extends WebrpcError {
|
|
1085
|
-
constructor(name = 'WebrpcStreamFinished', code = -10, message =
|
|
1332
|
+
constructor(name = 'WebrpcStreamFinished', code = -10, message = `stream finished`, status = 0, cause) {
|
|
1086
1333
|
super(name, code, message, status, cause);
|
|
1087
1334
|
Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype);
|
|
1088
1335
|
}
|
|
@@ -1091,59 +1338,155 @@ class WebrpcStreamFinishedError extends WebrpcError {
|
|
|
1091
1338
|
// Schema errors
|
|
1092
1339
|
|
|
1093
1340
|
class UnauthorizedError extends WebrpcError {
|
|
1094
|
-
constructor(name = 'Unauthorized', code = 1000, message =
|
|
1341
|
+
constructor(name = 'Unauthorized', code = 1000, message = `Unauthorized access`, status = 0, cause) {
|
|
1095
1342
|
super(name, code, message, status, cause);
|
|
1096
1343
|
Object.setPrototypeOf(this, UnauthorizedError.prototype);
|
|
1097
1344
|
}
|
|
1098
1345
|
}
|
|
1099
1346
|
class PermissionDeniedError extends WebrpcError {
|
|
1100
|
-
constructor(name = 'PermissionDenied', code = 1001, message =
|
|
1347
|
+
constructor(name = 'PermissionDenied', code = 1001, message = `Permission denied`, status = 0, cause) {
|
|
1101
1348
|
super(name, code, message, status, cause);
|
|
1102
1349
|
Object.setPrototypeOf(this, PermissionDeniedError.prototype);
|
|
1103
1350
|
}
|
|
1104
1351
|
}
|
|
1105
1352
|
class SessionExpiredError extends WebrpcError {
|
|
1106
|
-
constructor(name = 'SessionExpired', code = 1002, message =
|
|
1353
|
+
constructor(name = 'SessionExpired', code = 1002, message = `Session expired`, status = 0, cause) {
|
|
1107
1354
|
super(name, code, message, status, cause);
|
|
1108
1355
|
Object.setPrototypeOf(this, SessionExpiredError.prototype);
|
|
1109
1356
|
}
|
|
1110
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
|
+
}
|
|
1111
1370
|
class AbortedError extends WebrpcError {
|
|
1112
|
-
constructor(name = 'Aborted', code = 1005, message =
|
|
1371
|
+
constructor(name = 'Aborted', code = 1005, message = `Request aborted`, status = 0, cause) {
|
|
1113
1372
|
super(name, code, message, status, cause);
|
|
1114
1373
|
Object.setPrototypeOf(this, AbortedError.prototype);
|
|
1115
1374
|
}
|
|
1116
1375
|
}
|
|
1117
1376
|
class GeoblockedError extends WebrpcError {
|
|
1118
|
-
constructor(name = 'Geoblocked', code = 1006, message =
|
|
1377
|
+
constructor(name = 'Geoblocked', code = 1006, message = `Geoblocked region`, status = 0, cause) {
|
|
1119
1378
|
super(name, code, message, status, cause);
|
|
1120
1379
|
Object.setPrototypeOf(this, GeoblockedError.prototype);
|
|
1121
1380
|
}
|
|
1122
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
|
+
}
|
|
1123
1460
|
class InvalidArgumentError extends WebrpcError {
|
|
1124
|
-
constructor(name = 'InvalidArgument', code = 2000, message =
|
|
1461
|
+
constructor(name = 'InvalidArgument', code = 2000, message = `Invalid argument`, status = 0, cause) {
|
|
1125
1462
|
super(name, code, message, status, cause);
|
|
1126
1463
|
Object.setPrototypeOf(this, InvalidArgumentError.prototype);
|
|
1127
1464
|
}
|
|
1128
1465
|
}
|
|
1129
1466
|
class UnavailableError extends WebrpcError {
|
|
1130
|
-
constructor(name = 'Unavailable', code = 2002, message =
|
|
1467
|
+
constructor(name = 'Unavailable', code = 2002, message = `Unavailable resource`, status = 0, cause) {
|
|
1131
1468
|
super(name, code, message, status, cause);
|
|
1132
1469
|
Object.setPrototypeOf(this, UnavailableError.prototype);
|
|
1133
1470
|
}
|
|
1134
1471
|
}
|
|
1135
1472
|
class QueryFailedError extends WebrpcError {
|
|
1136
|
-
constructor(name = 'QueryFailed', code = 2003, message =
|
|
1473
|
+
constructor(name = 'QueryFailed', code = 2003, message = `Query failed`, status = 0, cause) {
|
|
1137
1474
|
super(name, code, message, status, cause);
|
|
1138
1475
|
Object.setPrototypeOf(this, QueryFailedError.prototype);
|
|
1139
1476
|
}
|
|
1140
1477
|
}
|
|
1141
1478
|
class NotFoundError extends WebrpcError {
|
|
1142
|
-
constructor(name = 'NotFound', code = 3000, message =
|
|
1479
|
+
constructor(name = 'NotFound', code = 3000, message = `Resource not found`, status = 0, cause) {
|
|
1143
1480
|
super(name, code, message, status, cause);
|
|
1144
1481
|
Object.setPrototypeOf(this, NotFoundError.prototype);
|
|
1145
1482
|
}
|
|
1146
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
|
+
}
|
|
1147
1490
|
let errors = /*#__PURE__*/function (errors) {
|
|
1148
1491
|
errors["WebrpcEndpoint"] = "WebrpcEndpoint";
|
|
1149
1492
|
errors["WebrpcRequestFailed"] = "WebrpcRequestFailed";
|
|
@@ -1159,14 +1502,69 @@ let errors = /*#__PURE__*/function (errors) {
|
|
|
1159
1502
|
errors["Unauthorized"] = "Unauthorized";
|
|
1160
1503
|
errors["PermissionDenied"] = "PermissionDenied";
|
|
1161
1504
|
errors["SessionExpired"] = "SessionExpired";
|
|
1505
|
+
errors["MethodNotFound"] = "MethodNotFound";
|
|
1506
|
+
errors["RequestConflict"] = "RequestConflict";
|
|
1162
1507
|
errors["Aborted"] = "Aborted";
|
|
1163
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";
|
|
1164
1522
|
errors["InvalidArgument"] = "InvalidArgument";
|
|
1165
1523
|
errors["Unavailable"] = "Unavailable";
|
|
1166
1524
|
errors["QueryFailed"] = "QueryFailed";
|
|
1167
1525
|
errors["NotFound"] = "NotFound";
|
|
1526
|
+
errors["UnsupportedNetwork"] = "UnsupportedNetwork";
|
|
1168
1527
|
return errors;
|
|
1169
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
|
+
}({});
|
|
1170
1568
|
const webrpcErrorByCode = {
|
|
1171
1569
|
[0]: WebrpcEndpointError,
|
|
1172
1570
|
[-1]: WebrpcRequestFailedError,
|
|
@@ -1182,12 +1580,28 @@ const webrpcErrorByCode = {
|
|
|
1182
1580
|
[1000]: UnauthorizedError,
|
|
1183
1581
|
[1001]: PermissionDeniedError,
|
|
1184
1582
|
[1002]: SessionExpiredError,
|
|
1583
|
+
[1003]: MethodNotFoundError,
|
|
1584
|
+
[1004]: RequestConflictError,
|
|
1185
1585
|
[1005]: AbortedError,
|
|
1186
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,
|
|
1187
1600
|
[2000]: InvalidArgumentError,
|
|
1188
1601
|
[2002]: UnavailableError,
|
|
1189
1602
|
[2003]: QueryFailedError,
|
|
1190
|
-
[3000]: NotFoundError
|
|
1603
|
+
[3000]: NotFoundError,
|
|
1604
|
+
[3008]: UnsupportedNetworkError
|
|
1191
1605
|
};
|
|
1192
1606
|
|
|
1193
1607
|
class SequenceAPIClient extends API {
|
|
@@ -1218,19 +1632,41 @@ class SequenceAPIClient extends API {
|
|
|
1218
1632
|
|
|
1219
1633
|
exports.API = API;
|
|
1220
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;
|
|
1221
1642
|
exports.GeoblockedError = GeoblockedError;
|
|
1222
1643
|
exports.InvalidArgumentError = InvalidArgumentError;
|
|
1644
|
+
exports.InvalidOriginError = InvalidOriginError;
|
|
1645
|
+
exports.InvalidServiceError = InvalidServiceError;
|
|
1646
|
+
exports.MaxAccessKeysError = MaxAccessKeysError;
|
|
1647
|
+
exports.MethodNotFoundError = MethodNotFoundError;
|
|
1648
|
+
exports.NoDefaultKeyError = NoDefaultKeyError;
|
|
1223
1649
|
exports.NotFoundError = NotFoundError;
|
|
1224
1650
|
exports.PermissionDeniedError = PermissionDeniedError;
|
|
1651
|
+
exports.ProjectNotFoundError = ProjectNotFoundError;
|
|
1225
1652
|
exports.QueryFailedError = QueryFailedError;
|
|
1653
|
+
exports.QuotaExceededError = QuotaExceededError;
|
|
1654
|
+
exports.QuotaRateLimitError = QuotaRateLimitError;
|
|
1655
|
+
exports.RateLimitedError = RateLimitedError;
|
|
1656
|
+
exports.RequestConflictError = RequestConflictError;
|
|
1226
1657
|
exports.SardinePaymentType = SardinePaymentType;
|
|
1227
1658
|
exports.SardineQuoteType = SardineQuoteType;
|
|
1228
1659
|
exports.SequenceAPIClient = SequenceAPIClient;
|
|
1229
1660
|
exports.SessionExpiredError = SessionExpiredError;
|
|
1230
1661
|
exports.SortOrder = SortOrder;
|
|
1662
|
+
exports.TimeoutError = TimeoutError;
|
|
1231
1663
|
exports.TokenType = TokenType;
|
|
1664
|
+
exports.TransakBuySell = TransakBuySell;
|
|
1232
1665
|
exports.UnauthorizedError = UnauthorizedError;
|
|
1666
|
+
exports.UnauthorizedUserError = UnauthorizedUserError;
|
|
1233
1667
|
exports.UnavailableError = UnavailableError;
|
|
1668
|
+
exports.UnsupportedNetworkError = UnsupportedNetworkError;
|
|
1669
|
+
exports.VersionFromHeader = VersionFromHeader;
|
|
1234
1670
|
exports.WebRPCSchemaHash = WebRPCSchemaHash;
|
|
1235
1671
|
exports.WebRPCSchemaVersion = WebRPCSchemaVersion;
|
|
1236
1672
|
exports.WebRPCVersion = WebRPCVersion;
|
|
@@ -1241,9 +1677,13 @@ exports.WebrpcBadRouteError = WebrpcBadRouteError;
|
|
|
1241
1677
|
exports.WebrpcClientDisconnectedError = WebrpcClientDisconnectedError;
|
|
1242
1678
|
exports.WebrpcEndpointError = WebrpcEndpointError;
|
|
1243
1679
|
exports.WebrpcError = WebrpcError;
|
|
1680
|
+
exports.WebrpcErrorCodes = WebrpcErrorCodes;
|
|
1681
|
+
exports.WebrpcHeader = WebrpcHeader;
|
|
1682
|
+
exports.WebrpcHeaderValue = WebrpcHeaderValue;
|
|
1244
1683
|
exports.WebrpcInternalErrorError = WebrpcInternalErrorError;
|
|
1245
1684
|
exports.WebrpcRequestFailedError = WebrpcRequestFailedError;
|
|
1246
1685
|
exports.WebrpcServerPanicError = WebrpcServerPanicError;
|
|
1247
1686
|
exports.WebrpcStreamFinishedError = WebrpcStreamFinishedError;
|
|
1248
1687
|
exports.WebrpcStreamLostError = WebrpcStreamLostError;
|
|
1249
1688
|
exports.errors = errors;
|
|
1689
|
+
exports.webrpcErrorByCode = webrpcErrorByCode;
|