@0xsequence/api 3.0.0-beta.18 → 3.0.0-beta.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.gen.js CHANGED
@@ -1,75 +1,70 @@
1
- "use strict";
2
1
  /* eslint-disable */
3
2
  // sequence-api v0.4.0 3c15fa79614e43a5321cd2ac0c080e80af291bd1
4
3
  // --
5
4
  // Code generated by Webrpc-gen@v0.31.0 with typescript generator. DO NOT EDIT.
6
5
  //
7
6
  // webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.QueryFailedError = exports.UnavailableError = exports.InvalidArgumentError = exports.TimeoutError = exports.AtLeastOneKeyError = exports.MaxAccessKeysError = exports.NoDefaultKeyError = exports.QuotaRateLimitError = exports.QuotaExceededError = exports.UnauthorizedUserError = exports.InvalidServiceError = exports.InvalidOriginError = exports.AccessKeyMismatchError = exports.AccessKeyNotFoundError = exports.ProjectNotFoundError = exports.RateLimitedError = exports.GeoblockedError = exports.AbortedError = exports.RequestConflictError = exports.MethodNotFoundError = exports.SessionExpiredError = exports.PermissionDeniedError = exports.UnauthorizedError = exports.WebrpcStreamFinishedError = exports.WebrpcStreamLostError = exports.WebrpcClientAbortedError = exports.WebrpcInternalErrorError = exports.WebrpcServerPanicError = exports.WebrpcBadResponseError = exports.WebrpcBadRequestError = exports.WebrpcBadMethodError = exports.WebrpcBadRouteError = exports.WebrpcRequestFailedError = exports.WebrpcEndpointError = exports.WebrpcError = exports.JsonDecode = exports.JsonEncode = exports.API = exports.CheckoutOptionSwapProvider = exports.CheckoutOptionOnRampProvider = exports.CheckoutOptionNFTCheckoutProvider = exports.CheckoutOptionCrypto = exports.TradeType = exports.TransakBuySell = exports.TokenType = exports.GetLifiSwapRouteDirection = exports.SortOrder = exports.WebrpcSchemaHash = exports.WebrpcSchemaVersion = exports.WebrpcVersion = void 0;
10
- exports.WebrpcHeaderValue = exports.WebrpcHeader = exports.webrpcErrorByCode = exports.WebrpcErrorCodes = exports.errors = exports.UnsupportedNetworkError = exports.NotFoundError = void 0;
11
- exports.VersionFromHeader = VersionFromHeader;
12
7
  // Webrpc description and code-gen version
13
- exports.WebrpcVersion = 'v1';
8
+ export const WebrpcVersion = 'v1';
14
9
  // Schema version of your RIDL schema
15
- exports.WebrpcSchemaVersion = 'v0.4.0';
10
+ export const WebrpcSchemaVersion = 'v0.4.0';
16
11
  // Schema hash generated from your RIDL schema
17
- exports.WebrpcSchemaHash = '3c15fa79614e43a5321cd2ac0c080e80af291bd1';
12
+ export const WebrpcSchemaHash = '3c15fa79614e43a5321cd2ac0c080e80af291bd1';
18
13
  //
19
14
  // Schema types
20
15
  //
21
- var SortOrder;
16
+ export var SortOrder;
22
17
  (function (SortOrder) {
23
18
  SortOrder["DESC"] = "DESC";
24
19
  SortOrder["ASC"] = "ASC";
25
- })(SortOrder || (exports.SortOrder = SortOrder = {}));
26
- var GetLifiSwapRouteDirection;
20
+ })(SortOrder || (SortOrder = {}));
21
+ export var GetLifiSwapRouteDirection;
27
22
  (function (GetLifiSwapRouteDirection) {
28
23
  GetLifiSwapRouteDirection["to"] = "to";
29
24
  GetLifiSwapRouteDirection["from"] = "from";
30
- })(GetLifiSwapRouteDirection || (exports.GetLifiSwapRouteDirection = GetLifiSwapRouteDirection = {}));
31
- var TokenType;
25
+ })(GetLifiSwapRouteDirection || (GetLifiSwapRouteDirection = {}));
26
+ export var TokenType;
32
27
  (function (TokenType) {
33
28
  TokenType["ERC20"] = "ERC20";
34
29
  TokenType["ERC721"] = "ERC721";
35
30
  TokenType["ERC1155"] = "ERC1155";
36
- })(TokenType || (exports.TokenType = TokenType = {}));
37
- var TransakBuySell;
31
+ })(TokenType || (TokenType = {}));
32
+ export var TransakBuySell;
38
33
  (function (TransakBuySell) {
39
34
  TransakBuySell["UNKNOWN"] = "UNKNOWN";
40
35
  TransakBuySell["BUY"] = "BUY";
41
36
  TransakBuySell["SELL"] = "SELL";
42
- })(TransakBuySell || (exports.TransakBuySell = TransakBuySell = {}));
43
- var TradeType;
37
+ })(TransakBuySell || (TransakBuySell = {}));
38
+ export var TradeType;
44
39
  (function (TradeType) {
45
40
  TradeType["EXACT_INPUT"] = "EXACT_INPUT";
46
41
  TradeType["EXACT_OUTPUT"] = "EXACT_OUTPUT";
47
- })(TradeType || (exports.TradeType = TradeType = {}));
48
- var CheckoutOptionCrypto;
42
+ })(TradeType || (TradeType = {}));
43
+ export var CheckoutOptionCrypto;
49
44
  (function (CheckoutOptionCrypto) {
50
45
  CheckoutOptionCrypto["none"] = "none";
51
46
  CheckoutOptionCrypto["partially"] = "partially";
52
47
  CheckoutOptionCrypto["all"] = "all";
53
- })(CheckoutOptionCrypto || (exports.CheckoutOptionCrypto = CheckoutOptionCrypto = {}));
54
- var CheckoutOptionNFTCheckoutProvider;
48
+ })(CheckoutOptionCrypto || (CheckoutOptionCrypto = {}));
49
+ export var CheckoutOptionNFTCheckoutProvider;
55
50
  (function (CheckoutOptionNFTCheckoutProvider) {
56
51
  CheckoutOptionNFTCheckoutProvider["unknown"] = "unknown";
57
52
  CheckoutOptionNFTCheckoutProvider["transak"] = "transak";
58
- })(CheckoutOptionNFTCheckoutProvider || (exports.CheckoutOptionNFTCheckoutProvider = CheckoutOptionNFTCheckoutProvider = {}));
59
- var CheckoutOptionOnRampProvider;
53
+ })(CheckoutOptionNFTCheckoutProvider || (CheckoutOptionNFTCheckoutProvider = {}));
54
+ export var CheckoutOptionOnRampProvider;
60
55
  (function (CheckoutOptionOnRampProvider) {
61
56
  CheckoutOptionOnRampProvider["unknown"] = "unknown";
62
57
  CheckoutOptionOnRampProvider["transak"] = "transak";
63
- })(CheckoutOptionOnRampProvider || (exports.CheckoutOptionOnRampProvider = CheckoutOptionOnRampProvider = {}));
64
- var CheckoutOptionSwapProvider;
58
+ })(CheckoutOptionOnRampProvider || (CheckoutOptionOnRampProvider = {}));
59
+ export var CheckoutOptionSwapProvider;
65
60
  (function (CheckoutOptionSwapProvider) {
66
61
  CheckoutOptionSwapProvider["unknown"] = "unknown";
67
62
  CheckoutOptionSwapProvider["lifi"] = "lifi";
68
- })(CheckoutOptionSwapProvider || (exports.CheckoutOptionSwapProvider = CheckoutOptionSwapProvider = {}));
63
+ })(CheckoutOptionSwapProvider || (CheckoutOptionSwapProvider = {}));
69
64
  //
70
65
  // Client
71
66
  //
72
- class API {
67
+ export class API {
73
68
  hostname;
74
69
  fetch;
75
70
  path = '/rpc/API/';
@@ -161,7 +156,7 @@ class API {
161
156
  ping = (headers, signal) => {
162
157
  return this.fetch(this.url('Ping'), createHttpRequest('{}', headers, signal)).then(res => {
163
158
  return buildResponse(res).then(_data => {
164
- return (0, exports.JsonDecode)(_data, 'PingResponse');
159
+ return JsonDecode(_data, 'PingResponse');
165
160
  });
166
161
  }, error => {
167
162
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
@@ -170,7 +165,7 @@ class API {
170
165
  version = (headers, signal) => {
171
166
  return this.fetch(this.url('Version'), createHttpRequest('{}', headers, signal)).then(res => {
172
167
  return buildResponse(res).then(_data => {
173
- return (0, exports.JsonDecode)(_data, 'VersionResponse');
168
+ return JsonDecode(_data, 'VersionResponse');
174
169
  });
175
170
  }, error => {
176
171
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
@@ -179,7 +174,7 @@ class API {
179
174
  runtimeStatus = (headers, signal) => {
180
175
  return this.fetch(this.url('RuntimeStatus'), createHttpRequest('{}', headers, signal)).then(res => {
181
176
  return buildResponse(res).then(_data => {
182
- return (0, exports.JsonDecode)(_data, 'RuntimeStatusResponse');
177
+ return JsonDecode(_data, 'RuntimeStatusResponse');
183
178
  });
184
179
  }, error => {
185
180
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
@@ -188,7 +183,7 @@ class API {
188
183
  clock = (headers, signal) => {
189
184
  return this.fetch(this.url('Clock'), createHttpRequest('{}', headers, signal)).then(res => {
190
185
  return buildResponse(res).then(_data => {
191
- return (0, exports.JsonDecode)(_data, 'ClockResponse');
186
+ return JsonDecode(_data, 'ClockResponse');
192
187
  });
193
188
  }, error => {
194
189
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
@@ -197,232 +192,232 @@ class API {
197
192
  getSequenceContext = (headers, signal) => {
198
193
  return this.fetch(this.url('GetSequenceContext'), createHttpRequest('{}', headers, signal)).then(res => {
199
194
  return buildResponse(res).then(_data => {
200
- return (0, exports.JsonDecode)(_data, 'GetSequenceContextResponse');
195
+ return JsonDecode(_data, 'GetSequenceContextResponse');
201
196
  });
202
197
  }, error => {
203
198
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
204
199
  });
205
200
  };
206
201
  getAuthToken = (req, headers, signal) => {
207
- return this.fetch(this.url('GetAuthToken'), createHttpRequest((0, exports.JsonEncode)(req, 'GetAuthTokenRequest'), headers, signal)).then(res => {
202
+ return this.fetch(this.url('GetAuthToken'), createHttpRequest(JsonEncode(req, 'GetAuthTokenRequest'), headers, signal)).then(res => {
208
203
  return buildResponse(res).then(_data => {
209
- return (0, exports.JsonDecode)(_data, 'GetAuthTokenResponse');
204
+ return JsonDecode(_data, 'GetAuthTokenResponse');
210
205
  });
211
206
  }, error => {
212
207
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
213
208
  });
214
209
  };
215
210
  getAuthToken2 = (req, headers, signal) => {
216
- return this.fetch(this.url('GetAuthToken2'), createHttpRequest((0, exports.JsonEncode)(req, 'GetAuthToken2Request'), headers, signal)).then(res => {
211
+ return this.fetch(this.url('GetAuthToken2'), createHttpRequest(JsonEncode(req, 'GetAuthToken2Request'), headers, signal)).then(res => {
217
212
  return buildResponse(res).then(_data => {
218
- return (0, exports.JsonDecode)(_data, 'GetAuthToken2Response');
213
+ return JsonDecode(_data, 'GetAuthToken2Response');
219
214
  });
220
215
  }, error => {
221
216
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
222
217
  });
223
218
  };
224
219
  sendPasswordlessLink = (req, headers, signal) => {
225
- return this.fetch(this.url('SendPasswordlessLink'), createHttpRequest((0, exports.JsonEncode)(req, 'SendPasswordlessLinkRequest'), headers, signal)).then(res => {
220
+ return this.fetch(this.url('SendPasswordlessLink'), createHttpRequest(JsonEncode(req, 'SendPasswordlessLinkRequest'), headers, signal)).then(res => {
226
221
  return buildResponse(res).then(_data => {
227
- return (0, exports.JsonDecode)(_data, 'SendPasswordlessLinkResponse');
222
+ return JsonDecode(_data, 'SendPasswordlessLinkResponse');
228
223
  });
229
224
  }, error => {
230
225
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
231
226
  });
232
227
  };
233
228
  registerPublicKey = (req, headers, signal) => {
234
- return this.fetch(this.url('RegisterPublicKey'), createHttpRequest((0, exports.JsonEncode)(req, 'RegisterPublicKeyRequest'), headers, signal)).then(res => {
229
+ return this.fetch(this.url('RegisterPublicKey'), createHttpRequest(JsonEncode(req, 'RegisterPublicKeyRequest'), headers, signal)).then(res => {
235
230
  return buildResponse(res).then(_data => {
236
- return (0, exports.JsonDecode)(_data, 'RegisterPublicKeyResponse');
231
+ return JsonDecode(_data, 'RegisterPublicKeyResponse');
237
232
  });
238
233
  }, error => {
239
234
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
240
235
  });
241
236
  };
242
237
  getPublicKey = (req, headers, signal) => {
243
- return this.fetch(this.url('GetPublicKey'), createHttpRequest((0, exports.JsonEncode)(req, 'GetPublicKeyRequest'), headers, signal)).then(res => {
238
+ return this.fetch(this.url('GetPublicKey'), createHttpRequest(JsonEncode(req, 'GetPublicKeyRequest'), headers, signal)).then(res => {
244
239
  return buildResponse(res).then(_data => {
245
- return (0, exports.JsonDecode)(_data, 'GetPublicKeyResponse');
240
+ return JsonDecode(_data, 'GetPublicKeyResponse');
246
241
  });
247
242
  }, error => {
248
243
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
249
244
  });
250
245
  };
251
246
  friendList = (req, headers, signal) => {
252
- return this.fetch(this.url('FriendList'), createHttpRequest((0, exports.JsonEncode)(req, 'FriendListRequest'), headers, signal)).then(res => {
247
+ return this.fetch(this.url('FriendList'), createHttpRequest(JsonEncode(req, 'FriendListRequest'), headers, signal)).then(res => {
253
248
  return buildResponse(res).then(_data => {
254
- return (0, exports.JsonDecode)(_data, 'FriendListResponse');
249
+ return JsonDecode(_data, 'FriendListResponse');
255
250
  });
256
251
  }, error => {
257
252
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
258
253
  });
259
254
  };
260
255
  getFriendByAddress = (req, headers, signal) => {
261
- return this.fetch(this.url('GetFriendByAddress'), createHttpRequest((0, exports.JsonEncode)(req, 'GetFriendByAddressRequest'), headers, signal)).then(res => {
256
+ return this.fetch(this.url('GetFriendByAddress'), createHttpRequest(JsonEncode(req, 'GetFriendByAddressRequest'), headers, signal)).then(res => {
262
257
  return buildResponse(res).then(_data => {
263
- return (0, exports.JsonDecode)(_data, 'GetFriendByAddressResponse');
258
+ return JsonDecode(_data, 'GetFriendByAddressResponse');
264
259
  });
265
260
  }, error => {
266
261
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
267
262
  });
268
263
  };
269
264
  searchFriends = (req, headers, signal) => {
270
- return this.fetch(this.url('SearchFriends'), createHttpRequest((0, exports.JsonEncode)(req, 'SearchFriendsRequest'), headers, signal)).then(res => {
265
+ return this.fetch(this.url('SearchFriends'), createHttpRequest(JsonEncode(req, 'SearchFriendsRequest'), headers, signal)).then(res => {
271
266
  return buildResponse(res).then(_data => {
272
- return (0, exports.JsonDecode)(_data, 'SearchFriendsResponse');
267
+ return JsonDecode(_data, 'SearchFriendsResponse');
273
268
  });
274
269
  }, error => {
275
270
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
276
271
  });
277
272
  };
278
273
  addFriend = (req, headers, signal) => {
279
- return this.fetch(this.url('AddFriend'), createHttpRequest((0, exports.JsonEncode)(req, 'AddFriendRequest'), headers, signal)).then(res => {
274
+ return this.fetch(this.url('AddFriend'), createHttpRequest(JsonEncode(req, 'AddFriendRequest'), headers, signal)).then(res => {
280
275
  return buildResponse(res).then(_data => {
281
- return (0, exports.JsonDecode)(_data, 'AddFriendResponse');
276
+ return JsonDecode(_data, 'AddFriendResponse');
282
277
  });
283
278
  }, error => {
284
279
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
285
280
  });
286
281
  };
287
282
  updateFriendNickname = (req, headers, signal) => {
288
- return this.fetch(this.url('UpdateFriendNickname'), createHttpRequest((0, exports.JsonEncode)(req, 'UpdateFriendNicknameRequest'), headers, signal)).then(res => {
283
+ return this.fetch(this.url('UpdateFriendNickname'), createHttpRequest(JsonEncode(req, 'UpdateFriendNicknameRequest'), headers, signal)).then(res => {
289
284
  return buildResponse(res).then(_data => {
290
- return (0, exports.JsonDecode)(_data, 'UpdateFriendNicknameResponse');
285
+ return JsonDecode(_data, 'UpdateFriendNicknameResponse');
291
286
  });
292
287
  }, error => {
293
288
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
294
289
  });
295
290
  };
296
291
  removeFriend = (req, headers, signal) => {
297
- return this.fetch(this.url('RemoveFriend'), createHttpRequest((0, exports.JsonEncode)(req, 'RemoveFriendRequest'), headers, signal)).then(res => {
292
+ return this.fetch(this.url('RemoveFriend'), createHttpRequest(JsonEncode(req, 'RemoveFriendRequest'), headers, signal)).then(res => {
298
293
  return buildResponse(res).then(_data => {
299
- return (0, exports.JsonDecode)(_data, 'RemoveFriendResponse');
294
+ return JsonDecode(_data, 'RemoveFriendResponse');
300
295
  });
301
296
  }, error => {
302
297
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
303
298
  });
304
299
  };
305
300
  contractCall = (req, headers, signal) => {
306
- return this.fetch(this.url('ContractCall'), createHttpRequest((0, exports.JsonEncode)(req, 'ContractCallRequest'), headers, signal)).then(res => {
301
+ return this.fetch(this.url('ContractCall'), createHttpRequest(JsonEncode(req, 'ContractCallRequest'), headers, signal)).then(res => {
307
302
  return buildResponse(res).then(_data => {
308
- return (0, exports.JsonDecode)(_data, 'ContractCallResponse');
303
+ return JsonDecode(_data, 'ContractCallResponse');
309
304
  });
310
305
  }, error => {
311
306
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
312
307
  });
313
308
  };
314
309
  decodeContractCall = (req, headers, signal) => {
315
- return this.fetch(this.url('DecodeContractCall'), createHttpRequest((0, exports.JsonEncode)(req, 'DecodeContractCallRequest'), headers, signal)).then(res => {
310
+ return this.fetch(this.url('DecodeContractCall'), createHttpRequest(JsonEncode(req, 'DecodeContractCallRequest'), headers, signal)).then(res => {
316
311
  return buildResponse(res).then(_data => {
317
- return (0, exports.JsonDecode)(_data, 'DecodeContractCallResponse');
312
+ return JsonDecode(_data, 'DecodeContractCallResponse');
318
313
  });
319
314
  }, error => {
320
315
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
321
316
  });
322
317
  };
323
318
  lookupContractCallSelectors = (req, headers, signal) => {
324
- return this.fetch(this.url('LookupContractCallSelectors'), createHttpRequest((0, exports.JsonEncode)(req, 'LookupContractCallSelectorsRequest'), headers, signal)).then(res => {
319
+ return this.fetch(this.url('LookupContractCallSelectors'), createHttpRequest(JsonEncode(req, 'LookupContractCallSelectorsRequest'), headers, signal)).then(res => {
325
320
  return buildResponse(res).then(_data => {
326
- return (0, exports.JsonDecode)(_data, 'LookupContractCallSelectorsResponse');
321
+ return JsonDecode(_data, 'LookupContractCallSelectorsResponse');
327
322
  });
328
323
  }, error => {
329
324
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
330
325
  });
331
326
  };
332
327
  userStorageFetch = (req, headers, signal) => {
333
- return this.fetch(this.url('UserStorageFetch'), createHttpRequest((0, exports.JsonEncode)(req, 'UserStorageFetchRequest'), headers, signal)).then(res => {
328
+ return this.fetch(this.url('UserStorageFetch'), createHttpRequest(JsonEncode(req, 'UserStorageFetchRequest'), headers, signal)).then(res => {
334
329
  return buildResponse(res).then(_data => {
335
- return (0, exports.JsonDecode)(_data, 'UserStorageFetchResponse');
330
+ return JsonDecode(_data, 'UserStorageFetchResponse');
336
331
  });
337
332
  }, error => {
338
333
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
339
334
  });
340
335
  };
341
336
  userStorageSave = (req, headers, signal) => {
342
- return this.fetch(this.url('UserStorageSave'), createHttpRequest((0, exports.JsonEncode)(req, 'UserStorageSaveRequest'), headers, signal)).then(res => {
337
+ return this.fetch(this.url('UserStorageSave'), createHttpRequest(JsonEncode(req, 'UserStorageSaveRequest'), headers, signal)).then(res => {
343
338
  return buildResponse(res).then(_data => {
344
- return (0, exports.JsonDecode)(_data, 'UserStorageSaveResponse');
339
+ return JsonDecode(_data, 'UserStorageSaveResponse');
345
340
  });
346
341
  }, error => {
347
342
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
348
343
  });
349
344
  };
350
345
  userStorageDelete = (req, headers, signal) => {
351
- return this.fetch(this.url('UserStorageDelete'), createHttpRequest((0, exports.JsonEncode)(req, 'UserStorageDeleteRequest'), headers, signal)).then(res => {
346
+ return this.fetch(this.url('UserStorageDelete'), createHttpRequest(JsonEncode(req, 'UserStorageDeleteRequest'), headers, signal)).then(res => {
352
347
  return buildResponse(res).then(_data => {
353
- return (0, exports.JsonDecode)(_data, 'UserStorageDeleteResponse');
348
+ return JsonDecode(_data, 'UserStorageDeleteResponse');
354
349
  });
355
350
  }, error => {
356
351
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
357
352
  });
358
353
  };
359
354
  userStorageFetchAll = (req, headers, signal) => {
360
- return this.fetch(this.url('UserStorageFetchAll'), createHttpRequest((0, exports.JsonEncode)(req, 'UserStorageFetchAllRequest'), headers, signal)).then(res => {
355
+ return this.fetch(this.url('UserStorageFetchAll'), createHttpRequest(JsonEncode(req, 'UserStorageFetchAllRequest'), headers, signal)).then(res => {
361
356
  return buildResponse(res).then(_data => {
362
- return (0, exports.JsonDecode)(_data, 'UserStorageFetchAllResponse');
357
+ return JsonDecode(_data, 'UserStorageFetchAllResponse');
363
358
  });
364
359
  }, error => {
365
360
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
366
361
  });
367
362
  };
368
363
  getMoonpayLink = (req, headers, signal) => {
369
- return this.fetch(this.url('GetMoonpayLink'), createHttpRequest((0, exports.JsonEncode)(req, 'GetMoonpayLinkRequest'), headers, signal)).then(res => {
364
+ return this.fetch(this.url('GetMoonpayLink'), createHttpRequest(JsonEncode(req, 'GetMoonpayLinkRequest'), headers, signal)).then(res => {
370
365
  return buildResponse(res).then(_data => {
371
- return (0, exports.JsonDecode)(_data, 'GetMoonpayLinkResponse');
366
+ return JsonDecode(_data, 'GetMoonpayLinkResponse');
372
367
  });
373
368
  }, error => {
374
369
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
375
370
  });
376
371
  };
377
372
  resolveENSAddress = (req, headers, signal) => {
378
- return this.fetch(this.url('ResolveENSAddress'), createHttpRequest((0, exports.JsonEncode)(req, 'ResolveENSAddressRequest'), headers, signal)).then(res => {
373
+ return this.fetch(this.url('ResolveENSAddress'), createHttpRequest(JsonEncode(req, 'ResolveENSAddressRequest'), headers, signal)).then(res => {
379
374
  return buildResponse(res).then(_data => {
380
- return (0, exports.JsonDecode)(_data, 'ResolveENSAddressResponse');
375
+ return JsonDecode(_data, 'ResolveENSAddressResponse');
381
376
  });
382
377
  }, error => {
383
378
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
384
379
  });
385
380
  };
386
381
  isValidSignature = (req, headers, signal) => {
387
- return this.fetch(this.url('IsValidSignature'), createHttpRequest((0, exports.JsonEncode)(req, 'IsValidSignatureRequest'), headers, signal)).then(res => {
382
+ return this.fetch(this.url('IsValidSignature'), createHttpRequest(JsonEncode(req, 'IsValidSignatureRequest'), headers, signal)).then(res => {
388
383
  return buildResponse(res).then(_data => {
389
- return (0, exports.JsonDecode)(_data, 'IsValidSignatureResponse');
384
+ return JsonDecode(_data, 'IsValidSignatureResponse');
390
385
  });
391
386
  }, error => {
392
387
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
393
388
  });
394
389
  };
395
390
  isValidMessageSignature = (req, headers, signal) => {
396
- return this.fetch(this.url('IsValidMessageSignature'), createHttpRequest((0, exports.JsonEncode)(req, 'IsValidMessageSignatureRequest'), headers, signal)).then(res => {
391
+ return this.fetch(this.url('IsValidMessageSignature'), createHttpRequest(JsonEncode(req, 'IsValidMessageSignatureRequest'), headers, signal)).then(res => {
397
392
  return buildResponse(res).then(_data => {
398
- return (0, exports.JsonDecode)(_data, 'IsValidMessageSignatureResponse');
393
+ return JsonDecode(_data, 'IsValidMessageSignatureResponse');
399
394
  });
400
395
  }, error => {
401
396
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
402
397
  });
403
398
  };
404
399
  isValidTypedDataSignature = (req, headers, signal) => {
405
- return this.fetch(this.url('IsValidTypedDataSignature'), createHttpRequest((0, exports.JsonEncode)(req, 'IsValidTypedDataSignatureRequest'), headers, signal)).then(res => {
400
+ return this.fetch(this.url('IsValidTypedDataSignature'), createHttpRequest(JsonEncode(req, 'IsValidTypedDataSignatureRequest'), headers, signal)).then(res => {
406
401
  return buildResponse(res).then(_data => {
407
- return (0, exports.JsonDecode)(_data, 'IsValidTypedDataSignatureResponse');
402
+ return JsonDecode(_data, 'IsValidTypedDataSignatureResponse');
408
403
  });
409
404
  }, error => {
410
405
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
411
406
  });
412
407
  };
413
408
  isValidETHAuthProof = (req, headers, signal) => {
414
- return this.fetch(this.url('IsValidETHAuthProof'), createHttpRequest((0, exports.JsonEncode)(req, 'IsValidETHAuthProofRequest'), headers, signal)).then(res => {
409
+ return this.fetch(this.url('IsValidETHAuthProof'), createHttpRequest(JsonEncode(req, 'IsValidETHAuthProofRequest'), headers, signal)).then(res => {
415
410
  return buildResponse(res).then(_data => {
416
- return (0, exports.JsonDecode)(_data, 'IsValidETHAuthProofResponse');
411
+ return JsonDecode(_data, 'IsValidETHAuthProofResponse');
417
412
  });
418
413
  }, error => {
419
414
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
420
415
  });
421
416
  };
422
417
  getOnRampURL = (req, headers, signal) => {
423
- return this.fetch(this.url('GetOnRampURL'), createHttpRequest((0, exports.JsonEncode)(req, 'GetOnRampURLRequest'), headers, signal)).then(res => {
418
+ return this.fetch(this.url('GetOnRampURL'), createHttpRequest(JsonEncode(req, 'GetOnRampURLRequest'), headers, signal)).then(res => {
424
419
  return buildResponse(res).then(_data => {
425
- return (0, exports.JsonDecode)(_data, 'GetOnRampURLResponse');
420
+ return JsonDecode(_data, 'GetOnRampURLResponse');
426
421
  });
427
422
  }, error => {
428
423
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
@@ -431,7 +426,7 @@ class API {
431
426
  transakGetCountries = (headers, signal) => {
432
427
  return this.fetch(this.url('TransakGetCountries'), createHttpRequest('{}', headers, signal)).then(res => {
433
428
  return buildResponse(res).then(_data => {
434
- return (0, exports.JsonDecode)(_data, 'TransakGetCountriesResponse');
429
+ return JsonDecode(_data, 'TransakGetCountriesResponse');
435
430
  });
436
431
  }, error => {
437
432
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
@@ -440,7 +435,7 @@ class API {
440
435
  transakGetCryptoCurrencies = (headers, signal) => {
441
436
  return this.fetch(this.url('TransakGetCryptoCurrencies'), createHttpRequest('{}', headers, signal)).then(res => {
442
437
  return buildResponse(res).then(_data => {
443
- return (0, exports.JsonDecode)(_data, 'TransakGetCryptoCurrenciesResponse');
438
+ return JsonDecode(_data, 'TransakGetCryptoCurrenciesResponse');
444
439
  });
445
440
  }, error => {
446
441
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
@@ -449,16 +444,16 @@ class API {
449
444
  transakGetFiatCurrencies = (headers, signal) => {
450
445
  return this.fetch(this.url('TransakGetFiatCurrencies'), createHttpRequest('{}', headers, signal)).then(res => {
451
446
  return buildResponse(res).then(_data => {
452
- return (0, exports.JsonDecode)(_data, 'TransakGetFiatCurrenciesResponse');
447
+ return JsonDecode(_data, 'TransakGetFiatCurrenciesResponse');
453
448
  });
454
449
  }, error => {
455
450
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
456
451
  });
457
452
  };
458
453
  transakGetPrice = (req, headers, signal) => {
459
- return this.fetch(this.url('TransakGetPrice'), createHttpRequest((0, exports.JsonEncode)(req, 'TransakGetPriceRequest'), headers, signal)).then(res => {
454
+ return this.fetch(this.url('TransakGetPrice'), createHttpRequest(JsonEncode(req, 'TransakGetPriceRequest'), headers, signal)).then(res => {
460
455
  return buildResponse(res).then(_data => {
461
- return (0, exports.JsonDecode)(_data, 'TransakGetPriceResponse');
456
+ return JsonDecode(_data, 'TransakGetPriceResponse');
462
457
  });
463
458
  }, error => {
464
459
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
@@ -467,61 +462,61 @@ class API {
467
462
  transakGetSupportedNFTCheckoutChains = (headers, signal) => {
468
463
  return this.fetch(this.url('TransakGetSupportedNFTCheckoutChains'), createHttpRequest('{}', headers, signal)).then(res => {
469
464
  return buildResponse(res).then(_data => {
470
- return (0, exports.JsonDecode)(_data, 'TransakGetSupportedNFTCheckoutChainsResponse');
465
+ return JsonDecode(_data, 'TransakGetSupportedNFTCheckoutChainsResponse');
471
466
  });
472
467
  }, error => {
473
468
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
474
469
  });
475
470
  };
476
471
  transakGetWidgetURL = (req, headers, signal) => {
477
- return this.fetch(this.url('TransakGetWidgetURL'), createHttpRequest((0, exports.JsonEncode)(req, 'TransakGetWidgetURLRequest'), headers, signal)).then(res => {
472
+ return this.fetch(this.url('TransakGetWidgetURL'), createHttpRequest(JsonEncode(req, 'TransakGetWidgetURLRequest'), headers, signal)).then(res => {
478
473
  return buildResponse(res).then(_data => {
479
- return (0, exports.JsonDecode)(_data, 'TransakGetWidgetURLResponse');
474
+ return JsonDecode(_data, 'TransakGetWidgetURLResponse');
480
475
  });
481
476
  }, error => {
482
477
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
483
478
  });
484
479
  };
485
480
  getCoinPrices = (req, headers, signal) => {
486
- return this.fetch(this.url('GetCoinPrices'), createHttpRequest((0, exports.JsonEncode)(req, 'GetCoinPricesRequest'), headers, signal)).then(res => {
481
+ return this.fetch(this.url('GetCoinPrices'), createHttpRequest(JsonEncode(req, 'GetCoinPricesRequest'), headers, signal)).then(res => {
487
482
  return buildResponse(res).then(_data => {
488
- return (0, exports.JsonDecode)(_data, 'GetCoinPricesResponse');
483
+ return JsonDecode(_data, 'GetCoinPricesResponse');
489
484
  });
490
485
  }, error => {
491
486
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
492
487
  });
493
488
  };
494
489
  getCollectiblePrices = (req, headers, signal) => {
495
- return this.fetch(this.url('GetCollectiblePrices'), createHttpRequest((0, exports.JsonEncode)(req, 'GetCollectiblePricesRequest'), headers, signal)).then(res => {
490
+ return this.fetch(this.url('GetCollectiblePrices'), createHttpRequest(JsonEncode(req, 'GetCollectiblePricesRequest'), headers, signal)).then(res => {
496
491
  return buildResponse(res).then(_data => {
497
- return (0, exports.JsonDecode)(_data, 'GetCollectiblePricesResponse');
492
+ return JsonDecode(_data, 'GetCollectiblePricesResponse');
498
493
  });
499
494
  }, error => {
500
495
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
501
496
  });
502
497
  };
503
498
  getExchangeRate = (req, headers, signal) => {
504
- return this.fetch(this.url('GetExchangeRate'), createHttpRequest((0, exports.JsonEncode)(req, 'GetExchangeRateRequest'), headers, signal)).then(res => {
499
+ return this.fetch(this.url('GetExchangeRate'), createHttpRequest(JsonEncode(req, 'GetExchangeRateRequest'), headers, signal)).then(res => {
505
500
  return buildResponse(res).then(_data => {
506
- return (0, exports.JsonDecode)(_data, 'GetExchangeRateResponse');
501
+ return JsonDecode(_data, 'GetExchangeRateResponse');
507
502
  });
508
503
  }, error => {
509
504
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
510
505
  });
511
506
  };
512
507
  memoryStore = (req, headers, signal) => {
513
- return this.fetch(this.url('MemoryStore'), createHttpRequest((0, exports.JsonEncode)(req, 'MemoryStoreRequest'), headers, signal)).then(res => {
508
+ return this.fetch(this.url('MemoryStore'), createHttpRequest(JsonEncode(req, 'MemoryStoreRequest'), headers, signal)).then(res => {
514
509
  return buildResponse(res).then(_data => {
515
- return (0, exports.JsonDecode)(_data, 'MemoryStoreResponse');
510
+ return JsonDecode(_data, 'MemoryStoreResponse');
516
511
  });
517
512
  }, error => {
518
513
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
519
514
  });
520
515
  };
521
516
  memoryLoad = (req, headers, signal) => {
522
- return this.fetch(this.url('MemoryLoad'), createHttpRequest((0, exports.JsonEncode)(req, 'MemoryLoadRequest'), headers, signal)).then(res => {
517
+ return this.fetch(this.url('MemoryLoad'), createHttpRequest(JsonEncode(req, 'MemoryLoadRequest'), headers, signal)).then(res => {
523
518
  return buildResponse(res).then(_data => {
524
- return (0, exports.JsonDecode)(_data, 'MemoryLoadResponse');
519
+ return JsonDecode(_data, 'MemoryLoadResponse');
525
520
  });
526
521
  }, error => {
527
522
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
@@ -530,106 +525,106 @@ class API {
530
525
  getInviteInfo = (headers, signal) => {
531
526
  return this.fetch(this.url('GetInviteInfo'), createHttpRequest('{}', headers, signal)).then(res => {
532
527
  return buildResponse(res).then(_data => {
533
- return (0, exports.JsonDecode)(_data, 'GetInviteInfoResponse');
528
+ return JsonDecode(_data, 'GetInviteInfoResponse');
534
529
  });
535
530
  }, error => {
536
531
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
537
532
  });
538
533
  };
539
534
  isValidAccessCode = (req, headers, signal) => {
540
- return this.fetch(this.url('IsValidAccessCode'), createHttpRequest((0, exports.JsonEncode)(req, 'IsValidAccessCodeRequest'), headers, signal)).then(res => {
535
+ return this.fetch(this.url('IsValidAccessCode'), createHttpRequest(JsonEncode(req, 'IsValidAccessCodeRequest'), headers, signal)).then(res => {
541
536
  return buildResponse(res).then(_data => {
542
- return (0, exports.JsonDecode)(_data, 'IsValidAccessCodeResponse');
537
+ return JsonDecode(_data, 'IsValidAccessCodeResponse');
543
538
  });
544
539
  }, error => {
545
540
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
546
541
  });
547
542
  };
548
543
  internalClaimAccessCode = (req, headers, signal) => {
549
- return this.fetch(this.url('InternalClaimAccessCode'), createHttpRequest((0, exports.JsonEncode)(req, 'InternalClaimAccessCodeRequest'), headers, signal)).then(res => {
544
+ return this.fetch(this.url('InternalClaimAccessCode'), createHttpRequest(JsonEncode(req, 'InternalClaimAccessCodeRequest'), headers, signal)).then(res => {
550
545
  return buildResponse(res).then(_data => {
551
- return (0, exports.JsonDecode)(_data, 'InternalClaimAccessCodeResponse');
546
+ return JsonDecode(_data, 'InternalClaimAccessCodeResponse');
552
547
  });
553
548
  }, error => {
554
549
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
555
550
  });
556
551
  };
557
552
  blockNumberAtTime = (req, headers, signal) => {
558
- return this.fetch(this.url('BlockNumberAtTime'), createHttpRequest((0, exports.JsonEncode)(req, 'BlockNumberAtTimeRequest'), headers, signal)).then(res => {
553
+ return this.fetch(this.url('BlockNumberAtTime'), createHttpRequest(JsonEncode(req, 'BlockNumberAtTimeRequest'), headers, signal)).then(res => {
559
554
  return buildResponse(res).then(_data => {
560
- return (0, exports.JsonDecode)(_data, 'BlockNumberAtTimeResponse');
555
+ return JsonDecode(_data, 'BlockNumberAtTimeResponse');
561
556
  });
562
557
  }, error => {
563
558
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
564
559
  });
565
560
  };
566
561
  paperSessionSecret = (req, headers, signal) => {
567
- return this.fetch(this.url('PaperSessionSecret'), createHttpRequest((0, exports.JsonEncode)(req, 'PaperSessionSecretRequest'), headers, signal)).then(res => {
562
+ return this.fetch(this.url('PaperSessionSecret'), createHttpRequest(JsonEncode(req, 'PaperSessionSecretRequest'), headers, signal)).then(res => {
568
563
  return buildResponse(res).then(_data => {
569
- return (0, exports.JsonDecode)(_data, 'PaperSessionSecretResponse');
564
+ return JsonDecode(_data, 'PaperSessionSecretResponse');
570
565
  });
571
566
  }, error => {
572
567
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
573
568
  });
574
569
  };
575
570
  paperSessionSecret2 = (req, headers, signal) => {
576
- return this.fetch(this.url('PaperSessionSecret2'), createHttpRequest((0, exports.JsonEncode)(req, 'PaperSessionSecret2Request'), headers, signal)).then(res => {
571
+ return this.fetch(this.url('PaperSessionSecret2'), createHttpRequest(JsonEncode(req, 'PaperSessionSecret2Request'), headers, signal)).then(res => {
577
572
  return buildResponse(res).then(_data => {
578
- return (0, exports.JsonDecode)(_data, 'PaperSessionSecret2Response');
573
+ return JsonDecode(_data, 'PaperSessionSecret2Response');
579
574
  });
580
575
  }, error => {
581
576
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
582
577
  });
583
578
  };
584
579
  linkWallet = (req, headers, signal) => {
585
- return this.fetch(this.url('LinkWallet'), createHttpRequest((0, exports.JsonEncode)(req, 'LinkWalletRequest'), headers, signal)).then(res => {
580
+ return this.fetch(this.url('LinkWallet'), createHttpRequest(JsonEncode(req, 'LinkWalletRequest'), headers, signal)).then(res => {
586
581
  return buildResponse(res).then(_data => {
587
- return (0, exports.JsonDecode)(_data, 'LinkWalletResponse');
582
+ return JsonDecode(_data, 'LinkWalletResponse');
588
583
  });
589
584
  }, error => {
590
585
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
591
586
  });
592
587
  };
593
588
  getLinkedWallets = (req, headers, signal) => {
594
- return this.fetch(this.url('GetLinkedWallets'), createHttpRequest((0, exports.JsonEncode)(req, 'GetLinkedWalletsRequest'), headers, signal)).then(res => {
589
+ return this.fetch(this.url('GetLinkedWallets'), createHttpRequest(JsonEncode(req, 'GetLinkedWalletsRequest'), headers, signal)).then(res => {
595
590
  return buildResponse(res).then(_data => {
596
- return (0, exports.JsonDecode)(_data, 'GetLinkedWalletsResponse');
591
+ return JsonDecode(_data, 'GetLinkedWalletsResponse');
597
592
  });
598
593
  }, error => {
599
594
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
600
595
  });
601
596
  };
602
597
  removeLinkedWallet = (req, headers, signal) => {
603
- return this.fetch(this.url('RemoveLinkedWallet'), createHttpRequest((0, exports.JsonEncode)(req, 'RemoveLinkedWalletRequest'), headers, signal)).then(res => {
598
+ return this.fetch(this.url('RemoveLinkedWallet'), createHttpRequest(JsonEncode(req, 'RemoveLinkedWalletRequest'), headers, signal)).then(res => {
604
599
  return buildResponse(res).then(_data => {
605
- return (0, exports.JsonDecode)(_data, 'RemoveLinkedWalletResponse');
600
+ return JsonDecode(_data, 'RemoveLinkedWalletResponse');
606
601
  });
607
602
  }, error => {
608
603
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
609
604
  });
610
605
  };
611
606
  generateWaaSVerificationURL = (req, headers, signal) => {
612
- return this.fetch(this.url('GenerateWaaSVerificationURL'), createHttpRequest((0, exports.JsonEncode)(req, 'GenerateWaaSVerificationURLRequest'), headers, signal)).then(res => {
607
+ return this.fetch(this.url('GenerateWaaSVerificationURL'), createHttpRequest(JsonEncode(req, 'GenerateWaaSVerificationURLRequest'), headers, signal)).then(res => {
613
608
  return buildResponse(res).then(_data => {
614
- return (0, exports.JsonDecode)(_data, 'GenerateWaaSVerificationURLResponse');
609
+ return JsonDecode(_data, 'GenerateWaaSVerificationURLResponse');
615
610
  });
616
611
  }, error => {
617
612
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
618
613
  });
619
614
  };
620
615
  validateWaaSVerificationNonce = (req, headers, signal) => {
621
- return this.fetch(this.url('ValidateWaaSVerificationNonce'), createHttpRequest((0, exports.JsonEncode)(req, 'ValidateWaaSVerificationNonceRequest'), headers, signal)).then(res => {
616
+ return this.fetch(this.url('ValidateWaaSVerificationNonce'), createHttpRequest(JsonEncode(req, 'ValidateWaaSVerificationNonceRequest'), headers, signal)).then(res => {
622
617
  return buildResponse(res).then(_data => {
623
- return (0, exports.JsonDecode)(_data, 'ValidateWaaSVerificationNonceResponse');
618
+ return JsonDecode(_data, 'ValidateWaaSVerificationNonceResponse');
624
619
  });
625
620
  }, error => {
626
621
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
627
622
  });
628
623
  };
629
624
  listAdoptedWallets = (req, headers, signal) => {
630
- return this.fetch(this.url('ListAdoptedWallets'), createHttpRequest((0, exports.JsonEncode)(req, 'ListAdoptedWalletsRequest'), headers, signal)).then(res => {
625
+ return this.fetch(this.url('ListAdoptedWallets'), createHttpRequest(JsonEncode(req, 'ListAdoptedWalletsRequest'), headers, signal)).then(res => {
631
626
  return buildResponse(res).then(_data => {
632
- return (0, exports.JsonDecode)(_data, 'ListAdoptedWalletsResponse');
627
+ return JsonDecode(_data, 'ListAdoptedWalletsResponse');
633
628
  });
634
629
  }, error => {
635
630
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
@@ -638,34 +633,34 @@ class API {
638
633
  getLifiChains = (headers, signal) => {
639
634
  return this.fetch(this.url('GetLifiChains'), createHttpRequest('{}', headers, signal)).then(res => {
640
635
  return buildResponse(res).then(_data => {
641
- return (0, exports.JsonDecode)(_data, 'GetLifiChainsResponse');
636
+ return JsonDecode(_data, 'GetLifiChainsResponse');
642
637
  });
643
638
  }, error => {
644
639
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
645
640
  });
646
641
  };
647
642
  getLifiTokens = (req, headers, signal) => {
648
- return this.fetch(this.url('GetLifiTokens'), createHttpRequest((0, exports.JsonEncode)(req, 'GetLifiTokensRequest'), headers, signal)).then(res => {
643
+ return this.fetch(this.url('GetLifiTokens'), createHttpRequest(JsonEncode(req, 'GetLifiTokensRequest'), headers, signal)).then(res => {
649
644
  return buildResponse(res).then(_data => {
650
- return (0, exports.JsonDecode)(_data, 'GetLifiTokensResponse');
645
+ return JsonDecode(_data, 'GetLifiTokensResponse');
651
646
  });
652
647
  }, error => {
653
648
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
654
649
  });
655
650
  };
656
651
  getLifiSwapRoutes = (req, headers, signal) => {
657
- return this.fetch(this.url('GetLifiSwapRoutes'), createHttpRequest((0, exports.JsonEncode)(req, 'GetLifiSwapRoutesRequest'), headers, signal)).then(res => {
652
+ return this.fetch(this.url('GetLifiSwapRoutes'), createHttpRequest(JsonEncode(req, 'GetLifiSwapRoutesRequest'), headers, signal)).then(res => {
658
653
  return buildResponse(res).then(_data => {
659
- return (0, exports.JsonDecode)(_data, 'GetLifiSwapRoutesResponse');
654
+ return JsonDecode(_data, 'GetLifiSwapRoutesResponse');
660
655
  });
661
656
  }, error => {
662
657
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
663
658
  });
664
659
  };
665
660
  getLifiSwapQuote = (req, headers, signal) => {
666
- return this.fetch(this.url('GetLifiSwapQuote'), createHttpRequest((0, exports.JsonEncode)(req, 'GetLifiSwapQuoteRequest'), headers, signal)).then(res => {
661
+ return this.fetch(this.url('GetLifiSwapQuote'), createHttpRequest(JsonEncode(req, 'GetLifiSwapQuoteRequest'), headers, signal)).then(res => {
667
662
  return buildResponse(res).then(_data => {
668
- return (0, exports.JsonDecode)(_data, 'GetLifiSwapQuoteResponse');
663
+ return JsonDecode(_data, 'GetLifiSwapQuoteResponse');
669
664
  });
670
665
  }, error => {
671
666
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
@@ -674,181 +669,180 @@ class API {
674
669
  listCurrencyGroups = (headers, signal) => {
675
670
  return this.fetch(this.url('ListCurrencyGroups'), createHttpRequest('{}', headers, signal)).then(res => {
676
671
  return buildResponse(res).then(_data => {
677
- return (0, exports.JsonDecode)(_data, 'ListCurrencyGroupsResponse');
672
+ return JsonDecode(_data, 'ListCurrencyGroupsResponse');
678
673
  });
679
674
  }, error => {
680
675
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
681
676
  });
682
677
  };
683
678
  addOffchainInventory = (req, headers, signal) => {
684
- return this.fetch(this.url('AddOffchainInventory'), createHttpRequest((0, exports.JsonEncode)(req, 'AddOffchainInventoryRequest'), headers, signal)).then(res => {
679
+ return this.fetch(this.url('AddOffchainInventory'), createHttpRequest(JsonEncode(req, 'AddOffchainInventoryRequest'), headers, signal)).then(res => {
685
680
  return buildResponse(res).then(_data => {
686
- return (0, exports.JsonDecode)(_data, 'AddOffchainInventoryResponse');
681
+ return JsonDecode(_data, 'AddOffchainInventoryResponse');
687
682
  });
688
683
  }, error => {
689
684
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
690
685
  });
691
686
  };
692
687
  getOffchainInventory = (req, headers, signal) => {
693
- return this.fetch(this.url('GetOffchainInventory'), createHttpRequest((0, exports.JsonEncode)(req, 'GetOffchainInventoryRequest'), headers, signal)).then(res => {
688
+ return this.fetch(this.url('GetOffchainInventory'), createHttpRequest(JsonEncode(req, 'GetOffchainInventoryRequest'), headers, signal)).then(res => {
694
689
  return buildResponse(res).then(_data => {
695
- return (0, exports.JsonDecode)(_data, 'GetOffchainInventoryResponse');
690
+ return JsonDecode(_data, 'GetOffchainInventoryResponse');
696
691
  });
697
692
  }, error => {
698
693
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
699
694
  });
700
695
  };
701
696
  listOffchainInventories = (req, headers, signal) => {
702
- return this.fetch(this.url('ListOffchainInventories'), createHttpRequest((0, exports.JsonEncode)(req, 'ListOffchainInventoriesRequest'), headers, signal)).then(res => {
697
+ return this.fetch(this.url('ListOffchainInventories'), createHttpRequest(JsonEncode(req, 'ListOffchainInventoriesRequest'), headers, signal)).then(res => {
703
698
  return buildResponse(res).then(_data => {
704
- return (0, exports.JsonDecode)(_data, 'ListOffchainInventoriesResponse');
699
+ return JsonDecode(_data, 'ListOffchainInventoriesResponse');
705
700
  });
706
701
  }, error => {
707
702
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
708
703
  });
709
704
  };
710
705
  updateOffchainInventory = (req, headers, signal) => {
711
- return this.fetch(this.url('UpdateOffchainInventory'), createHttpRequest((0, exports.JsonEncode)(req, 'UpdateOffchainInventoryRequest'), headers, signal)).then(res => {
706
+ return this.fetch(this.url('UpdateOffchainInventory'), createHttpRequest(JsonEncode(req, 'UpdateOffchainInventoryRequest'), headers, signal)).then(res => {
712
707
  return buildResponse(res).then(_data => {
713
- return (0, exports.JsonDecode)(_data, 'UpdateOffchainInventoryResponse');
708
+ return JsonDecode(_data, 'UpdateOffchainInventoryResponse');
714
709
  });
715
710
  }, error => {
716
711
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
717
712
  });
718
713
  };
719
714
  deleteOffchainInventory = (req, headers, signal) => {
720
- return this.fetch(this.url('DeleteOffchainInventory'), createHttpRequest((0, exports.JsonEncode)(req, 'DeleteOffchainInventoryRequest'), headers, signal)).then(res => {
715
+ return this.fetch(this.url('DeleteOffchainInventory'), createHttpRequest(JsonEncode(req, 'DeleteOffchainInventoryRequest'), headers, signal)).then(res => {
721
716
  return buildResponse(res).then(_data => {
722
- return (0, exports.JsonDecode)(_data, 'DeleteOffchainInventoryResponse');
717
+ return JsonDecode(_data, 'DeleteOffchainInventoryResponse');
723
718
  });
724
719
  }, error => {
725
720
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
726
721
  });
727
722
  };
728
723
  requestOffchainPayment = (req, headers, signal) => {
729
- return this.fetch(this.url('RequestOffchainPayment'), createHttpRequest((0, exports.JsonEncode)(req, 'RequestOffchainPaymentRequest'), headers, signal)).then(res => {
724
+ return this.fetch(this.url('RequestOffchainPayment'), createHttpRequest(JsonEncode(req, 'RequestOffchainPaymentRequest'), headers, signal)).then(res => {
730
725
  return buildResponse(res).then(_data => {
731
- return (0, exports.JsonDecode)(_data, 'RequestOffchainPaymentResponse');
726
+ return JsonDecode(_data, 'RequestOffchainPaymentResponse');
732
727
  });
733
728
  }, error => {
734
729
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
735
730
  });
736
731
  };
737
732
  listOffchainPayments = (req, headers, signal) => {
738
- return this.fetch(this.url('ListOffchainPayments'), createHttpRequest((0, exports.JsonEncode)(req, 'ListOffchainPaymentsRequest'), headers, signal)).then(res => {
733
+ return this.fetch(this.url('ListOffchainPayments'), createHttpRequest(JsonEncode(req, 'ListOffchainPaymentsRequest'), headers, signal)).then(res => {
739
734
  return buildResponse(res).then(_data => {
740
- return (0, exports.JsonDecode)(_data, 'ListOffchainPaymentsResponse');
735
+ return JsonDecode(_data, 'ListOffchainPaymentsResponse');
741
736
  });
742
737
  }, error => {
743
738
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
744
739
  });
745
740
  };
746
741
  savePack = (req, headers, signal) => {
747
- return this.fetch(this.url('SavePack'), createHttpRequest((0, exports.JsonEncode)(req, 'SavePackRequest'), headers, signal)).then(res => {
742
+ return this.fetch(this.url('SavePack'), createHttpRequest(JsonEncode(req, 'SavePackRequest'), headers, signal)).then(res => {
748
743
  return buildResponse(res).then(_data => {
749
- return (0, exports.JsonDecode)(_data, 'SavePackResponse');
744
+ return JsonDecode(_data, 'SavePackResponse');
750
745
  });
751
746
  }, error => {
752
747
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
753
748
  });
754
749
  };
755
750
  getPack = (req, headers, signal) => {
756
- return this.fetch(this.url('GetPack'), createHttpRequest((0, exports.JsonEncode)(req, 'GetPackRequest'), headers, signal)).then(res => {
751
+ return this.fetch(this.url('GetPack'), createHttpRequest(JsonEncode(req, 'GetPackRequest'), headers, signal)).then(res => {
757
752
  return buildResponse(res).then(_data => {
758
- return (0, exports.JsonDecode)(_data, 'GetPackResponse');
753
+ return JsonDecode(_data, 'GetPackResponse');
759
754
  });
760
755
  }, error => {
761
756
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
762
757
  });
763
758
  };
764
759
  getPackIds = (req, headers, signal) => {
765
- return this.fetch(this.url('GetPackIds'), createHttpRequest((0, exports.JsonEncode)(req, 'GetPackIdsRequest'), headers, signal)).then(res => {
760
+ return this.fetch(this.url('GetPackIds'), createHttpRequest(JsonEncode(req, 'GetPackIdsRequest'), headers, signal)).then(res => {
766
761
  return buildResponse(res).then(_data => {
767
- return (0, exports.JsonDecode)(_data, 'GetPackIdsResponse');
762
+ return JsonDecode(_data, 'GetPackIdsResponse');
768
763
  });
769
764
  }, error => {
770
765
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
771
766
  });
772
767
  };
773
768
  deletePack = (req, headers, signal) => {
774
- return this.fetch(this.url('DeletePack'), createHttpRequest((0, exports.JsonEncode)(req, 'DeletePackRequest'), headers, signal)).then(res => {
769
+ return this.fetch(this.url('DeletePack'), createHttpRequest(JsonEncode(req, 'DeletePackRequest'), headers, signal)).then(res => {
775
770
  return buildResponse(res).then(_data => {
776
- return (0, exports.JsonDecode)(_data, 'DeletePackResponse');
771
+ return JsonDecode(_data, 'DeletePackResponse');
777
772
  });
778
773
  }, error => {
779
774
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
780
775
  });
781
776
  };
782
777
  updatePackContent = (req, headers, signal) => {
783
- return this.fetch(this.url('UpdatePackContent'), createHttpRequest((0, exports.JsonEncode)(req, 'UpdatePackContentRequest'), headers, signal)).then(res => {
778
+ return this.fetch(this.url('UpdatePackContent'), createHttpRequest(JsonEncode(req, 'UpdatePackContentRequest'), headers, signal)).then(res => {
784
779
  return buildResponse(res).then(_data => {
785
- return (0, exports.JsonDecode)(_data, 'UpdatePackContentResponse');
780
+ return JsonDecode(_data, 'UpdatePackContentResponse');
786
781
  });
787
782
  }, error => {
788
783
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
789
784
  });
790
785
  };
791
786
  getRevealTxData = (req, headers, signal) => {
792
- return this.fetch(this.url('GetRevealTxData'), createHttpRequest((0, exports.JsonEncode)(req, 'GetRevealTxDataRequest'), headers, signal)).then(res => {
787
+ return this.fetch(this.url('GetRevealTxData'), createHttpRequest(JsonEncode(req, 'GetRevealTxDataRequest'), headers, signal)).then(res => {
793
788
  return buildResponse(res).then(_data => {
794
- return (0, exports.JsonDecode)(_data, 'GetRevealTxDataResponse');
789
+ return JsonDecode(_data, 'GetRevealTxDataResponse');
795
790
  });
796
791
  }, error => {
797
792
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
798
793
  });
799
794
  };
800
795
  checkoutOptionsPrimary = (req, headers, signal) => {
801
- return this.fetch(this.url('CheckoutOptionsPrimary'), createHttpRequest((0, exports.JsonEncode)(req, 'CheckoutOptionsPrimaryRequest'), headers, signal)).then(res => {
796
+ return this.fetch(this.url('CheckoutOptionsPrimary'), createHttpRequest(JsonEncode(req, 'CheckoutOptionsPrimaryRequest'), headers, signal)).then(res => {
802
797
  return buildResponse(res).then(_data => {
803
- return (0, exports.JsonDecode)(_data, 'CheckoutOptionsPrimaryResponse');
798
+ return JsonDecode(_data, 'CheckoutOptionsPrimaryResponse');
804
799
  });
805
800
  }, error => {
806
801
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
807
802
  });
808
803
  };
809
804
  checkoutOptionsSecondary = (req, headers, signal) => {
810
- return this.fetch(this.url('CheckoutOptionsSecondary'), createHttpRequest((0, exports.JsonEncode)(req, 'CheckoutOptionsSecondaryRequest'), headers, signal)).then(res => {
805
+ return this.fetch(this.url('CheckoutOptionsSecondary'), createHttpRequest(JsonEncode(req, 'CheckoutOptionsSecondaryRequest'), headers, signal)).then(res => {
811
806
  return buildResponse(res).then(_data => {
812
- return (0, exports.JsonDecode)(_data, 'CheckoutOptionsSecondaryResponse');
807
+ return JsonDecode(_data, 'CheckoutOptionsSecondaryResponse');
813
808
  });
814
809
  }, error => {
815
810
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
816
811
  });
817
812
  };
818
813
  checkoutOptionsGetTransakContractID = (req, headers, signal) => {
819
- return this.fetch(this.url('CheckoutOptionsGetTransakContractID'), createHttpRequest((0, exports.JsonEncode)(req, 'CheckoutOptionsGetTransakContractIDRequest'), headers, signal)).then(res => {
814
+ return this.fetch(this.url('CheckoutOptionsGetTransakContractID'), createHttpRequest(JsonEncode(req, 'CheckoutOptionsGetTransakContractIDRequest'), headers, signal)).then(res => {
820
815
  return buildResponse(res).then(_data => {
821
- return (0, exports.JsonDecode)(_data, 'CheckoutOptionsGetTransakContractIDResponse');
816
+ return JsonDecode(_data, 'CheckoutOptionsGetTransakContractIDResponse');
822
817
  });
823
818
  }, error => {
824
819
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
825
820
  });
826
821
  };
827
822
  fortePayCreateIntent = (req, headers, signal) => {
828
- return this.fetch(this.url('FortePayCreateIntent'), createHttpRequest((0, exports.JsonEncode)(req, 'FortePayCreateIntentRequest'), headers, signal)).then(res => {
823
+ return this.fetch(this.url('FortePayCreateIntent'), createHttpRequest(JsonEncode(req, 'FortePayCreateIntentRequest'), headers, signal)).then(res => {
829
824
  return buildResponse(res).then(_data => {
830
- return (0, exports.JsonDecode)(_data, 'FortePayCreateIntentResponse');
825
+ return JsonDecode(_data, 'FortePayCreateIntentResponse');
831
826
  });
832
827
  }, error => {
833
828
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
834
829
  });
835
830
  };
836
831
  fortePayGetPaymentStatuses = (req, headers, signal) => {
837
- return this.fetch(this.url('FortePayGetPaymentStatuses'), createHttpRequest((0, exports.JsonEncode)(req, 'FortePayGetPaymentStatusesRequest'), headers, signal)).then(res => {
832
+ return this.fetch(this.url('FortePayGetPaymentStatuses'), createHttpRequest(JsonEncode(req, 'FortePayGetPaymentStatusesRequest'), headers, signal)).then(res => {
838
833
  return buildResponse(res).then(_data => {
839
- return (0, exports.JsonDecode)(_data, 'FortePayGetPaymentStatusesResponse');
834
+ return JsonDecode(_data, 'FortePayGetPaymentStatusesResponse');
840
835
  });
841
836
  }, error => {
842
837
  throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` });
843
838
  });
844
839
  };
845
840
  }
846
- exports.API = API;
847
841
  const createHttpRequest = (body = '{}', headers = {}, signal = null) => {
848
842
  const reqHeaders = {
849
843
  ...headers,
850
844
  'Content-Type': 'application/json',
851
- [exports.WebrpcHeader]: exports.WebrpcHeaderValue
845
+ [WebrpcHeader]: WebrpcHeaderValue
852
846
  };
853
847
  return { method: 'POST', headers: reqHeaders, body, signal };
854
848
  };
@@ -866,16 +860,15 @@ const buildResponse = (res) => {
866
860
  }
867
861
  if (!res.ok) {
868
862
  const code = typeof data.code === 'number' ? data.code : 0;
869
- throw (exports.webrpcErrorByCode[code] || WebrpcError).new(data);
863
+ throw (webrpcErrorByCode[code] || WebrpcError).new(data);
870
864
  }
871
865
  return data;
872
866
  });
873
867
  };
874
- const JsonEncode = (obj, _typ = '') => {
868
+ export const JsonEncode = (obj, _typ = '') => {
875
869
  return JSON.stringify(obj);
876
870
  };
877
- exports.JsonEncode = JsonEncode;
878
- const JsonDecode = (data, _typ = '') => {
871
+ export const JsonDecode = (data, _typ = '') => {
879
872
  let parsed = data;
880
873
  if (typeof data === 'string') {
881
874
  try {
@@ -887,8 +880,7 @@ const JsonDecode = (data, _typ = '') => {
887
880
  }
888
881
  return parsed;
889
882
  };
890
- exports.JsonDecode = JsonDecode;
891
- class WebrpcError extends Error {
883
+ export class WebrpcError extends Error {
892
884
  code;
893
885
  status;
894
886
  constructor(error = {}) {
@@ -905,8 +897,7 @@ class WebrpcError extends Error {
905
897
  return new this({ message: payload.message, code: payload.code, status: payload.status, cause: payload.cause });
906
898
  }
907
899
  }
908
- exports.WebrpcError = WebrpcError;
909
- class WebrpcEndpointError extends WebrpcError {
900
+ export class WebrpcEndpointError extends WebrpcError {
910
901
  constructor(error = {}) {
911
902
  super(error);
912
903
  this.name = error.name || 'WebrpcEndpoint';
@@ -918,8 +909,7 @@ class WebrpcEndpointError extends WebrpcError {
918
909
  Object.setPrototypeOf(this, WebrpcEndpointError.prototype);
919
910
  }
920
911
  }
921
- exports.WebrpcEndpointError = WebrpcEndpointError;
922
- class WebrpcRequestFailedError extends WebrpcError {
912
+ export class WebrpcRequestFailedError extends WebrpcError {
923
913
  constructor(error = {}) {
924
914
  super(error);
925
915
  this.name = error.name || 'WebrpcRequestFailed';
@@ -931,8 +921,7 @@ class WebrpcRequestFailedError extends WebrpcError {
931
921
  Object.setPrototypeOf(this, WebrpcRequestFailedError.prototype);
932
922
  }
933
923
  }
934
- exports.WebrpcRequestFailedError = WebrpcRequestFailedError;
935
- class WebrpcBadRouteError extends WebrpcError {
924
+ export class WebrpcBadRouteError extends WebrpcError {
936
925
  constructor(error = {}) {
937
926
  super(error);
938
927
  this.name = error.name || 'WebrpcBadRoute';
@@ -944,8 +933,7 @@ class WebrpcBadRouteError extends WebrpcError {
944
933
  Object.setPrototypeOf(this, WebrpcBadRouteError.prototype);
945
934
  }
946
935
  }
947
- exports.WebrpcBadRouteError = WebrpcBadRouteError;
948
- class WebrpcBadMethodError extends WebrpcError {
936
+ export class WebrpcBadMethodError extends WebrpcError {
949
937
  constructor(error = {}) {
950
938
  super(error);
951
939
  this.name = error.name || 'WebrpcBadMethod';
@@ -957,8 +945,7 @@ class WebrpcBadMethodError extends WebrpcError {
957
945
  Object.setPrototypeOf(this, WebrpcBadMethodError.prototype);
958
946
  }
959
947
  }
960
- exports.WebrpcBadMethodError = WebrpcBadMethodError;
961
- class WebrpcBadRequestError extends WebrpcError {
948
+ export class WebrpcBadRequestError extends WebrpcError {
962
949
  constructor(error = {}) {
963
950
  super(error);
964
951
  this.name = error.name || 'WebrpcBadRequest';
@@ -970,8 +957,7 @@ class WebrpcBadRequestError extends WebrpcError {
970
957
  Object.setPrototypeOf(this, WebrpcBadRequestError.prototype);
971
958
  }
972
959
  }
973
- exports.WebrpcBadRequestError = WebrpcBadRequestError;
974
- class WebrpcBadResponseError extends WebrpcError {
960
+ export class WebrpcBadResponseError extends WebrpcError {
975
961
  constructor(error = {}) {
976
962
  super(error);
977
963
  this.name = error.name || 'WebrpcBadResponse';
@@ -983,8 +969,7 @@ class WebrpcBadResponseError extends WebrpcError {
983
969
  Object.setPrototypeOf(this, WebrpcBadResponseError.prototype);
984
970
  }
985
971
  }
986
- exports.WebrpcBadResponseError = WebrpcBadResponseError;
987
- class WebrpcServerPanicError extends WebrpcError {
972
+ export class WebrpcServerPanicError extends WebrpcError {
988
973
  constructor(error = {}) {
989
974
  super(error);
990
975
  this.name = error.name || 'WebrpcServerPanic';
@@ -996,8 +981,7 @@ class WebrpcServerPanicError extends WebrpcError {
996
981
  Object.setPrototypeOf(this, WebrpcServerPanicError.prototype);
997
982
  }
998
983
  }
999
- exports.WebrpcServerPanicError = WebrpcServerPanicError;
1000
- class WebrpcInternalErrorError extends WebrpcError {
984
+ export class WebrpcInternalErrorError extends WebrpcError {
1001
985
  constructor(error = {}) {
1002
986
  super(error);
1003
987
  this.name = error.name || 'WebrpcInternalError';
@@ -1009,8 +993,7 @@ class WebrpcInternalErrorError extends WebrpcError {
1009
993
  Object.setPrototypeOf(this, WebrpcInternalErrorError.prototype);
1010
994
  }
1011
995
  }
1012
- exports.WebrpcInternalErrorError = WebrpcInternalErrorError;
1013
- class WebrpcClientAbortedError extends WebrpcError {
996
+ export class WebrpcClientAbortedError extends WebrpcError {
1014
997
  constructor(error = {}) {
1015
998
  super(error);
1016
999
  this.name = error.name || 'WebrpcClientAborted';
@@ -1022,8 +1005,7 @@ class WebrpcClientAbortedError extends WebrpcError {
1022
1005
  Object.setPrototypeOf(this, WebrpcClientAbortedError.prototype);
1023
1006
  }
1024
1007
  }
1025
- exports.WebrpcClientAbortedError = WebrpcClientAbortedError;
1026
- class WebrpcStreamLostError extends WebrpcError {
1008
+ export class WebrpcStreamLostError extends WebrpcError {
1027
1009
  constructor(error = {}) {
1028
1010
  super(error);
1029
1011
  this.name = error.name || 'WebrpcStreamLost';
@@ -1035,8 +1017,7 @@ class WebrpcStreamLostError extends WebrpcError {
1035
1017
  Object.setPrototypeOf(this, WebrpcStreamLostError.prototype);
1036
1018
  }
1037
1019
  }
1038
- exports.WebrpcStreamLostError = WebrpcStreamLostError;
1039
- class WebrpcStreamFinishedError extends WebrpcError {
1020
+ export class WebrpcStreamFinishedError extends WebrpcError {
1040
1021
  constructor(error = {}) {
1041
1022
  super(error);
1042
1023
  this.name = error.name || 'WebrpcStreamFinished';
@@ -1048,11 +1029,10 @@ class WebrpcStreamFinishedError extends WebrpcError {
1048
1029
  Object.setPrototypeOf(this, WebrpcStreamFinishedError.prototype);
1049
1030
  }
1050
1031
  }
1051
- exports.WebrpcStreamFinishedError = WebrpcStreamFinishedError;
1052
1032
  //
1053
1033
  // Schema errors
1054
1034
  //
1055
- class UnauthorizedError extends WebrpcError {
1035
+ export class UnauthorizedError extends WebrpcError {
1056
1036
  constructor(error = {}) {
1057
1037
  super(error);
1058
1038
  this.name = error.name || 'Unauthorized';
@@ -1064,8 +1044,7 @@ class UnauthorizedError extends WebrpcError {
1064
1044
  Object.setPrototypeOf(this, UnauthorizedError.prototype);
1065
1045
  }
1066
1046
  }
1067
- exports.UnauthorizedError = UnauthorizedError;
1068
- class PermissionDeniedError extends WebrpcError {
1047
+ export class PermissionDeniedError extends WebrpcError {
1069
1048
  constructor(error = {}) {
1070
1049
  super(error);
1071
1050
  this.name = error.name || 'PermissionDenied';
@@ -1077,8 +1056,7 @@ class PermissionDeniedError extends WebrpcError {
1077
1056
  Object.setPrototypeOf(this, PermissionDeniedError.prototype);
1078
1057
  }
1079
1058
  }
1080
- exports.PermissionDeniedError = PermissionDeniedError;
1081
- class SessionExpiredError extends WebrpcError {
1059
+ export class SessionExpiredError extends WebrpcError {
1082
1060
  constructor(error = {}) {
1083
1061
  super(error);
1084
1062
  this.name = error.name || 'SessionExpired';
@@ -1090,8 +1068,7 @@ class SessionExpiredError extends WebrpcError {
1090
1068
  Object.setPrototypeOf(this, SessionExpiredError.prototype);
1091
1069
  }
1092
1070
  }
1093
- exports.SessionExpiredError = SessionExpiredError;
1094
- class MethodNotFoundError extends WebrpcError {
1071
+ export class MethodNotFoundError extends WebrpcError {
1095
1072
  constructor(error = {}) {
1096
1073
  super(error);
1097
1074
  this.name = error.name || 'MethodNotFound';
@@ -1103,8 +1080,7 @@ class MethodNotFoundError extends WebrpcError {
1103
1080
  Object.setPrototypeOf(this, MethodNotFoundError.prototype);
1104
1081
  }
1105
1082
  }
1106
- exports.MethodNotFoundError = MethodNotFoundError;
1107
- class RequestConflictError extends WebrpcError {
1083
+ export class RequestConflictError extends WebrpcError {
1108
1084
  constructor(error = {}) {
1109
1085
  super(error);
1110
1086
  this.name = error.name || 'RequestConflict';
@@ -1116,8 +1092,7 @@ class RequestConflictError extends WebrpcError {
1116
1092
  Object.setPrototypeOf(this, RequestConflictError.prototype);
1117
1093
  }
1118
1094
  }
1119
- exports.RequestConflictError = RequestConflictError;
1120
- class AbortedError extends WebrpcError {
1095
+ export class AbortedError extends WebrpcError {
1121
1096
  constructor(error = {}) {
1122
1097
  super(error);
1123
1098
  this.name = error.name || 'Aborted';
@@ -1129,8 +1104,7 @@ class AbortedError extends WebrpcError {
1129
1104
  Object.setPrototypeOf(this, AbortedError.prototype);
1130
1105
  }
1131
1106
  }
1132
- exports.AbortedError = AbortedError;
1133
- class GeoblockedError extends WebrpcError {
1107
+ export class GeoblockedError extends WebrpcError {
1134
1108
  constructor(error = {}) {
1135
1109
  super(error);
1136
1110
  this.name = error.name || 'Geoblocked';
@@ -1142,8 +1116,7 @@ class GeoblockedError extends WebrpcError {
1142
1116
  Object.setPrototypeOf(this, GeoblockedError.prototype);
1143
1117
  }
1144
1118
  }
1145
- exports.GeoblockedError = GeoblockedError;
1146
- class RateLimitedError extends WebrpcError {
1119
+ export class RateLimitedError extends WebrpcError {
1147
1120
  constructor(error = {}) {
1148
1121
  super(error);
1149
1122
  this.name = error.name || 'RateLimited';
@@ -1155,8 +1128,7 @@ class RateLimitedError extends WebrpcError {
1155
1128
  Object.setPrototypeOf(this, RateLimitedError.prototype);
1156
1129
  }
1157
1130
  }
1158
- exports.RateLimitedError = RateLimitedError;
1159
- class ProjectNotFoundError extends WebrpcError {
1131
+ export class ProjectNotFoundError extends WebrpcError {
1160
1132
  constructor(error = {}) {
1161
1133
  super(error);
1162
1134
  this.name = error.name || 'ProjectNotFound';
@@ -1168,8 +1140,7 @@ class ProjectNotFoundError extends WebrpcError {
1168
1140
  Object.setPrototypeOf(this, ProjectNotFoundError.prototype);
1169
1141
  }
1170
1142
  }
1171
- exports.ProjectNotFoundError = ProjectNotFoundError;
1172
- class AccessKeyNotFoundError extends WebrpcError {
1143
+ export class AccessKeyNotFoundError extends WebrpcError {
1173
1144
  constructor(error = {}) {
1174
1145
  super(error);
1175
1146
  this.name = error.name || 'AccessKeyNotFound';
@@ -1181,8 +1152,7 @@ class AccessKeyNotFoundError extends WebrpcError {
1181
1152
  Object.setPrototypeOf(this, AccessKeyNotFoundError.prototype);
1182
1153
  }
1183
1154
  }
1184
- exports.AccessKeyNotFoundError = AccessKeyNotFoundError;
1185
- class AccessKeyMismatchError extends WebrpcError {
1155
+ export class AccessKeyMismatchError extends WebrpcError {
1186
1156
  constructor(error = {}) {
1187
1157
  super(error);
1188
1158
  this.name = error.name || 'AccessKeyMismatch';
@@ -1194,8 +1164,7 @@ class AccessKeyMismatchError extends WebrpcError {
1194
1164
  Object.setPrototypeOf(this, AccessKeyMismatchError.prototype);
1195
1165
  }
1196
1166
  }
1197
- exports.AccessKeyMismatchError = AccessKeyMismatchError;
1198
- class InvalidOriginError extends WebrpcError {
1167
+ export class InvalidOriginError extends WebrpcError {
1199
1168
  constructor(error = {}) {
1200
1169
  super(error);
1201
1170
  this.name = error.name || 'InvalidOrigin';
@@ -1207,8 +1176,7 @@ class InvalidOriginError extends WebrpcError {
1207
1176
  Object.setPrototypeOf(this, InvalidOriginError.prototype);
1208
1177
  }
1209
1178
  }
1210
- exports.InvalidOriginError = InvalidOriginError;
1211
- class InvalidServiceError extends WebrpcError {
1179
+ export class InvalidServiceError extends WebrpcError {
1212
1180
  constructor(error = {}) {
1213
1181
  super(error);
1214
1182
  this.name = error.name || 'InvalidService';
@@ -1220,8 +1188,7 @@ class InvalidServiceError extends WebrpcError {
1220
1188
  Object.setPrototypeOf(this, InvalidServiceError.prototype);
1221
1189
  }
1222
1190
  }
1223
- exports.InvalidServiceError = InvalidServiceError;
1224
- class UnauthorizedUserError extends WebrpcError {
1191
+ export class UnauthorizedUserError extends WebrpcError {
1225
1192
  constructor(error = {}) {
1226
1193
  super(error);
1227
1194
  this.name = error.name || 'UnauthorizedUser';
@@ -1233,8 +1200,7 @@ class UnauthorizedUserError extends WebrpcError {
1233
1200
  Object.setPrototypeOf(this, UnauthorizedUserError.prototype);
1234
1201
  }
1235
1202
  }
1236
- exports.UnauthorizedUserError = UnauthorizedUserError;
1237
- class QuotaExceededError extends WebrpcError {
1203
+ export class QuotaExceededError extends WebrpcError {
1238
1204
  constructor(error = {}) {
1239
1205
  super(error);
1240
1206
  this.name = error.name || 'QuotaExceeded';
@@ -1246,8 +1212,7 @@ class QuotaExceededError extends WebrpcError {
1246
1212
  Object.setPrototypeOf(this, QuotaExceededError.prototype);
1247
1213
  }
1248
1214
  }
1249
- exports.QuotaExceededError = QuotaExceededError;
1250
- class QuotaRateLimitError extends WebrpcError {
1215
+ export class QuotaRateLimitError extends WebrpcError {
1251
1216
  constructor(error = {}) {
1252
1217
  super(error);
1253
1218
  this.name = error.name || 'QuotaRateLimit';
@@ -1259,8 +1224,7 @@ class QuotaRateLimitError extends WebrpcError {
1259
1224
  Object.setPrototypeOf(this, QuotaRateLimitError.prototype);
1260
1225
  }
1261
1226
  }
1262
- exports.QuotaRateLimitError = QuotaRateLimitError;
1263
- class NoDefaultKeyError extends WebrpcError {
1227
+ export class NoDefaultKeyError extends WebrpcError {
1264
1228
  constructor(error = {}) {
1265
1229
  super(error);
1266
1230
  this.name = error.name || 'NoDefaultKey';
@@ -1272,8 +1236,7 @@ class NoDefaultKeyError extends WebrpcError {
1272
1236
  Object.setPrototypeOf(this, NoDefaultKeyError.prototype);
1273
1237
  }
1274
1238
  }
1275
- exports.NoDefaultKeyError = NoDefaultKeyError;
1276
- class MaxAccessKeysError extends WebrpcError {
1239
+ export class MaxAccessKeysError extends WebrpcError {
1277
1240
  constructor(error = {}) {
1278
1241
  super(error);
1279
1242
  this.name = error.name || 'MaxAccessKeys';
@@ -1285,8 +1248,7 @@ class MaxAccessKeysError extends WebrpcError {
1285
1248
  Object.setPrototypeOf(this, MaxAccessKeysError.prototype);
1286
1249
  }
1287
1250
  }
1288
- exports.MaxAccessKeysError = MaxAccessKeysError;
1289
- class AtLeastOneKeyError extends WebrpcError {
1251
+ export class AtLeastOneKeyError extends WebrpcError {
1290
1252
  constructor(error = {}) {
1291
1253
  super(error);
1292
1254
  this.name = error.name || 'AtLeastOneKey';
@@ -1298,8 +1260,7 @@ class AtLeastOneKeyError extends WebrpcError {
1298
1260
  Object.setPrototypeOf(this, AtLeastOneKeyError.prototype);
1299
1261
  }
1300
1262
  }
1301
- exports.AtLeastOneKeyError = AtLeastOneKeyError;
1302
- class TimeoutError extends WebrpcError {
1263
+ export class TimeoutError extends WebrpcError {
1303
1264
  constructor(error = {}) {
1304
1265
  super(error);
1305
1266
  this.name = error.name || 'Timeout';
@@ -1311,8 +1272,7 @@ class TimeoutError extends WebrpcError {
1311
1272
  Object.setPrototypeOf(this, TimeoutError.prototype);
1312
1273
  }
1313
1274
  }
1314
- exports.TimeoutError = TimeoutError;
1315
- class InvalidArgumentError extends WebrpcError {
1275
+ export class InvalidArgumentError extends WebrpcError {
1316
1276
  constructor(error = {}) {
1317
1277
  super(error);
1318
1278
  this.name = error.name || 'InvalidArgument';
@@ -1324,8 +1284,7 @@ class InvalidArgumentError extends WebrpcError {
1324
1284
  Object.setPrototypeOf(this, InvalidArgumentError.prototype);
1325
1285
  }
1326
1286
  }
1327
- exports.InvalidArgumentError = InvalidArgumentError;
1328
- class UnavailableError extends WebrpcError {
1287
+ export class UnavailableError extends WebrpcError {
1329
1288
  constructor(error = {}) {
1330
1289
  super(error);
1331
1290
  this.name = error.name || 'Unavailable';
@@ -1337,8 +1296,7 @@ class UnavailableError extends WebrpcError {
1337
1296
  Object.setPrototypeOf(this, UnavailableError.prototype);
1338
1297
  }
1339
1298
  }
1340
- exports.UnavailableError = UnavailableError;
1341
- class QueryFailedError extends WebrpcError {
1299
+ export class QueryFailedError extends WebrpcError {
1342
1300
  constructor(error = {}) {
1343
1301
  super(error);
1344
1302
  this.name = error.name || 'QueryFailed';
@@ -1350,8 +1308,7 @@ class QueryFailedError extends WebrpcError {
1350
1308
  Object.setPrototypeOf(this, QueryFailedError.prototype);
1351
1309
  }
1352
1310
  }
1353
- exports.QueryFailedError = QueryFailedError;
1354
- class NotFoundError extends WebrpcError {
1311
+ export class NotFoundError extends WebrpcError {
1355
1312
  constructor(error = {}) {
1356
1313
  super(error);
1357
1314
  this.name = error.name || 'NotFound';
@@ -1363,8 +1320,7 @@ class NotFoundError extends WebrpcError {
1363
1320
  Object.setPrototypeOf(this, NotFoundError.prototype);
1364
1321
  }
1365
1322
  }
1366
- exports.NotFoundError = NotFoundError;
1367
- class UnsupportedNetworkError extends WebrpcError {
1323
+ export class UnsupportedNetworkError extends WebrpcError {
1368
1324
  constructor(error = {}) {
1369
1325
  super(error);
1370
1326
  this.name = error.name || 'UnsupportedNetwork';
@@ -1376,8 +1332,7 @@ class UnsupportedNetworkError extends WebrpcError {
1376
1332
  Object.setPrototypeOf(this, UnsupportedNetworkError.prototype);
1377
1333
  }
1378
1334
  }
1379
- exports.UnsupportedNetworkError = UnsupportedNetworkError;
1380
- var errors;
1335
+ export var errors;
1381
1336
  (function (errors) {
1382
1337
  errors["WebrpcEndpoint"] = "WebrpcEndpoint";
1383
1338
  errors["WebrpcRequestFailed"] = "WebrpcRequestFailed";
@@ -1415,8 +1370,8 @@ var errors;
1415
1370
  errors["QueryFailed"] = "QueryFailed";
1416
1371
  errors["NotFound"] = "NotFound";
1417
1372
  errors["UnsupportedNetwork"] = "UnsupportedNetwork";
1418
- })(errors || (exports.errors = errors = {}));
1419
- var WebrpcErrorCodes;
1373
+ })(errors || (errors = {}));
1374
+ export var WebrpcErrorCodes;
1420
1375
  (function (WebrpcErrorCodes) {
1421
1376
  WebrpcErrorCodes[WebrpcErrorCodes["WebrpcEndpoint"] = 0] = "WebrpcEndpoint";
1422
1377
  WebrpcErrorCodes[WebrpcErrorCodes["WebrpcRequestFailed"] = -1] = "WebrpcRequestFailed";
@@ -1454,8 +1409,8 @@ var WebrpcErrorCodes;
1454
1409
  WebrpcErrorCodes[WebrpcErrorCodes["QueryFailed"] = 2003] = "QueryFailed";
1455
1410
  WebrpcErrorCodes[WebrpcErrorCodes["NotFound"] = 3000] = "NotFound";
1456
1411
  WebrpcErrorCodes[WebrpcErrorCodes["UnsupportedNetwork"] = 3008] = "UnsupportedNetwork";
1457
- })(WebrpcErrorCodes || (exports.WebrpcErrorCodes = WebrpcErrorCodes = {}));
1458
- exports.webrpcErrorByCode = {
1412
+ })(WebrpcErrorCodes || (WebrpcErrorCodes = {}));
1413
+ export const webrpcErrorByCode = {
1459
1414
  [0]: WebrpcEndpointError,
1460
1415
  [-1]: WebrpcRequestFailedError,
1461
1416
  [-2]: WebrpcBadRouteError,
@@ -1496,10 +1451,10 @@ exports.webrpcErrorByCode = {
1496
1451
  //
1497
1452
  // Webrpc
1498
1453
  //
1499
- exports.WebrpcHeader = 'Webrpc';
1500
- exports.WebrpcHeaderValue = 'webrpc@v0.31.0;gen-typescript@v0.22.5;sequence-api@v0.4.0';
1501
- function VersionFromHeader(headers) {
1502
- const headerValue = headers.get(exports.WebrpcHeader);
1454
+ export const WebrpcHeader = 'Webrpc';
1455
+ export const WebrpcHeaderValue = 'webrpc@v0.31.0;gen-typescript@v0.22.5;sequence-api@v0.4.0';
1456
+ export function VersionFromHeader(headers) {
1457
+ const headerValue = headers.get(WebrpcHeader);
1503
1458
  if (!headerValue) {
1504
1459
  return {
1505
1460
  WebrpcGenVersion: '',