@0xsequence/api 2.3.39 → 3.0.0-beta.10
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/.turbo/turbo-build.log +5 -0
- package/CHANGELOG.md +2214 -0
- package/LICENSE +0 -17
- package/README.md +1 -2
- package/dist/{declarations/src/api.gen.d.ts → api.gen.d.ts} +6 -1
- package/dist/api.gen.d.ts.map +1 -0
- package/dist/api.gen.js +1795 -0
- package/dist/{declarations/src/index.d.ts → index.d.ts} +3 -2
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +46 -0
- package/package.json +19 -13
- package/src/api.gen.ts +980 -634
- package/src/index.ts +1 -1
- package/tsconfig.json +10 -0
- package/dist/0xsequence-api.cjs.d.ts +0 -2
- package/dist/0xsequence-api.cjs.dev.js +0 -1841
- package/dist/0xsequence-api.cjs.js +0 -7
- package/dist/0xsequence-api.cjs.prod.js +0 -1841
- package/dist/0xsequence-api.esm.js +0 -1779
|
@@ -1,1779 +0,0 @@
|
|
|
1
|
-
function _extends() {
|
|
2
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
3
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
4
|
-
var t = arguments[e];
|
|
5
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
6
|
-
}
|
|
7
|
-
return n;
|
|
8
|
-
}, _extends.apply(null, arguments);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/* eslint-disable */
|
|
12
|
-
// sequence-api v0.4.0 c7a95904c3e083c5e5239662c725ee904ab4492a
|
|
13
|
-
// --
|
|
14
|
-
// Code generated by Webrpc-gen@v0.31.0 with typescript generator. DO NOT EDIT.
|
|
15
|
-
//
|
|
16
|
-
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
17
|
-
|
|
18
|
-
// Webrpc description and code-gen version
|
|
19
|
-
const WebrpcVersion = 'v1';
|
|
20
|
-
|
|
21
|
-
// Schema version of your RIDL schema
|
|
22
|
-
const WebrpcSchemaVersion = 'v0.4.0';
|
|
23
|
-
|
|
24
|
-
// Schema hash generated from your RIDL schema
|
|
25
|
-
const WebrpcSchemaHash = 'c7a95904c3e083c5e5239662c725ee904ab4492a';
|
|
26
|
-
|
|
27
|
-
//
|
|
28
|
-
// Client interface
|
|
29
|
-
//
|
|
30
|
-
|
|
31
|
-
//
|
|
32
|
-
// Schema types
|
|
33
|
-
//
|
|
34
|
-
|
|
35
|
-
let SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
36
|
-
SortOrder["DESC"] = "DESC";
|
|
37
|
-
SortOrder["ASC"] = "ASC";
|
|
38
|
-
return SortOrder;
|
|
39
|
-
}({});
|
|
40
|
-
let GetLifiSwapRouteDirection = /*#__PURE__*/function (GetLifiSwapRouteDirection) {
|
|
41
|
-
GetLifiSwapRouteDirection["to"] = "to";
|
|
42
|
-
GetLifiSwapRouteDirection["from"] = "from";
|
|
43
|
-
return GetLifiSwapRouteDirection;
|
|
44
|
-
}({});
|
|
45
|
-
let TokenType = /*#__PURE__*/function (TokenType) {
|
|
46
|
-
TokenType["ERC20"] = "ERC20";
|
|
47
|
-
TokenType["ERC721"] = "ERC721";
|
|
48
|
-
TokenType["ERC1155"] = "ERC1155";
|
|
49
|
-
return TokenType;
|
|
50
|
-
}({});
|
|
51
|
-
let TransakBuySell = /*#__PURE__*/function (TransakBuySell) {
|
|
52
|
-
TransakBuySell["UNKNOWN"] = "UNKNOWN";
|
|
53
|
-
TransakBuySell["BUY"] = "BUY";
|
|
54
|
-
TransakBuySell["SELL"] = "SELL";
|
|
55
|
-
return TransakBuySell;
|
|
56
|
-
}({});
|
|
57
|
-
let TradeType = /*#__PURE__*/function (TradeType) {
|
|
58
|
-
TradeType["EXACT_INPUT"] = "EXACT_INPUT";
|
|
59
|
-
TradeType["EXACT_OUTPUT"] = "EXACT_OUTPUT";
|
|
60
|
-
return TradeType;
|
|
61
|
-
}({});
|
|
62
|
-
let CheckoutOptionCrypto = /*#__PURE__*/function (CheckoutOptionCrypto) {
|
|
63
|
-
CheckoutOptionCrypto["none"] = "none";
|
|
64
|
-
CheckoutOptionCrypto["partially"] = "partially";
|
|
65
|
-
CheckoutOptionCrypto["all"] = "all";
|
|
66
|
-
return CheckoutOptionCrypto;
|
|
67
|
-
}({});
|
|
68
|
-
let CheckoutOptionNFTCheckoutProvider = /*#__PURE__*/function (CheckoutOptionNFTCheckoutProvider) {
|
|
69
|
-
CheckoutOptionNFTCheckoutProvider["unknown"] = "unknown";
|
|
70
|
-
CheckoutOptionNFTCheckoutProvider["transak"] = "transak";
|
|
71
|
-
return CheckoutOptionNFTCheckoutProvider;
|
|
72
|
-
}({});
|
|
73
|
-
let CheckoutOptionOnRampProvider = /*#__PURE__*/function (CheckoutOptionOnRampProvider) {
|
|
74
|
-
CheckoutOptionOnRampProvider["unknown"] = "unknown";
|
|
75
|
-
CheckoutOptionOnRampProvider["transak"] = "transak";
|
|
76
|
-
return CheckoutOptionOnRampProvider;
|
|
77
|
-
}({});
|
|
78
|
-
let CheckoutOptionSwapProvider = /*#__PURE__*/function (CheckoutOptionSwapProvider) {
|
|
79
|
-
CheckoutOptionSwapProvider["unknown"] = "unknown";
|
|
80
|
-
CheckoutOptionSwapProvider["lifi"] = "lifi";
|
|
81
|
-
return CheckoutOptionSwapProvider;
|
|
82
|
-
}({});
|
|
83
|
-
//
|
|
84
|
-
// Client
|
|
85
|
-
//
|
|
86
|
-
|
|
87
|
-
class API {
|
|
88
|
-
constructor(hostname, fetch) {
|
|
89
|
-
this.hostname = void 0;
|
|
90
|
-
this.fetch = void 0;
|
|
91
|
-
this.path = '/rpc/API/';
|
|
92
|
-
this.queryKey = {
|
|
93
|
-
ping: () => ['API', 'ping'],
|
|
94
|
-
version: () => ['API', 'version'],
|
|
95
|
-
runtimeStatus: () => ['API', 'runtimeStatus'],
|
|
96
|
-
clock: () => ['API', 'clock'],
|
|
97
|
-
getSequenceContext: () => ['API', 'getSequenceContext'],
|
|
98
|
-
getAuthToken: req => ['API', 'getAuthToken', req],
|
|
99
|
-
getAuthToken2: req => ['API', 'getAuthToken2', req],
|
|
100
|
-
sendPasswordlessLink: req => ['API', 'sendPasswordlessLink', req],
|
|
101
|
-
registerPublicKey: req => ['API', 'registerPublicKey', req],
|
|
102
|
-
getPublicKey: req => ['API', 'getPublicKey', req],
|
|
103
|
-
friendList: req => ['API', 'friendList', req],
|
|
104
|
-
getFriendByAddress: req => ['API', 'getFriendByAddress', req],
|
|
105
|
-
searchFriends: req => ['API', 'searchFriends', req],
|
|
106
|
-
addFriend: req => ['API', 'addFriend', req],
|
|
107
|
-
updateFriendNickname: req => ['API', 'updateFriendNickname', req],
|
|
108
|
-
removeFriend: req => ['API', 'removeFriend', req],
|
|
109
|
-
contractCall: req => ['API', 'contractCall', req],
|
|
110
|
-
decodeContractCall: req => ['API', 'decodeContractCall', req],
|
|
111
|
-
lookupContractCallSelectors: req => ['API', 'lookupContractCallSelectors', req],
|
|
112
|
-
userStorageFetch: req => ['API', 'userStorageFetch', req],
|
|
113
|
-
userStorageSave: req => ['API', 'userStorageSave', req],
|
|
114
|
-
userStorageDelete: req => ['API', 'userStorageDelete', req],
|
|
115
|
-
userStorageFetchAll: req => ['API', 'userStorageFetchAll', req],
|
|
116
|
-
getMoonpayLink: req => ['API', 'getMoonpayLink', req],
|
|
117
|
-
resolveENSAddress: req => ['API', 'resolveENSAddress', req],
|
|
118
|
-
isValidSignature: req => ['API', 'isValidSignature', req],
|
|
119
|
-
isValidMessageSignature: req => ['API', 'isValidMessageSignature', req],
|
|
120
|
-
isValidTypedDataSignature: req => ['API', 'isValidTypedDataSignature', req],
|
|
121
|
-
isValidETHAuthProof: req => ['API', 'isValidETHAuthProof', req],
|
|
122
|
-
getOnRampURL: req => ['API', 'getOnRampURL', req],
|
|
123
|
-
transakGetCountries: () => ['API', 'transakGetCountries'],
|
|
124
|
-
transakGetCryptoCurrencies: () => ['API', 'transakGetCryptoCurrencies'],
|
|
125
|
-
transakGetFiatCurrencies: () => ['API', 'transakGetFiatCurrencies'],
|
|
126
|
-
transakGetPrice: req => ['API', 'transakGetPrice', req],
|
|
127
|
-
transakGetSupportedNFTCheckoutChains: () => ['API', 'transakGetSupportedNFTCheckoutChains'],
|
|
128
|
-
transakGetWidgetURL: req => ['API', 'transakGetWidgetURL', req],
|
|
129
|
-
getCoinPrices: req => ['API', 'getCoinPrices', req],
|
|
130
|
-
getCollectiblePrices: req => ['API', 'getCollectiblePrices', req],
|
|
131
|
-
getExchangeRate: req => ['API', 'getExchangeRate', req],
|
|
132
|
-
memoryStore: req => ['API', 'memoryStore', req],
|
|
133
|
-
memoryLoad: req => ['API', 'memoryLoad', req],
|
|
134
|
-
getInviteInfo: () => ['API', 'getInviteInfo'],
|
|
135
|
-
isValidAccessCode: req => ['API', 'isValidAccessCode', req],
|
|
136
|
-
internalClaimAccessCode: req => ['API', 'internalClaimAccessCode', req],
|
|
137
|
-
blockNumberAtTime: req => ['API', 'blockNumberAtTime', req],
|
|
138
|
-
paperSessionSecret: req => ['API', 'paperSessionSecret', req],
|
|
139
|
-
paperSessionSecret2: req => ['API', 'paperSessionSecret2', req],
|
|
140
|
-
linkWallet: req => ['API', 'linkWallet', req],
|
|
141
|
-
getLinkedWallets: req => ['API', 'getLinkedWallets', req],
|
|
142
|
-
removeLinkedWallet: req => ['API', 'removeLinkedWallet', req],
|
|
143
|
-
generateWaaSVerificationURL: req => ['API', 'generateWaaSVerificationURL', req],
|
|
144
|
-
validateWaaSVerificationNonce: req => ['API', 'validateWaaSVerificationNonce', req],
|
|
145
|
-
listAdoptedWallets: req => ['API', 'listAdoptedWallets', req],
|
|
146
|
-
getLifiChains: () => ['API', 'getLifiChains'],
|
|
147
|
-
getLifiTokens: req => ['API', 'getLifiTokens', req],
|
|
148
|
-
getLifiSwapRoutes: req => ['API', 'getLifiSwapRoutes', req],
|
|
149
|
-
getLifiSwapQuote: req => ['API', 'getLifiSwapQuote', req],
|
|
150
|
-
getIntentCallsPayloads: req => ['API', 'getIntentCallsPayloads', req],
|
|
151
|
-
commitIntentConfig: req => ['API', 'commitIntentConfig', req],
|
|
152
|
-
getIntentConfig: req => ['API', 'getIntentConfig', req],
|
|
153
|
-
listCurrencyGroups: () => ['API', 'listCurrencyGroups'],
|
|
154
|
-
addOffchainInventory: req => ['API', 'addOffchainInventory', req],
|
|
155
|
-
getOffchainInventory: req => ['API', 'getOffchainInventory', req],
|
|
156
|
-
listOffchainInventories: req => ['API', 'listOffchainInventories', req],
|
|
157
|
-
updateOffchainInventory: req => ['API', 'updateOffchainInventory', req],
|
|
158
|
-
deleteOffchainInventory: req => ['API', 'deleteOffchainInventory', req],
|
|
159
|
-
requestOffchainPayment: req => ['API', 'requestOffchainPayment', req],
|
|
160
|
-
listOffchainPayments: req => ['API', 'listOffchainPayments', req],
|
|
161
|
-
savePack: req => ['API', 'savePack', req],
|
|
162
|
-
getPack: req => ['API', 'getPack', req],
|
|
163
|
-
getPackIds: req => ['API', 'getPackIds', req],
|
|
164
|
-
deletePack: req => ['API', 'deletePack', req],
|
|
165
|
-
updatePackContent: req => ['API', 'updatePackContent', req],
|
|
166
|
-
getRevealTxData: req => ['API', 'getRevealTxData', req],
|
|
167
|
-
checkoutOptionsPrimary: req => ['API', 'checkoutOptionsPrimary', req],
|
|
168
|
-
checkoutOptionsSecondary: req => ['API', 'checkoutOptionsSecondary', req],
|
|
169
|
-
checkoutOptionsGetTransakContractID: req => ['API', 'checkoutOptionsGetTransakContractID', req],
|
|
170
|
-
fortePayCreateIntent: req => ['API', 'fortePayCreateIntent', req],
|
|
171
|
-
fortePayGetPaymentStatuses: req => ['API', 'fortePayGetPaymentStatuses', req],
|
|
172
|
-
getCCTPTransfer: req => ['API', 'getCCTPTransfer', req],
|
|
173
|
-
queueCCTPTransfer: req => ['API', 'queueCCTPTransfer', req],
|
|
174
|
-
queueIntentConfigExecution: req => ['API', 'queueIntentConfigExecution', req],
|
|
175
|
-
getIntentConfigExecutionStatus: req => ['API', 'getIntentConfigExecutionStatus', req],
|
|
176
|
-
listIntentConfigs: req => ['API', 'listIntentConfigs', req],
|
|
177
|
-
queueMetaTxnReceipt: req => ['API', 'queueMetaTxnReceipt', req]
|
|
178
|
-
};
|
|
179
|
-
this.ping = (headers, signal) => {
|
|
180
|
-
return this.fetch(this.url('Ping'), createHttpRequest('{}', headers, signal)).then(res => {
|
|
181
|
-
return buildResponse(res).then(_data => {
|
|
182
|
-
return JsonDecode(_data, 'PingResponse');
|
|
183
|
-
});
|
|
184
|
-
}, error => {
|
|
185
|
-
throw WebrpcRequestFailedError.new({
|
|
186
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
187
|
-
});
|
|
188
|
-
});
|
|
189
|
-
};
|
|
190
|
-
this.version = (headers, signal) => {
|
|
191
|
-
return this.fetch(this.url('Version'), createHttpRequest('{}', headers, signal)).then(res => {
|
|
192
|
-
return buildResponse(res).then(_data => {
|
|
193
|
-
return JsonDecode(_data, 'VersionResponse');
|
|
194
|
-
});
|
|
195
|
-
}, error => {
|
|
196
|
-
throw WebrpcRequestFailedError.new({
|
|
197
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
198
|
-
});
|
|
199
|
-
});
|
|
200
|
-
};
|
|
201
|
-
this.runtimeStatus = (headers, signal) => {
|
|
202
|
-
return this.fetch(this.url('RuntimeStatus'), createHttpRequest('{}', headers, signal)).then(res => {
|
|
203
|
-
return buildResponse(res).then(_data => {
|
|
204
|
-
return JsonDecode(_data, 'RuntimeStatusResponse');
|
|
205
|
-
});
|
|
206
|
-
}, error => {
|
|
207
|
-
throw WebrpcRequestFailedError.new({
|
|
208
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
209
|
-
});
|
|
210
|
-
});
|
|
211
|
-
};
|
|
212
|
-
this.clock = (headers, signal) => {
|
|
213
|
-
return this.fetch(this.url('Clock'), createHttpRequest('{}', headers, signal)).then(res => {
|
|
214
|
-
return buildResponse(res).then(_data => {
|
|
215
|
-
return JsonDecode(_data, 'ClockResponse');
|
|
216
|
-
});
|
|
217
|
-
}, error => {
|
|
218
|
-
throw WebrpcRequestFailedError.new({
|
|
219
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
220
|
-
});
|
|
221
|
-
});
|
|
222
|
-
};
|
|
223
|
-
this.getSequenceContext = (headers, signal) => {
|
|
224
|
-
return this.fetch(this.url('GetSequenceContext'), createHttpRequest('{}', headers, signal)).then(res => {
|
|
225
|
-
return buildResponse(res).then(_data => {
|
|
226
|
-
return JsonDecode(_data, 'GetSequenceContextResponse');
|
|
227
|
-
});
|
|
228
|
-
}, error => {
|
|
229
|
-
throw WebrpcRequestFailedError.new({
|
|
230
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
231
|
-
});
|
|
232
|
-
});
|
|
233
|
-
};
|
|
234
|
-
this.getAuthToken = (req, headers, signal) => {
|
|
235
|
-
return this.fetch(this.url('GetAuthToken'), createHttpRequest(JsonEncode(req, 'GetAuthTokenRequest'), headers, signal)).then(res => {
|
|
236
|
-
return buildResponse(res).then(_data => {
|
|
237
|
-
return JsonDecode(_data, 'GetAuthTokenResponse');
|
|
238
|
-
});
|
|
239
|
-
}, error => {
|
|
240
|
-
throw WebrpcRequestFailedError.new({
|
|
241
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
242
|
-
});
|
|
243
|
-
});
|
|
244
|
-
};
|
|
245
|
-
this.getAuthToken2 = (req, headers, signal) => {
|
|
246
|
-
return this.fetch(this.url('GetAuthToken2'), createHttpRequest(JsonEncode(req, 'GetAuthToken2Request'), headers, signal)).then(res => {
|
|
247
|
-
return buildResponse(res).then(_data => {
|
|
248
|
-
return JsonDecode(_data, 'GetAuthToken2Response');
|
|
249
|
-
});
|
|
250
|
-
}, error => {
|
|
251
|
-
throw WebrpcRequestFailedError.new({
|
|
252
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
253
|
-
});
|
|
254
|
-
});
|
|
255
|
-
};
|
|
256
|
-
this.sendPasswordlessLink = (req, headers, signal) => {
|
|
257
|
-
return this.fetch(this.url('SendPasswordlessLink'), createHttpRequest(JsonEncode(req, 'SendPasswordlessLinkRequest'), headers, signal)).then(res => {
|
|
258
|
-
return buildResponse(res).then(_data => {
|
|
259
|
-
return JsonDecode(_data, 'SendPasswordlessLinkResponse');
|
|
260
|
-
});
|
|
261
|
-
}, error => {
|
|
262
|
-
throw WebrpcRequestFailedError.new({
|
|
263
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
264
|
-
});
|
|
265
|
-
});
|
|
266
|
-
};
|
|
267
|
-
this.registerPublicKey = (req, headers, signal) => {
|
|
268
|
-
return this.fetch(this.url('RegisterPublicKey'), createHttpRequest(JsonEncode(req, 'RegisterPublicKeyRequest'), headers, signal)).then(res => {
|
|
269
|
-
return buildResponse(res).then(_data => {
|
|
270
|
-
return JsonDecode(_data, 'RegisterPublicKeyResponse');
|
|
271
|
-
});
|
|
272
|
-
}, error => {
|
|
273
|
-
throw WebrpcRequestFailedError.new({
|
|
274
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
275
|
-
});
|
|
276
|
-
});
|
|
277
|
-
};
|
|
278
|
-
this.getPublicKey = (req, headers, signal) => {
|
|
279
|
-
return this.fetch(this.url('GetPublicKey'), createHttpRequest(JsonEncode(req, 'GetPublicKeyRequest'), headers, signal)).then(res => {
|
|
280
|
-
return buildResponse(res).then(_data => {
|
|
281
|
-
return JsonDecode(_data, 'GetPublicKeyResponse');
|
|
282
|
-
});
|
|
283
|
-
}, error => {
|
|
284
|
-
throw WebrpcRequestFailedError.new({
|
|
285
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
286
|
-
});
|
|
287
|
-
});
|
|
288
|
-
};
|
|
289
|
-
this.friendList = (req, headers, signal) => {
|
|
290
|
-
return this.fetch(this.url('FriendList'), createHttpRequest(JsonEncode(req, 'FriendListRequest'), headers, signal)).then(res => {
|
|
291
|
-
return buildResponse(res).then(_data => {
|
|
292
|
-
return JsonDecode(_data, 'FriendListResponse');
|
|
293
|
-
});
|
|
294
|
-
}, error => {
|
|
295
|
-
throw WebrpcRequestFailedError.new({
|
|
296
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
297
|
-
});
|
|
298
|
-
});
|
|
299
|
-
};
|
|
300
|
-
this.getFriendByAddress = (req, headers, signal) => {
|
|
301
|
-
return this.fetch(this.url('GetFriendByAddress'), createHttpRequest(JsonEncode(req, 'GetFriendByAddressRequest'), headers, signal)).then(res => {
|
|
302
|
-
return buildResponse(res).then(_data => {
|
|
303
|
-
return JsonDecode(_data, 'GetFriendByAddressResponse');
|
|
304
|
-
});
|
|
305
|
-
}, error => {
|
|
306
|
-
throw WebrpcRequestFailedError.new({
|
|
307
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
308
|
-
});
|
|
309
|
-
});
|
|
310
|
-
};
|
|
311
|
-
this.searchFriends = (req, headers, signal) => {
|
|
312
|
-
return this.fetch(this.url('SearchFriends'), createHttpRequest(JsonEncode(req, 'SearchFriendsRequest'), headers, signal)).then(res => {
|
|
313
|
-
return buildResponse(res).then(_data => {
|
|
314
|
-
return JsonDecode(_data, 'SearchFriendsResponse');
|
|
315
|
-
});
|
|
316
|
-
}, error => {
|
|
317
|
-
throw WebrpcRequestFailedError.new({
|
|
318
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
319
|
-
});
|
|
320
|
-
});
|
|
321
|
-
};
|
|
322
|
-
this.addFriend = (req, headers, signal) => {
|
|
323
|
-
return this.fetch(this.url('AddFriend'), createHttpRequest(JsonEncode(req, 'AddFriendRequest'), headers, signal)).then(res => {
|
|
324
|
-
return buildResponse(res).then(_data => {
|
|
325
|
-
return JsonDecode(_data, 'AddFriendResponse');
|
|
326
|
-
});
|
|
327
|
-
}, error => {
|
|
328
|
-
throw WebrpcRequestFailedError.new({
|
|
329
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
330
|
-
});
|
|
331
|
-
});
|
|
332
|
-
};
|
|
333
|
-
this.updateFriendNickname = (req, headers, signal) => {
|
|
334
|
-
return this.fetch(this.url('UpdateFriendNickname'), createHttpRequest(JsonEncode(req, 'UpdateFriendNicknameRequest'), headers, signal)).then(res => {
|
|
335
|
-
return buildResponse(res).then(_data => {
|
|
336
|
-
return JsonDecode(_data, 'UpdateFriendNicknameResponse');
|
|
337
|
-
});
|
|
338
|
-
}, error => {
|
|
339
|
-
throw WebrpcRequestFailedError.new({
|
|
340
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
341
|
-
});
|
|
342
|
-
});
|
|
343
|
-
};
|
|
344
|
-
this.removeFriend = (req, headers, signal) => {
|
|
345
|
-
return this.fetch(this.url('RemoveFriend'), createHttpRequest(JsonEncode(req, 'RemoveFriendRequest'), headers, signal)).then(res => {
|
|
346
|
-
return buildResponse(res).then(_data => {
|
|
347
|
-
return JsonDecode(_data, 'RemoveFriendResponse');
|
|
348
|
-
});
|
|
349
|
-
}, error => {
|
|
350
|
-
throw WebrpcRequestFailedError.new({
|
|
351
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
352
|
-
});
|
|
353
|
-
});
|
|
354
|
-
};
|
|
355
|
-
this.contractCall = (req, headers, signal) => {
|
|
356
|
-
return this.fetch(this.url('ContractCall'), createHttpRequest(JsonEncode(req, 'ContractCallRequest'), headers, signal)).then(res => {
|
|
357
|
-
return buildResponse(res).then(_data => {
|
|
358
|
-
return JsonDecode(_data, 'ContractCallResponse');
|
|
359
|
-
});
|
|
360
|
-
}, error => {
|
|
361
|
-
throw WebrpcRequestFailedError.new({
|
|
362
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
363
|
-
});
|
|
364
|
-
});
|
|
365
|
-
};
|
|
366
|
-
this.decodeContractCall = (req, headers, signal) => {
|
|
367
|
-
return this.fetch(this.url('DecodeContractCall'), createHttpRequest(JsonEncode(req, 'DecodeContractCallRequest'), headers, signal)).then(res => {
|
|
368
|
-
return buildResponse(res).then(_data => {
|
|
369
|
-
return JsonDecode(_data, 'DecodeContractCallResponse');
|
|
370
|
-
});
|
|
371
|
-
}, error => {
|
|
372
|
-
throw WebrpcRequestFailedError.new({
|
|
373
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
374
|
-
});
|
|
375
|
-
});
|
|
376
|
-
};
|
|
377
|
-
this.lookupContractCallSelectors = (req, headers, signal) => {
|
|
378
|
-
return this.fetch(this.url('LookupContractCallSelectors'), createHttpRequest(JsonEncode(req, 'LookupContractCallSelectorsRequest'), headers, signal)).then(res => {
|
|
379
|
-
return buildResponse(res).then(_data => {
|
|
380
|
-
return JsonDecode(_data, 'LookupContractCallSelectorsResponse');
|
|
381
|
-
});
|
|
382
|
-
}, error => {
|
|
383
|
-
throw WebrpcRequestFailedError.new({
|
|
384
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
385
|
-
});
|
|
386
|
-
});
|
|
387
|
-
};
|
|
388
|
-
this.userStorageFetch = (req, headers, signal) => {
|
|
389
|
-
return this.fetch(this.url('UserStorageFetch'), createHttpRequest(JsonEncode(req, 'UserStorageFetchRequest'), headers, signal)).then(res => {
|
|
390
|
-
return buildResponse(res).then(_data => {
|
|
391
|
-
return JsonDecode(_data, 'UserStorageFetchResponse');
|
|
392
|
-
});
|
|
393
|
-
}, error => {
|
|
394
|
-
throw WebrpcRequestFailedError.new({
|
|
395
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
396
|
-
});
|
|
397
|
-
});
|
|
398
|
-
};
|
|
399
|
-
this.userStorageSave = (req, headers, signal) => {
|
|
400
|
-
return this.fetch(this.url('UserStorageSave'), createHttpRequest(JsonEncode(req, 'UserStorageSaveRequest'), headers, signal)).then(res => {
|
|
401
|
-
return buildResponse(res).then(_data => {
|
|
402
|
-
return JsonDecode(_data, 'UserStorageSaveResponse');
|
|
403
|
-
});
|
|
404
|
-
}, error => {
|
|
405
|
-
throw WebrpcRequestFailedError.new({
|
|
406
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
407
|
-
});
|
|
408
|
-
});
|
|
409
|
-
};
|
|
410
|
-
this.userStorageDelete = (req, headers, signal) => {
|
|
411
|
-
return this.fetch(this.url('UserStorageDelete'), createHttpRequest(JsonEncode(req, 'UserStorageDeleteRequest'), headers, signal)).then(res => {
|
|
412
|
-
return buildResponse(res).then(_data => {
|
|
413
|
-
return JsonDecode(_data, 'UserStorageDeleteResponse');
|
|
414
|
-
});
|
|
415
|
-
}, error => {
|
|
416
|
-
throw WebrpcRequestFailedError.new({
|
|
417
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
418
|
-
});
|
|
419
|
-
});
|
|
420
|
-
};
|
|
421
|
-
this.userStorageFetchAll = (req, headers, signal) => {
|
|
422
|
-
return this.fetch(this.url('UserStorageFetchAll'), createHttpRequest(JsonEncode(req, 'UserStorageFetchAllRequest'), headers, signal)).then(res => {
|
|
423
|
-
return buildResponse(res).then(_data => {
|
|
424
|
-
return JsonDecode(_data, 'UserStorageFetchAllResponse');
|
|
425
|
-
});
|
|
426
|
-
}, error => {
|
|
427
|
-
throw WebrpcRequestFailedError.new({
|
|
428
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
429
|
-
});
|
|
430
|
-
});
|
|
431
|
-
};
|
|
432
|
-
this.getMoonpayLink = (req, headers, signal) => {
|
|
433
|
-
return this.fetch(this.url('GetMoonpayLink'), createHttpRequest(JsonEncode(req, 'GetMoonpayLinkRequest'), headers, signal)).then(res => {
|
|
434
|
-
return buildResponse(res).then(_data => {
|
|
435
|
-
return JsonDecode(_data, 'GetMoonpayLinkResponse');
|
|
436
|
-
});
|
|
437
|
-
}, error => {
|
|
438
|
-
throw WebrpcRequestFailedError.new({
|
|
439
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
440
|
-
});
|
|
441
|
-
});
|
|
442
|
-
};
|
|
443
|
-
this.resolveENSAddress = (req, headers, signal) => {
|
|
444
|
-
return this.fetch(this.url('ResolveENSAddress'), createHttpRequest(JsonEncode(req, 'ResolveENSAddressRequest'), headers, signal)).then(res => {
|
|
445
|
-
return buildResponse(res).then(_data => {
|
|
446
|
-
return JsonDecode(_data, 'ResolveENSAddressResponse');
|
|
447
|
-
});
|
|
448
|
-
}, error => {
|
|
449
|
-
throw WebrpcRequestFailedError.new({
|
|
450
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
451
|
-
});
|
|
452
|
-
});
|
|
453
|
-
};
|
|
454
|
-
this.isValidSignature = (req, headers, signal) => {
|
|
455
|
-
return this.fetch(this.url('IsValidSignature'), createHttpRequest(JsonEncode(req, 'IsValidSignatureRequest'), headers, signal)).then(res => {
|
|
456
|
-
return buildResponse(res).then(_data => {
|
|
457
|
-
return JsonDecode(_data, 'IsValidSignatureResponse');
|
|
458
|
-
});
|
|
459
|
-
}, error => {
|
|
460
|
-
throw WebrpcRequestFailedError.new({
|
|
461
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
462
|
-
});
|
|
463
|
-
});
|
|
464
|
-
};
|
|
465
|
-
this.isValidMessageSignature = (req, headers, signal) => {
|
|
466
|
-
return this.fetch(this.url('IsValidMessageSignature'), createHttpRequest(JsonEncode(req, 'IsValidMessageSignatureRequest'), headers, signal)).then(res => {
|
|
467
|
-
return buildResponse(res).then(_data => {
|
|
468
|
-
return JsonDecode(_data, 'IsValidMessageSignatureResponse');
|
|
469
|
-
});
|
|
470
|
-
}, error => {
|
|
471
|
-
throw WebrpcRequestFailedError.new({
|
|
472
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
473
|
-
});
|
|
474
|
-
});
|
|
475
|
-
};
|
|
476
|
-
this.isValidTypedDataSignature = (req, headers, signal) => {
|
|
477
|
-
return this.fetch(this.url('IsValidTypedDataSignature'), createHttpRequest(JsonEncode(req, 'IsValidTypedDataSignatureRequest'), headers, signal)).then(res => {
|
|
478
|
-
return buildResponse(res).then(_data => {
|
|
479
|
-
return JsonDecode(_data, 'IsValidTypedDataSignatureResponse');
|
|
480
|
-
});
|
|
481
|
-
}, error => {
|
|
482
|
-
throw WebrpcRequestFailedError.new({
|
|
483
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
484
|
-
});
|
|
485
|
-
});
|
|
486
|
-
};
|
|
487
|
-
this.isValidETHAuthProof = (req, headers, signal) => {
|
|
488
|
-
return this.fetch(this.url('IsValidETHAuthProof'), createHttpRequest(JsonEncode(req, 'IsValidETHAuthProofRequest'), headers, signal)).then(res => {
|
|
489
|
-
return buildResponse(res).then(_data => {
|
|
490
|
-
return JsonDecode(_data, 'IsValidETHAuthProofResponse');
|
|
491
|
-
});
|
|
492
|
-
}, error => {
|
|
493
|
-
throw WebrpcRequestFailedError.new({
|
|
494
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
495
|
-
});
|
|
496
|
-
});
|
|
497
|
-
};
|
|
498
|
-
this.getOnRampURL = (req, headers, signal) => {
|
|
499
|
-
return this.fetch(this.url('GetOnRampURL'), createHttpRequest(JsonEncode(req, 'GetOnRampURLRequest'), headers, signal)).then(res => {
|
|
500
|
-
return buildResponse(res).then(_data => {
|
|
501
|
-
return JsonDecode(_data, 'GetOnRampURLResponse');
|
|
502
|
-
});
|
|
503
|
-
}, error => {
|
|
504
|
-
throw WebrpcRequestFailedError.new({
|
|
505
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
506
|
-
});
|
|
507
|
-
});
|
|
508
|
-
};
|
|
509
|
-
this.transakGetCountries = (headers, signal) => {
|
|
510
|
-
return this.fetch(this.url('TransakGetCountries'), createHttpRequest('{}', headers, signal)).then(res => {
|
|
511
|
-
return buildResponse(res).then(_data => {
|
|
512
|
-
return JsonDecode(_data, 'TransakGetCountriesResponse');
|
|
513
|
-
});
|
|
514
|
-
}, error => {
|
|
515
|
-
throw WebrpcRequestFailedError.new({
|
|
516
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
517
|
-
});
|
|
518
|
-
});
|
|
519
|
-
};
|
|
520
|
-
this.transakGetCryptoCurrencies = (headers, signal) => {
|
|
521
|
-
return this.fetch(this.url('TransakGetCryptoCurrencies'), createHttpRequest('{}', headers, signal)).then(res => {
|
|
522
|
-
return buildResponse(res).then(_data => {
|
|
523
|
-
return JsonDecode(_data, 'TransakGetCryptoCurrenciesResponse');
|
|
524
|
-
});
|
|
525
|
-
}, error => {
|
|
526
|
-
throw WebrpcRequestFailedError.new({
|
|
527
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
528
|
-
});
|
|
529
|
-
});
|
|
530
|
-
};
|
|
531
|
-
this.transakGetFiatCurrencies = (headers, signal) => {
|
|
532
|
-
return this.fetch(this.url('TransakGetFiatCurrencies'), createHttpRequest('{}', headers, signal)).then(res => {
|
|
533
|
-
return buildResponse(res).then(_data => {
|
|
534
|
-
return JsonDecode(_data, 'TransakGetFiatCurrenciesResponse');
|
|
535
|
-
});
|
|
536
|
-
}, error => {
|
|
537
|
-
throw WebrpcRequestFailedError.new({
|
|
538
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
539
|
-
});
|
|
540
|
-
});
|
|
541
|
-
};
|
|
542
|
-
this.transakGetPrice = (req, headers, signal) => {
|
|
543
|
-
return this.fetch(this.url('TransakGetPrice'), createHttpRequest(JsonEncode(req, 'TransakGetPriceRequest'), headers, signal)).then(res => {
|
|
544
|
-
return buildResponse(res).then(_data => {
|
|
545
|
-
return JsonDecode(_data, 'TransakGetPriceResponse');
|
|
546
|
-
});
|
|
547
|
-
}, error => {
|
|
548
|
-
throw WebrpcRequestFailedError.new({
|
|
549
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
550
|
-
});
|
|
551
|
-
});
|
|
552
|
-
};
|
|
553
|
-
this.transakGetSupportedNFTCheckoutChains = (headers, signal) => {
|
|
554
|
-
return this.fetch(this.url('TransakGetSupportedNFTCheckoutChains'), createHttpRequest('{}', headers, signal)).then(res => {
|
|
555
|
-
return buildResponse(res).then(_data => {
|
|
556
|
-
return JsonDecode(_data, 'TransakGetSupportedNFTCheckoutChainsResponse');
|
|
557
|
-
});
|
|
558
|
-
}, error => {
|
|
559
|
-
throw WebrpcRequestFailedError.new({
|
|
560
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
561
|
-
});
|
|
562
|
-
});
|
|
563
|
-
};
|
|
564
|
-
this.transakGetWidgetURL = (req, headers, signal) => {
|
|
565
|
-
return this.fetch(this.url('TransakGetWidgetURL'), createHttpRequest(JsonEncode(req, 'TransakGetWidgetURLRequest'), headers, signal)).then(res => {
|
|
566
|
-
return buildResponse(res).then(_data => {
|
|
567
|
-
return JsonDecode(_data, 'TransakGetWidgetURLResponse');
|
|
568
|
-
});
|
|
569
|
-
}, error => {
|
|
570
|
-
throw WebrpcRequestFailedError.new({
|
|
571
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
572
|
-
});
|
|
573
|
-
});
|
|
574
|
-
};
|
|
575
|
-
this.getCoinPrices = (req, headers, signal) => {
|
|
576
|
-
return this.fetch(this.url('GetCoinPrices'), createHttpRequest(JsonEncode(req, 'GetCoinPricesRequest'), headers, signal)).then(res => {
|
|
577
|
-
return buildResponse(res).then(_data => {
|
|
578
|
-
return JsonDecode(_data, 'GetCoinPricesResponse');
|
|
579
|
-
});
|
|
580
|
-
}, error => {
|
|
581
|
-
throw WebrpcRequestFailedError.new({
|
|
582
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
583
|
-
});
|
|
584
|
-
});
|
|
585
|
-
};
|
|
586
|
-
this.getCollectiblePrices = (req, headers, signal) => {
|
|
587
|
-
return this.fetch(this.url('GetCollectiblePrices'), createHttpRequest(JsonEncode(req, 'GetCollectiblePricesRequest'), headers, signal)).then(res => {
|
|
588
|
-
return buildResponse(res).then(_data => {
|
|
589
|
-
return JsonDecode(_data, 'GetCollectiblePricesResponse');
|
|
590
|
-
});
|
|
591
|
-
}, error => {
|
|
592
|
-
throw WebrpcRequestFailedError.new({
|
|
593
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
594
|
-
});
|
|
595
|
-
});
|
|
596
|
-
};
|
|
597
|
-
this.getExchangeRate = (req, headers, signal) => {
|
|
598
|
-
return this.fetch(this.url('GetExchangeRate'), createHttpRequest(JsonEncode(req, 'GetExchangeRateRequest'), headers, signal)).then(res => {
|
|
599
|
-
return buildResponse(res).then(_data => {
|
|
600
|
-
return JsonDecode(_data, 'GetExchangeRateResponse');
|
|
601
|
-
});
|
|
602
|
-
}, error => {
|
|
603
|
-
throw WebrpcRequestFailedError.new({
|
|
604
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
605
|
-
});
|
|
606
|
-
});
|
|
607
|
-
};
|
|
608
|
-
this.memoryStore = (req, headers, signal) => {
|
|
609
|
-
return this.fetch(this.url('MemoryStore'), createHttpRequest(JsonEncode(req, 'MemoryStoreRequest'), headers, signal)).then(res => {
|
|
610
|
-
return buildResponse(res).then(_data => {
|
|
611
|
-
return JsonDecode(_data, 'MemoryStoreResponse');
|
|
612
|
-
});
|
|
613
|
-
}, error => {
|
|
614
|
-
throw WebrpcRequestFailedError.new({
|
|
615
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
616
|
-
});
|
|
617
|
-
});
|
|
618
|
-
};
|
|
619
|
-
this.memoryLoad = (req, headers, signal) => {
|
|
620
|
-
return this.fetch(this.url('MemoryLoad'), createHttpRequest(JsonEncode(req, 'MemoryLoadRequest'), headers, signal)).then(res => {
|
|
621
|
-
return buildResponse(res).then(_data => {
|
|
622
|
-
return JsonDecode(_data, 'MemoryLoadResponse');
|
|
623
|
-
});
|
|
624
|
-
}, error => {
|
|
625
|
-
throw WebrpcRequestFailedError.new({
|
|
626
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
627
|
-
});
|
|
628
|
-
});
|
|
629
|
-
};
|
|
630
|
-
this.getInviteInfo = (headers, signal) => {
|
|
631
|
-
return this.fetch(this.url('GetInviteInfo'), createHttpRequest('{}', headers, signal)).then(res => {
|
|
632
|
-
return buildResponse(res).then(_data => {
|
|
633
|
-
return JsonDecode(_data, 'GetInviteInfoResponse');
|
|
634
|
-
});
|
|
635
|
-
}, error => {
|
|
636
|
-
throw WebrpcRequestFailedError.new({
|
|
637
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
638
|
-
});
|
|
639
|
-
});
|
|
640
|
-
};
|
|
641
|
-
this.isValidAccessCode = (req, headers, signal) => {
|
|
642
|
-
return this.fetch(this.url('IsValidAccessCode'), createHttpRequest(JsonEncode(req, 'IsValidAccessCodeRequest'), headers, signal)).then(res => {
|
|
643
|
-
return buildResponse(res).then(_data => {
|
|
644
|
-
return JsonDecode(_data, 'IsValidAccessCodeResponse');
|
|
645
|
-
});
|
|
646
|
-
}, error => {
|
|
647
|
-
throw WebrpcRequestFailedError.new({
|
|
648
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
649
|
-
});
|
|
650
|
-
});
|
|
651
|
-
};
|
|
652
|
-
this.internalClaimAccessCode = (req, headers, signal) => {
|
|
653
|
-
return this.fetch(this.url('InternalClaimAccessCode'), createHttpRequest(JsonEncode(req, 'InternalClaimAccessCodeRequest'), headers, signal)).then(res => {
|
|
654
|
-
return buildResponse(res).then(_data => {
|
|
655
|
-
return JsonDecode(_data, 'InternalClaimAccessCodeResponse');
|
|
656
|
-
});
|
|
657
|
-
}, error => {
|
|
658
|
-
throw WebrpcRequestFailedError.new({
|
|
659
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
660
|
-
});
|
|
661
|
-
});
|
|
662
|
-
};
|
|
663
|
-
this.blockNumberAtTime = (req, headers, signal) => {
|
|
664
|
-
return this.fetch(this.url('BlockNumberAtTime'), createHttpRequest(JsonEncode(req, 'BlockNumberAtTimeRequest'), headers, signal)).then(res => {
|
|
665
|
-
return buildResponse(res).then(_data => {
|
|
666
|
-
return JsonDecode(_data, 'BlockNumberAtTimeResponse');
|
|
667
|
-
});
|
|
668
|
-
}, error => {
|
|
669
|
-
throw WebrpcRequestFailedError.new({
|
|
670
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
671
|
-
});
|
|
672
|
-
});
|
|
673
|
-
};
|
|
674
|
-
this.paperSessionSecret = (req, headers, signal) => {
|
|
675
|
-
return this.fetch(this.url('PaperSessionSecret'), createHttpRequest(JsonEncode(req, 'PaperSessionSecretRequest'), headers, signal)).then(res => {
|
|
676
|
-
return buildResponse(res).then(_data => {
|
|
677
|
-
return JsonDecode(_data, 'PaperSessionSecretResponse');
|
|
678
|
-
});
|
|
679
|
-
}, error => {
|
|
680
|
-
throw WebrpcRequestFailedError.new({
|
|
681
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
682
|
-
});
|
|
683
|
-
});
|
|
684
|
-
};
|
|
685
|
-
this.paperSessionSecret2 = (req, headers, signal) => {
|
|
686
|
-
return this.fetch(this.url('PaperSessionSecret2'), createHttpRequest(JsonEncode(req, 'PaperSessionSecret2Request'), headers, signal)).then(res => {
|
|
687
|
-
return buildResponse(res).then(_data => {
|
|
688
|
-
return JsonDecode(_data, 'PaperSessionSecret2Response');
|
|
689
|
-
});
|
|
690
|
-
}, error => {
|
|
691
|
-
throw WebrpcRequestFailedError.new({
|
|
692
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
693
|
-
});
|
|
694
|
-
});
|
|
695
|
-
};
|
|
696
|
-
this.linkWallet = (req, headers, signal) => {
|
|
697
|
-
return this.fetch(this.url('LinkWallet'), createHttpRequest(JsonEncode(req, 'LinkWalletRequest'), headers, signal)).then(res => {
|
|
698
|
-
return buildResponse(res).then(_data => {
|
|
699
|
-
return JsonDecode(_data, 'LinkWalletResponse');
|
|
700
|
-
});
|
|
701
|
-
}, error => {
|
|
702
|
-
throw WebrpcRequestFailedError.new({
|
|
703
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
704
|
-
});
|
|
705
|
-
});
|
|
706
|
-
};
|
|
707
|
-
this.getLinkedWallets = (req, headers, signal) => {
|
|
708
|
-
return this.fetch(this.url('GetLinkedWallets'), createHttpRequest(JsonEncode(req, 'GetLinkedWalletsRequest'), headers, signal)).then(res => {
|
|
709
|
-
return buildResponse(res).then(_data => {
|
|
710
|
-
return JsonDecode(_data, 'GetLinkedWalletsResponse');
|
|
711
|
-
});
|
|
712
|
-
}, error => {
|
|
713
|
-
throw WebrpcRequestFailedError.new({
|
|
714
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
715
|
-
});
|
|
716
|
-
});
|
|
717
|
-
};
|
|
718
|
-
this.removeLinkedWallet = (req, headers, signal) => {
|
|
719
|
-
return this.fetch(this.url('RemoveLinkedWallet'), createHttpRequest(JsonEncode(req, 'RemoveLinkedWalletRequest'), headers, signal)).then(res => {
|
|
720
|
-
return buildResponse(res).then(_data => {
|
|
721
|
-
return JsonDecode(_data, 'RemoveLinkedWalletResponse');
|
|
722
|
-
});
|
|
723
|
-
}, error => {
|
|
724
|
-
throw WebrpcRequestFailedError.new({
|
|
725
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
726
|
-
});
|
|
727
|
-
});
|
|
728
|
-
};
|
|
729
|
-
this.generateWaaSVerificationURL = (req, headers, signal) => {
|
|
730
|
-
return this.fetch(this.url('GenerateWaaSVerificationURL'), createHttpRequest(JsonEncode(req, 'GenerateWaaSVerificationURLRequest'), headers, signal)).then(res => {
|
|
731
|
-
return buildResponse(res).then(_data => {
|
|
732
|
-
return JsonDecode(_data, 'GenerateWaaSVerificationURLResponse');
|
|
733
|
-
});
|
|
734
|
-
}, error => {
|
|
735
|
-
throw WebrpcRequestFailedError.new({
|
|
736
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
737
|
-
});
|
|
738
|
-
});
|
|
739
|
-
};
|
|
740
|
-
this.validateWaaSVerificationNonce = (req, headers, signal) => {
|
|
741
|
-
return this.fetch(this.url('ValidateWaaSVerificationNonce'), createHttpRequest(JsonEncode(req, 'ValidateWaaSVerificationNonceRequest'), headers, signal)).then(res => {
|
|
742
|
-
return buildResponse(res).then(_data => {
|
|
743
|
-
return JsonDecode(_data, 'ValidateWaaSVerificationNonceResponse');
|
|
744
|
-
});
|
|
745
|
-
}, error => {
|
|
746
|
-
throw WebrpcRequestFailedError.new({
|
|
747
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
748
|
-
});
|
|
749
|
-
});
|
|
750
|
-
};
|
|
751
|
-
this.listAdoptedWallets = (req, headers, signal) => {
|
|
752
|
-
return this.fetch(this.url('ListAdoptedWallets'), createHttpRequest(JsonEncode(req, 'ListAdoptedWalletsRequest'), headers, signal)).then(res => {
|
|
753
|
-
return buildResponse(res).then(_data => {
|
|
754
|
-
return JsonDecode(_data, 'ListAdoptedWalletsResponse');
|
|
755
|
-
});
|
|
756
|
-
}, error => {
|
|
757
|
-
throw WebrpcRequestFailedError.new({
|
|
758
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
759
|
-
});
|
|
760
|
-
});
|
|
761
|
-
};
|
|
762
|
-
this.getLifiChains = (headers, signal) => {
|
|
763
|
-
return this.fetch(this.url('GetLifiChains'), createHttpRequest('{}', headers, signal)).then(res => {
|
|
764
|
-
return buildResponse(res).then(_data => {
|
|
765
|
-
return JsonDecode(_data, 'GetLifiChainsResponse');
|
|
766
|
-
});
|
|
767
|
-
}, error => {
|
|
768
|
-
throw WebrpcRequestFailedError.new({
|
|
769
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
770
|
-
});
|
|
771
|
-
});
|
|
772
|
-
};
|
|
773
|
-
this.getLifiTokens = (req, headers, signal) => {
|
|
774
|
-
return this.fetch(this.url('GetLifiTokens'), createHttpRequest(JsonEncode(req, 'GetLifiTokensRequest'), headers, signal)).then(res => {
|
|
775
|
-
return buildResponse(res).then(_data => {
|
|
776
|
-
return JsonDecode(_data, 'GetLifiTokensResponse');
|
|
777
|
-
});
|
|
778
|
-
}, error => {
|
|
779
|
-
throw WebrpcRequestFailedError.new({
|
|
780
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
781
|
-
});
|
|
782
|
-
});
|
|
783
|
-
};
|
|
784
|
-
this.getLifiSwapRoutes = (req, headers, signal) => {
|
|
785
|
-
return this.fetch(this.url('GetLifiSwapRoutes'), createHttpRequest(JsonEncode(req, 'GetLifiSwapRoutesRequest'), headers, signal)).then(res => {
|
|
786
|
-
return buildResponse(res).then(_data => {
|
|
787
|
-
return JsonDecode(_data, 'GetLifiSwapRoutesResponse');
|
|
788
|
-
});
|
|
789
|
-
}, error => {
|
|
790
|
-
throw WebrpcRequestFailedError.new({
|
|
791
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
792
|
-
});
|
|
793
|
-
});
|
|
794
|
-
};
|
|
795
|
-
this.getLifiSwapQuote = (req, headers, signal) => {
|
|
796
|
-
return this.fetch(this.url('GetLifiSwapQuote'), createHttpRequest(JsonEncode(req, 'GetLifiSwapQuoteRequest'), headers, signal)).then(res => {
|
|
797
|
-
return buildResponse(res).then(_data => {
|
|
798
|
-
return JsonDecode(_data, 'GetLifiSwapQuoteResponse');
|
|
799
|
-
});
|
|
800
|
-
}, error => {
|
|
801
|
-
throw WebrpcRequestFailedError.new({
|
|
802
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
803
|
-
});
|
|
804
|
-
});
|
|
805
|
-
};
|
|
806
|
-
this.getIntentCallsPayloads = (req, headers, signal) => {
|
|
807
|
-
return this.fetch(this.url('GetIntentCallsPayloads'), createHttpRequest(JsonEncode(req, 'GetIntentCallsPayloadsRequest'), headers, signal)).then(res => {
|
|
808
|
-
return buildResponse(res).then(_data => {
|
|
809
|
-
return JsonDecode(_data, 'GetIntentCallsPayloadsResponse');
|
|
810
|
-
});
|
|
811
|
-
}, error => {
|
|
812
|
-
throw WebrpcRequestFailedError.new({
|
|
813
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
814
|
-
});
|
|
815
|
-
});
|
|
816
|
-
};
|
|
817
|
-
this.commitIntentConfig = (req, headers, signal) => {
|
|
818
|
-
return this.fetch(this.url('CommitIntentConfig'), createHttpRequest(JsonEncode(req, 'CommitIntentConfigRequest'), headers, signal)).then(res => {
|
|
819
|
-
return buildResponse(res).then(_data => {
|
|
820
|
-
return JsonDecode(_data, 'CommitIntentConfigResponse');
|
|
821
|
-
});
|
|
822
|
-
}, error => {
|
|
823
|
-
throw WebrpcRequestFailedError.new({
|
|
824
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
825
|
-
});
|
|
826
|
-
});
|
|
827
|
-
};
|
|
828
|
-
this.getIntentConfig = (req, headers, signal) => {
|
|
829
|
-
return this.fetch(this.url('GetIntentConfig'), createHttpRequest(JsonEncode(req, 'GetIntentConfigRequest'), headers, signal)).then(res => {
|
|
830
|
-
return buildResponse(res).then(_data => {
|
|
831
|
-
return JsonDecode(_data, 'GetIntentConfigResponse');
|
|
832
|
-
});
|
|
833
|
-
}, error => {
|
|
834
|
-
throw WebrpcRequestFailedError.new({
|
|
835
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
836
|
-
});
|
|
837
|
-
});
|
|
838
|
-
};
|
|
839
|
-
this.listCurrencyGroups = (headers, signal) => {
|
|
840
|
-
return this.fetch(this.url('ListCurrencyGroups'), createHttpRequest('{}', headers, signal)).then(res => {
|
|
841
|
-
return buildResponse(res).then(_data => {
|
|
842
|
-
return JsonDecode(_data, 'ListCurrencyGroupsResponse');
|
|
843
|
-
});
|
|
844
|
-
}, error => {
|
|
845
|
-
throw WebrpcRequestFailedError.new({
|
|
846
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
847
|
-
});
|
|
848
|
-
});
|
|
849
|
-
};
|
|
850
|
-
this.addOffchainInventory = (req, headers, signal) => {
|
|
851
|
-
return this.fetch(this.url('AddOffchainInventory'), createHttpRequest(JsonEncode(req, 'AddOffchainInventoryRequest'), headers, signal)).then(res => {
|
|
852
|
-
return buildResponse(res).then(_data => {
|
|
853
|
-
return JsonDecode(_data, 'AddOffchainInventoryResponse');
|
|
854
|
-
});
|
|
855
|
-
}, error => {
|
|
856
|
-
throw WebrpcRequestFailedError.new({
|
|
857
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
858
|
-
});
|
|
859
|
-
});
|
|
860
|
-
};
|
|
861
|
-
this.getOffchainInventory = (req, headers, signal) => {
|
|
862
|
-
return this.fetch(this.url('GetOffchainInventory'), createHttpRequest(JsonEncode(req, 'GetOffchainInventoryRequest'), headers, signal)).then(res => {
|
|
863
|
-
return buildResponse(res).then(_data => {
|
|
864
|
-
return JsonDecode(_data, 'GetOffchainInventoryResponse');
|
|
865
|
-
});
|
|
866
|
-
}, error => {
|
|
867
|
-
throw WebrpcRequestFailedError.new({
|
|
868
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
869
|
-
});
|
|
870
|
-
});
|
|
871
|
-
};
|
|
872
|
-
this.listOffchainInventories = (req, headers, signal) => {
|
|
873
|
-
return this.fetch(this.url('ListOffchainInventories'), createHttpRequest(JsonEncode(req, 'ListOffchainInventoriesRequest'), headers, signal)).then(res => {
|
|
874
|
-
return buildResponse(res).then(_data => {
|
|
875
|
-
return JsonDecode(_data, 'ListOffchainInventoriesResponse');
|
|
876
|
-
});
|
|
877
|
-
}, error => {
|
|
878
|
-
throw WebrpcRequestFailedError.new({
|
|
879
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
880
|
-
});
|
|
881
|
-
});
|
|
882
|
-
};
|
|
883
|
-
this.updateOffchainInventory = (req, headers, signal) => {
|
|
884
|
-
return this.fetch(this.url('UpdateOffchainInventory'), createHttpRequest(JsonEncode(req, 'UpdateOffchainInventoryRequest'), headers, signal)).then(res => {
|
|
885
|
-
return buildResponse(res).then(_data => {
|
|
886
|
-
return JsonDecode(_data, 'UpdateOffchainInventoryResponse');
|
|
887
|
-
});
|
|
888
|
-
}, error => {
|
|
889
|
-
throw WebrpcRequestFailedError.new({
|
|
890
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
891
|
-
});
|
|
892
|
-
});
|
|
893
|
-
};
|
|
894
|
-
this.deleteOffchainInventory = (req, headers, signal) => {
|
|
895
|
-
return this.fetch(this.url('DeleteOffchainInventory'), createHttpRequest(JsonEncode(req, 'DeleteOffchainInventoryRequest'), headers, signal)).then(res => {
|
|
896
|
-
return buildResponse(res).then(_data => {
|
|
897
|
-
return JsonDecode(_data, 'DeleteOffchainInventoryResponse');
|
|
898
|
-
});
|
|
899
|
-
}, error => {
|
|
900
|
-
throw WebrpcRequestFailedError.new({
|
|
901
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
902
|
-
});
|
|
903
|
-
});
|
|
904
|
-
};
|
|
905
|
-
this.requestOffchainPayment = (req, headers, signal) => {
|
|
906
|
-
return this.fetch(this.url('RequestOffchainPayment'), createHttpRequest(JsonEncode(req, 'RequestOffchainPaymentRequest'), headers, signal)).then(res => {
|
|
907
|
-
return buildResponse(res).then(_data => {
|
|
908
|
-
return JsonDecode(_data, 'RequestOffchainPaymentResponse');
|
|
909
|
-
});
|
|
910
|
-
}, error => {
|
|
911
|
-
throw WebrpcRequestFailedError.new({
|
|
912
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
913
|
-
});
|
|
914
|
-
});
|
|
915
|
-
};
|
|
916
|
-
this.listOffchainPayments = (req, headers, signal) => {
|
|
917
|
-
return this.fetch(this.url('ListOffchainPayments'), createHttpRequest(JsonEncode(req, 'ListOffchainPaymentsRequest'), headers, signal)).then(res => {
|
|
918
|
-
return buildResponse(res).then(_data => {
|
|
919
|
-
return JsonDecode(_data, 'ListOffchainPaymentsResponse');
|
|
920
|
-
});
|
|
921
|
-
}, error => {
|
|
922
|
-
throw WebrpcRequestFailedError.new({
|
|
923
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
924
|
-
});
|
|
925
|
-
});
|
|
926
|
-
};
|
|
927
|
-
this.savePack = (req, headers, signal) => {
|
|
928
|
-
return this.fetch(this.url('SavePack'), createHttpRequest(JsonEncode(req, 'SavePackRequest'), headers, signal)).then(res => {
|
|
929
|
-
return buildResponse(res).then(_data => {
|
|
930
|
-
return JsonDecode(_data, 'SavePackResponse');
|
|
931
|
-
});
|
|
932
|
-
}, error => {
|
|
933
|
-
throw WebrpcRequestFailedError.new({
|
|
934
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
935
|
-
});
|
|
936
|
-
});
|
|
937
|
-
};
|
|
938
|
-
this.getPack = (req, headers, signal) => {
|
|
939
|
-
return this.fetch(this.url('GetPack'), createHttpRequest(JsonEncode(req, 'GetPackRequest'), headers, signal)).then(res => {
|
|
940
|
-
return buildResponse(res).then(_data => {
|
|
941
|
-
return JsonDecode(_data, 'GetPackResponse');
|
|
942
|
-
});
|
|
943
|
-
}, error => {
|
|
944
|
-
throw WebrpcRequestFailedError.new({
|
|
945
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
946
|
-
});
|
|
947
|
-
});
|
|
948
|
-
};
|
|
949
|
-
this.getPackIds = (req, headers, signal) => {
|
|
950
|
-
return this.fetch(this.url('GetPackIds'), createHttpRequest(JsonEncode(req, 'GetPackIdsRequest'), headers, signal)).then(res => {
|
|
951
|
-
return buildResponse(res).then(_data => {
|
|
952
|
-
return JsonDecode(_data, 'GetPackIdsResponse');
|
|
953
|
-
});
|
|
954
|
-
}, error => {
|
|
955
|
-
throw WebrpcRequestFailedError.new({
|
|
956
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
957
|
-
});
|
|
958
|
-
});
|
|
959
|
-
};
|
|
960
|
-
this.deletePack = (req, headers, signal) => {
|
|
961
|
-
return this.fetch(this.url('DeletePack'), createHttpRequest(JsonEncode(req, 'DeletePackRequest'), headers, signal)).then(res => {
|
|
962
|
-
return buildResponse(res).then(_data => {
|
|
963
|
-
return JsonDecode(_data, 'DeletePackResponse');
|
|
964
|
-
});
|
|
965
|
-
}, error => {
|
|
966
|
-
throw WebrpcRequestFailedError.new({
|
|
967
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
968
|
-
});
|
|
969
|
-
});
|
|
970
|
-
};
|
|
971
|
-
this.updatePackContent = (req, headers, signal) => {
|
|
972
|
-
return this.fetch(this.url('UpdatePackContent'), createHttpRequest(JsonEncode(req, 'UpdatePackContentRequest'), headers, signal)).then(res => {
|
|
973
|
-
return buildResponse(res).then(_data => {
|
|
974
|
-
return JsonDecode(_data, 'UpdatePackContentResponse');
|
|
975
|
-
});
|
|
976
|
-
}, error => {
|
|
977
|
-
throw WebrpcRequestFailedError.new({
|
|
978
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
979
|
-
});
|
|
980
|
-
});
|
|
981
|
-
};
|
|
982
|
-
this.getRevealTxData = (req, headers, signal) => {
|
|
983
|
-
return this.fetch(this.url('GetRevealTxData'), createHttpRequest(JsonEncode(req, 'GetRevealTxDataRequest'), headers, signal)).then(res => {
|
|
984
|
-
return buildResponse(res).then(_data => {
|
|
985
|
-
return JsonDecode(_data, 'GetRevealTxDataResponse');
|
|
986
|
-
});
|
|
987
|
-
}, error => {
|
|
988
|
-
throw WebrpcRequestFailedError.new({
|
|
989
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
990
|
-
});
|
|
991
|
-
});
|
|
992
|
-
};
|
|
993
|
-
this.checkoutOptionsPrimary = (req, headers, signal) => {
|
|
994
|
-
return this.fetch(this.url('CheckoutOptionsPrimary'), createHttpRequest(JsonEncode(req, 'CheckoutOptionsPrimaryRequest'), headers, signal)).then(res => {
|
|
995
|
-
return buildResponse(res).then(_data => {
|
|
996
|
-
return JsonDecode(_data, 'CheckoutOptionsPrimaryResponse');
|
|
997
|
-
});
|
|
998
|
-
}, error => {
|
|
999
|
-
throw WebrpcRequestFailedError.new({
|
|
1000
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
1001
|
-
});
|
|
1002
|
-
});
|
|
1003
|
-
};
|
|
1004
|
-
this.checkoutOptionsSecondary = (req, headers, signal) => {
|
|
1005
|
-
return this.fetch(this.url('CheckoutOptionsSecondary'), createHttpRequest(JsonEncode(req, 'CheckoutOptionsSecondaryRequest'), headers, signal)).then(res => {
|
|
1006
|
-
return buildResponse(res).then(_data => {
|
|
1007
|
-
return JsonDecode(_data, 'CheckoutOptionsSecondaryResponse');
|
|
1008
|
-
});
|
|
1009
|
-
}, error => {
|
|
1010
|
-
throw WebrpcRequestFailedError.new({
|
|
1011
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
1012
|
-
});
|
|
1013
|
-
});
|
|
1014
|
-
};
|
|
1015
|
-
this.checkoutOptionsGetTransakContractID = (req, headers, signal) => {
|
|
1016
|
-
return this.fetch(this.url('CheckoutOptionsGetTransakContractID'), createHttpRequest(JsonEncode(req, 'CheckoutOptionsGetTransakContractIDRequest'), headers, signal)).then(res => {
|
|
1017
|
-
return buildResponse(res).then(_data => {
|
|
1018
|
-
return JsonDecode(_data, 'CheckoutOptionsGetTransakContractIDResponse');
|
|
1019
|
-
});
|
|
1020
|
-
}, error => {
|
|
1021
|
-
throw WebrpcRequestFailedError.new({
|
|
1022
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
1023
|
-
});
|
|
1024
|
-
});
|
|
1025
|
-
};
|
|
1026
|
-
this.fortePayCreateIntent = (req, headers, signal) => {
|
|
1027
|
-
return this.fetch(this.url('FortePayCreateIntent'), createHttpRequest(JsonEncode(req, 'FortePayCreateIntentRequest'), headers, signal)).then(res => {
|
|
1028
|
-
return buildResponse(res).then(_data => {
|
|
1029
|
-
return JsonDecode(_data, 'FortePayCreateIntentResponse');
|
|
1030
|
-
});
|
|
1031
|
-
}, error => {
|
|
1032
|
-
throw WebrpcRequestFailedError.new({
|
|
1033
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
1034
|
-
});
|
|
1035
|
-
});
|
|
1036
|
-
};
|
|
1037
|
-
this.fortePayGetPaymentStatuses = (req, headers, signal) => {
|
|
1038
|
-
return this.fetch(this.url('FortePayGetPaymentStatuses'), createHttpRequest(JsonEncode(req, 'FortePayGetPaymentStatusesRequest'), headers, signal)).then(res => {
|
|
1039
|
-
return buildResponse(res).then(_data => {
|
|
1040
|
-
return JsonDecode(_data, 'FortePayGetPaymentStatusesResponse');
|
|
1041
|
-
});
|
|
1042
|
-
}, error => {
|
|
1043
|
-
throw WebrpcRequestFailedError.new({
|
|
1044
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
1045
|
-
});
|
|
1046
|
-
});
|
|
1047
|
-
};
|
|
1048
|
-
this.getCCTPTransfer = (req, headers, signal) => {
|
|
1049
|
-
return this.fetch(this.url('GetCCTPTransfer'), createHttpRequest(JsonEncode(req, 'GetCCTPTransferRequest'), headers, signal)).then(res => {
|
|
1050
|
-
return buildResponse(res).then(_data => {
|
|
1051
|
-
return JsonDecode(_data, 'GetCCTPTransferResponse');
|
|
1052
|
-
});
|
|
1053
|
-
}, error => {
|
|
1054
|
-
throw WebrpcRequestFailedError.new({
|
|
1055
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
1056
|
-
});
|
|
1057
|
-
});
|
|
1058
|
-
};
|
|
1059
|
-
this.queueCCTPTransfer = (req, headers, signal) => {
|
|
1060
|
-
return this.fetch(this.url('QueueCCTPTransfer'), createHttpRequest(JsonEncode(req, 'QueueCCTPTransferRequest'), headers, signal)).then(res => {
|
|
1061
|
-
return buildResponse(res).then(_data => {
|
|
1062
|
-
return JsonDecode(_data, 'QueueCCTPTransferResponse');
|
|
1063
|
-
});
|
|
1064
|
-
}, error => {
|
|
1065
|
-
throw WebrpcRequestFailedError.new({
|
|
1066
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
1067
|
-
});
|
|
1068
|
-
});
|
|
1069
|
-
};
|
|
1070
|
-
this.queueIntentConfigExecution = (req, headers, signal) => {
|
|
1071
|
-
return this.fetch(this.url('QueueIntentConfigExecution'), createHttpRequest(JsonEncode(req, 'QueueIntentConfigExecutionRequest'), headers, signal)).then(res => {
|
|
1072
|
-
return buildResponse(res).then(_data => {
|
|
1073
|
-
return JsonDecode(_data, 'QueueIntentConfigExecutionResponse');
|
|
1074
|
-
});
|
|
1075
|
-
}, error => {
|
|
1076
|
-
throw WebrpcRequestFailedError.new({
|
|
1077
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
1078
|
-
});
|
|
1079
|
-
});
|
|
1080
|
-
};
|
|
1081
|
-
this.getIntentConfigExecutionStatus = (req, headers, signal) => {
|
|
1082
|
-
return this.fetch(this.url('GetIntentConfigExecutionStatus'), createHttpRequest(JsonEncode(req, 'GetIntentConfigExecutionStatusRequest'), headers, signal)).then(res => {
|
|
1083
|
-
return buildResponse(res).then(_data => {
|
|
1084
|
-
return JsonDecode(_data, 'GetIntentConfigExecutionStatusResponse');
|
|
1085
|
-
});
|
|
1086
|
-
}, error => {
|
|
1087
|
-
throw WebrpcRequestFailedError.new({
|
|
1088
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
1089
|
-
});
|
|
1090
|
-
});
|
|
1091
|
-
};
|
|
1092
|
-
this.listIntentConfigs = (req, headers, signal) => {
|
|
1093
|
-
return this.fetch(this.url('ListIntentConfigs'), createHttpRequest(JsonEncode(req, 'ListIntentConfigsRequest'), headers, signal)).then(res => {
|
|
1094
|
-
return buildResponse(res).then(_data => {
|
|
1095
|
-
return JsonDecode(_data, 'ListIntentConfigsResponse');
|
|
1096
|
-
});
|
|
1097
|
-
}, error => {
|
|
1098
|
-
throw WebrpcRequestFailedError.new({
|
|
1099
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
1100
|
-
});
|
|
1101
|
-
});
|
|
1102
|
-
};
|
|
1103
|
-
this.queueMetaTxnReceipt = (req, headers, signal) => {
|
|
1104
|
-
return this.fetch(this.url('QueueMetaTxnReceipt'), createHttpRequest(JsonEncode(req, 'QueueMetaTxnReceiptRequest'), headers, signal)).then(res => {
|
|
1105
|
-
return buildResponse(res).then(_data => {
|
|
1106
|
-
return JsonDecode(_data, 'QueueMetaTxnReceiptResponse');
|
|
1107
|
-
});
|
|
1108
|
-
}, error => {
|
|
1109
|
-
throw WebrpcRequestFailedError.new({
|
|
1110
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`
|
|
1111
|
-
});
|
|
1112
|
-
});
|
|
1113
|
-
};
|
|
1114
|
-
this.hostname = hostname.replace(/\/*$/, '');
|
|
1115
|
-
this.fetch = (input, init) => fetch(input, init);
|
|
1116
|
-
}
|
|
1117
|
-
url(name) {
|
|
1118
|
-
return this.hostname + this.path + name;
|
|
1119
|
-
}
|
|
1120
|
-
}
|
|
1121
|
-
const createHttpRequest = (body = '{}', headers = {}, signal = null) => {
|
|
1122
|
-
const reqHeaders = _extends({}, headers, {
|
|
1123
|
-
'Content-Type': 'application/json',
|
|
1124
|
-
[WebrpcHeader]: WebrpcHeaderValue
|
|
1125
|
-
});
|
|
1126
|
-
return {
|
|
1127
|
-
method: 'POST',
|
|
1128
|
-
headers: reqHeaders,
|
|
1129
|
-
body,
|
|
1130
|
-
signal
|
|
1131
|
-
};
|
|
1132
|
-
};
|
|
1133
|
-
const buildResponse = res => {
|
|
1134
|
-
return res.text().then(text => {
|
|
1135
|
-
let data;
|
|
1136
|
-
try {
|
|
1137
|
-
data = JSON.parse(text);
|
|
1138
|
-
} catch (error) {
|
|
1139
|
-
throw WebrpcBadResponseError.new({
|
|
1140
|
-
status: res.status,
|
|
1141
|
-
cause: `JSON.parse(): ${error instanceof Error ? error.message : String(error)}: response text: ${text}`
|
|
1142
|
-
});
|
|
1143
|
-
}
|
|
1144
|
-
if (!res.ok) {
|
|
1145
|
-
const code = typeof data.code === 'number' ? data.code : 0;
|
|
1146
|
-
throw (webrpcErrorByCode[code] || WebrpcError).new(data);
|
|
1147
|
-
}
|
|
1148
|
-
return data;
|
|
1149
|
-
});
|
|
1150
|
-
};
|
|
1151
|
-
const JsonEncode = (obj, _typ = '') => {
|
|
1152
|
-
return JSON.stringify(obj);
|
|
1153
|
-
};
|
|
1154
|
-
const JsonDecode = (data, _typ = '') => {
|
|
1155
|
-
let parsed = data;
|
|
1156
|
-
if (typeof data === 'string') {
|
|
1157
|
-
try {
|
|
1158
|
-
parsed = JSON.parse(data);
|
|
1159
|
-
} catch (err) {
|
|
1160
|
-
throw WebrpcBadResponseError.new({
|
|
1161
|
-
cause: `JsonDecode: JSON.parse failed: ${err.message}`
|
|
1162
|
-
});
|
|
1163
|
-
}
|
|
1164
|
-
}
|
|
1165
|
-
return parsed;
|
|
1166
|
-
};
|
|
1167
|
-
|
|
1168
|
-
//
|
|
1169
|
-
// Errors
|
|
1170
|
-
//
|
|
1171
|
-
|
|
1172
|
-
class WebrpcError extends Error {
|
|
1173
|
-
constructor(error = {}) {
|
|
1174
|
-
super(error.message);
|
|
1175
|
-
this.code = void 0;
|
|
1176
|
-
this.status = void 0;
|
|
1177
|
-
this.name = error.name || 'WebrpcEndpointError';
|
|
1178
|
-
this.code = typeof error.code === 'number' ? error.code : 0;
|
|
1179
|
-
this.message = error.message || `endpoint error`;
|
|
1180
|
-
this.status = typeof error.status === 'number' ? error.status : 400;
|
|
1181
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1182
|
-
Object.setPrototypeOf(this, WebrpcError.prototype);
|
|
1183
|
-
}
|
|
1184
|
-
static new(payload) {
|
|
1185
|
-
return new this({
|
|
1186
|
-
message: payload.message,
|
|
1187
|
-
code: payload.code,
|
|
1188
|
-
status: payload.status,
|
|
1189
|
-
cause: payload.cause
|
|
1190
|
-
});
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
1193
|
-
class WebrpcEndpointError extends WebrpcError {
|
|
1194
|
-
constructor(error = {}) {
|
|
1195
|
-
super(error);
|
|
1196
|
-
this.name = error.name || 'WebrpcEndpoint';
|
|
1197
|
-
this.code = typeof error.code === 'number' ? error.code : 0;
|
|
1198
|
-
this.message = error.message || `endpoint error`;
|
|
1199
|
-
this.status = typeof error.status === 'number' ? error.status : 400;
|
|
1200
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1201
|
-
Object.setPrototypeOf(this, WebrpcEndpointError.prototype);
|
|
1202
|
-
}
|
|
1203
|
-
}
|
|
1204
|
-
class WebrpcRequestFailedError extends WebrpcError {
|
|
1205
|
-
constructor(error = {}) {
|
|
1206
|
-
super(error);
|
|
1207
|
-
this.name = error.name || 'WebrpcRequestFailed';
|
|
1208
|
-
this.code = typeof error.code === 'number' ? error.code : -1;
|
|
1209
|
-
this.message = error.message || `request failed`;
|
|
1210
|
-
this.status = typeof error.status === 'number' ? error.status : 400;
|
|
1211
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1212
|
-
Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype);
|
|
1213
|
-
}
|
|
1214
|
-
}
|
|
1215
|
-
class WebrpcBadRouteError extends WebrpcError {
|
|
1216
|
-
constructor(error = {}) {
|
|
1217
|
-
super(error);
|
|
1218
|
-
this.name = error.name || 'WebrpcBadRoute';
|
|
1219
|
-
this.code = typeof error.code === 'number' ? error.code : -2;
|
|
1220
|
-
this.message = error.message || `bad route`;
|
|
1221
|
-
this.status = typeof error.status === 'number' ? error.status : 404;
|
|
1222
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1223
|
-
Object.setPrototypeOf(this, WebrpcBadRouteError.prototype);
|
|
1224
|
-
}
|
|
1225
|
-
}
|
|
1226
|
-
class WebrpcBadMethodError extends WebrpcError {
|
|
1227
|
-
constructor(error = {}) {
|
|
1228
|
-
super(error);
|
|
1229
|
-
this.name = error.name || 'WebrpcBadMethod';
|
|
1230
|
-
this.code = typeof error.code === 'number' ? error.code : -3;
|
|
1231
|
-
this.message = error.message || `bad method`;
|
|
1232
|
-
this.status = typeof error.status === 'number' ? error.status : 405;
|
|
1233
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1234
|
-
Object.setPrototypeOf(this, WebrpcBadMethodError.prototype);
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
class WebrpcBadRequestError extends WebrpcError {
|
|
1238
|
-
constructor(error = {}) {
|
|
1239
|
-
super(error);
|
|
1240
|
-
this.name = error.name || 'WebrpcBadRequest';
|
|
1241
|
-
this.code = typeof error.code === 'number' ? error.code : -4;
|
|
1242
|
-
this.message = error.message || `bad request`;
|
|
1243
|
-
this.status = typeof error.status === 'number' ? error.status : 400;
|
|
1244
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1245
|
-
Object.setPrototypeOf(this, WebrpcBadRequestError.prototype);
|
|
1246
|
-
}
|
|
1247
|
-
}
|
|
1248
|
-
class WebrpcBadResponseError extends WebrpcError {
|
|
1249
|
-
constructor(error = {}) {
|
|
1250
|
-
super(error);
|
|
1251
|
-
this.name = error.name || 'WebrpcBadResponse';
|
|
1252
|
-
this.code = typeof error.code === 'number' ? error.code : -5;
|
|
1253
|
-
this.message = error.message || `bad response`;
|
|
1254
|
-
this.status = typeof error.status === 'number' ? error.status : 500;
|
|
1255
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1256
|
-
Object.setPrototypeOf(this, WebrpcBadResponseError.prototype);
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
class WebrpcServerPanicError extends WebrpcError {
|
|
1260
|
-
constructor(error = {}) {
|
|
1261
|
-
super(error);
|
|
1262
|
-
this.name = error.name || 'WebrpcServerPanic';
|
|
1263
|
-
this.code = typeof error.code === 'number' ? error.code : -6;
|
|
1264
|
-
this.message = error.message || `server panic`;
|
|
1265
|
-
this.status = typeof error.status === 'number' ? error.status : 500;
|
|
1266
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1267
|
-
Object.setPrototypeOf(this, WebrpcServerPanicError.prototype);
|
|
1268
|
-
}
|
|
1269
|
-
}
|
|
1270
|
-
class WebrpcInternalErrorError extends WebrpcError {
|
|
1271
|
-
constructor(error = {}) {
|
|
1272
|
-
super(error);
|
|
1273
|
-
this.name = error.name || 'WebrpcInternalError';
|
|
1274
|
-
this.code = typeof error.code === 'number' ? error.code : -7;
|
|
1275
|
-
this.message = error.message || `internal error`;
|
|
1276
|
-
this.status = typeof error.status === 'number' ? error.status : 500;
|
|
1277
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1278
|
-
Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype);
|
|
1279
|
-
}
|
|
1280
|
-
}
|
|
1281
|
-
class WebrpcClientAbortedError extends WebrpcError {
|
|
1282
|
-
constructor(error = {}) {
|
|
1283
|
-
super(error);
|
|
1284
|
-
this.name = error.name || 'WebrpcClientAborted';
|
|
1285
|
-
this.code = typeof error.code === 'number' ? error.code : -8;
|
|
1286
|
-
this.message = error.message || `request aborted by client`;
|
|
1287
|
-
this.status = typeof error.status === 'number' ? error.status : 400;
|
|
1288
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1289
|
-
Object.setPrototypeOf(this, WebrpcClientAbortedError.prototype);
|
|
1290
|
-
}
|
|
1291
|
-
}
|
|
1292
|
-
class WebrpcStreamLostError extends WebrpcError {
|
|
1293
|
-
constructor(error = {}) {
|
|
1294
|
-
super(error);
|
|
1295
|
-
this.name = error.name || 'WebrpcStreamLost';
|
|
1296
|
-
this.code = typeof error.code === 'number' ? error.code : -9;
|
|
1297
|
-
this.message = error.message || `stream lost`;
|
|
1298
|
-
this.status = typeof error.status === 'number' ? error.status : 400;
|
|
1299
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1300
|
-
Object.setPrototypeOf(this, WebrpcStreamLostError.prototype);
|
|
1301
|
-
}
|
|
1302
|
-
}
|
|
1303
|
-
class WebrpcStreamFinishedError extends WebrpcError {
|
|
1304
|
-
constructor(error = {}) {
|
|
1305
|
-
super(error);
|
|
1306
|
-
this.name = error.name || 'WebrpcStreamFinished';
|
|
1307
|
-
this.code = typeof error.code === 'number' ? error.code : -10;
|
|
1308
|
-
this.message = error.message || `stream finished`;
|
|
1309
|
-
this.status = typeof error.status === 'number' ? error.status : 200;
|
|
1310
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1311
|
-
Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype);
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
//
|
|
1316
|
-
// Schema errors
|
|
1317
|
-
//
|
|
1318
|
-
|
|
1319
|
-
class UnauthorizedError extends WebrpcError {
|
|
1320
|
-
constructor(error = {}) {
|
|
1321
|
-
super(error);
|
|
1322
|
-
this.name = error.name || 'Unauthorized';
|
|
1323
|
-
this.code = typeof error.code === 'number' ? error.code : 1000;
|
|
1324
|
-
this.message = error.message || `Unauthorized access`;
|
|
1325
|
-
this.status = typeof error.status === 'number' ? error.status : 401;
|
|
1326
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1327
|
-
Object.setPrototypeOf(this, UnauthorizedError.prototype);
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
class PermissionDeniedError extends WebrpcError {
|
|
1331
|
-
constructor(error = {}) {
|
|
1332
|
-
super(error);
|
|
1333
|
-
this.name = error.name || 'PermissionDenied';
|
|
1334
|
-
this.code = typeof error.code === 'number' ? error.code : 1001;
|
|
1335
|
-
this.message = error.message || `Permission denied`;
|
|
1336
|
-
this.status = typeof error.status === 'number' ? error.status : 403;
|
|
1337
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1338
|
-
Object.setPrototypeOf(this, PermissionDeniedError.prototype);
|
|
1339
|
-
}
|
|
1340
|
-
}
|
|
1341
|
-
class SessionExpiredError extends WebrpcError {
|
|
1342
|
-
constructor(error = {}) {
|
|
1343
|
-
super(error);
|
|
1344
|
-
this.name = error.name || 'SessionExpired';
|
|
1345
|
-
this.code = typeof error.code === 'number' ? error.code : 1002;
|
|
1346
|
-
this.message = error.message || `Session expired`;
|
|
1347
|
-
this.status = typeof error.status === 'number' ? error.status : 403;
|
|
1348
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1349
|
-
Object.setPrototypeOf(this, SessionExpiredError.prototype);
|
|
1350
|
-
}
|
|
1351
|
-
}
|
|
1352
|
-
class MethodNotFoundError extends WebrpcError {
|
|
1353
|
-
constructor(error = {}) {
|
|
1354
|
-
super(error);
|
|
1355
|
-
this.name = error.name || 'MethodNotFound';
|
|
1356
|
-
this.code = typeof error.code === 'number' ? error.code : 1003;
|
|
1357
|
-
this.message = error.message || `Method not found`;
|
|
1358
|
-
this.status = typeof error.status === 'number' ? error.status : 404;
|
|
1359
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1360
|
-
Object.setPrototypeOf(this, MethodNotFoundError.prototype);
|
|
1361
|
-
}
|
|
1362
|
-
}
|
|
1363
|
-
class RequestConflictError extends WebrpcError {
|
|
1364
|
-
constructor(error = {}) {
|
|
1365
|
-
super(error);
|
|
1366
|
-
this.name = error.name || 'RequestConflict';
|
|
1367
|
-
this.code = typeof error.code === 'number' ? error.code : 1004;
|
|
1368
|
-
this.message = error.message || `Conflict with target resource`;
|
|
1369
|
-
this.status = typeof error.status === 'number' ? error.status : 409;
|
|
1370
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1371
|
-
Object.setPrototypeOf(this, RequestConflictError.prototype);
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
class AbortedError extends WebrpcError {
|
|
1375
|
-
constructor(error = {}) {
|
|
1376
|
-
super(error);
|
|
1377
|
-
this.name = error.name || 'Aborted';
|
|
1378
|
-
this.code = typeof error.code === 'number' ? error.code : 1005;
|
|
1379
|
-
this.message = error.message || `Request aborted`;
|
|
1380
|
-
this.status = typeof error.status === 'number' ? error.status : 400;
|
|
1381
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1382
|
-
Object.setPrototypeOf(this, AbortedError.prototype);
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
class GeoblockedError extends WebrpcError {
|
|
1386
|
-
constructor(error = {}) {
|
|
1387
|
-
super(error);
|
|
1388
|
-
this.name = error.name || 'Geoblocked';
|
|
1389
|
-
this.code = typeof error.code === 'number' ? error.code : 1006;
|
|
1390
|
-
this.message = error.message || `Geoblocked region`;
|
|
1391
|
-
this.status = typeof error.status === 'number' ? error.status : 451;
|
|
1392
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1393
|
-
Object.setPrototypeOf(this, GeoblockedError.prototype);
|
|
1394
|
-
}
|
|
1395
|
-
}
|
|
1396
|
-
class RateLimitedError extends WebrpcError {
|
|
1397
|
-
constructor(error = {}) {
|
|
1398
|
-
super(error);
|
|
1399
|
-
this.name = error.name || 'RateLimited';
|
|
1400
|
-
this.code = typeof error.code === 'number' ? error.code : 1007;
|
|
1401
|
-
this.message = error.message || `Rate-limited. Please slow down.`;
|
|
1402
|
-
this.status = typeof error.status === 'number' ? error.status : 429;
|
|
1403
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1404
|
-
Object.setPrototypeOf(this, RateLimitedError.prototype);
|
|
1405
|
-
}
|
|
1406
|
-
}
|
|
1407
|
-
class ProjectNotFoundError extends WebrpcError {
|
|
1408
|
-
constructor(error = {}) {
|
|
1409
|
-
super(error);
|
|
1410
|
-
this.name = error.name || 'ProjectNotFound';
|
|
1411
|
-
this.code = typeof error.code === 'number' ? error.code : 1008;
|
|
1412
|
-
this.message = error.message || `Project not found`;
|
|
1413
|
-
this.status = typeof error.status === 'number' ? error.status : 401;
|
|
1414
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1415
|
-
Object.setPrototypeOf(this, ProjectNotFoundError.prototype);
|
|
1416
|
-
}
|
|
1417
|
-
}
|
|
1418
|
-
class AccessKeyNotFoundError extends WebrpcError {
|
|
1419
|
-
constructor(error = {}) {
|
|
1420
|
-
super(error);
|
|
1421
|
-
this.name = error.name || 'AccessKeyNotFound';
|
|
1422
|
-
this.code = typeof error.code === 'number' ? error.code : 1101;
|
|
1423
|
-
this.message = error.message || `Access key not found`;
|
|
1424
|
-
this.status = typeof error.status === 'number' ? error.status : 401;
|
|
1425
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1426
|
-
Object.setPrototypeOf(this, AccessKeyNotFoundError.prototype);
|
|
1427
|
-
}
|
|
1428
|
-
}
|
|
1429
|
-
class AccessKeyMismatchError extends WebrpcError {
|
|
1430
|
-
constructor(error = {}) {
|
|
1431
|
-
super(error);
|
|
1432
|
-
this.name = error.name || 'AccessKeyMismatch';
|
|
1433
|
-
this.code = typeof error.code === 'number' ? error.code : 1102;
|
|
1434
|
-
this.message = error.message || `Access key mismatch`;
|
|
1435
|
-
this.status = typeof error.status === 'number' ? error.status : 409;
|
|
1436
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1437
|
-
Object.setPrototypeOf(this, AccessKeyMismatchError.prototype);
|
|
1438
|
-
}
|
|
1439
|
-
}
|
|
1440
|
-
class InvalidOriginError extends WebrpcError {
|
|
1441
|
-
constructor(error = {}) {
|
|
1442
|
-
super(error);
|
|
1443
|
-
this.name = error.name || 'InvalidOrigin';
|
|
1444
|
-
this.code = typeof error.code === 'number' ? error.code : 1103;
|
|
1445
|
-
this.message = error.message || `Invalid origin for Access Key`;
|
|
1446
|
-
this.status = typeof error.status === 'number' ? error.status : 403;
|
|
1447
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1448
|
-
Object.setPrototypeOf(this, InvalidOriginError.prototype);
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
class InvalidServiceError extends WebrpcError {
|
|
1452
|
-
constructor(error = {}) {
|
|
1453
|
-
super(error);
|
|
1454
|
-
this.name = error.name || 'InvalidService';
|
|
1455
|
-
this.code = typeof error.code === 'number' ? error.code : 1104;
|
|
1456
|
-
this.message = error.message || `Service not enabled for Access key`;
|
|
1457
|
-
this.status = typeof error.status === 'number' ? error.status : 403;
|
|
1458
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1459
|
-
Object.setPrototypeOf(this, InvalidServiceError.prototype);
|
|
1460
|
-
}
|
|
1461
|
-
}
|
|
1462
|
-
class UnauthorizedUserError extends WebrpcError {
|
|
1463
|
-
constructor(error = {}) {
|
|
1464
|
-
super(error);
|
|
1465
|
-
this.name = error.name || 'UnauthorizedUser';
|
|
1466
|
-
this.code = typeof error.code === 'number' ? error.code : 1105;
|
|
1467
|
-
this.message = error.message || `Unauthorized user`;
|
|
1468
|
-
this.status = typeof error.status === 'number' ? error.status : 403;
|
|
1469
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1470
|
-
Object.setPrototypeOf(this, UnauthorizedUserError.prototype);
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
class QuotaExceededError extends WebrpcError {
|
|
1474
|
-
constructor(error = {}) {
|
|
1475
|
-
super(error);
|
|
1476
|
-
this.name = error.name || 'QuotaExceeded';
|
|
1477
|
-
this.code = typeof error.code === 'number' ? error.code : 1200;
|
|
1478
|
-
this.message = error.message || `Quota request exceeded`;
|
|
1479
|
-
this.status = typeof error.status === 'number' ? error.status : 429;
|
|
1480
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1481
|
-
Object.setPrototypeOf(this, QuotaExceededError.prototype);
|
|
1482
|
-
}
|
|
1483
|
-
}
|
|
1484
|
-
class QuotaRateLimitError extends WebrpcError {
|
|
1485
|
-
constructor(error = {}) {
|
|
1486
|
-
super(error);
|
|
1487
|
-
this.name = error.name || 'QuotaRateLimit';
|
|
1488
|
-
this.code = typeof error.code === 'number' ? error.code : 1201;
|
|
1489
|
-
this.message = error.message || `Quota rate limit exceeded`;
|
|
1490
|
-
this.status = typeof error.status === 'number' ? error.status : 429;
|
|
1491
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1492
|
-
Object.setPrototypeOf(this, QuotaRateLimitError.prototype);
|
|
1493
|
-
}
|
|
1494
|
-
}
|
|
1495
|
-
class NoDefaultKeyError extends WebrpcError {
|
|
1496
|
-
constructor(error = {}) {
|
|
1497
|
-
super(error);
|
|
1498
|
-
this.name = error.name || 'NoDefaultKey';
|
|
1499
|
-
this.code = typeof error.code === 'number' ? error.code : 1300;
|
|
1500
|
-
this.message = error.message || `No default access key found`;
|
|
1501
|
-
this.status = typeof error.status === 'number' ? error.status : 403;
|
|
1502
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1503
|
-
Object.setPrototypeOf(this, NoDefaultKeyError.prototype);
|
|
1504
|
-
}
|
|
1505
|
-
}
|
|
1506
|
-
class MaxAccessKeysError extends WebrpcError {
|
|
1507
|
-
constructor(error = {}) {
|
|
1508
|
-
super(error);
|
|
1509
|
-
this.name = error.name || 'MaxAccessKeys';
|
|
1510
|
-
this.code = typeof error.code === 'number' ? error.code : 1301;
|
|
1511
|
-
this.message = error.message || `Access keys limit reached`;
|
|
1512
|
-
this.status = typeof error.status === 'number' ? error.status : 403;
|
|
1513
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1514
|
-
Object.setPrototypeOf(this, MaxAccessKeysError.prototype);
|
|
1515
|
-
}
|
|
1516
|
-
}
|
|
1517
|
-
class AtLeastOneKeyError extends WebrpcError {
|
|
1518
|
-
constructor(error = {}) {
|
|
1519
|
-
super(error);
|
|
1520
|
-
this.name = error.name || 'AtLeastOneKey';
|
|
1521
|
-
this.code = typeof error.code === 'number' ? error.code : 1302;
|
|
1522
|
-
this.message = error.message || `You need at least one Access Key`;
|
|
1523
|
-
this.status = typeof error.status === 'number' ? error.status : 403;
|
|
1524
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1525
|
-
Object.setPrototypeOf(this, AtLeastOneKeyError.prototype);
|
|
1526
|
-
}
|
|
1527
|
-
}
|
|
1528
|
-
class TimeoutError extends WebrpcError {
|
|
1529
|
-
constructor(error = {}) {
|
|
1530
|
-
super(error);
|
|
1531
|
-
this.name = error.name || 'Timeout';
|
|
1532
|
-
this.code = typeof error.code === 'number' ? error.code : 1900;
|
|
1533
|
-
this.message = error.message || `Request timed out`;
|
|
1534
|
-
this.status = typeof error.status === 'number' ? error.status : 408;
|
|
1535
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1536
|
-
Object.setPrototypeOf(this, TimeoutError.prototype);
|
|
1537
|
-
}
|
|
1538
|
-
}
|
|
1539
|
-
class InvalidArgumentError extends WebrpcError {
|
|
1540
|
-
constructor(error = {}) {
|
|
1541
|
-
super(error);
|
|
1542
|
-
this.name = error.name || 'InvalidArgument';
|
|
1543
|
-
this.code = typeof error.code === 'number' ? error.code : 2000;
|
|
1544
|
-
this.message = error.message || `Invalid argument`;
|
|
1545
|
-
this.status = typeof error.status === 'number' ? error.status : 400;
|
|
1546
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1547
|
-
Object.setPrototypeOf(this, InvalidArgumentError.prototype);
|
|
1548
|
-
}
|
|
1549
|
-
}
|
|
1550
|
-
class UnavailableError extends WebrpcError {
|
|
1551
|
-
constructor(error = {}) {
|
|
1552
|
-
super(error);
|
|
1553
|
-
this.name = error.name || 'Unavailable';
|
|
1554
|
-
this.code = typeof error.code === 'number' ? error.code : 2002;
|
|
1555
|
-
this.message = error.message || `Unavailable resource`;
|
|
1556
|
-
this.status = typeof error.status === 'number' ? error.status : 400;
|
|
1557
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1558
|
-
Object.setPrototypeOf(this, UnavailableError.prototype);
|
|
1559
|
-
}
|
|
1560
|
-
}
|
|
1561
|
-
class QueryFailedError extends WebrpcError {
|
|
1562
|
-
constructor(error = {}) {
|
|
1563
|
-
super(error);
|
|
1564
|
-
this.name = error.name || 'QueryFailed';
|
|
1565
|
-
this.code = typeof error.code === 'number' ? error.code : 2003;
|
|
1566
|
-
this.message = error.message || `Query failed`;
|
|
1567
|
-
this.status = typeof error.status === 'number' ? error.status : 400;
|
|
1568
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1569
|
-
Object.setPrototypeOf(this, QueryFailedError.prototype);
|
|
1570
|
-
}
|
|
1571
|
-
}
|
|
1572
|
-
class NotFoundError extends WebrpcError {
|
|
1573
|
-
constructor(error = {}) {
|
|
1574
|
-
super(error);
|
|
1575
|
-
this.name = error.name || 'NotFound';
|
|
1576
|
-
this.code = typeof error.code === 'number' ? error.code : 3000;
|
|
1577
|
-
this.message = error.message || `Resource not found`;
|
|
1578
|
-
this.status = typeof error.status === 'number' ? error.status : 400;
|
|
1579
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1580
|
-
Object.setPrototypeOf(this, NotFoundError.prototype);
|
|
1581
|
-
}
|
|
1582
|
-
}
|
|
1583
|
-
class UnsupportedNetworkError extends WebrpcError {
|
|
1584
|
-
constructor(error = {}) {
|
|
1585
|
-
super(error);
|
|
1586
|
-
this.name = error.name || 'UnsupportedNetwork';
|
|
1587
|
-
this.code = typeof error.code === 'number' ? error.code : 3008;
|
|
1588
|
-
this.message = error.message || `Unsupported network`;
|
|
1589
|
-
this.status = typeof error.status === 'number' ? error.status : 422;
|
|
1590
|
-
if (error.cause !== undefined) this.cause = error.cause;
|
|
1591
|
-
Object.setPrototypeOf(this, UnsupportedNetworkError.prototype);
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
let errors = /*#__PURE__*/function (errors) {
|
|
1595
|
-
errors["WebrpcEndpoint"] = "WebrpcEndpoint";
|
|
1596
|
-
errors["WebrpcRequestFailed"] = "WebrpcRequestFailed";
|
|
1597
|
-
errors["WebrpcBadRoute"] = "WebrpcBadRoute";
|
|
1598
|
-
errors["WebrpcBadMethod"] = "WebrpcBadMethod";
|
|
1599
|
-
errors["WebrpcBadRequest"] = "WebrpcBadRequest";
|
|
1600
|
-
errors["WebrpcBadResponse"] = "WebrpcBadResponse";
|
|
1601
|
-
errors["WebrpcServerPanic"] = "WebrpcServerPanic";
|
|
1602
|
-
errors["WebrpcInternalError"] = "WebrpcInternalError";
|
|
1603
|
-
errors["WebrpcClientAborted"] = "WebrpcClientAborted";
|
|
1604
|
-
errors["WebrpcStreamLost"] = "WebrpcStreamLost";
|
|
1605
|
-
errors["WebrpcStreamFinished"] = "WebrpcStreamFinished";
|
|
1606
|
-
errors["Unauthorized"] = "Unauthorized";
|
|
1607
|
-
errors["PermissionDenied"] = "PermissionDenied";
|
|
1608
|
-
errors["SessionExpired"] = "SessionExpired";
|
|
1609
|
-
errors["MethodNotFound"] = "MethodNotFound";
|
|
1610
|
-
errors["RequestConflict"] = "RequestConflict";
|
|
1611
|
-
errors["Aborted"] = "Aborted";
|
|
1612
|
-
errors["Geoblocked"] = "Geoblocked";
|
|
1613
|
-
errors["RateLimited"] = "RateLimited";
|
|
1614
|
-
errors["ProjectNotFound"] = "ProjectNotFound";
|
|
1615
|
-
errors["AccessKeyNotFound"] = "AccessKeyNotFound";
|
|
1616
|
-
errors["AccessKeyMismatch"] = "AccessKeyMismatch";
|
|
1617
|
-
errors["InvalidOrigin"] = "InvalidOrigin";
|
|
1618
|
-
errors["InvalidService"] = "InvalidService";
|
|
1619
|
-
errors["UnauthorizedUser"] = "UnauthorizedUser";
|
|
1620
|
-
errors["QuotaExceeded"] = "QuotaExceeded";
|
|
1621
|
-
errors["QuotaRateLimit"] = "QuotaRateLimit";
|
|
1622
|
-
errors["NoDefaultKey"] = "NoDefaultKey";
|
|
1623
|
-
errors["MaxAccessKeys"] = "MaxAccessKeys";
|
|
1624
|
-
errors["AtLeastOneKey"] = "AtLeastOneKey";
|
|
1625
|
-
errors["Timeout"] = "Timeout";
|
|
1626
|
-
errors["InvalidArgument"] = "InvalidArgument";
|
|
1627
|
-
errors["Unavailable"] = "Unavailable";
|
|
1628
|
-
errors["QueryFailed"] = "QueryFailed";
|
|
1629
|
-
errors["NotFound"] = "NotFound";
|
|
1630
|
-
errors["UnsupportedNetwork"] = "UnsupportedNetwork";
|
|
1631
|
-
return errors;
|
|
1632
|
-
}({});
|
|
1633
|
-
let WebrpcErrorCodes = /*#__PURE__*/function (WebrpcErrorCodes) {
|
|
1634
|
-
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcEndpoint"] = 0] = "WebrpcEndpoint";
|
|
1635
|
-
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcRequestFailed"] = -1] = "WebrpcRequestFailed";
|
|
1636
|
-
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadRoute"] = -2] = "WebrpcBadRoute";
|
|
1637
|
-
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadMethod"] = -3] = "WebrpcBadMethod";
|
|
1638
|
-
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadRequest"] = -4] = "WebrpcBadRequest";
|
|
1639
|
-
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcBadResponse"] = -5] = "WebrpcBadResponse";
|
|
1640
|
-
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcServerPanic"] = -6] = "WebrpcServerPanic";
|
|
1641
|
-
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcInternalError"] = -7] = "WebrpcInternalError";
|
|
1642
|
-
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcClientAborted"] = -8] = "WebrpcClientAborted";
|
|
1643
|
-
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcStreamLost"] = -9] = "WebrpcStreamLost";
|
|
1644
|
-
WebrpcErrorCodes[WebrpcErrorCodes["WebrpcStreamFinished"] = -10] = "WebrpcStreamFinished";
|
|
1645
|
-
WebrpcErrorCodes[WebrpcErrorCodes["Unauthorized"] = 1000] = "Unauthorized";
|
|
1646
|
-
WebrpcErrorCodes[WebrpcErrorCodes["PermissionDenied"] = 1001] = "PermissionDenied";
|
|
1647
|
-
WebrpcErrorCodes[WebrpcErrorCodes["SessionExpired"] = 1002] = "SessionExpired";
|
|
1648
|
-
WebrpcErrorCodes[WebrpcErrorCodes["MethodNotFound"] = 1003] = "MethodNotFound";
|
|
1649
|
-
WebrpcErrorCodes[WebrpcErrorCodes["RequestConflict"] = 1004] = "RequestConflict";
|
|
1650
|
-
WebrpcErrorCodes[WebrpcErrorCodes["Aborted"] = 1005] = "Aborted";
|
|
1651
|
-
WebrpcErrorCodes[WebrpcErrorCodes["Geoblocked"] = 1006] = "Geoblocked";
|
|
1652
|
-
WebrpcErrorCodes[WebrpcErrorCodes["RateLimited"] = 1007] = "RateLimited";
|
|
1653
|
-
WebrpcErrorCodes[WebrpcErrorCodes["ProjectNotFound"] = 1008] = "ProjectNotFound";
|
|
1654
|
-
WebrpcErrorCodes[WebrpcErrorCodes["AccessKeyNotFound"] = 1101] = "AccessKeyNotFound";
|
|
1655
|
-
WebrpcErrorCodes[WebrpcErrorCodes["AccessKeyMismatch"] = 1102] = "AccessKeyMismatch";
|
|
1656
|
-
WebrpcErrorCodes[WebrpcErrorCodes["InvalidOrigin"] = 1103] = "InvalidOrigin";
|
|
1657
|
-
WebrpcErrorCodes[WebrpcErrorCodes["InvalidService"] = 1104] = "InvalidService";
|
|
1658
|
-
WebrpcErrorCodes[WebrpcErrorCodes["UnauthorizedUser"] = 1105] = "UnauthorizedUser";
|
|
1659
|
-
WebrpcErrorCodes[WebrpcErrorCodes["QuotaExceeded"] = 1200] = "QuotaExceeded";
|
|
1660
|
-
WebrpcErrorCodes[WebrpcErrorCodes["QuotaRateLimit"] = 1201] = "QuotaRateLimit";
|
|
1661
|
-
WebrpcErrorCodes[WebrpcErrorCodes["NoDefaultKey"] = 1300] = "NoDefaultKey";
|
|
1662
|
-
WebrpcErrorCodes[WebrpcErrorCodes["MaxAccessKeys"] = 1301] = "MaxAccessKeys";
|
|
1663
|
-
WebrpcErrorCodes[WebrpcErrorCodes["AtLeastOneKey"] = 1302] = "AtLeastOneKey";
|
|
1664
|
-
WebrpcErrorCodes[WebrpcErrorCodes["Timeout"] = 1900] = "Timeout";
|
|
1665
|
-
WebrpcErrorCodes[WebrpcErrorCodes["InvalidArgument"] = 2000] = "InvalidArgument";
|
|
1666
|
-
WebrpcErrorCodes[WebrpcErrorCodes["Unavailable"] = 2002] = "Unavailable";
|
|
1667
|
-
WebrpcErrorCodes[WebrpcErrorCodes["QueryFailed"] = 2003] = "QueryFailed";
|
|
1668
|
-
WebrpcErrorCodes[WebrpcErrorCodes["NotFound"] = 3000] = "NotFound";
|
|
1669
|
-
WebrpcErrorCodes[WebrpcErrorCodes["UnsupportedNetwork"] = 3008] = "UnsupportedNetwork";
|
|
1670
|
-
return WebrpcErrorCodes;
|
|
1671
|
-
}({});
|
|
1672
|
-
const webrpcErrorByCode = {
|
|
1673
|
-
[0]: WebrpcEndpointError,
|
|
1674
|
-
[-1]: WebrpcRequestFailedError,
|
|
1675
|
-
[-2]: WebrpcBadRouteError,
|
|
1676
|
-
[-3]: WebrpcBadMethodError,
|
|
1677
|
-
[-4]: WebrpcBadRequestError,
|
|
1678
|
-
[-5]: WebrpcBadResponseError,
|
|
1679
|
-
[-6]: WebrpcServerPanicError,
|
|
1680
|
-
[-7]: WebrpcInternalErrorError,
|
|
1681
|
-
[-8]: WebrpcClientAbortedError,
|
|
1682
|
-
[-9]: WebrpcStreamLostError,
|
|
1683
|
-
[-10]: WebrpcStreamFinishedError,
|
|
1684
|
-
[1000]: UnauthorizedError,
|
|
1685
|
-
[1001]: PermissionDeniedError,
|
|
1686
|
-
[1002]: SessionExpiredError,
|
|
1687
|
-
[1003]: MethodNotFoundError,
|
|
1688
|
-
[1004]: RequestConflictError,
|
|
1689
|
-
[1005]: AbortedError,
|
|
1690
|
-
[1006]: GeoblockedError,
|
|
1691
|
-
[1007]: RateLimitedError,
|
|
1692
|
-
[1008]: ProjectNotFoundError,
|
|
1693
|
-
[1101]: AccessKeyNotFoundError,
|
|
1694
|
-
[1102]: AccessKeyMismatchError,
|
|
1695
|
-
[1103]: InvalidOriginError,
|
|
1696
|
-
[1104]: InvalidServiceError,
|
|
1697
|
-
[1105]: UnauthorizedUserError,
|
|
1698
|
-
[1200]: QuotaExceededError,
|
|
1699
|
-
[1201]: QuotaRateLimitError,
|
|
1700
|
-
[1300]: NoDefaultKeyError,
|
|
1701
|
-
[1301]: MaxAccessKeysError,
|
|
1702
|
-
[1302]: AtLeastOneKeyError,
|
|
1703
|
-
[1900]: TimeoutError,
|
|
1704
|
-
[2000]: InvalidArgumentError,
|
|
1705
|
-
[2002]: UnavailableError,
|
|
1706
|
-
[2003]: QueryFailedError,
|
|
1707
|
-
[3000]: NotFoundError,
|
|
1708
|
-
[3008]: UnsupportedNetworkError
|
|
1709
|
-
};
|
|
1710
|
-
|
|
1711
|
-
//
|
|
1712
|
-
// Webrpc
|
|
1713
|
-
//
|
|
1714
|
-
|
|
1715
|
-
const WebrpcHeader = 'Webrpc';
|
|
1716
|
-
const WebrpcHeaderValue = 'webrpc@v0.31.0;gen-typescript@v0.22.5;sequence-api@v0.4.0';
|
|
1717
|
-
function VersionFromHeader(headers) {
|
|
1718
|
-
const headerValue = headers.get(WebrpcHeader);
|
|
1719
|
-
if (!headerValue) {
|
|
1720
|
-
return {
|
|
1721
|
-
WebrpcGenVersion: '',
|
|
1722
|
-
codeGenName: '',
|
|
1723
|
-
codeGenVersion: '',
|
|
1724
|
-
schemaName: '',
|
|
1725
|
-
schemaVersion: ''
|
|
1726
|
-
};
|
|
1727
|
-
}
|
|
1728
|
-
return parseWebrpcGenVersions(headerValue);
|
|
1729
|
-
}
|
|
1730
|
-
function parseWebrpcGenVersions(header) {
|
|
1731
|
-
const versions = header.split(';');
|
|
1732
|
-
if (versions.length < 3) {
|
|
1733
|
-
return {
|
|
1734
|
-
WebrpcGenVersion: '',
|
|
1735
|
-
codeGenName: '',
|
|
1736
|
-
codeGenVersion: '',
|
|
1737
|
-
schemaName: '',
|
|
1738
|
-
schemaVersion: ''
|
|
1739
|
-
};
|
|
1740
|
-
}
|
|
1741
|
-
const [_, WebrpcGenVersion] = versions[0].split('@');
|
|
1742
|
-
const [codeGenName, codeGenVersion] = versions[1].split('@');
|
|
1743
|
-
const [schemaName, schemaVersion] = versions[2].split('@');
|
|
1744
|
-
return {
|
|
1745
|
-
WebrpcGenVersion: WebrpcGenVersion != null ? WebrpcGenVersion : '',
|
|
1746
|
-
codeGenName: codeGenName != null ? codeGenName : '',
|
|
1747
|
-
codeGenVersion: codeGenVersion != null ? codeGenVersion : '',
|
|
1748
|
-
schemaName: schemaName != null ? schemaName : '',
|
|
1749
|
-
schemaVersion: schemaVersion != null ? schemaVersion : ''
|
|
1750
|
-
};
|
|
1751
|
-
}
|
|
1752
|
-
|
|
1753
|
-
class SequenceAPIClient extends API {
|
|
1754
|
-
constructor(hostname, projectAccessKey, jwtAuth) {
|
|
1755
|
-
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
|
|
1756
|
-
this.projectAccessKey = projectAccessKey;
|
|
1757
|
-
this.jwtAuth = jwtAuth;
|
|
1758
|
-
this._fetch = (input, init) => {
|
|
1759
|
-
// automatically include jwt and access key auth header to requests
|
|
1760
|
-
// if its been set on the api client
|
|
1761
|
-
const headers = {};
|
|
1762
|
-
const jwtAuth = this.jwtAuth;
|
|
1763
|
-
const projectAccessKey = this.projectAccessKey;
|
|
1764
|
-
if (jwtAuth && jwtAuth.length > 0) {
|
|
1765
|
-
headers['Authorization'] = `BEARER ${jwtAuth}`;
|
|
1766
|
-
}
|
|
1767
|
-
if (projectAccessKey && projectAccessKey.length > 0) {
|
|
1768
|
-
headers['X-Access-Key'] = projectAccessKey;
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
|
-
// before the request is made
|
|
1772
|
-
init.headers = _extends({}, init.headers, headers);
|
|
1773
|
-
return fetch(input, init);
|
|
1774
|
-
};
|
|
1775
|
-
this.fetch = this._fetch;
|
|
1776
|
-
}
|
|
1777
|
-
}
|
|
1778
|
-
|
|
1779
|
-
export { API, AbortedError, AccessKeyMismatchError, AccessKeyNotFoundError, AtLeastOneKeyError, CheckoutOptionCrypto, CheckoutOptionNFTCheckoutProvider, CheckoutOptionOnRampProvider, CheckoutOptionSwapProvider, GeoblockedError, GetLifiSwapRouteDirection, InvalidArgumentError, InvalidOriginError, InvalidServiceError, JsonDecode, JsonEncode, MaxAccessKeysError, MethodNotFoundError, NoDefaultKeyError, NotFoundError, PermissionDeniedError, ProjectNotFoundError, QueryFailedError, QuotaExceededError, QuotaRateLimitError, RateLimitedError, RequestConflictError, SequenceAPIClient, SessionExpiredError, SortOrder, TimeoutError, TokenType, TradeType, TransakBuySell, UnauthorizedError, UnauthorizedUserError, UnavailableError, UnsupportedNetworkError, VersionFromHeader, WebrpcBadMethodError, WebrpcBadRequestError, WebrpcBadResponseError, WebrpcBadRouteError, WebrpcClientAbortedError, WebrpcEndpointError, WebrpcError, WebrpcErrorCodes, WebrpcHeader, WebrpcHeaderValue, WebrpcInternalErrorError, WebrpcRequestFailedError, WebrpcSchemaHash, WebrpcSchemaVersion, WebrpcServerPanicError, WebrpcStreamFinishedError, WebrpcStreamLostError, WebrpcVersion, errors, webrpcErrorByCode };
|