@0xsequence/api 3.0.0-beta.13 → 3.0.0-beta.14
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 +1 -1
- package/CHANGELOG.md +6 -0
- package/dist/api.gen.d.ts +1 -222
- package/dist/api.gen.d.ts.map +1 -1
- package/dist/api.gen.js +314 -574
- package/package.json +1 -1
- package/src/api.gen.ts +562 -1338
package/src/api.gen.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// sequence-api v0.4.0
|
|
2
|
+
// sequence-api v0.4.0 3c15fa79614e43a5321cd2ac0c080e80af291bd1
|
|
3
3
|
// --
|
|
4
4
|
// Code generated by Webrpc-gen@v0.31.0 with typescript generator. DO NOT EDIT.
|
|
5
5
|
//
|
|
@@ -12,7 +12,7 @@ export const WebrpcVersion = 'v1'
|
|
|
12
12
|
export const WebrpcSchemaVersion = 'v0.4.0'
|
|
13
13
|
|
|
14
14
|
// Schema hash generated from your RIDL schema
|
|
15
|
-
export const WebrpcSchemaHash = '
|
|
15
|
+
export const WebrpcSchemaHash = '3c15fa79614e43a5321cd2ac0c080e80af291bd1'
|
|
16
16
|
|
|
17
17
|
//
|
|
18
18
|
// Client interface
|
|
@@ -47,14 +47,10 @@ export interface APIClient {
|
|
|
47
47
|
sendPasswordlessLink(
|
|
48
48
|
req: SendPasswordlessLinkRequest,
|
|
49
49
|
headers?: object,
|
|
50
|
-
signal?: AbortSignal
|
|
50
|
+
signal?: AbortSignal
|
|
51
51
|
): Promise<SendPasswordlessLinkResponse>
|
|
52
52
|
|
|
53
|
-
registerPublicKey(
|
|
54
|
-
req: RegisterPublicKeyRequest,
|
|
55
|
-
headers?: object,
|
|
56
|
-
signal?: AbortSignal,
|
|
57
|
-
): Promise<RegisterPublicKeyResponse>
|
|
53
|
+
registerPublicKey(req: RegisterPublicKeyRequest, headers?: object, signal?: AbortSignal): Promise<RegisterPublicKeyResponse>
|
|
58
54
|
|
|
59
55
|
getPublicKey(req: GetPublicKeyRequest, headers?: object, signal?: AbortSignal): Promise<GetPublicKeyResponse>
|
|
60
56
|
|
|
@@ -65,11 +61,7 @@ export interface APIClient {
|
|
|
65
61
|
*/
|
|
66
62
|
friendList(req: FriendListRequest, headers?: object, signal?: AbortSignal): Promise<FriendListResponse>
|
|
67
63
|
|
|
68
|
-
getFriendByAddress(
|
|
69
|
-
req: GetFriendByAddressRequest,
|
|
70
|
-
headers?: object,
|
|
71
|
-
signal?: AbortSignal,
|
|
72
|
-
): Promise<GetFriendByAddressResponse>
|
|
64
|
+
getFriendByAddress(req: GetFriendByAddressRequest, headers?: object, signal?: AbortSignal): Promise<GetFriendByAddressResponse>
|
|
73
65
|
|
|
74
66
|
searchFriends(req: SearchFriendsRequest, headers?: object, signal?: AbortSignal): Promise<SearchFriendsResponse>
|
|
75
67
|
|
|
@@ -78,7 +70,7 @@ export interface APIClient {
|
|
|
78
70
|
updateFriendNickname(
|
|
79
71
|
req: UpdateFriendNicknameRequest,
|
|
80
72
|
headers?: object,
|
|
81
|
-
signal?: AbortSignal
|
|
73
|
+
signal?: AbortSignal
|
|
82
74
|
): Promise<UpdateFriendNicknameResponse>
|
|
83
75
|
|
|
84
76
|
removeFriend(req: RemoveFriendRequest, headers?: object, signal?: AbortSignal): Promise<RemoveFriendResponse>
|
|
@@ -90,16 +82,12 @@ export interface APIClient {
|
|
|
90
82
|
*/
|
|
91
83
|
contractCall(req: ContractCallRequest, headers?: object, signal?: AbortSignal): Promise<ContractCallResponse>
|
|
92
84
|
|
|
93
|
-
decodeContractCall(
|
|
94
|
-
req: DecodeContractCallRequest,
|
|
95
|
-
headers?: object,
|
|
96
|
-
signal?: AbortSignal,
|
|
97
|
-
): Promise<DecodeContractCallResponse>
|
|
85
|
+
decodeContractCall(req: DecodeContractCallRequest, headers?: object, signal?: AbortSignal): Promise<DecodeContractCallResponse>
|
|
98
86
|
|
|
99
87
|
lookupContractCallSelectors(
|
|
100
88
|
req: LookupContractCallSelectorsRequest,
|
|
101
89
|
headers?: object,
|
|
102
|
-
signal?: AbortSignal
|
|
90
|
+
signal?: AbortSignal
|
|
103
91
|
): Promise<LookupContractCallSelectorsResponse>
|
|
104
92
|
|
|
105
93
|
/**
|
|
@@ -107,24 +95,16 @@ export interface APIClient {
|
|
|
107
95
|
* User Storage
|
|
108
96
|
*
|
|
109
97
|
*/
|
|
110
|
-
userStorageFetch(
|
|
111
|
-
req: UserStorageFetchRequest,
|
|
112
|
-
headers?: object,
|
|
113
|
-
signal?: AbortSignal,
|
|
114
|
-
): Promise<UserStorageFetchResponse>
|
|
98
|
+
userStorageFetch(req: UserStorageFetchRequest, headers?: object, signal?: AbortSignal): Promise<UserStorageFetchResponse>
|
|
115
99
|
|
|
116
100
|
userStorageSave(req: UserStorageSaveRequest, headers?: object, signal?: AbortSignal): Promise<UserStorageSaveResponse>
|
|
117
101
|
|
|
118
|
-
userStorageDelete(
|
|
119
|
-
req: UserStorageDeleteRequest,
|
|
120
|
-
headers?: object,
|
|
121
|
-
signal?: AbortSignal,
|
|
122
|
-
): Promise<UserStorageDeleteResponse>
|
|
102
|
+
userStorageDelete(req: UserStorageDeleteRequest, headers?: object, signal?: AbortSignal): Promise<UserStorageDeleteResponse>
|
|
123
103
|
|
|
124
104
|
userStorageFetchAll(
|
|
125
105
|
req: UserStorageFetchAllRequest,
|
|
126
106
|
headers?: object,
|
|
127
|
-
signal?: AbortSignal
|
|
107
|
+
signal?: AbortSignal
|
|
128
108
|
): Promise<UserStorageFetchAllResponse>
|
|
129
109
|
|
|
130
110
|
/**
|
|
@@ -137,38 +117,30 @@ export interface APIClient {
|
|
|
137
117
|
/**
|
|
138
118
|
* - IsUsingGoogleMail(domain: string) => (yes: bool)
|
|
139
119
|
*/
|
|
140
|
-
resolveENSAddress(
|
|
141
|
-
req: ResolveENSAddressRequest,
|
|
142
|
-
headers?: object,
|
|
143
|
-
signal?: AbortSignal,
|
|
144
|
-
): Promise<ResolveENSAddressResponse>
|
|
120
|
+
resolveENSAddress(req: ResolveENSAddressRequest, headers?: object, signal?: AbortSignal): Promise<ResolveENSAddressResponse>
|
|
145
121
|
|
|
146
122
|
/**
|
|
147
123
|
* TODO: we can add walletContext optional in the future when we need it
|
|
148
124
|
* NOTE: chainId can be either a number or canonical name
|
|
149
125
|
*/
|
|
150
|
-
isValidSignature(
|
|
151
|
-
req: IsValidSignatureRequest,
|
|
152
|
-
headers?: object,
|
|
153
|
-
signal?: AbortSignal,
|
|
154
|
-
): Promise<IsValidSignatureResponse>
|
|
126
|
+
isValidSignature(req: IsValidSignatureRequest, headers?: object, signal?: AbortSignal): Promise<IsValidSignatureResponse>
|
|
155
127
|
|
|
156
128
|
isValidMessageSignature(
|
|
157
129
|
req: IsValidMessageSignatureRequest,
|
|
158
130
|
headers?: object,
|
|
159
|
-
signal?: AbortSignal
|
|
131
|
+
signal?: AbortSignal
|
|
160
132
|
): Promise<IsValidMessageSignatureResponse>
|
|
161
133
|
|
|
162
134
|
isValidTypedDataSignature(
|
|
163
135
|
req: IsValidTypedDataSignatureRequest,
|
|
164
136
|
headers?: object,
|
|
165
|
-
signal?: AbortSignal
|
|
137
|
+
signal?: AbortSignal
|
|
166
138
|
): Promise<IsValidTypedDataSignatureResponse>
|
|
167
139
|
|
|
168
140
|
isValidETHAuthProof(
|
|
169
141
|
req: IsValidETHAuthProofRequest,
|
|
170
142
|
headers?: object,
|
|
171
|
-
signal?: AbortSignal
|
|
143
|
+
signal?: AbortSignal
|
|
172
144
|
): Promise<IsValidETHAuthProofResponse>
|
|
173
145
|
|
|
174
146
|
getOnRampURL(req: GetOnRampURLRequest, headers?: object, signal?: AbortSignal): Promise<GetOnRampURLResponse>
|
|
@@ -183,13 +155,13 @@ export interface APIClient {
|
|
|
183
155
|
|
|
184
156
|
transakGetSupportedNFTCheckoutChains(
|
|
185
157
|
headers?: object,
|
|
186
|
-
signal?: AbortSignal
|
|
158
|
+
signal?: AbortSignal
|
|
187
159
|
): Promise<TransakGetSupportedNFTCheckoutChainsResponse>
|
|
188
160
|
|
|
189
161
|
transakGetWidgetURL(
|
|
190
162
|
req: TransakGetWidgetURLRequest,
|
|
191
163
|
headers?: object,
|
|
192
|
-
signal?: AbortSignal
|
|
164
|
+
signal?: AbortSignal
|
|
193
165
|
): Promise<TransakGetWidgetURLResponse>
|
|
194
166
|
|
|
195
167
|
/**
|
|
@@ -202,7 +174,7 @@ export interface APIClient {
|
|
|
202
174
|
getCollectiblePrices(
|
|
203
175
|
req: GetCollectiblePricesRequest,
|
|
204
176
|
headers?: object,
|
|
205
|
-
signal?: AbortSignal
|
|
177
|
+
signal?: AbortSignal
|
|
206
178
|
): Promise<GetCollectiblePricesResponse>
|
|
207
179
|
|
|
208
180
|
/**
|
|
@@ -231,26 +203,18 @@ export interface APIClient {
|
|
|
231
203
|
/**
|
|
232
204
|
* NOTE: we're still using this from SW-API to Sequence-API to claim invite code
|
|
233
205
|
*/
|
|
234
|
-
isValidAccessCode(
|
|
235
|
-
req: IsValidAccessCodeRequest,
|
|
236
|
-
headers?: object,
|
|
237
|
-
signal?: AbortSignal,
|
|
238
|
-
): Promise<IsValidAccessCodeResponse>
|
|
206
|
+
isValidAccessCode(req: IsValidAccessCodeRequest, headers?: object, signal?: AbortSignal): Promise<IsValidAccessCodeResponse>
|
|
239
207
|
|
|
240
208
|
internalClaimAccessCode(
|
|
241
209
|
req: InternalClaimAccessCodeRequest,
|
|
242
210
|
headers?: object,
|
|
243
|
-
signal?: AbortSignal
|
|
211
|
+
signal?: AbortSignal
|
|
244
212
|
): Promise<InternalClaimAccessCodeResponse>
|
|
245
213
|
|
|
246
214
|
/**
|
|
247
215
|
* Utils
|
|
248
216
|
*/
|
|
249
|
-
blockNumberAtTime(
|
|
250
|
-
req: BlockNumberAtTimeRequest,
|
|
251
|
-
headers?: object,
|
|
252
|
-
signal?: AbortSignal,
|
|
253
|
-
): Promise<BlockNumberAtTimeResponse>
|
|
217
|
+
blockNumberAtTime(req: BlockNumberAtTimeRequest, headers?: object, signal?: AbortSignal): Promise<BlockNumberAtTimeResponse>
|
|
254
218
|
|
|
255
219
|
/**
|
|
256
220
|
*
|
|
@@ -258,16 +222,12 @@ export interface APIClient {
|
|
|
258
222
|
* TODO: deprecate in the future
|
|
259
223
|
*
|
|
260
224
|
*/
|
|
261
|
-
paperSessionSecret(
|
|
262
|
-
req: PaperSessionSecretRequest,
|
|
263
|
-
headers?: object,
|
|
264
|
-
signal?: AbortSignal,
|
|
265
|
-
): Promise<PaperSessionSecretResponse>
|
|
225
|
+
paperSessionSecret(req: PaperSessionSecretRequest, headers?: object, signal?: AbortSignal): Promise<PaperSessionSecretResponse>
|
|
266
226
|
|
|
267
227
|
paperSessionSecret2(
|
|
268
228
|
req: PaperSessionSecret2Request,
|
|
269
229
|
headers?: object,
|
|
270
|
-
signal?: AbortSignal
|
|
230
|
+
signal?: AbortSignal
|
|
271
231
|
): Promise<PaperSessionSecret2Response>
|
|
272
232
|
|
|
273
233
|
/**
|
|
@@ -277,17 +237,9 @@ export interface APIClient {
|
|
|
277
237
|
*/
|
|
278
238
|
linkWallet(req: LinkWalletRequest, headers?: object, signal?: AbortSignal): Promise<LinkWalletResponse>
|
|
279
239
|
|
|
280
|
-
getLinkedWallets(
|
|
281
|
-
req: GetLinkedWalletsRequest,
|
|
282
|
-
headers?: object,
|
|
283
|
-
signal?: AbortSignal,
|
|
284
|
-
): Promise<GetLinkedWalletsResponse>
|
|
240
|
+
getLinkedWallets(req: GetLinkedWalletsRequest, headers?: object, signal?: AbortSignal): Promise<GetLinkedWalletsResponse>
|
|
285
241
|
|
|
286
|
-
removeLinkedWallet(
|
|
287
|
-
req: RemoveLinkedWalletRequest,
|
|
288
|
-
headers?: object,
|
|
289
|
-
signal?: AbortSignal,
|
|
290
|
-
): Promise<RemoveLinkedWalletResponse>
|
|
242
|
+
removeLinkedWallet(req: RemoveLinkedWalletRequest, headers?: object, signal?: AbortSignal): Promise<RemoveLinkedWalletResponse>
|
|
291
243
|
|
|
292
244
|
/**
|
|
293
245
|
* NOTE: these methods are deprecated, please do not use them. We may resurface them in the future, but just wanted
|
|
@@ -296,13 +248,13 @@ export interface APIClient {
|
|
|
296
248
|
generateWaaSVerificationURL(
|
|
297
249
|
req: GenerateWaaSVerificationURLRequest,
|
|
298
250
|
headers?: object,
|
|
299
|
-
signal?: AbortSignal
|
|
251
|
+
signal?: AbortSignal
|
|
300
252
|
): Promise<GenerateWaaSVerificationURLResponse>
|
|
301
253
|
|
|
302
254
|
validateWaaSVerificationNonce(
|
|
303
255
|
req: ValidateWaaSVerificationNonceRequest,
|
|
304
256
|
headers?: object,
|
|
305
|
-
signal?: AbortSignal
|
|
257
|
+
signal?: AbortSignal
|
|
306
258
|
): Promise<ValidateWaaSVerificationNonceResponse>
|
|
307
259
|
|
|
308
260
|
/**
|
|
@@ -311,11 +263,7 @@ export interface APIClient {
|
|
|
311
263
|
* WaaS child wallet adoption
|
|
312
264
|
*
|
|
313
265
|
*/
|
|
314
|
-
listAdoptedWallets(
|
|
315
|
-
req: ListAdoptedWalletsRequest,
|
|
316
|
-
headers?: object,
|
|
317
|
-
signal?: AbortSignal,
|
|
318
|
-
): Promise<ListAdoptedWalletsResponse>
|
|
266
|
+
listAdoptedWallets(req: ListAdoptedWalletsRequest, headers?: object, signal?: AbortSignal): Promise<ListAdoptedWalletsResponse>
|
|
319
267
|
|
|
320
268
|
getLifiChains(headers?: object, signal?: AbortSignal): Promise<GetLifiChainsResponse>
|
|
321
269
|
|
|
@@ -325,36 +273,9 @@ export interface APIClient {
|
|
|
325
273
|
* All parameters except `params` are deprecated.
|
|
326
274
|
* Use only the `params` object to pass values.
|
|
327
275
|
*/
|
|
328
|
-
getLifiSwapRoutes(
|
|
329
|
-
req: GetLifiSwapRoutesRequest,
|
|
330
|
-
headers?: object,
|
|
331
|
-
signal?: AbortSignal,
|
|
332
|
-
): Promise<GetLifiSwapRoutesResponse>
|
|
276
|
+
getLifiSwapRoutes(req: GetLifiSwapRoutesRequest, headers?: object, signal?: AbortSignal): Promise<GetLifiSwapRoutesResponse>
|
|
333
277
|
|
|
334
|
-
getLifiSwapQuote(
|
|
335
|
-
req: GetLifiSwapQuoteRequest,
|
|
336
|
-
headers?: object,
|
|
337
|
-
signal?: AbortSignal,
|
|
338
|
-
): Promise<GetLifiSwapQuoteResponse>
|
|
339
|
-
|
|
340
|
-
/**
|
|
341
|
-
*
|
|
342
|
-
* Chain abstraction
|
|
343
|
-
*
|
|
344
|
-
*/
|
|
345
|
-
getIntentCallsPayloads(
|
|
346
|
-
req: GetIntentCallsPayloadsRequest,
|
|
347
|
-
headers?: object,
|
|
348
|
-
signal?: AbortSignal,
|
|
349
|
-
): Promise<GetIntentCallsPayloadsResponse>
|
|
350
|
-
|
|
351
|
-
commitIntentConfig(
|
|
352
|
-
req: CommitIntentConfigRequest,
|
|
353
|
-
headers?: object,
|
|
354
|
-
signal?: AbortSignal,
|
|
355
|
-
): Promise<CommitIntentConfigResponse>
|
|
356
|
-
|
|
357
|
-
getIntentConfig(req: GetIntentConfigRequest, headers?: object, signal?: AbortSignal): Promise<GetIntentConfigResponse>
|
|
278
|
+
getLifiSwapQuote(req: GetLifiSwapQuoteRequest, headers?: object, signal?: AbortSignal): Promise<GetLifiSwapQuoteResponse>
|
|
358
279
|
|
|
359
280
|
/**
|
|
360
281
|
*
|
|
@@ -366,43 +287,43 @@ export interface APIClient {
|
|
|
366
287
|
addOffchainInventory(
|
|
367
288
|
req: AddOffchainInventoryRequest,
|
|
368
289
|
headers?: object,
|
|
369
|
-
signal?: AbortSignal
|
|
290
|
+
signal?: AbortSignal
|
|
370
291
|
): Promise<AddOffchainInventoryResponse>
|
|
371
292
|
|
|
372
293
|
getOffchainInventory(
|
|
373
294
|
req: GetOffchainInventoryRequest,
|
|
374
295
|
headers?: object,
|
|
375
|
-
signal?: AbortSignal
|
|
296
|
+
signal?: AbortSignal
|
|
376
297
|
): Promise<GetOffchainInventoryResponse>
|
|
377
298
|
|
|
378
299
|
listOffchainInventories(
|
|
379
300
|
req: ListOffchainInventoriesRequest,
|
|
380
301
|
headers?: object,
|
|
381
|
-
signal?: AbortSignal
|
|
302
|
+
signal?: AbortSignal
|
|
382
303
|
): Promise<ListOffchainInventoriesResponse>
|
|
383
304
|
|
|
384
305
|
updateOffchainInventory(
|
|
385
306
|
req: UpdateOffchainInventoryRequest,
|
|
386
307
|
headers?: object,
|
|
387
|
-
signal?: AbortSignal
|
|
308
|
+
signal?: AbortSignal
|
|
388
309
|
): Promise<UpdateOffchainInventoryResponse>
|
|
389
310
|
|
|
390
311
|
deleteOffchainInventory(
|
|
391
312
|
req: DeleteOffchainInventoryRequest,
|
|
392
313
|
headers?: object,
|
|
393
|
-
signal?: AbortSignal
|
|
314
|
+
signal?: AbortSignal
|
|
394
315
|
): Promise<DeleteOffchainInventoryResponse>
|
|
395
316
|
|
|
396
317
|
requestOffchainPayment(
|
|
397
318
|
req: RequestOffchainPaymentRequest,
|
|
398
319
|
headers?: object,
|
|
399
|
-
signal?: AbortSignal
|
|
320
|
+
signal?: AbortSignal
|
|
400
321
|
): Promise<RequestOffchainPaymentResponse>
|
|
401
322
|
|
|
402
323
|
listOffchainPayments(
|
|
403
324
|
req: ListOffchainPaymentsRequest,
|
|
404
325
|
headers?: object,
|
|
405
|
-
signal?: AbortSignal
|
|
326
|
+
signal?: AbortSignal
|
|
406
327
|
): Promise<ListOffchainPaymentsResponse>
|
|
407
328
|
|
|
408
329
|
/**
|
|
@@ -418,85 +339,39 @@ export interface APIClient {
|
|
|
418
339
|
|
|
419
340
|
deletePack(req: DeletePackRequest, headers?: object, signal?: AbortSignal): Promise<DeletePackResponse>
|
|
420
341
|
|
|
421
|
-
updatePackContent(
|
|
422
|
-
req: UpdatePackContentRequest,
|
|
423
|
-
headers?: object,
|
|
424
|
-
signal?: AbortSignal,
|
|
425
|
-
): Promise<UpdatePackContentResponse>
|
|
342
|
+
updatePackContent(req: UpdatePackContentRequest, headers?: object, signal?: AbortSignal): Promise<UpdatePackContentResponse>
|
|
426
343
|
|
|
427
344
|
getRevealTxData(req: GetRevealTxDataRequest, headers?: object, signal?: AbortSignal): Promise<GetRevealTxDataResponse>
|
|
428
345
|
|
|
429
346
|
checkoutOptionsPrimary(
|
|
430
347
|
req: CheckoutOptionsPrimaryRequest,
|
|
431
348
|
headers?: object,
|
|
432
|
-
signal?: AbortSignal
|
|
349
|
+
signal?: AbortSignal
|
|
433
350
|
): Promise<CheckoutOptionsPrimaryResponse>
|
|
434
351
|
|
|
435
352
|
checkoutOptionsSecondary(
|
|
436
353
|
req: CheckoutOptionsSecondaryRequest,
|
|
437
354
|
headers?: object,
|
|
438
|
-
signal?: AbortSignal
|
|
355
|
+
signal?: AbortSignal
|
|
439
356
|
): Promise<CheckoutOptionsSecondaryResponse>
|
|
440
357
|
|
|
441
358
|
checkoutOptionsGetTransakContractID(
|
|
442
359
|
req: CheckoutOptionsGetTransakContractIDRequest,
|
|
443
360
|
headers?: object,
|
|
444
|
-
signal?: AbortSignal
|
|
361
|
+
signal?: AbortSignal
|
|
445
362
|
): Promise<CheckoutOptionsGetTransakContractIDResponse>
|
|
446
363
|
|
|
447
364
|
fortePayCreateIntent(
|
|
448
365
|
req: FortePayCreateIntentRequest,
|
|
449
366
|
headers?: object,
|
|
450
|
-
signal?: AbortSignal
|
|
367
|
+
signal?: AbortSignal
|
|
451
368
|
): Promise<FortePayCreateIntentResponse>
|
|
452
369
|
|
|
453
370
|
fortePayGetPaymentStatuses(
|
|
454
371
|
req: FortePayGetPaymentStatusesRequest,
|
|
455
372
|
headers?: object,
|
|
456
|
-
signal?: AbortSignal
|
|
373
|
+
signal?: AbortSignal
|
|
457
374
|
): Promise<FortePayGetPaymentStatusesResponse>
|
|
458
|
-
|
|
459
|
-
/**
|
|
460
|
-
*
|
|
461
|
-
* CCTP
|
|
462
|
-
*
|
|
463
|
-
*/
|
|
464
|
-
getCCTPTransfer(req: GetCCTPTransferRequest, headers?: object, signal?: AbortSignal): Promise<GetCCTPTransferResponse>
|
|
465
|
-
|
|
466
|
-
queueCCTPTransfer(
|
|
467
|
-
req: QueueCCTPTransferRequest,
|
|
468
|
-
headers?: object,
|
|
469
|
-
signal?: AbortSignal,
|
|
470
|
-
): Promise<QueueCCTPTransferResponse>
|
|
471
|
-
|
|
472
|
-
/**
|
|
473
|
-
*
|
|
474
|
-
* Intent Machine Worker
|
|
475
|
-
*
|
|
476
|
-
*/
|
|
477
|
-
queueIntentConfigExecution(
|
|
478
|
-
req: QueueIntentConfigExecutionRequest,
|
|
479
|
-
headers?: object,
|
|
480
|
-
signal?: AbortSignal,
|
|
481
|
-
): Promise<QueueIntentConfigExecutionResponse>
|
|
482
|
-
|
|
483
|
-
getIntentConfigExecutionStatus(
|
|
484
|
-
req: GetIntentConfigExecutionStatusRequest,
|
|
485
|
-
headers?: object,
|
|
486
|
-
signal?: AbortSignal,
|
|
487
|
-
): Promise<GetIntentConfigExecutionStatusResponse>
|
|
488
|
-
|
|
489
|
-
listIntentConfigs(
|
|
490
|
-
req: ListIntentConfigsRequest,
|
|
491
|
-
headers?: object,
|
|
492
|
-
signal?: AbortSignal,
|
|
493
|
-
): Promise<ListIntentConfigsResponse>
|
|
494
|
-
|
|
495
|
-
queueMetaTxnReceipt(
|
|
496
|
-
req: QueueMetaTxnReceiptRequest,
|
|
497
|
-
headers?: object,
|
|
498
|
-
signal?: AbortSignal,
|
|
499
|
-
): Promise<QueueMetaTxnReceiptResponse>
|
|
500
375
|
}
|
|
501
376
|
|
|
502
377
|
//
|
|
@@ -505,50 +380,50 @@ export interface APIClient {
|
|
|
505
380
|
|
|
506
381
|
export enum SortOrder {
|
|
507
382
|
DESC = 'DESC',
|
|
508
|
-
ASC = 'ASC'
|
|
383
|
+
ASC = 'ASC'
|
|
509
384
|
}
|
|
510
385
|
|
|
511
386
|
export enum GetLifiSwapRouteDirection {
|
|
512
387
|
to = 'to',
|
|
513
|
-
from = 'from'
|
|
388
|
+
from = 'from'
|
|
514
389
|
}
|
|
515
390
|
|
|
516
391
|
export enum TokenType {
|
|
517
392
|
ERC20 = 'ERC20',
|
|
518
393
|
ERC721 = 'ERC721',
|
|
519
|
-
ERC1155 = 'ERC1155'
|
|
394
|
+
ERC1155 = 'ERC1155'
|
|
520
395
|
}
|
|
521
396
|
|
|
522
397
|
export enum TransakBuySell {
|
|
523
398
|
UNKNOWN = 'UNKNOWN',
|
|
524
399
|
BUY = 'BUY',
|
|
525
|
-
SELL = 'SELL'
|
|
400
|
+
SELL = 'SELL'
|
|
526
401
|
}
|
|
527
402
|
|
|
528
403
|
export enum TradeType {
|
|
529
404
|
EXACT_INPUT = 'EXACT_INPUT',
|
|
530
|
-
EXACT_OUTPUT = 'EXACT_OUTPUT'
|
|
405
|
+
EXACT_OUTPUT = 'EXACT_OUTPUT'
|
|
531
406
|
}
|
|
532
407
|
|
|
533
408
|
export enum CheckoutOptionCrypto {
|
|
534
409
|
none = 'none',
|
|
535
410
|
partially = 'partially',
|
|
536
|
-
all = 'all'
|
|
411
|
+
all = 'all'
|
|
537
412
|
}
|
|
538
413
|
|
|
539
414
|
export enum CheckoutOptionNFTCheckoutProvider {
|
|
540
415
|
unknown = 'unknown',
|
|
541
|
-
transak = 'transak'
|
|
416
|
+
transak = 'transak'
|
|
542
417
|
}
|
|
543
418
|
|
|
544
419
|
export enum CheckoutOptionOnRampProvider {
|
|
545
420
|
unknown = 'unknown',
|
|
546
|
-
transak = 'transak'
|
|
421
|
+
transak = 'transak'
|
|
547
422
|
}
|
|
548
423
|
|
|
549
424
|
export enum CheckoutOptionSwapProvider {
|
|
550
425
|
unknown = 'unknown',
|
|
551
|
-
lifi = 'lifi'
|
|
426
|
+
lifi = 'lifi'
|
|
552
427
|
}
|
|
553
428
|
|
|
554
429
|
export interface Version {
|
|
@@ -632,38 +507,6 @@ export interface MetaTxn {
|
|
|
632
507
|
input: string
|
|
633
508
|
}
|
|
634
509
|
|
|
635
|
-
export interface Call {
|
|
636
|
-
to: string
|
|
637
|
-
value?: string
|
|
638
|
-
data?: string
|
|
639
|
-
gasLimit?: string
|
|
640
|
-
delegateCall?: boolean
|
|
641
|
-
onlyFallback?: boolean
|
|
642
|
-
behaviorOnError?: number
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
export interface IntentCallsPayload {
|
|
646
|
-
chainId: string
|
|
647
|
-
space?: string
|
|
648
|
-
nonce?: string
|
|
649
|
-
calls: Array<Call>
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
export interface IntentConfig {
|
|
653
|
-
id: number
|
|
654
|
-
configHash: string
|
|
655
|
-
originIntentAddress: string
|
|
656
|
-
destinationIntentAddress: string
|
|
657
|
-
mainSigner: string
|
|
658
|
-
calls: Array<IntentCallsPayload>
|
|
659
|
-
preconditions: Array<IntentPrecondition>
|
|
660
|
-
executionStatus?: string
|
|
661
|
-
metaTxnId?: string
|
|
662
|
-
txnHash?: string
|
|
663
|
-
updatedAt?: string
|
|
664
|
-
createdAt?: string
|
|
665
|
-
}
|
|
666
|
-
|
|
667
510
|
export interface MetaTxnReceipt {
|
|
668
511
|
metaTxID: string
|
|
669
512
|
status: string
|
|
@@ -703,30 +546,6 @@ export interface TupleComponent {
|
|
|
703
546
|
value: any
|
|
704
547
|
}
|
|
705
548
|
|
|
706
|
-
export interface AddressOverrides {
|
|
707
|
-
trailsLiFiSapientSignerAddress?: string
|
|
708
|
-
trailsRelaySapientSignerAddress?: string
|
|
709
|
-
trailsCCTPV2SapientSignerAddress?: string
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
export interface TakerFee {
|
|
713
|
-
address: string
|
|
714
|
-
bps: number
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
export interface OriginCall {
|
|
718
|
-
chainId: number
|
|
719
|
-
to: string
|
|
720
|
-
transactionData: string
|
|
721
|
-
transactionValue: string
|
|
722
|
-
}
|
|
723
|
-
|
|
724
|
-
export interface IntentPrecondition {
|
|
725
|
-
type: string
|
|
726
|
-
chainId: string
|
|
727
|
-
data: any
|
|
728
|
-
}
|
|
729
|
-
|
|
730
549
|
export interface UserStorage {
|
|
731
550
|
userAddress: string
|
|
732
551
|
key: string
|
|
@@ -866,18 +685,6 @@ export interface OffchainInventory {
|
|
|
866
685
|
deletedAt?: string
|
|
867
686
|
}
|
|
868
687
|
|
|
869
|
-
export interface CCTPTransfer {
|
|
870
|
-
id: string
|
|
871
|
-
sourceTxHash: string
|
|
872
|
-
sourceChainId: number
|
|
873
|
-
destinationChainId: number
|
|
874
|
-
message: string
|
|
875
|
-
attestation: string
|
|
876
|
-
status: string
|
|
877
|
-
createdAt: string
|
|
878
|
-
updatedAt: string
|
|
879
|
-
}
|
|
880
|
-
|
|
881
688
|
export interface OffchainPayment {
|
|
882
689
|
id: number
|
|
883
690
|
offchainInventoryId: number
|
|
@@ -1228,33 +1035,6 @@ export interface ExecuteQuote {
|
|
|
1228
1035
|
chainQuotes: Array<ChainExecuteQuote>
|
|
1229
1036
|
}
|
|
1230
1037
|
|
|
1231
|
-
export interface TrailsFee {
|
|
1232
|
-
executeQuote: ExecuteQuote
|
|
1233
|
-
crossChainFee?: CrossChainFee
|
|
1234
|
-
takerFeeAmount?: string
|
|
1235
|
-
takerFeeUSD?: number
|
|
1236
|
-
trailsFixedFeeUSD: number
|
|
1237
|
-
feeToken?: string
|
|
1238
|
-
originTokenTotalAmount?: string
|
|
1239
|
-
totalFeeAmount?: string
|
|
1240
|
-
totalFeeUSD?: string
|
|
1241
|
-
quoteProvider?: string
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
|
-
export interface IntentQuote {
|
|
1245
|
-
fromAmount: string
|
|
1246
|
-
fromAmountMin: string
|
|
1247
|
-
toAmount: string
|
|
1248
|
-
toAmountMin: string
|
|
1249
|
-
priceImpact: number
|
|
1250
|
-
priceImpactUsd: string
|
|
1251
|
-
maxSlippage: number
|
|
1252
|
-
quoteProvider: string
|
|
1253
|
-
quoteProviderRequestId: string
|
|
1254
|
-
quoteProviderFeeUsd: string
|
|
1255
|
-
feeQuotes: { [key: string]: string }
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
1038
|
export interface PingRequest {}
|
|
1259
1039
|
|
|
1260
1040
|
export interface PingResponse {
|
|
@@ -1738,10 +1518,6 @@ export interface GetLifiTokensResponse {
|
|
|
1738
1518
|
|
|
1739
1519
|
export interface GetLifiSwapRoutesRequest {
|
|
1740
1520
|
params: GetLifiSwapRouteParams
|
|
1741
|
-
chainId: number
|
|
1742
|
-
toTokenAddress: string
|
|
1743
|
-
toTokenAmount: string
|
|
1744
|
-
walletAddress: string
|
|
1745
1521
|
}
|
|
1746
1522
|
|
|
1747
1523
|
export interface GetLifiSwapRoutesResponse {
|
|
@@ -1756,57 +1532,6 @@ export interface GetLifiSwapQuoteResponse {
|
|
|
1756
1532
|
quote: LifiSwapQuote
|
|
1757
1533
|
}
|
|
1758
1534
|
|
|
1759
|
-
export interface GetIntentCallsPayloadsRequest {
|
|
1760
|
-
userAddress: string
|
|
1761
|
-
destinationChainId: number
|
|
1762
|
-
destinationTokenAddress: string
|
|
1763
|
-
destinationTokenAmount: string
|
|
1764
|
-
destinationToAddress: string
|
|
1765
|
-
originChainId: number
|
|
1766
|
-
originTokenAddress: string
|
|
1767
|
-
originTokenAmount: string
|
|
1768
|
-
destinationCallData?: string
|
|
1769
|
-
destinationCallValue?: string
|
|
1770
|
-
provider?: string
|
|
1771
|
-
addressOverrides?: AddressOverrides
|
|
1772
|
-
destinationSalt?: string
|
|
1773
|
-
takerFee?: TakerFee
|
|
1774
|
-
slippageTolerance?: number
|
|
1775
|
-
tradeType?: TradeType
|
|
1776
|
-
}
|
|
1777
|
-
|
|
1778
|
-
export interface GetIntentCallsPayloadsResponse {
|
|
1779
|
-
calls: Array<IntentCallsPayload>
|
|
1780
|
-
preconditions: Array<IntentPrecondition>
|
|
1781
|
-
metaTxns: Array<MetaTxn>
|
|
1782
|
-
trailsFee: TrailsFee
|
|
1783
|
-
quote: IntentQuote
|
|
1784
|
-
feeQuotes: { [key: string]: string }
|
|
1785
|
-
originIntentAddress: string
|
|
1786
|
-
destinationIntentAddress: string
|
|
1787
|
-
}
|
|
1788
|
-
|
|
1789
|
-
export interface CommitIntentConfigRequest {
|
|
1790
|
-
originIntentAddress: string
|
|
1791
|
-
destinationIntentAddress: string
|
|
1792
|
-
mainSigner: string
|
|
1793
|
-
calls: Array<IntentCallsPayload>
|
|
1794
|
-
preconditions: Array<IntentPrecondition>
|
|
1795
|
-
addressOverrides?: AddressOverrides
|
|
1796
|
-
}
|
|
1797
|
-
|
|
1798
|
-
export interface CommitIntentConfigResponse {
|
|
1799
|
-
config: IntentConfig
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
export interface GetIntentConfigRequest {
|
|
1803
|
-
intentAddress: string
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
export interface GetIntentConfigResponse {
|
|
1807
|
-
config: IntentConfig
|
|
1808
|
-
}
|
|
1809
|
-
|
|
1810
1535
|
export interface ListCurrencyGroupsRequest {}
|
|
1811
1536
|
|
|
1812
1537
|
export interface ListCurrencyGroupsResponse {
|
|
@@ -1975,59 +1700,6 @@ export interface FortePayGetPaymentStatusesResponse {
|
|
|
1975
1700
|
statuses: Array<FortePaymentStatus>
|
|
1976
1701
|
}
|
|
1977
1702
|
|
|
1978
|
-
export interface GetCCTPTransferRequest {
|
|
1979
|
-
id: string
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
export interface GetCCTPTransferResponse {
|
|
1983
|
-
transfer: CCTPTransfer
|
|
1984
|
-
}
|
|
1985
|
-
|
|
1986
|
-
export interface QueueCCTPTransferRequest {
|
|
1987
|
-
sourceTxHash?: string
|
|
1988
|
-
metaTxHash?: string
|
|
1989
|
-
sourceChainId: number
|
|
1990
|
-
destinationChainId: number
|
|
1991
|
-
}
|
|
1992
|
-
|
|
1993
|
-
export interface QueueCCTPTransferResponse {
|
|
1994
|
-
transfer: CCTPTransfer
|
|
1995
|
-
}
|
|
1996
|
-
|
|
1997
|
-
export interface QueueIntentConfigExecutionRequest {
|
|
1998
|
-
intentConfigId: number
|
|
1999
|
-
}
|
|
2000
|
-
|
|
2001
|
-
export interface QueueIntentConfigExecutionResponse {
|
|
2002
|
-
status: boolean
|
|
2003
|
-
}
|
|
2004
|
-
|
|
2005
|
-
export interface GetIntentConfigExecutionStatusRequest {
|
|
2006
|
-
intentConfigId: number
|
|
2007
|
-
}
|
|
2008
|
-
|
|
2009
|
-
export interface GetIntentConfigExecutionStatusResponse {
|
|
2010
|
-
executionStatus: string
|
|
2011
|
-
}
|
|
2012
|
-
|
|
2013
|
-
export interface ListIntentConfigsRequest {
|
|
2014
|
-
page?: Page
|
|
2015
|
-
executionStatus?: string
|
|
2016
|
-
}
|
|
2017
|
-
|
|
2018
|
-
export interface ListIntentConfigsResponse {
|
|
2019
|
-
page: Page
|
|
2020
|
-
intentConfigs: Array<IntentConfig>
|
|
2021
|
-
}
|
|
2022
|
-
|
|
2023
|
-
export interface QueueMetaTxnReceiptRequest {
|
|
2024
|
-
metaTxID: string
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
|
-
export interface QueueMetaTxnReceiptResponse {
|
|
2028
|
-
status: boolean
|
|
2029
|
-
}
|
|
2030
|
-
|
|
2031
1703
|
//
|
|
2032
1704
|
// Client
|
|
2033
1705
|
//
|
|
@@ -2075,8 +1747,7 @@ export class API implements APIClient {
|
|
|
2075
1747
|
resolveENSAddress: (req: ResolveENSAddressRequest) => ['API', 'resolveENSAddress', req] as const,
|
|
2076
1748
|
isValidSignature: (req: IsValidSignatureRequest) => ['API', 'isValidSignature', req] as const,
|
|
2077
1749
|
isValidMessageSignature: (req: IsValidMessageSignatureRequest) => ['API', 'isValidMessageSignature', req] as const,
|
|
2078
|
-
isValidTypedDataSignature: (req: IsValidTypedDataSignatureRequest) =>
|
|
2079
|
-
['API', 'isValidTypedDataSignature', req] as const,
|
|
1750
|
+
isValidTypedDataSignature: (req: IsValidTypedDataSignatureRequest) => ['API', 'isValidTypedDataSignature', req] as const,
|
|
2080
1751
|
isValidETHAuthProof: (req: IsValidETHAuthProofRequest) => ['API', 'isValidETHAuthProof', req] as const,
|
|
2081
1752
|
getOnRampURL: (req: GetOnRampURLRequest) => ['API', 'getOnRampURL', req] as const,
|
|
2082
1753
|
transakGetCountries: () => ['API', 'transakGetCountries'] as const,
|
|
@@ -2108,9 +1779,6 @@ export class API implements APIClient {
|
|
|
2108
1779
|
getLifiTokens: (req: GetLifiTokensRequest) => ['API', 'getLifiTokens', req] as const,
|
|
2109
1780
|
getLifiSwapRoutes: (req: GetLifiSwapRoutesRequest) => ['API', 'getLifiSwapRoutes', req] as const,
|
|
2110
1781
|
getLifiSwapQuote: (req: GetLifiSwapQuoteRequest) => ['API', 'getLifiSwapQuote', req] as const,
|
|
2111
|
-
getIntentCallsPayloads: (req: GetIntentCallsPayloadsRequest) => ['API', 'getIntentCallsPayloads', req] as const,
|
|
2112
|
-
commitIntentConfig: (req: CommitIntentConfigRequest) => ['API', 'commitIntentConfig', req] as const,
|
|
2113
|
-
getIntentConfig: (req: GetIntentConfigRequest) => ['API', 'getIntentConfig', req] as const,
|
|
2114
1782
|
listCurrencyGroups: () => ['API', 'listCurrencyGroups'] as const,
|
|
2115
1783
|
addOffchainInventory: (req: AddOffchainInventoryRequest) => ['API', 'addOffchainInventory', req] as const,
|
|
2116
1784
|
getOffchainInventory: (req: GetOffchainInventoryRequest) => ['API', 'getOffchainInventory', req] as const,
|
|
@@ -2126,1759 +1794,1315 @@ export class API implements APIClient {
|
|
|
2126
1794
|
updatePackContent: (req: UpdatePackContentRequest) => ['API', 'updatePackContent', req] as const,
|
|
2127
1795
|
getRevealTxData: (req: GetRevealTxDataRequest) => ['API', 'getRevealTxData', req] as const,
|
|
2128
1796
|
checkoutOptionsPrimary: (req: CheckoutOptionsPrimaryRequest) => ['API', 'checkoutOptionsPrimary', req] as const,
|
|
2129
|
-
checkoutOptionsSecondary: (req: CheckoutOptionsSecondaryRequest) =>
|
|
2130
|
-
['API', 'checkoutOptionsSecondary', req] as const,
|
|
1797
|
+
checkoutOptionsSecondary: (req: CheckoutOptionsSecondaryRequest) => ['API', 'checkoutOptionsSecondary', req] as const,
|
|
2131
1798
|
checkoutOptionsGetTransakContractID: (req: CheckoutOptionsGetTransakContractIDRequest) =>
|
|
2132
1799
|
['API', 'checkoutOptionsGetTransakContractID', req] as const,
|
|
2133
1800
|
fortePayCreateIntent: (req: FortePayCreateIntentRequest) => ['API', 'fortePayCreateIntent', req] as const,
|
|
2134
|
-
fortePayGetPaymentStatuses: (req: FortePayGetPaymentStatusesRequest) =>
|
|
2135
|
-
['API', 'fortePayGetPaymentStatuses', req] as const,
|
|
2136
|
-
getCCTPTransfer: (req: GetCCTPTransferRequest) => ['API', 'getCCTPTransfer', req] as const,
|
|
2137
|
-
queueCCTPTransfer: (req: QueueCCTPTransferRequest) => ['API', 'queueCCTPTransfer', req] as const,
|
|
2138
|
-
queueIntentConfigExecution: (req: QueueIntentConfigExecutionRequest) =>
|
|
2139
|
-
['API', 'queueIntentConfigExecution', req] as const,
|
|
2140
|
-
getIntentConfigExecutionStatus: (req: GetIntentConfigExecutionStatusRequest) =>
|
|
2141
|
-
['API', 'getIntentConfigExecutionStatus', req] as const,
|
|
2142
|
-
listIntentConfigs: (req: ListIntentConfigsRequest) => ['API', 'listIntentConfigs', req] as const,
|
|
2143
|
-
queueMetaTxnReceipt: (req: QueueMetaTxnReceiptRequest) => ['API', 'queueMetaTxnReceipt', req] as const,
|
|
1801
|
+
fortePayGetPaymentStatuses: (req: FortePayGetPaymentStatusesRequest) => ['API', 'fortePayGetPaymentStatuses', req] as const
|
|
2144
1802
|
}
|
|
2145
1803
|
|
|
2146
1804
|
ping = (headers?: object, signal?: AbortSignal): Promise<PingResponse> => {
|
|
2147
1805
|
return this.fetch(this.url('Ping'), createHttpRequest('{}', headers, signal)).then(
|
|
2148
|
-
|
|
2149
|
-
return buildResponse(res).then(
|
|
1806
|
+
res => {
|
|
1807
|
+
return buildResponse(res).then(_data => {
|
|
2150
1808
|
return JsonDecode<PingResponse>(_data, 'PingResponse')
|
|
2151
1809
|
})
|
|
2152
1810
|
},
|
|
2153
|
-
|
|
2154
|
-
throw WebrpcRequestFailedError.new({
|
|
2155
|
-
|
|
2156
|
-
})
|
|
2157
|
-
},
|
|
1811
|
+
error => {
|
|
1812
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1813
|
+
}
|
|
2158
1814
|
)
|
|
2159
1815
|
}
|
|
2160
1816
|
|
|
2161
1817
|
version = (headers?: object, signal?: AbortSignal): Promise<VersionResponse> => {
|
|
2162
1818
|
return this.fetch(this.url('Version'), createHttpRequest('{}', headers, signal)).then(
|
|
2163
|
-
|
|
2164
|
-
return buildResponse(res).then(
|
|
1819
|
+
res => {
|
|
1820
|
+
return buildResponse(res).then(_data => {
|
|
2165
1821
|
return JsonDecode<VersionResponse>(_data, 'VersionResponse')
|
|
2166
1822
|
})
|
|
2167
1823
|
},
|
|
2168
|
-
|
|
2169
|
-
throw WebrpcRequestFailedError.new({
|
|
2170
|
-
|
|
2171
|
-
})
|
|
2172
|
-
},
|
|
1824
|
+
error => {
|
|
1825
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1826
|
+
}
|
|
2173
1827
|
)
|
|
2174
1828
|
}
|
|
2175
1829
|
|
|
2176
1830
|
runtimeStatus = (headers?: object, signal?: AbortSignal): Promise<RuntimeStatusResponse> => {
|
|
2177
1831
|
return this.fetch(this.url('RuntimeStatus'), createHttpRequest('{}', headers, signal)).then(
|
|
2178
|
-
|
|
2179
|
-
return buildResponse(res).then(
|
|
1832
|
+
res => {
|
|
1833
|
+
return buildResponse(res).then(_data => {
|
|
2180
1834
|
return JsonDecode<RuntimeStatusResponse>(_data, 'RuntimeStatusResponse')
|
|
2181
1835
|
})
|
|
2182
1836
|
},
|
|
2183
|
-
|
|
2184
|
-
throw WebrpcRequestFailedError.new({
|
|
2185
|
-
|
|
2186
|
-
})
|
|
2187
|
-
},
|
|
1837
|
+
error => {
|
|
1838
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1839
|
+
}
|
|
2188
1840
|
)
|
|
2189
1841
|
}
|
|
2190
1842
|
|
|
2191
1843
|
clock = (headers?: object, signal?: AbortSignal): Promise<ClockResponse> => {
|
|
2192
1844
|
return this.fetch(this.url('Clock'), createHttpRequest('{}', headers, signal)).then(
|
|
2193
|
-
|
|
2194
|
-
return buildResponse(res).then(
|
|
1845
|
+
res => {
|
|
1846
|
+
return buildResponse(res).then(_data => {
|
|
2195
1847
|
return JsonDecode<ClockResponse>(_data, 'ClockResponse')
|
|
2196
1848
|
})
|
|
2197
1849
|
},
|
|
2198
|
-
|
|
2199
|
-
throw WebrpcRequestFailedError.new({
|
|
2200
|
-
|
|
2201
|
-
})
|
|
2202
|
-
},
|
|
1850
|
+
error => {
|
|
1851
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1852
|
+
}
|
|
2203
1853
|
)
|
|
2204
1854
|
}
|
|
2205
1855
|
|
|
2206
1856
|
getSequenceContext = (headers?: object, signal?: AbortSignal): Promise<GetSequenceContextResponse> => {
|
|
2207
1857
|
return this.fetch(this.url('GetSequenceContext'), createHttpRequest('{}', headers, signal)).then(
|
|
2208
|
-
|
|
2209
|
-
return buildResponse(res).then(
|
|
1858
|
+
res => {
|
|
1859
|
+
return buildResponse(res).then(_data => {
|
|
2210
1860
|
return JsonDecode<GetSequenceContextResponse>(_data, 'GetSequenceContextResponse')
|
|
2211
1861
|
})
|
|
2212
1862
|
},
|
|
2213
|
-
|
|
2214
|
-
throw WebrpcRequestFailedError.new({
|
|
2215
|
-
|
|
2216
|
-
})
|
|
2217
|
-
},
|
|
1863
|
+
error => {
|
|
1864
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1865
|
+
}
|
|
2218
1866
|
)
|
|
2219
1867
|
}
|
|
2220
1868
|
|
|
2221
1869
|
getAuthToken = (req: GetAuthTokenRequest, headers?: object, signal?: AbortSignal): Promise<GetAuthTokenResponse> => {
|
|
2222
|
-
return this.fetch(
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
).then(
|
|
2226
|
-
(res) => {
|
|
2227
|
-
return buildResponse(res).then((_data) => {
|
|
1870
|
+
return this.fetch(this.url('GetAuthToken'), createHttpRequest(JsonEncode(req, 'GetAuthTokenRequest'), headers, signal)).then(
|
|
1871
|
+
res => {
|
|
1872
|
+
return buildResponse(res).then(_data => {
|
|
2228
1873
|
return JsonDecode<GetAuthTokenResponse>(_data, 'GetAuthTokenResponse')
|
|
2229
1874
|
})
|
|
2230
1875
|
},
|
|
2231
|
-
|
|
2232
|
-
throw WebrpcRequestFailedError.new({
|
|
2233
|
-
|
|
2234
|
-
})
|
|
2235
|
-
},
|
|
1876
|
+
error => {
|
|
1877
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1878
|
+
}
|
|
2236
1879
|
)
|
|
2237
1880
|
}
|
|
2238
1881
|
|
|
2239
|
-
getAuthToken2 = (
|
|
2240
|
-
req: GetAuthToken2Request,
|
|
2241
|
-
headers?: object,
|
|
2242
|
-
signal?: AbortSignal,
|
|
2243
|
-
): Promise<GetAuthToken2Response> => {
|
|
1882
|
+
getAuthToken2 = (req: GetAuthToken2Request, headers?: object, signal?: AbortSignal): Promise<GetAuthToken2Response> => {
|
|
2244
1883
|
return this.fetch(
|
|
2245
1884
|
this.url('GetAuthToken2'),
|
|
2246
|
-
createHttpRequest(JsonEncode(req, 'GetAuthToken2Request'), headers, signal)
|
|
1885
|
+
createHttpRequest(JsonEncode(req, 'GetAuthToken2Request'), headers, signal)
|
|
2247
1886
|
).then(
|
|
2248
|
-
|
|
2249
|
-
return buildResponse(res).then(
|
|
1887
|
+
res => {
|
|
1888
|
+
return buildResponse(res).then(_data => {
|
|
2250
1889
|
return JsonDecode<GetAuthToken2Response>(_data, 'GetAuthToken2Response')
|
|
2251
1890
|
})
|
|
2252
1891
|
},
|
|
2253
|
-
|
|
2254
|
-
throw WebrpcRequestFailedError.new({
|
|
2255
|
-
|
|
2256
|
-
})
|
|
2257
|
-
},
|
|
1892
|
+
error => {
|
|
1893
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1894
|
+
}
|
|
2258
1895
|
)
|
|
2259
1896
|
}
|
|
2260
1897
|
|
|
2261
1898
|
sendPasswordlessLink = (
|
|
2262
1899
|
req: SendPasswordlessLinkRequest,
|
|
2263
1900
|
headers?: object,
|
|
2264
|
-
signal?: AbortSignal
|
|
1901
|
+
signal?: AbortSignal
|
|
2265
1902
|
): Promise<SendPasswordlessLinkResponse> => {
|
|
2266
1903
|
return this.fetch(
|
|
2267
1904
|
this.url('SendPasswordlessLink'),
|
|
2268
|
-
createHttpRequest(JsonEncode(req, 'SendPasswordlessLinkRequest'), headers, signal)
|
|
1905
|
+
createHttpRequest(JsonEncode(req, 'SendPasswordlessLinkRequest'), headers, signal)
|
|
2269
1906
|
).then(
|
|
2270
|
-
|
|
2271
|
-
return buildResponse(res).then(
|
|
1907
|
+
res => {
|
|
1908
|
+
return buildResponse(res).then(_data => {
|
|
2272
1909
|
return JsonDecode<SendPasswordlessLinkResponse>(_data, 'SendPasswordlessLinkResponse')
|
|
2273
1910
|
})
|
|
2274
1911
|
},
|
|
2275
|
-
|
|
2276
|
-
throw WebrpcRequestFailedError.new({
|
|
2277
|
-
|
|
2278
|
-
})
|
|
2279
|
-
},
|
|
1912
|
+
error => {
|
|
1913
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1914
|
+
}
|
|
2280
1915
|
)
|
|
2281
1916
|
}
|
|
2282
1917
|
|
|
2283
1918
|
registerPublicKey = (
|
|
2284
1919
|
req: RegisterPublicKeyRequest,
|
|
2285
1920
|
headers?: object,
|
|
2286
|
-
signal?: AbortSignal
|
|
1921
|
+
signal?: AbortSignal
|
|
2287
1922
|
): Promise<RegisterPublicKeyResponse> => {
|
|
2288
1923
|
return this.fetch(
|
|
2289
1924
|
this.url('RegisterPublicKey'),
|
|
2290
|
-
createHttpRequest(JsonEncode(req, 'RegisterPublicKeyRequest'), headers, signal)
|
|
1925
|
+
createHttpRequest(JsonEncode(req, 'RegisterPublicKeyRequest'), headers, signal)
|
|
2291
1926
|
).then(
|
|
2292
|
-
|
|
2293
|
-
return buildResponse(res).then(
|
|
1927
|
+
res => {
|
|
1928
|
+
return buildResponse(res).then(_data => {
|
|
2294
1929
|
return JsonDecode<RegisterPublicKeyResponse>(_data, 'RegisterPublicKeyResponse')
|
|
2295
1930
|
})
|
|
2296
1931
|
},
|
|
2297
|
-
|
|
2298
|
-
throw WebrpcRequestFailedError.new({
|
|
2299
|
-
|
|
2300
|
-
})
|
|
2301
|
-
},
|
|
1932
|
+
error => {
|
|
1933
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1934
|
+
}
|
|
2302
1935
|
)
|
|
2303
1936
|
}
|
|
2304
1937
|
|
|
2305
1938
|
getPublicKey = (req: GetPublicKeyRequest, headers?: object, signal?: AbortSignal): Promise<GetPublicKeyResponse> => {
|
|
2306
|
-
return this.fetch(
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
).then(
|
|
2310
|
-
(res) => {
|
|
2311
|
-
return buildResponse(res).then((_data) => {
|
|
1939
|
+
return this.fetch(this.url('GetPublicKey'), createHttpRequest(JsonEncode(req, 'GetPublicKeyRequest'), headers, signal)).then(
|
|
1940
|
+
res => {
|
|
1941
|
+
return buildResponse(res).then(_data => {
|
|
2312
1942
|
return JsonDecode<GetPublicKeyResponse>(_data, 'GetPublicKeyResponse')
|
|
2313
1943
|
})
|
|
2314
1944
|
},
|
|
2315
|
-
|
|
2316
|
-
throw WebrpcRequestFailedError.new({
|
|
2317
|
-
|
|
2318
|
-
})
|
|
2319
|
-
},
|
|
1945
|
+
error => {
|
|
1946
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1947
|
+
}
|
|
2320
1948
|
)
|
|
2321
1949
|
}
|
|
2322
1950
|
|
|
2323
1951
|
friendList = (req: FriendListRequest, headers?: object, signal?: AbortSignal): Promise<FriendListResponse> => {
|
|
2324
|
-
return this.fetch(
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
).then(
|
|
2328
|
-
(res) => {
|
|
2329
|
-
return buildResponse(res).then((_data) => {
|
|
1952
|
+
return this.fetch(this.url('FriendList'), createHttpRequest(JsonEncode(req, 'FriendListRequest'), headers, signal)).then(
|
|
1953
|
+
res => {
|
|
1954
|
+
return buildResponse(res).then(_data => {
|
|
2330
1955
|
return JsonDecode<FriendListResponse>(_data, 'FriendListResponse')
|
|
2331
1956
|
})
|
|
2332
1957
|
},
|
|
2333
|
-
|
|
2334
|
-
throw WebrpcRequestFailedError.new({
|
|
2335
|
-
|
|
2336
|
-
})
|
|
2337
|
-
},
|
|
1958
|
+
error => {
|
|
1959
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1960
|
+
}
|
|
2338
1961
|
)
|
|
2339
1962
|
}
|
|
2340
1963
|
|
|
2341
1964
|
getFriendByAddress = (
|
|
2342
1965
|
req: GetFriendByAddressRequest,
|
|
2343
1966
|
headers?: object,
|
|
2344
|
-
signal?: AbortSignal
|
|
1967
|
+
signal?: AbortSignal
|
|
2345
1968
|
): Promise<GetFriendByAddressResponse> => {
|
|
2346
1969
|
return this.fetch(
|
|
2347
1970
|
this.url('GetFriendByAddress'),
|
|
2348
|
-
createHttpRequest(JsonEncode(req, 'GetFriendByAddressRequest'), headers, signal)
|
|
1971
|
+
createHttpRequest(JsonEncode(req, 'GetFriendByAddressRequest'), headers, signal)
|
|
2349
1972
|
).then(
|
|
2350
|
-
|
|
2351
|
-
return buildResponse(res).then(
|
|
1973
|
+
res => {
|
|
1974
|
+
return buildResponse(res).then(_data => {
|
|
2352
1975
|
return JsonDecode<GetFriendByAddressResponse>(_data, 'GetFriendByAddressResponse')
|
|
2353
1976
|
})
|
|
2354
1977
|
},
|
|
2355
|
-
|
|
2356
|
-
throw WebrpcRequestFailedError.new({
|
|
2357
|
-
|
|
2358
|
-
})
|
|
2359
|
-
},
|
|
1978
|
+
error => {
|
|
1979
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1980
|
+
}
|
|
2360
1981
|
)
|
|
2361
1982
|
}
|
|
2362
1983
|
|
|
2363
|
-
searchFriends = (
|
|
2364
|
-
req: SearchFriendsRequest,
|
|
2365
|
-
headers?: object,
|
|
2366
|
-
signal?: AbortSignal,
|
|
2367
|
-
): Promise<SearchFriendsResponse> => {
|
|
1984
|
+
searchFriends = (req: SearchFriendsRequest, headers?: object, signal?: AbortSignal): Promise<SearchFriendsResponse> => {
|
|
2368
1985
|
return this.fetch(
|
|
2369
1986
|
this.url('SearchFriends'),
|
|
2370
|
-
createHttpRequest(JsonEncode(req, 'SearchFriendsRequest'), headers, signal)
|
|
1987
|
+
createHttpRequest(JsonEncode(req, 'SearchFriendsRequest'), headers, signal)
|
|
2371
1988
|
).then(
|
|
2372
|
-
|
|
2373
|
-
return buildResponse(res).then(
|
|
1989
|
+
res => {
|
|
1990
|
+
return buildResponse(res).then(_data => {
|
|
2374
1991
|
return JsonDecode<SearchFriendsResponse>(_data, 'SearchFriendsResponse')
|
|
2375
1992
|
})
|
|
2376
1993
|
},
|
|
2377
|
-
|
|
2378
|
-
throw WebrpcRequestFailedError.new({
|
|
2379
|
-
|
|
2380
|
-
})
|
|
2381
|
-
},
|
|
1994
|
+
error => {
|
|
1995
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
1996
|
+
}
|
|
2382
1997
|
)
|
|
2383
1998
|
}
|
|
2384
1999
|
|
|
2385
2000
|
addFriend = (req: AddFriendRequest, headers?: object, signal?: AbortSignal): Promise<AddFriendResponse> => {
|
|
2386
|
-
return this.fetch(
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
).then(
|
|
2390
|
-
(res) => {
|
|
2391
|
-
return buildResponse(res).then((_data) => {
|
|
2001
|
+
return this.fetch(this.url('AddFriend'), createHttpRequest(JsonEncode(req, 'AddFriendRequest'), headers, signal)).then(
|
|
2002
|
+
res => {
|
|
2003
|
+
return buildResponse(res).then(_data => {
|
|
2392
2004
|
return JsonDecode<AddFriendResponse>(_data, 'AddFriendResponse')
|
|
2393
2005
|
})
|
|
2394
2006
|
},
|
|
2395
|
-
|
|
2396
|
-
throw WebrpcRequestFailedError.new({
|
|
2397
|
-
|
|
2398
|
-
})
|
|
2399
|
-
},
|
|
2007
|
+
error => {
|
|
2008
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2009
|
+
}
|
|
2400
2010
|
)
|
|
2401
2011
|
}
|
|
2402
2012
|
|
|
2403
2013
|
updateFriendNickname = (
|
|
2404
2014
|
req: UpdateFriendNicknameRequest,
|
|
2405
2015
|
headers?: object,
|
|
2406
|
-
signal?: AbortSignal
|
|
2016
|
+
signal?: AbortSignal
|
|
2407
2017
|
): Promise<UpdateFriendNicknameResponse> => {
|
|
2408
2018
|
return this.fetch(
|
|
2409
2019
|
this.url('UpdateFriendNickname'),
|
|
2410
|
-
createHttpRequest(JsonEncode(req, 'UpdateFriendNicknameRequest'), headers, signal)
|
|
2020
|
+
createHttpRequest(JsonEncode(req, 'UpdateFriendNicknameRequest'), headers, signal)
|
|
2411
2021
|
).then(
|
|
2412
|
-
|
|
2413
|
-
return buildResponse(res).then(
|
|
2022
|
+
res => {
|
|
2023
|
+
return buildResponse(res).then(_data => {
|
|
2414
2024
|
return JsonDecode<UpdateFriendNicknameResponse>(_data, 'UpdateFriendNicknameResponse')
|
|
2415
2025
|
})
|
|
2416
2026
|
},
|
|
2417
|
-
|
|
2418
|
-
throw WebrpcRequestFailedError.new({
|
|
2419
|
-
|
|
2420
|
-
})
|
|
2421
|
-
},
|
|
2027
|
+
error => {
|
|
2028
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2029
|
+
}
|
|
2422
2030
|
)
|
|
2423
2031
|
}
|
|
2424
2032
|
|
|
2425
2033
|
removeFriend = (req: RemoveFriendRequest, headers?: object, signal?: AbortSignal): Promise<RemoveFriendResponse> => {
|
|
2426
|
-
return this.fetch(
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
).then(
|
|
2430
|
-
(res) => {
|
|
2431
|
-
return buildResponse(res).then((_data) => {
|
|
2034
|
+
return this.fetch(this.url('RemoveFriend'), createHttpRequest(JsonEncode(req, 'RemoveFriendRequest'), headers, signal)).then(
|
|
2035
|
+
res => {
|
|
2036
|
+
return buildResponse(res).then(_data => {
|
|
2432
2037
|
return JsonDecode<RemoveFriendResponse>(_data, 'RemoveFriendResponse')
|
|
2433
2038
|
})
|
|
2434
2039
|
},
|
|
2435
|
-
|
|
2436
|
-
throw WebrpcRequestFailedError.new({
|
|
2437
|
-
|
|
2438
|
-
})
|
|
2439
|
-
},
|
|
2040
|
+
error => {
|
|
2041
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2042
|
+
}
|
|
2440
2043
|
)
|
|
2441
2044
|
}
|
|
2442
2045
|
|
|
2443
2046
|
contractCall = (req: ContractCallRequest, headers?: object, signal?: AbortSignal): Promise<ContractCallResponse> => {
|
|
2444
|
-
return this.fetch(
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
).then(
|
|
2448
|
-
(res) => {
|
|
2449
|
-
return buildResponse(res).then((_data) => {
|
|
2047
|
+
return this.fetch(this.url('ContractCall'), createHttpRequest(JsonEncode(req, 'ContractCallRequest'), headers, signal)).then(
|
|
2048
|
+
res => {
|
|
2049
|
+
return buildResponse(res).then(_data => {
|
|
2450
2050
|
return JsonDecode<ContractCallResponse>(_data, 'ContractCallResponse')
|
|
2451
2051
|
})
|
|
2452
2052
|
},
|
|
2453
|
-
|
|
2454
|
-
throw WebrpcRequestFailedError.new({
|
|
2455
|
-
|
|
2456
|
-
})
|
|
2457
|
-
},
|
|
2053
|
+
error => {
|
|
2054
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2055
|
+
}
|
|
2458
2056
|
)
|
|
2459
2057
|
}
|
|
2460
2058
|
|
|
2461
2059
|
decodeContractCall = (
|
|
2462
2060
|
req: DecodeContractCallRequest,
|
|
2463
2061
|
headers?: object,
|
|
2464
|
-
signal?: AbortSignal
|
|
2062
|
+
signal?: AbortSignal
|
|
2465
2063
|
): Promise<DecodeContractCallResponse> => {
|
|
2466
2064
|
return this.fetch(
|
|
2467
2065
|
this.url('DecodeContractCall'),
|
|
2468
|
-
createHttpRequest(JsonEncode(req, 'DecodeContractCallRequest'), headers, signal)
|
|
2066
|
+
createHttpRequest(JsonEncode(req, 'DecodeContractCallRequest'), headers, signal)
|
|
2469
2067
|
).then(
|
|
2470
|
-
|
|
2471
|
-
return buildResponse(res).then(
|
|
2068
|
+
res => {
|
|
2069
|
+
return buildResponse(res).then(_data => {
|
|
2472
2070
|
return JsonDecode<DecodeContractCallResponse>(_data, 'DecodeContractCallResponse')
|
|
2473
2071
|
})
|
|
2474
2072
|
},
|
|
2475
|
-
|
|
2476
|
-
throw WebrpcRequestFailedError.new({
|
|
2477
|
-
|
|
2478
|
-
})
|
|
2479
|
-
},
|
|
2073
|
+
error => {
|
|
2074
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2075
|
+
}
|
|
2480
2076
|
)
|
|
2481
2077
|
}
|
|
2482
2078
|
|
|
2483
2079
|
lookupContractCallSelectors = (
|
|
2484
2080
|
req: LookupContractCallSelectorsRequest,
|
|
2485
2081
|
headers?: object,
|
|
2486
|
-
signal?: AbortSignal
|
|
2082
|
+
signal?: AbortSignal
|
|
2487
2083
|
): Promise<LookupContractCallSelectorsResponse> => {
|
|
2488
2084
|
return this.fetch(
|
|
2489
2085
|
this.url('LookupContractCallSelectors'),
|
|
2490
|
-
createHttpRequest(JsonEncode(req, 'LookupContractCallSelectorsRequest'), headers, signal)
|
|
2086
|
+
createHttpRequest(JsonEncode(req, 'LookupContractCallSelectorsRequest'), headers, signal)
|
|
2491
2087
|
).then(
|
|
2492
|
-
|
|
2493
|
-
return buildResponse(res).then(
|
|
2088
|
+
res => {
|
|
2089
|
+
return buildResponse(res).then(_data => {
|
|
2494
2090
|
return JsonDecode<LookupContractCallSelectorsResponse>(_data, 'LookupContractCallSelectorsResponse')
|
|
2495
2091
|
})
|
|
2496
2092
|
},
|
|
2497
|
-
|
|
2498
|
-
throw WebrpcRequestFailedError.new({
|
|
2499
|
-
|
|
2500
|
-
})
|
|
2501
|
-
},
|
|
2093
|
+
error => {
|
|
2094
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2095
|
+
}
|
|
2502
2096
|
)
|
|
2503
2097
|
}
|
|
2504
2098
|
|
|
2505
2099
|
userStorageFetch = (
|
|
2506
2100
|
req: UserStorageFetchRequest,
|
|
2507
2101
|
headers?: object,
|
|
2508
|
-
signal?: AbortSignal
|
|
2102
|
+
signal?: AbortSignal
|
|
2509
2103
|
): Promise<UserStorageFetchResponse> => {
|
|
2510
2104
|
return this.fetch(
|
|
2511
2105
|
this.url('UserStorageFetch'),
|
|
2512
|
-
createHttpRequest(JsonEncode(req, 'UserStorageFetchRequest'), headers, signal)
|
|
2106
|
+
createHttpRequest(JsonEncode(req, 'UserStorageFetchRequest'), headers, signal)
|
|
2513
2107
|
).then(
|
|
2514
|
-
|
|
2515
|
-
return buildResponse(res).then(
|
|
2108
|
+
res => {
|
|
2109
|
+
return buildResponse(res).then(_data => {
|
|
2516
2110
|
return JsonDecode<UserStorageFetchResponse>(_data, 'UserStorageFetchResponse')
|
|
2517
2111
|
})
|
|
2518
2112
|
},
|
|
2519
|
-
|
|
2520
|
-
throw WebrpcRequestFailedError.new({
|
|
2521
|
-
|
|
2522
|
-
})
|
|
2523
|
-
},
|
|
2113
|
+
error => {
|
|
2114
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2115
|
+
}
|
|
2524
2116
|
)
|
|
2525
2117
|
}
|
|
2526
2118
|
|
|
2527
|
-
userStorageSave = (
|
|
2528
|
-
req: UserStorageSaveRequest,
|
|
2529
|
-
headers?: object,
|
|
2530
|
-
signal?: AbortSignal,
|
|
2531
|
-
): Promise<UserStorageSaveResponse> => {
|
|
2119
|
+
userStorageSave = (req: UserStorageSaveRequest, headers?: object, signal?: AbortSignal): Promise<UserStorageSaveResponse> => {
|
|
2532
2120
|
return this.fetch(
|
|
2533
2121
|
this.url('UserStorageSave'),
|
|
2534
|
-
createHttpRequest(JsonEncode(req, 'UserStorageSaveRequest'), headers, signal)
|
|
2122
|
+
createHttpRequest(JsonEncode(req, 'UserStorageSaveRequest'), headers, signal)
|
|
2535
2123
|
).then(
|
|
2536
|
-
|
|
2537
|
-
return buildResponse(res).then(
|
|
2124
|
+
res => {
|
|
2125
|
+
return buildResponse(res).then(_data => {
|
|
2538
2126
|
return JsonDecode<UserStorageSaveResponse>(_data, 'UserStorageSaveResponse')
|
|
2539
2127
|
})
|
|
2540
2128
|
},
|
|
2541
|
-
|
|
2542
|
-
throw WebrpcRequestFailedError.new({
|
|
2543
|
-
|
|
2544
|
-
})
|
|
2545
|
-
},
|
|
2129
|
+
error => {
|
|
2130
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2131
|
+
}
|
|
2546
2132
|
)
|
|
2547
2133
|
}
|
|
2548
2134
|
|
|
2549
2135
|
userStorageDelete = (
|
|
2550
2136
|
req: UserStorageDeleteRequest,
|
|
2551
2137
|
headers?: object,
|
|
2552
|
-
signal?: AbortSignal
|
|
2138
|
+
signal?: AbortSignal
|
|
2553
2139
|
): Promise<UserStorageDeleteResponse> => {
|
|
2554
2140
|
return this.fetch(
|
|
2555
2141
|
this.url('UserStorageDelete'),
|
|
2556
|
-
createHttpRequest(JsonEncode(req, 'UserStorageDeleteRequest'), headers, signal)
|
|
2142
|
+
createHttpRequest(JsonEncode(req, 'UserStorageDeleteRequest'), headers, signal)
|
|
2557
2143
|
).then(
|
|
2558
|
-
|
|
2559
|
-
return buildResponse(res).then(
|
|
2144
|
+
res => {
|
|
2145
|
+
return buildResponse(res).then(_data => {
|
|
2560
2146
|
return JsonDecode<UserStorageDeleteResponse>(_data, 'UserStorageDeleteResponse')
|
|
2561
2147
|
})
|
|
2562
2148
|
},
|
|
2563
|
-
|
|
2564
|
-
throw WebrpcRequestFailedError.new({
|
|
2565
|
-
|
|
2566
|
-
})
|
|
2567
|
-
},
|
|
2149
|
+
error => {
|
|
2150
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2151
|
+
}
|
|
2568
2152
|
)
|
|
2569
2153
|
}
|
|
2570
2154
|
|
|
2571
2155
|
userStorageFetchAll = (
|
|
2572
2156
|
req: UserStorageFetchAllRequest,
|
|
2573
2157
|
headers?: object,
|
|
2574
|
-
signal?: AbortSignal
|
|
2158
|
+
signal?: AbortSignal
|
|
2575
2159
|
): Promise<UserStorageFetchAllResponse> => {
|
|
2576
2160
|
return this.fetch(
|
|
2577
2161
|
this.url('UserStorageFetchAll'),
|
|
2578
|
-
createHttpRequest(JsonEncode(req, 'UserStorageFetchAllRequest'), headers, signal)
|
|
2162
|
+
createHttpRequest(JsonEncode(req, 'UserStorageFetchAllRequest'), headers, signal)
|
|
2579
2163
|
).then(
|
|
2580
|
-
|
|
2581
|
-
return buildResponse(res).then(
|
|
2164
|
+
res => {
|
|
2165
|
+
return buildResponse(res).then(_data => {
|
|
2582
2166
|
return JsonDecode<UserStorageFetchAllResponse>(_data, 'UserStorageFetchAllResponse')
|
|
2583
2167
|
})
|
|
2584
2168
|
},
|
|
2585
|
-
|
|
2586
|
-
throw WebrpcRequestFailedError.new({
|
|
2587
|
-
|
|
2588
|
-
})
|
|
2589
|
-
},
|
|
2169
|
+
error => {
|
|
2170
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2171
|
+
}
|
|
2590
2172
|
)
|
|
2591
2173
|
}
|
|
2592
2174
|
|
|
2593
|
-
getMoonpayLink = (
|
|
2594
|
-
req: GetMoonpayLinkRequest,
|
|
2595
|
-
headers?: object,
|
|
2596
|
-
signal?: AbortSignal,
|
|
2597
|
-
): Promise<GetMoonpayLinkResponse> => {
|
|
2175
|
+
getMoonpayLink = (req: GetMoonpayLinkRequest, headers?: object, signal?: AbortSignal): Promise<GetMoonpayLinkResponse> => {
|
|
2598
2176
|
return this.fetch(
|
|
2599
2177
|
this.url('GetMoonpayLink'),
|
|
2600
|
-
createHttpRequest(JsonEncode(req, 'GetMoonpayLinkRequest'), headers, signal)
|
|
2178
|
+
createHttpRequest(JsonEncode(req, 'GetMoonpayLinkRequest'), headers, signal)
|
|
2601
2179
|
).then(
|
|
2602
|
-
|
|
2603
|
-
return buildResponse(res).then(
|
|
2180
|
+
res => {
|
|
2181
|
+
return buildResponse(res).then(_data => {
|
|
2604
2182
|
return JsonDecode<GetMoonpayLinkResponse>(_data, 'GetMoonpayLinkResponse')
|
|
2605
2183
|
})
|
|
2606
2184
|
},
|
|
2607
|
-
|
|
2608
|
-
throw WebrpcRequestFailedError.new({
|
|
2609
|
-
|
|
2610
|
-
})
|
|
2611
|
-
},
|
|
2185
|
+
error => {
|
|
2186
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2187
|
+
}
|
|
2612
2188
|
)
|
|
2613
2189
|
}
|
|
2614
2190
|
|
|
2615
2191
|
resolveENSAddress = (
|
|
2616
2192
|
req: ResolveENSAddressRequest,
|
|
2617
2193
|
headers?: object,
|
|
2618
|
-
signal?: AbortSignal
|
|
2194
|
+
signal?: AbortSignal
|
|
2619
2195
|
): Promise<ResolveENSAddressResponse> => {
|
|
2620
2196
|
return this.fetch(
|
|
2621
2197
|
this.url('ResolveENSAddress'),
|
|
2622
|
-
createHttpRequest(JsonEncode(req, 'ResolveENSAddressRequest'), headers, signal)
|
|
2198
|
+
createHttpRequest(JsonEncode(req, 'ResolveENSAddressRequest'), headers, signal)
|
|
2623
2199
|
).then(
|
|
2624
|
-
|
|
2625
|
-
return buildResponse(res).then(
|
|
2200
|
+
res => {
|
|
2201
|
+
return buildResponse(res).then(_data => {
|
|
2626
2202
|
return JsonDecode<ResolveENSAddressResponse>(_data, 'ResolveENSAddressResponse')
|
|
2627
2203
|
})
|
|
2628
2204
|
},
|
|
2629
|
-
|
|
2630
|
-
throw WebrpcRequestFailedError.new({
|
|
2631
|
-
|
|
2632
|
-
})
|
|
2633
|
-
},
|
|
2205
|
+
error => {
|
|
2206
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2207
|
+
}
|
|
2634
2208
|
)
|
|
2635
2209
|
}
|
|
2636
2210
|
|
|
2637
2211
|
isValidSignature = (
|
|
2638
2212
|
req: IsValidSignatureRequest,
|
|
2639
2213
|
headers?: object,
|
|
2640
|
-
signal?: AbortSignal
|
|
2214
|
+
signal?: AbortSignal
|
|
2641
2215
|
): Promise<IsValidSignatureResponse> => {
|
|
2642
2216
|
return this.fetch(
|
|
2643
2217
|
this.url('IsValidSignature'),
|
|
2644
|
-
createHttpRequest(JsonEncode(req, 'IsValidSignatureRequest'), headers, signal)
|
|
2218
|
+
createHttpRequest(JsonEncode(req, 'IsValidSignatureRequest'), headers, signal)
|
|
2645
2219
|
).then(
|
|
2646
|
-
|
|
2647
|
-
return buildResponse(res).then(
|
|
2220
|
+
res => {
|
|
2221
|
+
return buildResponse(res).then(_data => {
|
|
2648
2222
|
return JsonDecode<IsValidSignatureResponse>(_data, 'IsValidSignatureResponse')
|
|
2649
2223
|
})
|
|
2650
2224
|
},
|
|
2651
|
-
|
|
2652
|
-
throw WebrpcRequestFailedError.new({
|
|
2653
|
-
|
|
2654
|
-
})
|
|
2655
|
-
},
|
|
2225
|
+
error => {
|
|
2226
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2227
|
+
}
|
|
2656
2228
|
)
|
|
2657
2229
|
}
|
|
2658
2230
|
|
|
2659
2231
|
isValidMessageSignature = (
|
|
2660
2232
|
req: IsValidMessageSignatureRequest,
|
|
2661
2233
|
headers?: object,
|
|
2662
|
-
signal?: AbortSignal
|
|
2234
|
+
signal?: AbortSignal
|
|
2663
2235
|
): Promise<IsValidMessageSignatureResponse> => {
|
|
2664
2236
|
return this.fetch(
|
|
2665
2237
|
this.url('IsValidMessageSignature'),
|
|
2666
|
-
createHttpRequest(JsonEncode(req, 'IsValidMessageSignatureRequest'), headers, signal)
|
|
2238
|
+
createHttpRequest(JsonEncode(req, 'IsValidMessageSignatureRequest'), headers, signal)
|
|
2667
2239
|
).then(
|
|
2668
|
-
|
|
2669
|
-
return buildResponse(res).then(
|
|
2240
|
+
res => {
|
|
2241
|
+
return buildResponse(res).then(_data => {
|
|
2670
2242
|
return JsonDecode<IsValidMessageSignatureResponse>(_data, 'IsValidMessageSignatureResponse')
|
|
2671
2243
|
})
|
|
2672
2244
|
},
|
|
2673
|
-
|
|
2674
|
-
throw WebrpcRequestFailedError.new({
|
|
2675
|
-
|
|
2676
|
-
})
|
|
2677
|
-
},
|
|
2245
|
+
error => {
|
|
2246
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2247
|
+
}
|
|
2678
2248
|
)
|
|
2679
2249
|
}
|
|
2680
2250
|
|
|
2681
2251
|
isValidTypedDataSignature = (
|
|
2682
2252
|
req: IsValidTypedDataSignatureRequest,
|
|
2683
2253
|
headers?: object,
|
|
2684
|
-
signal?: AbortSignal
|
|
2254
|
+
signal?: AbortSignal
|
|
2685
2255
|
): Promise<IsValidTypedDataSignatureResponse> => {
|
|
2686
2256
|
return this.fetch(
|
|
2687
2257
|
this.url('IsValidTypedDataSignature'),
|
|
2688
|
-
createHttpRequest(JsonEncode(req, 'IsValidTypedDataSignatureRequest'), headers, signal)
|
|
2258
|
+
createHttpRequest(JsonEncode(req, 'IsValidTypedDataSignatureRequest'), headers, signal)
|
|
2689
2259
|
).then(
|
|
2690
|
-
|
|
2691
|
-
return buildResponse(res).then(
|
|
2260
|
+
res => {
|
|
2261
|
+
return buildResponse(res).then(_data => {
|
|
2692
2262
|
return JsonDecode<IsValidTypedDataSignatureResponse>(_data, 'IsValidTypedDataSignatureResponse')
|
|
2693
2263
|
})
|
|
2694
2264
|
},
|
|
2695
|
-
|
|
2696
|
-
throw WebrpcRequestFailedError.new({
|
|
2697
|
-
|
|
2698
|
-
})
|
|
2699
|
-
},
|
|
2265
|
+
error => {
|
|
2266
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2267
|
+
}
|
|
2700
2268
|
)
|
|
2701
2269
|
}
|
|
2702
2270
|
|
|
2703
2271
|
isValidETHAuthProof = (
|
|
2704
2272
|
req: IsValidETHAuthProofRequest,
|
|
2705
2273
|
headers?: object,
|
|
2706
|
-
signal?: AbortSignal
|
|
2274
|
+
signal?: AbortSignal
|
|
2707
2275
|
): Promise<IsValidETHAuthProofResponse> => {
|
|
2708
2276
|
return this.fetch(
|
|
2709
2277
|
this.url('IsValidETHAuthProof'),
|
|
2710
|
-
createHttpRequest(JsonEncode(req, 'IsValidETHAuthProofRequest'), headers, signal)
|
|
2278
|
+
createHttpRequest(JsonEncode(req, 'IsValidETHAuthProofRequest'), headers, signal)
|
|
2711
2279
|
).then(
|
|
2712
|
-
|
|
2713
|
-
return buildResponse(res).then(
|
|
2280
|
+
res => {
|
|
2281
|
+
return buildResponse(res).then(_data => {
|
|
2714
2282
|
return JsonDecode<IsValidETHAuthProofResponse>(_data, 'IsValidETHAuthProofResponse')
|
|
2715
2283
|
})
|
|
2716
2284
|
},
|
|
2717
|
-
|
|
2718
|
-
throw WebrpcRequestFailedError.new({
|
|
2719
|
-
|
|
2720
|
-
})
|
|
2721
|
-
},
|
|
2285
|
+
error => {
|
|
2286
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2287
|
+
}
|
|
2722
2288
|
)
|
|
2723
2289
|
}
|
|
2724
2290
|
|
|
2725
2291
|
getOnRampURL = (req: GetOnRampURLRequest, headers?: object, signal?: AbortSignal): Promise<GetOnRampURLResponse> => {
|
|
2726
|
-
return this.fetch(
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
).then(
|
|
2730
|
-
(res) => {
|
|
2731
|
-
return buildResponse(res).then((_data) => {
|
|
2292
|
+
return this.fetch(this.url('GetOnRampURL'), createHttpRequest(JsonEncode(req, 'GetOnRampURLRequest'), headers, signal)).then(
|
|
2293
|
+
res => {
|
|
2294
|
+
return buildResponse(res).then(_data => {
|
|
2732
2295
|
return JsonDecode<GetOnRampURLResponse>(_data, 'GetOnRampURLResponse')
|
|
2733
2296
|
})
|
|
2734
2297
|
},
|
|
2735
|
-
|
|
2736
|
-
throw WebrpcRequestFailedError.new({
|
|
2737
|
-
|
|
2738
|
-
})
|
|
2739
|
-
},
|
|
2298
|
+
error => {
|
|
2299
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2300
|
+
}
|
|
2740
2301
|
)
|
|
2741
2302
|
}
|
|
2742
2303
|
|
|
2743
2304
|
transakGetCountries = (headers?: object, signal?: AbortSignal): Promise<TransakGetCountriesResponse> => {
|
|
2744
2305
|
return this.fetch(this.url('TransakGetCountries'), createHttpRequest('{}', headers, signal)).then(
|
|
2745
|
-
|
|
2746
|
-
return buildResponse(res).then(
|
|
2306
|
+
res => {
|
|
2307
|
+
return buildResponse(res).then(_data => {
|
|
2747
2308
|
return JsonDecode<TransakGetCountriesResponse>(_data, 'TransakGetCountriesResponse')
|
|
2748
2309
|
})
|
|
2749
2310
|
},
|
|
2750
|
-
|
|
2751
|
-
throw WebrpcRequestFailedError.new({
|
|
2752
|
-
|
|
2753
|
-
})
|
|
2754
|
-
},
|
|
2311
|
+
error => {
|
|
2312
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2313
|
+
}
|
|
2755
2314
|
)
|
|
2756
2315
|
}
|
|
2757
2316
|
|
|
2758
|
-
transakGetCryptoCurrencies = (
|
|
2759
|
-
headers?: object,
|
|
2760
|
-
signal?: AbortSignal,
|
|
2761
|
-
): Promise<TransakGetCryptoCurrenciesResponse> => {
|
|
2317
|
+
transakGetCryptoCurrencies = (headers?: object, signal?: AbortSignal): Promise<TransakGetCryptoCurrenciesResponse> => {
|
|
2762
2318
|
return this.fetch(this.url('TransakGetCryptoCurrencies'), createHttpRequest('{}', headers, signal)).then(
|
|
2763
|
-
|
|
2764
|
-
return buildResponse(res).then(
|
|
2319
|
+
res => {
|
|
2320
|
+
return buildResponse(res).then(_data => {
|
|
2765
2321
|
return JsonDecode<TransakGetCryptoCurrenciesResponse>(_data, 'TransakGetCryptoCurrenciesResponse')
|
|
2766
2322
|
})
|
|
2767
2323
|
},
|
|
2768
|
-
|
|
2769
|
-
throw WebrpcRequestFailedError.new({
|
|
2770
|
-
|
|
2771
|
-
})
|
|
2772
|
-
},
|
|
2324
|
+
error => {
|
|
2325
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2326
|
+
}
|
|
2773
2327
|
)
|
|
2774
2328
|
}
|
|
2775
2329
|
|
|
2776
2330
|
transakGetFiatCurrencies = (headers?: object, signal?: AbortSignal): Promise<TransakGetFiatCurrenciesResponse> => {
|
|
2777
2331
|
return this.fetch(this.url('TransakGetFiatCurrencies'), createHttpRequest('{}', headers, signal)).then(
|
|
2778
|
-
|
|
2779
|
-
return buildResponse(res).then(
|
|
2332
|
+
res => {
|
|
2333
|
+
return buildResponse(res).then(_data => {
|
|
2780
2334
|
return JsonDecode<TransakGetFiatCurrenciesResponse>(_data, 'TransakGetFiatCurrenciesResponse')
|
|
2781
2335
|
})
|
|
2782
2336
|
},
|
|
2783
|
-
|
|
2784
|
-
throw WebrpcRequestFailedError.new({
|
|
2785
|
-
|
|
2786
|
-
})
|
|
2787
|
-
},
|
|
2337
|
+
error => {
|
|
2338
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2339
|
+
}
|
|
2788
2340
|
)
|
|
2789
2341
|
}
|
|
2790
2342
|
|
|
2791
|
-
transakGetPrice = (
|
|
2792
|
-
req: TransakGetPriceRequest,
|
|
2793
|
-
headers?: object,
|
|
2794
|
-
signal?: AbortSignal,
|
|
2795
|
-
): Promise<TransakGetPriceResponse> => {
|
|
2343
|
+
transakGetPrice = (req: TransakGetPriceRequest, headers?: object, signal?: AbortSignal): Promise<TransakGetPriceResponse> => {
|
|
2796
2344
|
return this.fetch(
|
|
2797
2345
|
this.url('TransakGetPrice'),
|
|
2798
|
-
createHttpRequest(JsonEncode(req, 'TransakGetPriceRequest'), headers, signal)
|
|
2346
|
+
createHttpRequest(JsonEncode(req, 'TransakGetPriceRequest'), headers, signal)
|
|
2799
2347
|
).then(
|
|
2800
|
-
|
|
2801
|
-
return buildResponse(res).then(
|
|
2348
|
+
res => {
|
|
2349
|
+
return buildResponse(res).then(_data => {
|
|
2802
2350
|
return JsonDecode<TransakGetPriceResponse>(_data, 'TransakGetPriceResponse')
|
|
2803
2351
|
})
|
|
2804
2352
|
},
|
|
2805
|
-
|
|
2806
|
-
throw WebrpcRequestFailedError.new({
|
|
2807
|
-
|
|
2808
|
-
})
|
|
2809
|
-
},
|
|
2353
|
+
error => {
|
|
2354
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2355
|
+
}
|
|
2810
2356
|
)
|
|
2811
2357
|
}
|
|
2812
2358
|
|
|
2813
2359
|
transakGetSupportedNFTCheckoutChains = (
|
|
2814
2360
|
headers?: object,
|
|
2815
|
-
signal?: AbortSignal
|
|
2361
|
+
signal?: AbortSignal
|
|
2816
2362
|
): Promise<TransakGetSupportedNFTCheckoutChainsResponse> => {
|
|
2817
2363
|
return this.fetch(this.url('TransakGetSupportedNFTCheckoutChains'), createHttpRequest('{}', headers, signal)).then(
|
|
2818
|
-
|
|
2819
|
-
return buildResponse(res).then(
|
|
2820
|
-
return JsonDecode<TransakGetSupportedNFTCheckoutChainsResponse>(
|
|
2821
|
-
_data,
|
|
2822
|
-
'TransakGetSupportedNFTCheckoutChainsResponse',
|
|
2823
|
-
)
|
|
2824
|
-
})
|
|
2825
|
-
},
|
|
2826
|
-
(error) => {
|
|
2827
|
-
throw WebrpcRequestFailedError.new({
|
|
2828
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
|
|
2364
|
+
res => {
|
|
2365
|
+
return buildResponse(res).then(_data => {
|
|
2366
|
+
return JsonDecode<TransakGetSupportedNFTCheckoutChainsResponse>(_data, 'TransakGetSupportedNFTCheckoutChainsResponse')
|
|
2829
2367
|
})
|
|
2830
2368
|
},
|
|
2369
|
+
error => {
|
|
2370
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2371
|
+
}
|
|
2831
2372
|
)
|
|
2832
2373
|
}
|
|
2833
2374
|
|
|
2834
2375
|
transakGetWidgetURL = (
|
|
2835
2376
|
req: TransakGetWidgetURLRequest,
|
|
2836
2377
|
headers?: object,
|
|
2837
|
-
signal?: AbortSignal
|
|
2378
|
+
signal?: AbortSignal
|
|
2838
2379
|
): Promise<TransakGetWidgetURLResponse> => {
|
|
2839
2380
|
return this.fetch(
|
|
2840
2381
|
this.url('TransakGetWidgetURL'),
|
|
2841
|
-
createHttpRequest(JsonEncode(req, 'TransakGetWidgetURLRequest'), headers, signal)
|
|
2382
|
+
createHttpRequest(JsonEncode(req, 'TransakGetWidgetURLRequest'), headers, signal)
|
|
2842
2383
|
).then(
|
|
2843
|
-
|
|
2844
|
-
return buildResponse(res).then(
|
|
2384
|
+
res => {
|
|
2385
|
+
return buildResponse(res).then(_data => {
|
|
2845
2386
|
return JsonDecode<TransakGetWidgetURLResponse>(_data, 'TransakGetWidgetURLResponse')
|
|
2846
2387
|
})
|
|
2847
2388
|
},
|
|
2848
|
-
|
|
2849
|
-
throw WebrpcRequestFailedError.new({
|
|
2850
|
-
|
|
2851
|
-
})
|
|
2852
|
-
},
|
|
2389
|
+
error => {
|
|
2390
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2391
|
+
}
|
|
2853
2392
|
)
|
|
2854
2393
|
}
|
|
2855
2394
|
|
|
2856
|
-
getCoinPrices = (
|
|
2857
|
-
req: GetCoinPricesRequest,
|
|
2858
|
-
headers?: object,
|
|
2859
|
-
signal?: AbortSignal,
|
|
2860
|
-
): Promise<GetCoinPricesResponse> => {
|
|
2395
|
+
getCoinPrices = (req: GetCoinPricesRequest, headers?: object, signal?: AbortSignal): Promise<GetCoinPricesResponse> => {
|
|
2861
2396
|
return this.fetch(
|
|
2862
2397
|
this.url('GetCoinPrices'),
|
|
2863
|
-
createHttpRequest(JsonEncode(req, 'GetCoinPricesRequest'), headers, signal)
|
|
2398
|
+
createHttpRequest(JsonEncode(req, 'GetCoinPricesRequest'), headers, signal)
|
|
2864
2399
|
).then(
|
|
2865
|
-
|
|
2866
|
-
return buildResponse(res).then(
|
|
2400
|
+
res => {
|
|
2401
|
+
return buildResponse(res).then(_data => {
|
|
2867
2402
|
return JsonDecode<GetCoinPricesResponse>(_data, 'GetCoinPricesResponse')
|
|
2868
2403
|
})
|
|
2869
2404
|
},
|
|
2870
|
-
|
|
2871
|
-
throw WebrpcRequestFailedError.new({
|
|
2872
|
-
|
|
2873
|
-
})
|
|
2874
|
-
},
|
|
2405
|
+
error => {
|
|
2406
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2407
|
+
}
|
|
2875
2408
|
)
|
|
2876
2409
|
}
|
|
2877
2410
|
|
|
2878
2411
|
getCollectiblePrices = (
|
|
2879
2412
|
req: GetCollectiblePricesRequest,
|
|
2880
2413
|
headers?: object,
|
|
2881
|
-
signal?: AbortSignal
|
|
2414
|
+
signal?: AbortSignal
|
|
2882
2415
|
): Promise<GetCollectiblePricesResponse> => {
|
|
2883
2416
|
return this.fetch(
|
|
2884
2417
|
this.url('GetCollectiblePrices'),
|
|
2885
|
-
createHttpRequest(JsonEncode(req, 'GetCollectiblePricesRequest'), headers, signal)
|
|
2418
|
+
createHttpRequest(JsonEncode(req, 'GetCollectiblePricesRequest'), headers, signal)
|
|
2886
2419
|
).then(
|
|
2887
|
-
|
|
2888
|
-
return buildResponse(res).then(
|
|
2420
|
+
res => {
|
|
2421
|
+
return buildResponse(res).then(_data => {
|
|
2889
2422
|
return JsonDecode<GetCollectiblePricesResponse>(_data, 'GetCollectiblePricesResponse')
|
|
2890
2423
|
})
|
|
2891
2424
|
},
|
|
2892
|
-
|
|
2893
|
-
throw WebrpcRequestFailedError.new({
|
|
2894
|
-
|
|
2895
|
-
})
|
|
2896
|
-
},
|
|
2425
|
+
error => {
|
|
2426
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2427
|
+
}
|
|
2897
2428
|
)
|
|
2898
2429
|
}
|
|
2899
2430
|
|
|
2900
|
-
getExchangeRate = (
|
|
2901
|
-
req: GetExchangeRateRequest,
|
|
2902
|
-
headers?: object,
|
|
2903
|
-
signal?: AbortSignal,
|
|
2904
|
-
): Promise<GetExchangeRateResponse> => {
|
|
2431
|
+
getExchangeRate = (req: GetExchangeRateRequest, headers?: object, signal?: AbortSignal): Promise<GetExchangeRateResponse> => {
|
|
2905
2432
|
return this.fetch(
|
|
2906
2433
|
this.url('GetExchangeRate'),
|
|
2907
|
-
createHttpRequest(JsonEncode(req, 'GetExchangeRateRequest'), headers, signal)
|
|
2434
|
+
createHttpRequest(JsonEncode(req, 'GetExchangeRateRequest'), headers, signal)
|
|
2908
2435
|
).then(
|
|
2909
|
-
|
|
2910
|
-
return buildResponse(res).then(
|
|
2436
|
+
res => {
|
|
2437
|
+
return buildResponse(res).then(_data => {
|
|
2911
2438
|
return JsonDecode<GetExchangeRateResponse>(_data, 'GetExchangeRateResponse')
|
|
2912
2439
|
})
|
|
2913
2440
|
},
|
|
2914
|
-
|
|
2915
|
-
throw WebrpcRequestFailedError.new({
|
|
2916
|
-
|
|
2917
|
-
})
|
|
2918
|
-
},
|
|
2441
|
+
error => {
|
|
2442
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2443
|
+
}
|
|
2919
2444
|
)
|
|
2920
2445
|
}
|
|
2921
2446
|
|
|
2922
2447
|
memoryStore = (req: MemoryStoreRequest, headers?: object, signal?: AbortSignal): Promise<MemoryStoreResponse> => {
|
|
2923
|
-
return this.fetch(
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
).then(
|
|
2927
|
-
(res) => {
|
|
2928
|
-
return buildResponse(res).then((_data) => {
|
|
2448
|
+
return this.fetch(this.url('MemoryStore'), createHttpRequest(JsonEncode(req, 'MemoryStoreRequest'), headers, signal)).then(
|
|
2449
|
+
res => {
|
|
2450
|
+
return buildResponse(res).then(_data => {
|
|
2929
2451
|
return JsonDecode<MemoryStoreResponse>(_data, 'MemoryStoreResponse')
|
|
2930
2452
|
})
|
|
2931
2453
|
},
|
|
2932
|
-
|
|
2933
|
-
throw WebrpcRequestFailedError.new({
|
|
2934
|
-
|
|
2935
|
-
})
|
|
2936
|
-
},
|
|
2454
|
+
error => {
|
|
2455
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2456
|
+
}
|
|
2937
2457
|
)
|
|
2938
2458
|
}
|
|
2939
2459
|
|
|
2940
2460
|
memoryLoad = (req: MemoryLoadRequest, headers?: object, signal?: AbortSignal): Promise<MemoryLoadResponse> => {
|
|
2941
|
-
return this.fetch(
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
).then(
|
|
2945
|
-
(res) => {
|
|
2946
|
-
return buildResponse(res).then((_data) => {
|
|
2461
|
+
return this.fetch(this.url('MemoryLoad'), createHttpRequest(JsonEncode(req, 'MemoryLoadRequest'), headers, signal)).then(
|
|
2462
|
+
res => {
|
|
2463
|
+
return buildResponse(res).then(_data => {
|
|
2947
2464
|
return JsonDecode<MemoryLoadResponse>(_data, 'MemoryLoadResponse')
|
|
2948
2465
|
})
|
|
2949
2466
|
},
|
|
2950
|
-
|
|
2951
|
-
throw WebrpcRequestFailedError.new({
|
|
2952
|
-
|
|
2953
|
-
})
|
|
2954
|
-
},
|
|
2467
|
+
error => {
|
|
2468
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2469
|
+
}
|
|
2955
2470
|
)
|
|
2956
2471
|
}
|
|
2957
2472
|
|
|
2958
2473
|
getInviteInfo = (headers?: object, signal?: AbortSignal): Promise<GetInviteInfoResponse> => {
|
|
2959
2474
|
return this.fetch(this.url('GetInviteInfo'), createHttpRequest('{}', headers, signal)).then(
|
|
2960
|
-
|
|
2961
|
-
return buildResponse(res).then(
|
|
2475
|
+
res => {
|
|
2476
|
+
return buildResponse(res).then(_data => {
|
|
2962
2477
|
return JsonDecode<GetInviteInfoResponse>(_data, 'GetInviteInfoResponse')
|
|
2963
2478
|
})
|
|
2964
2479
|
},
|
|
2965
|
-
|
|
2966
|
-
throw WebrpcRequestFailedError.new({
|
|
2967
|
-
|
|
2968
|
-
})
|
|
2969
|
-
},
|
|
2480
|
+
error => {
|
|
2481
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2482
|
+
}
|
|
2970
2483
|
)
|
|
2971
2484
|
}
|
|
2972
2485
|
|
|
2973
2486
|
isValidAccessCode = (
|
|
2974
2487
|
req: IsValidAccessCodeRequest,
|
|
2975
2488
|
headers?: object,
|
|
2976
|
-
signal?: AbortSignal
|
|
2489
|
+
signal?: AbortSignal
|
|
2977
2490
|
): Promise<IsValidAccessCodeResponse> => {
|
|
2978
2491
|
return this.fetch(
|
|
2979
2492
|
this.url('IsValidAccessCode'),
|
|
2980
|
-
createHttpRequest(JsonEncode(req, 'IsValidAccessCodeRequest'), headers, signal)
|
|
2493
|
+
createHttpRequest(JsonEncode(req, 'IsValidAccessCodeRequest'), headers, signal)
|
|
2981
2494
|
).then(
|
|
2982
|
-
|
|
2983
|
-
return buildResponse(res).then(
|
|
2495
|
+
res => {
|
|
2496
|
+
return buildResponse(res).then(_data => {
|
|
2984
2497
|
return JsonDecode<IsValidAccessCodeResponse>(_data, 'IsValidAccessCodeResponse')
|
|
2985
2498
|
})
|
|
2986
2499
|
},
|
|
2987
|
-
|
|
2988
|
-
throw WebrpcRequestFailedError.new({
|
|
2989
|
-
|
|
2990
|
-
})
|
|
2991
|
-
},
|
|
2500
|
+
error => {
|
|
2501
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2502
|
+
}
|
|
2992
2503
|
)
|
|
2993
2504
|
}
|
|
2994
2505
|
|
|
2995
2506
|
internalClaimAccessCode = (
|
|
2996
2507
|
req: InternalClaimAccessCodeRequest,
|
|
2997
2508
|
headers?: object,
|
|
2998
|
-
signal?: AbortSignal
|
|
2509
|
+
signal?: AbortSignal
|
|
2999
2510
|
): Promise<InternalClaimAccessCodeResponse> => {
|
|
3000
2511
|
return this.fetch(
|
|
3001
2512
|
this.url('InternalClaimAccessCode'),
|
|
3002
|
-
createHttpRequest(JsonEncode(req, 'InternalClaimAccessCodeRequest'), headers, signal)
|
|
2513
|
+
createHttpRequest(JsonEncode(req, 'InternalClaimAccessCodeRequest'), headers, signal)
|
|
3003
2514
|
).then(
|
|
3004
|
-
|
|
3005
|
-
return buildResponse(res).then(
|
|
2515
|
+
res => {
|
|
2516
|
+
return buildResponse(res).then(_data => {
|
|
3006
2517
|
return JsonDecode<InternalClaimAccessCodeResponse>(_data, 'InternalClaimAccessCodeResponse')
|
|
3007
2518
|
})
|
|
3008
2519
|
},
|
|
3009
|
-
|
|
3010
|
-
throw WebrpcRequestFailedError.new({
|
|
3011
|
-
|
|
3012
|
-
})
|
|
3013
|
-
},
|
|
2520
|
+
error => {
|
|
2521
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2522
|
+
}
|
|
3014
2523
|
)
|
|
3015
2524
|
}
|
|
3016
2525
|
|
|
3017
2526
|
blockNumberAtTime = (
|
|
3018
2527
|
req: BlockNumberAtTimeRequest,
|
|
3019
2528
|
headers?: object,
|
|
3020
|
-
signal?: AbortSignal
|
|
2529
|
+
signal?: AbortSignal
|
|
3021
2530
|
): Promise<BlockNumberAtTimeResponse> => {
|
|
3022
2531
|
return this.fetch(
|
|
3023
2532
|
this.url('BlockNumberAtTime'),
|
|
3024
|
-
createHttpRequest(JsonEncode(req, 'BlockNumberAtTimeRequest'), headers, signal)
|
|
2533
|
+
createHttpRequest(JsonEncode(req, 'BlockNumberAtTimeRequest'), headers, signal)
|
|
3025
2534
|
).then(
|
|
3026
|
-
|
|
3027
|
-
return buildResponse(res).then(
|
|
2535
|
+
res => {
|
|
2536
|
+
return buildResponse(res).then(_data => {
|
|
3028
2537
|
return JsonDecode<BlockNumberAtTimeResponse>(_data, 'BlockNumberAtTimeResponse')
|
|
3029
2538
|
})
|
|
3030
2539
|
},
|
|
3031
|
-
|
|
3032
|
-
throw WebrpcRequestFailedError.new({
|
|
3033
|
-
|
|
3034
|
-
})
|
|
3035
|
-
},
|
|
2540
|
+
error => {
|
|
2541
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2542
|
+
}
|
|
3036
2543
|
)
|
|
3037
2544
|
}
|
|
3038
2545
|
|
|
3039
2546
|
paperSessionSecret = (
|
|
3040
2547
|
req: PaperSessionSecretRequest,
|
|
3041
2548
|
headers?: object,
|
|
3042
|
-
signal?: AbortSignal
|
|
2549
|
+
signal?: AbortSignal
|
|
3043
2550
|
): Promise<PaperSessionSecretResponse> => {
|
|
3044
2551
|
return this.fetch(
|
|
3045
2552
|
this.url('PaperSessionSecret'),
|
|
3046
|
-
createHttpRequest(JsonEncode(req, 'PaperSessionSecretRequest'), headers, signal)
|
|
2553
|
+
createHttpRequest(JsonEncode(req, 'PaperSessionSecretRequest'), headers, signal)
|
|
3047
2554
|
).then(
|
|
3048
|
-
|
|
3049
|
-
return buildResponse(res).then(
|
|
2555
|
+
res => {
|
|
2556
|
+
return buildResponse(res).then(_data => {
|
|
3050
2557
|
return JsonDecode<PaperSessionSecretResponse>(_data, 'PaperSessionSecretResponse')
|
|
3051
2558
|
})
|
|
3052
2559
|
},
|
|
3053
|
-
|
|
3054
|
-
throw WebrpcRequestFailedError.new({
|
|
3055
|
-
|
|
3056
|
-
})
|
|
3057
|
-
},
|
|
2560
|
+
error => {
|
|
2561
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2562
|
+
}
|
|
3058
2563
|
)
|
|
3059
2564
|
}
|
|
3060
2565
|
|
|
3061
2566
|
paperSessionSecret2 = (
|
|
3062
2567
|
req: PaperSessionSecret2Request,
|
|
3063
2568
|
headers?: object,
|
|
3064
|
-
signal?: AbortSignal
|
|
2569
|
+
signal?: AbortSignal
|
|
3065
2570
|
): Promise<PaperSessionSecret2Response> => {
|
|
3066
2571
|
return this.fetch(
|
|
3067
2572
|
this.url('PaperSessionSecret2'),
|
|
3068
|
-
createHttpRequest(JsonEncode(req, 'PaperSessionSecret2Request'), headers, signal)
|
|
2573
|
+
createHttpRequest(JsonEncode(req, 'PaperSessionSecret2Request'), headers, signal)
|
|
3069
2574
|
).then(
|
|
3070
|
-
|
|
3071
|
-
return buildResponse(res).then(
|
|
2575
|
+
res => {
|
|
2576
|
+
return buildResponse(res).then(_data => {
|
|
3072
2577
|
return JsonDecode<PaperSessionSecret2Response>(_data, 'PaperSessionSecret2Response')
|
|
3073
2578
|
})
|
|
3074
2579
|
},
|
|
3075
|
-
|
|
3076
|
-
throw WebrpcRequestFailedError.new({
|
|
3077
|
-
|
|
3078
|
-
})
|
|
3079
|
-
},
|
|
2580
|
+
error => {
|
|
2581
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2582
|
+
}
|
|
3080
2583
|
)
|
|
3081
2584
|
}
|
|
3082
2585
|
|
|
3083
2586
|
linkWallet = (req: LinkWalletRequest, headers?: object, signal?: AbortSignal): Promise<LinkWalletResponse> => {
|
|
3084
|
-
return this.fetch(
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
).then(
|
|
3088
|
-
(res) => {
|
|
3089
|
-
return buildResponse(res).then((_data) => {
|
|
2587
|
+
return this.fetch(this.url('LinkWallet'), createHttpRequest(JsonEncode(req, 'LinkWalletRequest'), headers, signal)).then(
|
|
2588
|
+
res => {
|
|
2589
|
+
return buildResponse(res).then(_data => {
|
|
3090
2590
|
return JsonDecode<LinkWalletResponse>(_data, 'LinkWalletResponse')
|
|
3091
2591
|
})
|
|
3092
2592
|
},
|
|
3093
|
-
|
|
3094
|
-
throw WebrpcRequestFailedError.new({
|
|
3095
|
-
|
|
3096
|
-
})
|
|
3097
|
-
},
|
|
2593
|
+
error => {
|
|
2594
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2595
|
+
}
|
|
3098
2596
|
)
|
|
3099
2597
|
}
|
|
3100
2598
|
|
|
3101
2599
|
getLinkedWallets = (
|
|
3102
2600
|
req: GetLinkedWalletsRequest,
|
|
3103
2601
|
headers?: object,
|
|
3104
|
-
signal?: AbortSignal
|
|
2602
|
+
signal?: AbortSignal
|
|
3105
2603
|
): Promise<GetLinkedWalletsResponse> => {
|
|
3106
2604
|
return this.fetch(
|
|
3107
2605
|
this.url('GetLinkedWallets'),
|
|
3108
|
-
createHttpRequest(JsonEncode(req, 'GetLinkedWalletsRequest'), headers, signal)
|
|
2606
|
+
createHttpRequest(JsonEncode(req, 'GetLinkedWalletsRequest'), headers, signal)
|
|
3109
2607
|
).then(
|
|
3110
|
-
|
|
3111
|
-
return buildResponse(res).then(
|
|
2608
|
+
res => {
|
|
2609
|
+
return buildResponse(res).then(_data => {
|
|
3112
2610
|
return JsonDecode<GetLinkedWalletsResponse>(_data, 'GetLinkedWalletsResponse')
|
|
3113
2611
|
})
|
|
3114
2612
|
},
|
|
3115
|
-
|
|
3116
|
-
throw WebrpcRequestFailedError.new({
|
|
3117
|
-
|
|
3118
|
-
})
|
|
3119
|
-
},
|
|
2613
|
+
error => {
|
|
2614
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2615
|
+
}
|
|
3120
2616
|
)
|
|
3121
2617
|
}
|
|
3122
2618
|
|
|
3123
2619
|
removeLinkedWallet = (
|
|
3124
2620
|
req: RemoveLinkedWalletRequest,
|
|
3125
2621
|
headers?: object,
|
|
3126
|
-
signal?: AbortSignal
|
|
2622
|
+
signal?: AbortSignal
|
|
3127
2623
|
): Promise<RemoveLinkedWalletResponse> => {
|
|
3128
2624
|
return this.fetch(
|
|
3129
2625
|
this.url('RemoveLinkedWallet'),
|
|
3130
|
-
createHttpRequest(JsonEncode(req, 'RemoveLinkedWalletRequest'), headers, signal)
|
|
2626
|
+
createHttpRequest(JsonEncode(req, 'RemoveLinkedWalletRequest'), headers, signal)
|
|
3131
2627
|
).then(
|
|
3132
|
-
|
|
3133
|
-
return buildResponse(res).then(
|
|
2628
|
+
res => {
|
|
2629
|
+
return buildResponse(res).then(_data => {
|
|
3134
2630
|
return JsonDecode<RemoveLinkedWalletResponse>(_data, 'RemoveLinkedWalletResponse')
|
|
3135
2631
|
})
|
|
3136
2632
|
},
|
|
3137
|
-
|
|
3138
|
-
throw WebrpcRequestFailedError.new({
|
|
3139
|
-
|
|
3140
|
-
})
|
|
3141
|
-
},
|
|
2633
|
+
error => {
|
|
2634
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2635
|
+
}
|
|
3142
2636
|
)
|
|
3143
2637
|
}
|
|
3144
2638
|
|
|
3145
2639
|
generateWaaSVerificationURL = (
|
|
3146
2640
|
req: GenerateWaaSVerificationURLRequest,
|
|
3147
2641
|
headers?: object,
|
|
3148
|
-
signal?: AbortSignal
|
|
2642
|
+
signal?: AbortSignal
|
|
3149
2643
|
): Promise<GenerateWaaSVerificationURLResponse> => {
|
|
3150
2644
|
return this.fetch(
|
|
3151
2645
|
this.url('GenerateWaaSVerificationURL'),
|
|
3152
|
-
createHttpRequest(JsonEncode(req, 'GenerateWaaSVerificationURLRequest'), headers, signal)
|
|
2646
|
+
createHttpRequest(JsonEncode(req, 'GenerateWaaSVerificationURLRequest'), headers, signal)
|
|
3153
2647
|
).then(
|
|
3154
|
-
|
|
3155
|
-
return buildResponse(res).then(
|
|
2648
|
+
res => {
|
|
2649
|
+
return buildResponse(res).then(_data => {
|
|
3156
2650
|
return JsonDecode<GenerateWaaSVerificationURLResponse>(_data, 'GenerateWaaSVerificationURLResponse')
|
|
3157
2651
|
})
|
|
3158
2652
|
},
|
|
3159
|
-
|
|
3160
|
-
throw WebrpcRequestFailedError.new({
|
|
3161
|
-
|
|
3162
|
-
})
|
|
3163
|
-
},
|
|
2653
|
+
error => {
|
|
2654
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2655
|
+
}
|
|
3164
2656
|
)
|
|
3165
2657
|
}
|
|
3166
2658
|
|
|
3167
2659
|
validateWaaSVerificationNonce = (
|
|
3168
2660
|
req: ValidateWaaSVerificationNonceRequest,
|
|
3169
2661
|
headers?: object,
|
|
3170
|
-
signal?: AbortSignal
|
|
2662
|
+
signal?: AbortSignal
|
|
3171
2663
|
): Promise<ValidateWaaSVerificationNonceResponse> => {
|
|
3172
2664
|
return this.fetch(
|
|
3173
2665
|
this.url('ValidateWaaSVerificationNonce'),
|
|
3174
|
-
createHttpRequest(JsonEncode(req, 'ValidateWaaSVerificationNonceRequest'), headers, signal)
|
|
2666
|
+
createHttpRequest(JsonEncode(req, 'ValidateWaaSVerificationNonceRequest'), headers, signal)
|
|
3175
2667
|
).then(
|
|
3176
|
-
|
|
3177
|
-
return buildResponse(res).then(
|
|
2668
|
+
res => {
|
|
2669
|
+
return buildResponse(res).then(_data => {
|
|
3178
2670
|
return JsonDecode<ValidateWaaSVerificationNonceResponse>(_data, 'ValidateWaaSVerificationNonceResponse')
|
|
3179
2671
|
})
|
|
3180
2672
|
},
|
|
3181
|
-
|
|
3182
|
-
throw WebrpcRequestFailedError.new({
|
|
3183
|
-
|
|
3184
|
-
})
|
|
3185
|
-
},
|
|
2673
|
+
error => {
|
|
2674
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2675
|
+
}
|
|
3186
2676
|
)
|
|
3187
2677
|
}
|
|
3188
2678
|
|
|
3189
2679
|
listAdoptedWallets = (
|
|
3190
2680
|
req: ListAdoptedWalletsRequest,
|
|
3191
2681
|
headers?: object,
|
|
3192
|
-
signal?: AbortSignal
|
|
2682
|
+
signal?: AbortSignal
|
|
3193
2683
|
): Promise<ListAdoptedWalletsResponse> => {
|
|
3194
2684
|
return this.fetch(
|
|
3195
2685
|
this.url('ListAdoptedWallets'),
|
|
3196
|
-
createHttpRequest(JsonEncode(req, 'ListAdoptedWalletsRequest'), headers, signal)
|
|
2686
|
+
createHttpRequest(JsonEncode(req, 'ListAdoptedWalletsRequest'), headers, signal)
|
|
3197
2687
|
).then(
|
|
3198
|
-
|
|
3199
|
-
return buildResponse(res).then(
|
|
2688
|
+
res => {
|
|
2689
|
+
return buildResponse(res).then(_data => {
|
|
3200
2690
|
return JsonDecode<ListAdoptedWalletsResponse>(_data, 'ListAdoptedWalletsResponse')
|
|
3201
2691
|
})
|
|
3202
2692
|
},
|
|
3203
|
-
|
|
3204
|
-
throw WebrpcRequestFailedError.new({
|
|
3205
|
-
|
|
3206
|
-
})
|
|
3207
|
-
},
|
|
2693
|
+
error => {
|
|
2694
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2695
|
+
}
|
|
3208
2696
|
)
|
|
3209
2697
|
}
|
|
3210
2698
|
|
|
3211
2699
|
getLifiChains = (headers?: object, signal?: AbortSignal): Promise<GetLifiChainsResponse> => {
|
|
3212
2700
|
return this.fetch(this.url('GetLifiChains'), createHttpRequest('{}', headers, signal)).then(
|
|
3213
|
-
|
|
3214
|
-
return buildResponse(res).then(
|
|
2701
|
+
res => {
|
|
2702
|
+
return buildResponse(res).then(_data => {
|
|
3215
2703
|
return JsonDecode<GetLifiChainsResponse>(_data, 'GetLifiChainsResponse')
|
|
3216
2704
|
})
|
|
3217
2705
|
},
|
|
3218
|
-
|
|
3219
|
-
throw WebrpcRequestFailedError.new({
|
|
3220
|
-
|
|
3221
|
-
})
|
|
3222
|
-
},
|
|
2706
|
+
error => {
|
|
2707
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2708
|
+
}
|
|
3223
2709
|
)
|
|
3224
2710
|
}
|
|
3225
2711
|
|
|
3226
|
-
getLifiTokens = (
|
|
3227
|
-
req: GetLifiTokensRequest,
|
|
3228
|
-
headers?: object,
|
|
3229
|
-
signal?: AbortSignal,
|
|
3230
|
-
): Promise<GetLifiTokensResponse> => {
|
|
2712
|
+
getLifiTokens = (req: GetLifiTokensRequest, headers?: object, signal?: AbortSignal): Promise<GetLifiTokensResponse> => {
|
|
3231
2713
|
return this.fetch(
|
|
3232
2714
|
this.url('GetLifiTokens'),
|
|
3233
|
-
createHttpRequest(JsonEncode(req, 'GetLifiTokensRequest'), headers, signal)
|
|
2715
|
+
createHttpRequest(JsonEncode(req, 'GetLifiTokensRequest'), headers, signal)
|
|
3234
2716
|
).then(
|
|
3235
|
-
|
|
3236
|
-
return buildResponse(res).then(
|
|
2717
|
+
res => {
|
|
2718
|
+
return buildResponse(res).then(_data => {
|
|
3237
2719
|
return JsonDecode<GetLifiTokensResponse>(_data, 'GetLifiTokensResponse')
|
|
3238
2720
|
})
|
|
3239
2721
|
},
|
|
3240
|
-
|
|
3241
|
-
throw WebrpcRequestFailedError.new({
|
|
3242
|
-
|
|
3243
|
-
})
|
|
3244
|
-
},
|
|
2722
|
+
error => {
|
|
2723
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2724
|
+
}
|
|
3245
2725
|
)
|
|
3246
2726
|
}
|
|
3247
2727
|
|
|
3248
2728
|
getLifiSwapRoutes = (
|
|
3249
2729
|
req: GetLifiSwapRoutesRequest,
|
|
3250
2730
|
headers?: object,
|
|
3251
|
-
signal?: AbortSignal
|
|
2731
|
+
signal?: AbortSignal
|
|
3252
2732
|
): Promise<GetLifiSwapRoutesResponse> => {
|
|
3253
2733
|
return this.fetch(
|
|
3254
2734
|
this.url('GetLifiSwapRoutes'),
|
|
3255
|
-
createHttpRequest(JsonEncode(req, 'GetLifiSwapRoutesRequest'), headers, signal)
|
|
2735
|
+
createHttpRequest(JsonEncode(req, 'GetLifiSwapRoutesRequest'), headers, signal)
|
|
3256
2736
|
).then(
|
|
3257
|
-
|
|
3258
|
-
return buildResponse(res).then(
|
|
2737
|
+
res => {
|
|
2738
|
+
return buildResponse(res).then(_data => {
|
|
3259
2739
|
return JsonDecode<GetLifiSwapRoutesResponse>(_data, 'GetLifiSwapRoutesResponse')
|
|
3260
2740
|
})
|
|
3261
2741
|
},
|
|
3262
|
-
|
|
3263
|
-
throw WebrpcRequestFailedError.new({
|
|
3264
|
-
|
|
3265
|
-
})
|
|
3266
|
-
},
|
|
2742
|
+
error => {
|
|
2743
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2744
|
+
}
|
|
3267
2745
|
)
|
|
3268
2746
|
}
|
|
3269
2747
|
|
|
3270
2748
|
getLifiSwapQuote = (
|
|
3271
2749
|
req: GetLifiSwapQuoteRequest,
|
|
3272
2750
|
headers?: object,
|
|
3273
|
-
signal?: AbortSignal
|
|
2751
|
+
signal?: AbortSignal
|
|
3274
2752
|
): Promise<GetLifiSwapQuoteResponse> => {
|
|
3275
2753
|
return this.fetch(
|
|
3276
2754
|
this.url('GetLifiSwapQuote'),
|
|
3277
|
-
createHttpRequest(JsonEncode(req, 'GetLifiSwapQuoteRequest'), headers, signal)
|
|
2755
|
+
createHttpRequest(JsonEncode(req, 'GetLifiSwapQuoteRequest'), headers, signal)
|
|
3278
2756
|
).then(
|
|
3279
|
-
|
|
3280
|
-
return buildResponse(res).then(
|
|
2757
|
+
res => {
|
|
2758
|
+
return buildResponse(res).then(_data => {
|
|
3281
2759
|
return JsonDecode<GetLifiSwapQuoteResponse>(_data, 'GetLifiSwapQuoteResponse')
|
|
3282
2760
|
})
|
|
3283
2761
|
},
|
|
3284
|
-
|
|
3285
|
-
throw WebrpcRequestFailedError.new({
|
|
3286
|
-
|
|
3287
|
-
})
|
|
3288
|
-
},
|
|
3289
|
-
)
|
|
3290
|
-
}
|
|
3291
|
-
|
|
3292
|
-
getIntentCallsPayloads = (
|
|
3293
|
-
req: GetIntentCallsPayloadsRequest,
|
|
3294
|
-
headers?: object,
|
|
3295
|
-
signal?: AbortSignal,
|
|
3296
|
-
): Promise<GetIntentCallsPayloadsResponse> => {
|
|
3297
|
-
return this.fetch(
|
|
3298
|
-
this.url('GetIntentCallsPayloads'),
|
|
3299
|
-
createHttpRequest(JsonEncode(req, 'GetIntentCallsPayloadsRequest'), headers, signal),
|
|
3300
|
-
).then(
|
|
3301
|
-
(res) => {
|
|
3302
|
-
return buildResponse(res).then((_data) => {
|
|
3303
|
-
return JsonDecode<GetIntentCallsPayloadsResponse>(_data, 'GetIntentCallsPayloadsResponse')
|
|
3304
|
-
})
|
|
3305
|
-
},
|
|
3306
|
-
(error) => {
|
|
3307
|
-
throw WebrpcRequestFailedError.new({
|
|
3308
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
|
|
3309
|
-
})
|
|
3310
|
-
},
|
|
3311
|
-
)
|
|
3312
|
-
}
|
|
3313
|
-
|
|
3314
|
-
commitIntentConfig = (
|
|
3315
|
-
req: CommitIntentConfigRequest,
|
|
3316
|
-
headers?: object,
|
|
3317
|
-
signal?: AbortSignal,
|
|
3318
|
-
): Promise<CommitIntentConfigResponse> => {
|
|
3319
|
-
return this.fetch(
|
|
3320
|
-
this.url('CommitIntentConfig'),
|
|
3321
|
-
createHttpRequest(JsonEncode(req, 'CommitIntentConfigRequest'), headers, signal),
|
|
3322
|
-
).then(
|
|
3323
|
-
(res) => {
|
|
3324
|
-
return buildResponse(res).then((_data) => {
|
|
3325
|
-
return JsonDecode<CommitIntentConfigResponse>(_data, 'CommitIntentConfigResponse')
|
|
3326
|
-
})
|
|
3327
|
-
},
|
|
3328
|
-
(error) => {
|
|
3329
|
-
throw WebrpcRequestFailedError.new({
|
|
3330
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
|
|
3331
|
-
})
|
|
3332
|
-
},
|
|
3333
|
-
)
|
|
3334
|
-
}
|
|
3335
|
-
|
|
3336
|
-
getIntentConfig = (
|
|
3337
|
-
req: GetIntentConfigRequest,
|
|
3338
|
-
headers?: object,
|
|
3339
|
-
signal?: AbortSignal,
|
|
3340
|
-
): Promise<GetIntentConfigResponse> => {
|
|
3341
|
-
return this.fetch(
|
|
3342
|
-
this.url('GetIntentConfig'),
|
|
3343
|
-
createHttpRequest(JsonEncode(req, 'GetIntentConfigRequest'), headers, signal),
|
|
3344
|
-
).then(
|
|
3345
|
-
(res) => {
|
|
3346
|
-
return buildResponse(res).then((_data) => {
|
|
3347
|
-
return JsonDecode<GetIntentConfigResponse>(_data, 'GetIntentConfigResponse')
|
|
3348
|
-
})
|
|
3349
|
-
},
|
|
3350
|
-
(error) => {
|
|
3351
|
-
throw WebrpcRequestFailedError.new({
|
|
3352
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
|
|
3353
|
-
})
|
|
3354
|
-
},
|
|
2762
|
+
error => {
|
|
2763
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2764
|
+
}
|
|
3355
2765
|
)
|
|
3356
2766
|
}
|
|
3357
2767
|
|
|
3358
2768
|
listCurrencyGroups = (headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsResponse> => {
|
|
3359
2769
|
return this.fetch(this.url('ListCurrencyGroups'), createHttpRequest('{}', headers, signal)).then(
|
|
3360
|
-
|
|
3361
|
-
return buildResponse(res).then(
|
|
2770
|
+
res => {
|
|
2771
|
+
return buildResponse(res).then(_data => {
|
|
3362
2772
|
return JsonDecode<ListCurrencyGroupsResponse>(_data, 'ListCurrencyGroupsResponse')
|
|
3363
2773
|
})
|
|
3364
2774
|
},
|
|
3365
|
-
|
|
3366
|
-
throw WebrpcRequestFailedError.new({
|
|
3367
|
-
|
|
3368
|
-
})
|
|
3369
|
-
},
|
|
2775
|
+
error => {
|
|
2776
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2777
|
+
}
|
|
3370
2778
|
)
|
|
3371
2779
|
}
|
|
3372
2780
|
|
|
3373
2781
|
addOffchainInventory = (
|
|
3374
2782
|
req: AddOffchainInventoryRequest,
|
|
3375
2783
|
headers?: object,
|
|
3376
|
-
signal?: AbortSignal
|
|
2784
|
+
signal?: AbortSignal
|
|
3377
2785
|
): Promise<AddOffchainInventoryResponse> => {
|
|
3378
2786
|
return this.fetch(
|
|
3379
2787
|
this.url('AddOffchainInventory'),
|
|
3380
|
-
createHttpRequest(JsonEncode(req, 'AddOffchainInventoryRequest'), headers, signal)
|
|
2788
|
+
createHttpRequest(JsonEncode(req, 'AddOffchainInventoryRequest'), headers, signal)
|
|
3381
2789
|
).then(
|
|
3382
|
-
|
|
3383
|
-
return buildResponse(res).then(
|
|
2790
|
+
res => {
|
|
2791
|
+
return buildResponse(res).then(_data => {
|
|
3384
2792
|
return JsonDecode<AddOffchainInventoryResponse>(_data, 'AddOffchainInventoryResponse')
|
|
3385
2793
|
})
|
|
3386
2794
|
},
|
|
3387
|
-
|
|
3388
|
-
throw WebrpcRequestFailedError.new({
|
|
3389
|
-
|
|
3390
|
-
})
|
|
3391
|
-
},
|
|
2795
|
+
error => {
|
|
2796
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2797
|
+
}
|
|
3392
2798
|
)
|
|
3393
2799
|
}
|
|
3394
2800
|
|
|
3395
2801
|
getOffchainInventory = (
|
|
3396
2802
|
req: GetOffchainInventoryRequest,
|
|
3397
2803
|
headers?: object,
|
|
3398
|
-
signal?: AbortSignal
|
|
2804
|
+
signal?: AbortSignal
|
|
3399
2805
|
): Promise<GetOffchainInventoryResponse> => {
|
|
3400
2806
|
return this.fetch(
|
|
3401
2807
|
this.url('GetOffchainInventory'),
|
|
3402
|
-
createHttpRequest(JsonEncode(req, 'GetOffchainInventoryRequest'), headers, signal)
|
|
2808
|
+
createHttpRequest(JsonEncode(req, 'GetOffchainInventoryRequest'), headers, signal)
|
|
3403
2809
|
).then(
|
|
3404
|
-
|
|
3405
|
-
return buildResponse(res).then(
|
|
2810
|
+
res => {
|
|
2811
|
+
return buildResponse(res).then(_data => {
|
|
3406
2812
|
return JsonDecode<GetOffchainInventoryResponse>(_data, 'GetOffchainInventoryResponse')
|
|
3407
2813
|
})
|
|
3408
2814
|
},
|
|
3409
|
-
|
|
3410
|
-
throw WebrpcRequestFailedError.new({
|
|
3411
|
-
|
|
3412
|
-
})
|
|
3413
|
-
},
|
|
2815
|
+
error => {
|
|
2816
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2817
|
+
}
|
|
3414
2818
|
)
|
|
3415
2819
|
}
|
|
3416
2820
|
|
|
3417
2821
|
listOffchainInventories = (
|
|
3418
2822
|
req: ListOffchainInventoriesRequest,
|
|
3419
2823
|
headers?: object,
|
|
3420
|
-
signal?: AbortSignal
|
|
2824
|
+
signal?: AbortSignal
|
|
3421
2825
|
): Promise<ListOffchainInventoriesResponse> => {
|
|
3422
2826
|
return this.fetch(
|
|
3423
2827
|
this.url('ListOffchainInventories'),
|
|
3424
|
-
createHttpRequest(JsonEncode(req, 'ListOffchainInventoriesRequest'), headers, signal)
|
|
2828
|
+
createHttpRequest(JsonEncode(req, 'ListOffchainInventoriesRequest'), headers, signal)
|
|
3425
2829
|
).then(
|
|
3426
|
-
|
|
3427
|
-
return buildResponse(res).then(
|
|
2830
|
+
res => {
|
|
2831
|
+
return buildResponse(res).then(_data => {
|
|
3428
2832
|
return JsonDecode<ListOffchainInventoriesResponse>(_data, 'ListOffchainInventoriesResponse')
|
|
3429
2833
|
})
|
|
3430
2834
|
},
|
|
3431
|
-
|
|
3432
|
-
throw WebrpcRequestFailedError.new({
|
|
3433
|
-
|
|
3434
|
-
})
|
|
3435
|
-
},
|
|
2835
|
+
error => {
|
|
2836
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2837
|
+
}
|
|
3436
2838
|
)
|
|
3437
2839
|
}
|
|
3438
2840
|
|
|
3439
2841
|
updateOffchainInventory = (
|
|
3440
2842
|
req: UpdateOffchainInventoryRequest,
|
|
3441
2843
|
headers?: object,
|
|
3442
|
-
signal?: AbortSignal
|
|
2844
|
+
signal?: AbortSignal
|
|
3443
2845
|
): Promise<UpdateOffchainInventoryResponse> => {
|
|
3444
2846
|
return this.fetch(
|
|
3445
2847
|
this.url('UpdateOffchainInventory'),
|
|
3446
|
-
createHttpRequest(JsonEncode(req, 'UpdateOffchainInventoryRequest'), headers, signal)
|
|
2848
|
+
createHttpRequest(JsonEncode(req, 'UpdateOffchainInventoryRequest'), headers, signal)
|
|
3447
2849
|
).then(
|
|
3448
|
-
|
|
3449
|
-
return buildResponse(res).then(
|
|
2850
|
+
res => {
|
|
2851
|
+
return buildResponse(res).then(_data => {
|
|
3450
2852
|
return JsonDecode<UpdateOffchainInventoryResponse>(_data, 'UpdateOffchainInventoryResponse')
|
|
3451
2853
|
})
|
|
3452
2854
|
},
|
|
3453
|
-
|
|
3454
|
-
throw WebrpcRequestFailedError.new({
|
|
3455
|
-
|
|
3456
|
-
})
|
|
3457
|
-
},
|
|
2855
|
+
error => {
|
|
2856
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2857
|
+
}
|
|
3458
2858
|
)
|
|
3459
2859
|
}
|
|
3460
2860
|
|
|
3461
2861
|
deleteOffchainInventory = (
|
|
3462
2862
|
req: DeleteOffchainInventoryRequest,
|
|
3463
2863
|
headers?: object,
|
|
3464
|
-
signal?: AbortSignal
|
|
2864
|
+
signal?: AbortSignal
|
|
3465
2865
|
): Promise<DeleteOffchainInventoryResponse> => {
|
|
3466
2866
|
return this.fetch(
|
|
3467
2867
|
this.url('DeleteOffchainInventory'),
|
|
3468
|
-
createHttpRequest(JsonEncode(req, 'DeleteOffchainInventoryRequest'), headers, signal)
|
|
2868
|
+
createHttpRequest(JsonEncode(req, 'DeleteOffchainInventoryRequest'), headers, signal)
|
|
3469
2869
|
).then(
|
|
3470
|
-
|
|
3471
|
-
return buildResponse(res).then(
|
|
2870
|
+
res => {
|
|
2871
|
+
return buildResponse(res).then(_data => {
|
|
3472
2872
|
return JsonDecode<DeleteOffchainInventoryResponse>(_data, 'DeleteOffchainInventoryResponse')
|
|
3473
2873
|
})
|
|
3474
2874
|
},
|
|
3475
|
-
|
|
3476
|
-
throw WebrpcRequestFailedError.new({
|
|
3477
|
-
|
|
3478
|
-
})
|
|
3479
|
-
},
|
|
2875
|
+
error => {
|
|
2876
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2877
|
+
}
|
|
3480
2878
|
)
|
|
3481
2879
|
}
|
|
3482
2880
|
|
|
3483
2881
|
requestOffchainPayment = (
|
|
3484
2882
|
req: RequestOffchainPaymentRequest,
|
|
3485
2883
|
headers?: object,
|
|
3486
|
-
signal?: AbortSignal
|
|
2884
|
+
signal?: AbortSignal
|
|
3487
2885
|
): Promise<RequestOffchainPaymentResponse> => {
|
|
3488
2886
|
return this.fetch(
|
|
3489
2887
|
this.url('RequestOffchainPayment'),
|
|
3490
|
-
createHttpRequest(JsonEncode(req, 'RequestOffchainPaymentRequest'), headers, signal)
|
|
2888
|
+
createHttpRequest(JsonEncode(req, 'RequestOffchainPaymentRequest'), headers, signal)
|
|
3491
2889
|
).then(
|
|
3492
|
-
|
|
3493
|
-
return buildResponse(res).then(
|
|
2890
|
+
res => {
|
|
2891
|
+
return buildResponse(res).then(_data => {
|
|
3494
2892
|
return JsonDecode<RequestOffchainPaymentResponse>(_data, 'RequestOffchainPaymentResponse')
|
|
3495
2893
|
})
|
|
3496
2894
|
},
|
|
3497
|
-
|
|
3498
|
-
throw WebrpcRequestFailedError.new({
|
|
3499
|
-
|
|
3500
|
-
})
|
|
3501
|
-
},
|
|
2895
|
+
error => {
|
|
2896
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2897
|
+
}
|
|
3502
2898
|
)
|
|
3503
2899
|
}
|
|
3504
2900
|
|
|
3505
2901
|
listOffchainPayments = (
|
|
3506
2902
|
req: ListOffchainPaymentsRequest,
|
|
3507
2903
|
headers?: object,
|
|
3508
|
-
signal?: AbortSignal
|
|
2904
|
+
signal?: AbortSignal
|
|
3509
2905
|
): Promise<ListOffchainPaymentsResponse> => {
|
|
3510
2906
|
return this.fetch(
|
|
3511
2907
|
this.url('ListOffchainPayments'),
|
|
3512
|
-
createHttpRequest(JsonEncode(req, 'ListOffchainPaymentsRequest'), headers, signal)
|
|
2908
|
+
createHttpRequest(JsonEncode(req, 'ListOffchainPaymentsRequest'), headers, signal)
|
|
3513
2909
|
).then(
|
|
3514
|
-
|
|
3515
|
-
return buildResponse(res).then(
|
|
2910
|
+
res => {
|
|
2911
|
+
return buildResponse(res).then(_data => {
|
|
3516
2912
|
return JsonDecode<ListOffchainPaymentsResponse>(_data, 'ListOffchainPaymentsResponse')
|
|
3517
2913
|
})
|
|
3518
2914
|
},
|
|
3519
|
-
|
|
3520
|
-
throw WebrpcRequestFailedError.new({
|
|
3521
|
-
|
|
3522
|
-
})
|
|
3523
|
-
},
|
|
2915
|
+
error => {
|
|
2916
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2917
|
+
}
|
|
3524
2918
|
)
|
|
3525
2919
|
}
|
|
3526
2920
|
|
|
3527
2921
|
savePack = (req: SavePackRequest, headers?: object, signal?: AbortSignal): Promise<SavePackResponse> => {
|
|
3528
|
-
return this.fetch(
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
).then(
|
|
3532
|
-
(res) => {
|
|
3533
|
-
return buildResponse(res).then((_data) => {
|
|
2922
|
+
return this.fetch(this.url('SavePack'), createHttpRequest(JsonEncode(req, 'SavePackRequest'), headers, signal)).then(
|
|
2923
|
+
res => {
|
|
2924
|
+
return buildResponse(res).then(_data => {
|
|
3534
2925
|
return JsonDecode<SavePackResponse>(_data, 'SavePackResponse')
|
|
3535
2926
|
})
|
|
3536
2927
|
},
|
|
3537
|
-
|
|
3538
|
-
throw WebrpcRequestFailedError.new({
|
|
3539
|
-
|
|
3540
|
-
})
|
|
3541
|
-
},
|
|
2928
|
+
error => {
|
|
2929
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2930
|
+
}
|
|
3542
2931
|
)
|
|
3543
2932
|
}
|
|
3544
2933
|
|
|
3545
2934
|
getPack = (req: GetPackRequest, headers?: object, signal?: AbortSignal): Promise<GetPackResponse> => {
|
|
3546
2935
|
return this.fetch(this.url('GetPack'), createHttpRequest(JsonEncode(req, 'GetPackRequest'), headers, signal)).then(
|
|
3547
|
-
|
|
3548
|
-
return buildResponse(res).then(
|
|
2936
|
+
res => {
|
|
2937
|
+
return buildResponse(res).then(_data => {
|
|
3549
2938
|
return JsonDecode<GetPackResponse>(_data, 'GetPackResponse')
|
|
3550
2939
|
})
|
|
3551
2940
|
},
|
|
3552
|
-
|
|
3553
|
-
throw WebrpcRequestFailedError.new({
|
|
3554
|
-
|
|
3555
|
-
})
|
|
3556
|
-
},
|
|
2941
|
+
error => {
|
|
2942
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2943
|
+
}
|
|
3557
2944
|
)
|
|
3558
2945
|
}
|
|
3559
2946
|
|
|
3560
2947
|
getPackIds = (req: GetPackIdsRequest, headers?: object, signal?: AbortSignal): Promise<GetPackIdsResponse> => {
|
|
3561
|
-
return this.fetch(
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
).then(
|
|
3565
|
-
(res) => {
|
|
3566
|
-
return buildResponse(res).then((_data) => {
|
|
2948
|
+
return this.fetch(this.url('GetPackIds'), createHttpRequest(JsonEncode(req, 'GetPackIdsRequest'), headers, signal)).then(
|
|
2949
|
+
res => {
|
|
2950
|
+
return buildResponse(res).then(_data => {
|
|
3567
2951
|
return JsonDecode<GetPackIdsResponse>(_data, 'GetPackIdsResponse')
|
|
3568
2952
|
})
|
|
3569
2953
|
},
|
|
3570
|
-
|
|
3571
|
-
throw WebrpcRequestFailedError.new({
|
|
3572
|
-
|
|
3573
|
-
})
|
|
3574
|
-
},
|
|
2954
|
+
error => {
|
|
2955
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2956
|
+
}
|
|
3575
2957
|
)
|
|
3576
2958
|
}
|
|
3577
2959
|
|
|
3578
2960
|
deletePack = (req: DeletePackRequest, headers?: object, signal?: AbortSignal): Promise<DeletePackResponse> => {
|
|
3579
|
-
return this.fetch(
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
).then(
|
|
3583
|
-
(res) => {
|
|
3584
|
-
return buildResponse(res).then((_data) => {
|
|
2961
|
+
return this.fetch(this.url('DeletePack'), createHttpRequest(JsonEncode(req, 'DeletePackRequest'), headers, signal)).then(
|
|
2962
|
+
res => {
|
|
2963
|
+
return buildResponse(res).then(_data => {
|
|
3585
2964
|
return JsonDecode<DeletePackResponse>(_data, 'DeletePackResponse')
|
|
3586
2965
|
})
|
|
3587
2966
|
},
|
|
3588
|
-
|
|
3589
|
-
throw WebrpcRequestFailedError.new({
|
|
3590
|
-
|
|
3591
|
-
})
|
|
3592
|
-
},
|
|
2967
|
+
error => {
|
|
2968
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2969
|
+
}
|
|
3593
2970
|
)
|
|
3594
2971
|
}
|
|
3595
2972
|
|
|
3596
2973
|
updatePackContent = (
|
|
3597
2974
|
req: UpdatePackContentRequest,
|
|
3598
2975
|
headers?: object,
|
|
3599
|
-
signal?: AbortSignal
|
|
2976
|
+
signal?: AbortSignal
|
|
3600
2977
|
): Promise<UpdatePackContentResponse> => {
|
|
3601
2978
|
return this.fetch(
|
|
3602
2979
|
this.url('UpdatePackContent'),
|
|
3603
|
-
createHttpRequest(JsonEncode(req, 'UpdatePackContentRequest'), headers, signal)
|
|
2980
|
+
createHttpRequest(JsonEncode(req, 'UpdatePackContentRequest'), headers, signal)
|
|
3604
2981
|
).then(
|
|
3605
|
-
|
|
3606
|
-
return buildResponse(res).then(
|
|
2982
|
+
res => {
|
|
2983
|
+
return buildResponse(res).then(_data => {
|
|
3607
2984
|
return JsonDecode<UpdatePackContentResponse>(_data, 'UpdatePackContentResponse')
|
|
3608
2985
|
})
|
|
3609
2986
|
},
|
|
3610
|
-
|
|
3611
|
-
throw WebrpcRequestFailedError.new({
|
|
3612
|
-
|
|
3613
|
-
})
|
|
3614
|
-
},
|
|
2987
|
+
error => {
|
|
2988
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2989
|
+
}
|
|
3615
2990
|
)
|
|
3616
2991
|
}
|
|
3617
2992
|
|
|
3618
|
-
getRevealTxData = (
|
|
3619
|
-
req: GetRevealTxDataRequest,
|
|
3620
|
-
headers?: object,
|
|
3621
|
-
signal?: AbortSignal,
|
|
3622
|
-
): Promise<GetRevealTxDataResponse> => {
|
|
2993
|
+
getRevealTxData = (req: GetRevealTxDataRequest, headers?: object, signal?: AbortSignal): Promise<GetRevealTxDataResponse> => {
|
|
3623
2994
|
return this.fetch(
|
|
3624
2995
|
this.url('GetRevealTxData'),
|
|
3625
|
-
createHttpRequest(JsonEncode(req, 'GetRevealTxDataRequest'), headers, signal)
|
|
2996
|
+
createHttpRequest(JsonEncode(req, 'GetRevealTxDataRequest'), headers, signal)
|
|
3626
2997
|
).then(
|
|
3627
|
-
|
|
3628
|
-
return buildResponse(res).then(
|
|
2998
|
+
res => {
|
|
2999
|
+
return buildResponse(res).then(_data => {
|
|
3629
3000
|
return JsonDecode<GetRevealTxDataResponse>(_data, 'GetRevealTxDataResponse')
|
|
3630
3001
|
})
|
|
3631
3002
|
},
|
|
3632
|
-
|
|
3633
|
-
throw WebrpcRequestFailedError.new({
|
|
3634
|
-
|
|
3635
|
-
})
|
|
3636
|
-
},
|
|
3003
|
+
error => {
|
|
3004
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3005
|
+
}
|
|
3637
3006
|
)
|
|
3638
3007
|
}
|
|
3639
3008
|
|
|
3640
3009
|
checkoutOptionsPrimary = (
|
|
3641
3010
|
req: CheckoutOptionsPrimaryRequest,
|
|
3642
3011
|
headers?: object,
|
|
3643
|
-
signal?: AbortSignal
|
|
3012
|
+
signal?: AbortSignal
|
|
3644
3013
|
): Promise<CheckoutOptionsPrimaryResponse> => {
|
|
3645
3014
|
return this.fetch(
|
|
3646
3015
|
this.url('CheckoutOptionsPrimary'),
|
|
3647
|
-
createHttpRequest(JsonEncode(req, 'CheckoutOptionsPrimaryRequest'), headers, signal)
|
|
3016
|
+
createHttpRequest(JsonEncode(req, 'CheckoutOptionsPrimaryRequest'), headers, signal)
|
|
3648
3017
|
).then(
|
|
3649
|
-
|
|
3650
|
-
return buildResponse(res).then(
|
|
3018
|
+
res => {
|
|
3019
|
+
return buildResponse(res).then(_data => {
|
|
3651
3020
|
return JsonDecode<CheckoutOptionsPrimaryResponse>(_data, 'CheckoutOptionsPrimaryResponse')
|
|
3652
3021
|
})
|
|
3653
3022
|
},
|
|
3654
|
-
|
|
3655
|
-
throw WebrpcRequestFailedError.new({
|
|
3656
|
-
|
|
3657
|
-
})
|
|
3658
|
-
},
|
|
3023
|
+
error => {
|
|
3024
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3025
|
+
}
|
|
3659
3026
|
)
|
|
3660
3027
|
}
|
|
3661
3028
|
|
|
3662
3029
|
checkoutOptionsSecondary = (
|
|
3663
3030
|
req: CheckoutOptionsSecondaryRequest,
|
|
3664
3031
|
headers?: object,
|
|
3665
|
-
signal?: AbortSignal
|
|
3032
|
+
signal?: AbortSignal
|
|
3666
3033
|
): Promise<CheckoutOptionsSecondaryResponse> => {
|
|
3667
3034
|
return this.fetch(
|
|
3668
3035
|
this.url('CheckoutOptionsSecondary'),
|
|
3669
|
-
createHttpRequest(JsonEncode(req, 'CheckoutOptionsSecondaryRequest'), headers, signal)
|
|
3036
|
+
createHttpRequest(JsonEncode(req, 'CheckoutOptionsSecondaryRequest'), headers, signal)
|
|
3670
3037
|
).then(
|
|
3671
|
-
|
|
3672
|
-
return buildResponse(res).then(
|
|
3038
|
+
res => {
|
|
3039
|
+
return buildResponse(res).then(_data => {
|
|
3673
3040
|
return JsonDecode<CheckoutOptionsSecondaryResponse>(_data, 'CheckoutOptionsSecondaryResponse')
|
|
3674
3041
|
})
|
|
3675
3042
|
},
|
|
3676
|
-
|
|
3677
|
-
throw WebrpcRequestFailedError.new({
|
|
3678
|
-
|
|
3679
|
-
})
|
|
3680
|
-
},
|
|
3043
|
+
error => {
|
|
3044
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3045
|
+
}
|
|
3681
3046
|
)
|
|
3682
3047
|
}
|
|
3683
3048
|
|
|
3684
3049
|
checkoutOptionsGetTransakContractID = (
|
|
3685
3050
|
req: CheckoutOptionsGetTransakContractIDRequest,
|
|
3686
3051
|
headers?: object,
|
|
3687
|
-
signal?: AbortSignal
|
|
3052
|
+
signal?: AbortSignal
|
|
3688
3053
|
): Promise<CheckoutOptionsGetTransakContractIDResponse> => {
|
|
3689
3054
|
return this.fetch(
|
|
3690
3055
|
this.url('CheckoutOptionsGetTransakContractID'),
|
|
3691
|
-
createHttpRequest(JsonEncode(req, 'CheckoutOptionsGetTransakContractIDRequest'), headers, signal)
|
|
3056
|
+
createHttpRequest(JsonEncode(req, 'CheckoutOptionsGetTransakContractIDRequest'), headers, signal)
|
|
3692
3057
|
).then(
|
|
3693
|
-
|
|
3694
|
-
return buildResponse(res).then(
|
|
3695
|
-
return JsonDecode<CheckoutOptionsGetTransakContractIDResponse>(
|
|
3696
|
-
_data,
|
|
3697
|
-
'CheckoutOptionsGetTransakContractIDResponse',
|
|
3698
|
-
)
|
|
3699
|
-
})
|
|
3700
|
-
},
|
|
3701
|
-
(error) => {
|
|
3702
|
-
throw WebrpcRequestFailedError.new({
|
|
3703
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
|
|
3058
|
+
res => {
|
|
3059
|
+
return buildResponse(res).then(_data => {
|
|
3060
|
+
return JsonDecode<CheckoutOptionsGetTransakContractIDResponse>(_data, 'CheckoutOptionsGetTransakContractIDResponse')
|
|
3704
3061
|
})
|
|
3705
3062
|
},
|
|
3063
|
+
error => {
|
|
3064
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3065
|
+
}
|
|
3706
3066
|
)
|
|
3707
3067
|
}
|
|
3708
3068
|
|
|
3709
3069
|
fortePayCreateIntent = (
|
|
3710
3070
|
req: FortePayCreateIntentRequest,
|
|
3711
3071
|
headers?: object,
|
|
3712
|
-
signal?: AbortSignal
|
|
3072
|
+
signal?: AbortSignal
|
|
3713
3073
|
): Promise<FortePayCreateIntentResponse> => {
|
|
3714
3074
|
return this.fetch(
|
|
3715
3075
|
this.url('FortePayCreateIntent'),
|
|
3716
|
-
createHttpRequest(JsonEncode(req, 'FortePayCreateIntentRequest'), headers, signal)
|
|
3076
|
+
createHttpRequest(JsonEncode(req, 'FortePayCreateIntentRequest'), headers, signal)
|
|
3717
3077
|
).then(
|
|
3718
|
-
|
|
3719
|
-
return buildResponse(res).then(
|
|
3078
|
+
res => {
|
|
3079
|
+
return buildResponse(res).then(_data => {
|
|
3720
3080
|
return JsonDecode<FortePayCreateIntentResponse>(_data, 'FortePayCreateIntentResponse')
|
|
3721
3081
|
})
|
|
3722
3082
|
},
|
|
3723
|
-
|
|
3724
|
-
throw WebrpcRequestFailedError.new({
|
|
3725
|
-
|
|
3726
|
-
})
|
|
3727
|
-
},
|
|
3083
|
+
error => {
|
|
3084
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3085
|
+
}
|
|
3728
3086
|
)
|
|
3729
3087
|
}
|
|
3730
3088
|
|
|
3731
3089
|
fortePayGetPaymentStatuses = (
|
|
3732
3090
|
req: FortePayGetPaymentStatusesRequest,
|
|
3733
3091
|
headers?: object,
|
|
3734
|
-
signal?: AbortSignal
|
|
3092
|
+
signal?: AbortSignal
|
|
3735
3093
|
): Promise<FortePayGetPaymentStatusesResponse> => {
|
|
3736
3094
|
return this.fetch(
|
|
3737
3095
|
this.url('FortePayGetPaymentStatuses'),
|
|
3738
|
-
createHttpRequest(JsonEncode(req, 'FortePayGetPaymentStatusesRequest'), headers, signal)
|
|
3096
|
+
createHttpRequest(JsonEncode(req, 'FortePayGetPaymentStatusesRequest'), headers, signal)
|
|
3739
3097
|
).then(
|
|
3740
|
-
|
|
3741
|
-
return buildResponse(res).then(
|
|
3098
|
+
res => {
|
|
3099
|
+
return buildResponse(res).then(_data => {
|
|
3742
3100
|
return JsonDecode<FortePayGetPaymentStatusesResponse>(_data, 'FortePayGetPaymentStatusesResponse')
|
|
3743
3101
|
})
|
|
3744
3102
|
},
|
|
3745
|
-
|
|
3746
|
-
throw WebrpcRequestFailedError.new({
|
|
3747
|
-
|
|
3748
|
-
})
|
|
3749
|
-
},
|
|
3750
|
-
)
|
|
3751
|
-
}
|
|
3752
|
-
|
|
3753
|
-
getCCTPTransfer = (
|
|
3754
|
-
req: GetCCTPTransferRequest,
|
|
3755
|
-
headers?: object,
|
|
3756
|
-
signal?: AbortSignal,
|
|
3757
|
-
): Promise<GetCCTPTransferResponse> => {
|
|
3758
|
-
return this.fetch(
|
|
3759
|
-
this.url('GetCCTPTransfer'),
|
|
3760
|
-
createHttpRequest(JsonEncode(req, 'GetCCTPTransferRequest'), headers, signal),
|
|
3761
|
-
).then(
|
|
3762
|
-
(res) => {
|
|
3763
|
-
return buildResponse(res).then((_data) => {
|
|
3764
|
-
return JsonDecode<GetCCTPTransferResponse>(_data, 'GetCCTPTransferResponse')
|
|
3765
|
-
})
|
|
3766
|
-
},
|
|
3767
|
-
(error) => {
|
|
3768
|
-
throw WebrpcRequestFailedError.new({
|
|
3769
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
|
|
3770
|
-
})
|
|
3771
|
-
},
|
|
3772
|
-
)
|
|
3773
|
-
}
|
|
3774
|
-
|
|
3775
|
-
queueCCTPTransfer = (
|
|
3776
|
-
req: QueueCCTPTransferRequest,
|
|
3777
|
-
headers?: object,
|
|
3778
|
-
signal?: AbortSignal,
|
|
3779
|
-
): Promise<QueueCCTPTransferResponse> => {
|
|
3780
|
-
return this.fetch(
|
|
3781
|
-
this.url('QueueCCTPTransfer'),
|
|
3782
|
-
createHttpRequest(JsonEncode(req, 'QueueCCTPTransferRequest'), headers, signal),
|
|
3783
|
-
).then(
|
|
3784
|
-
(res) => {
|
|
3785
|
-
return buildResponse(res).then((_data) => {
|
|
3786
|
-
return JsonDecode<QueueCCTPTransferResponse>(_data, 'QueueCCTPTransferResponse')
|
|
3787
|
-
})
|
|
3788
|
-
},
|
|
3789
|
-
(error) => {
|
|
3790
|
-
throw WebrpcRequestFailedError.new({
|
|
3791
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
|
|
3792
|
-
})
|
|
3793
|
-
},
|
|
3794
|
-
)
|
|
3795
|
-
}
|
|
3796
|
-
|
|
3797
|
-
queueIntentConfigExecution = (
|
|
3798
|
-
req: QueueIntentConfigExecutionRequest,
|
|
3799
|
-
headers?: object,
|
|
3800
|
-
signal?: AbortSignal,
|
|
3801
|
-
): Promise<QueueIntentConfigExecutionResponse> => {
|
|
3802
|
-
return this.fetch(
|
|
3803
|
-
this.url('QueueIntentConfigExecution'),
|
|
3804
|
-
createHttpRequest(JsonEncode(req, 'QueueIntentConfigExecutionRequest'), headers, signal),
|
|
3805
|
-
).then(
|
|
3806
|
-
(res) => {
|
|
3807
|
-
return buildResponse(res).then((_data) => {
|
|
3808
|
-
return JsonDecode<QueueIntentConfigExecutionResponse>(_data, 'QueueIntentConfigExecutionResponse')
|
|
3809
|
-
})
|
|
3810
|
-
},
|
|
3811
|
-
(error) => {
|
|
3812
|
-
throw WebrpcRequestFailedError.new({
|
|
3813
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
|
|
3814
|
-
})
|
|
3815
|
-
},
|
|
3816
|
-
)
|
|
3817
|
-
}
|
|
3818
|
-
|
|
3819
|
-
getIntentConfigExecutionStatus = (
|
|
3820
|
-
req: GetIntentConfigExecutionStatusRequest,
|
|
3821
|
-
headers?: object,
|
|
3822
|
-
signal?: AbortSignal,
|
|
3823
|
-
): Promise<GetIntentConfigExecutionStatusResponse> => {
|
|
3824
|
-
return this.fetch(
|
|
3825
|
-
this.url('GetIntentConfigExecutionStatus'),
|
|
3826
|
-
createHttpRequest(JsonEncode(req, 'GetIntentConfigExecutionStatusRequest'), headers, signal),
|
|
3827
|
-
).then(
|
|
3828
|
-
(res) => {
|
|
3829
|
-
return buildResponse(res).then((_data) => {
|
|
3830
|
-
return JsonDecode<GetIntentConfigExecutionStatusResponse>(_data, 'GetIntentConfigExecutionStatusResponse')
|
|
3831
|
-
})
|
|
3832
|
-
},
|
|
3833
|
-
(error) => {
|
|
3834
|
-
throw WebrpcRequestFailedError.new({
|
|
3835
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
|
|
3836
|
-
})
|
|
3837
|
-
},
|
|
3838
|
-
)
|
|
3839
|
-
}
|
|
3840
|
-
|
|
3841
|
-
listIntentConfigs = (
|
|
3842
|
-
req: ListIntentConfigsRequest,
|
|
3843
|
-
headers?: object,
|
|
3844
|
-
signal?: AbortSignal,
|
|
3845
|
-
): Promise<ListIntentConfigsResponse> => {
|
|
3846
|
-
return this.fetch(
|
|
3847
|
-
this.url('ListIntentConfigs'),
|
|
3848
|
-
createHttpRequest(JsonEncode(req, 'ListIntentConfigsRequest'), headers, signal),
|
|
3849
|
-
).then(
|
|
3850
|
-
(res) => {
|
|
3851
|
-
return buildResponse(res).then((_data) => {
|
|
3852
|
-
return JsonDecode<ListIntentConfigsResponse>(_data, 'ListIntentConfigsResponse')
|
|
3853
|
-
})
|
|
3854
|
-
},
|
|
3855
|
-
(error) => {
|
|
3856
|
-
throw WebrpcRequestFailedError.new({
|
|
3857
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
|
|
3858
|
-
})
|
|
3859
|
-
},
|
|
3860
|
-
)
|
|
3861
|
-
}
|
|
3862
|
-
|
|
3863
|
-
queueMetaTxnReceipt = (
|
|
3864
|
-
req: QueueMetaTxnReceiptRequest,
|
|
3865
|
-
headers?: object,
|
|
3866
|
-
signal?: AbortSignal,
|
|
3867
|
-
): Promise<QueueMetaTxnReceiptResponse> => {
|
|
3868
|
-
return this.fetch(
|
|
3869
|
-
this.url('QueueMetaTxnReceipt'),
|
|
3870
|
-
createHttpRequest(JsonEncode(req, 'QueueMetaTxnReceiptRequest'), headers, signal),
|
|
3871
|
-
).then(
|
|
3872
|
-
(res) => {
|
|
3873
|
-
return buildResponse(res).then((_data) => {
|
|
3874
|
-
return JsonDecode<QueueMetaTxnReceiptResponse>(_data, 'QueueMetaTxnReceiptResponse')
|
|
3875
|
-
})
|
|
3876
|
-
},
|
|
3877
|
-
(error) => {
|
|
3878
|
-
throw WebrpcRequestFailedError.new({
|
|
3879
|
-
cause: `fetch(): ${error instanceof Error ? error.message : String(error)}`,
|
|
3880
|
-
})
|
|
3881
|
-
},
|
|
3103
|
+
error => {
|
|
3104
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3105
|
+
}
|
|
3882
3106
|
)
|
|
3883
3107
|
}
|
|
3884
3108
|
}
|
|
@@ -3887,20 +3111,20 @@ const createHttpRequest = (body: string = '{}', headers: object = {}, signal: Ab
|
|
|
3887
3111
|
const reqHeaders: { [key: string]: string } = {
|
|
3888
3112
|
...headers,
|
|
3889
3113
|
'Content-Type': 'application/json',
|
|
3890
|
-
[WebrpcHeader]: WebrpcHeaderValue
|
|
3114
|
+
[WebrpcHeader]: WebrpcHeaderValue
|
|
3891
3115
|
}
|
|
3892
3116
|
return { method: 'POST', headers: reqHeaders, body, signal }
|
|
3893
3117
|
}
|
|
3894
3118
|
|
|
3895
3119
|
const buildResponse = (res: Response): Promise<any> => {
|
|
3896
|
-
return res.text().then(
|
|
3120
|
+
return res.text().then(text => {
|
|
3897
3121
|
let data
|
|
3898
3122
|
try {
|
|
3899
3123
|
data = JSON.parse(text)
|
|
3900
3124
|
} catch (error) {
|
|
3901
3125
|
throw WebrpcBadResponseError.new({
|
|
3902
3126
|
status: res.status,
|
|
3903
|
-
cause: `JSON.parse(): ${error instanceof Error ? error.message : String(error)}: response text: ${text}
|
|
3127
|
+
cause: `JSON.parse(): ${error instanceof Error ? error.message : String(error)}: response text: ${text}`
|
|
3904
3128
|
})
|
|
3905
3129
|
}
|
|
3906
3130
|
if (!res.ok) {
|
|
@@ -4426,7 +3650,7 @@ export enum errors {
|
|
|
4426
3650
|
Unavailable = 'Unavailable',
|
|
4427
3651
|
QueryFailed = 'QueryFailed',
|
|
4428
3652
|
NotFound = 'NotFound',
|
|
4429
|
-
UnsupportedNetwork = 'UnsupportedNetwork'
|
|
3653
|
+
UnsupportedNetwork = 'UnsupportedNetwork'
|
|
4430
3654
|
}
|
|
4431
3655
|
|
|
4432
3656
|
export enum WebrpcErrorCodes {
|
|
@@ -4465,7 +3689,7 @@ export enum WebrpcErrorCodes {
|
|
|
4465
3689
|
Unavailable = 2002,
|
|
4466
3690
|
QueryFailed = 2003,
|
|
4467
3691
|
NotFound = 3000,
|
|
4468
|
-
UnsupportedNetwork = 3008
|
|
3692
|
+
UnsupportedNetwork = 3008
|
|
4469
3693
|
}
|
|
4470
3694
|
|
|
4471
3695
|
export const webrpcErrorByCode: { [code: number]: any } = {
|
|
@@ -4504,7 +3728,7 @@ export const webrpcErrorByCode: { [code: number]: any } = {
|
|
|
4504
3728
|
[2002]: UnavailableError,
|
|
4505
3729
|
[2003]: QueryFailedError,
|
|
4506
3730
|
[3000]: NotFoundError,
|
|
4507
|
-
[3008]: UnsupportedNetworkError
|
|
3731
|
+
[3008]: UnsupportedNetworkError
|
|
4508
3732
|
}
|
|
4509
3733
|
|
|
4510
3734
|
//
|
|
@@ -4531,7 +3755,7 @@ export function VersionFromHeader(headers: Headers): WebrpcGenVersions {
|
|
|
4531
3755
|
codeGenName: '',
|
|
4532
3756
|
codeGenVersion: '',
|
|
4533
3757
|
schemaName: '',
|
|
4534
|
-
schemaVersion: ''
|
|
3758
|
+
schemaVersion: ''
|
|
4535
3759
|
}
|
|
4536
3760
|
}
|
|
4537
3761
|
|
|
@@ -4546,7 +3770,7 @@ function parseWebrpcGenVersions(header: string): WebrpcGenVersions {
|
|
|
4546
3770
|
codeGenName: '',
|
|
4547
3771
|
codeGenVersion: '',
|
|
4548
3772
|
schemaName: '',
|
|
4549
|
-
schemaVersion: ''
|
|
3773
|
+
schemaVersion: ''
|
|
4550
3774
|
}
|
|
4551
3775
|
}
|
|
4552
3776
|
|
|
@@ -4559,6 +3783,6 @@ function parseWebrpcGenVersions(header: string): WebrpcGenVersions {
|
|
|
4559
3783
|
codeGenName: codeGenName ?? '',
|
|
4560
3784
|
codeGenVersion: codeGenVersion ?? '',
|
|
4561
3785
|
schemaName: schemaName ?? '',
|
|
4562
|
-
schemaVersion: schemaVersion ?? ''
|
|
3786
|
+
schemaVersion: schemaVersion ?? ''
|
|
4563
3787
|
}
|
|
4564
3788
|
}
|