@0xsequence/api 2.3.36 → 2.3.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/0xsequence-api.cjs.dev.js +25 -25
- package/dist/0xsequence-api.cjs.prod.js +25 -25
- package/dist/0xsequence-api.esm.js +25 -25
- package/dist/declarations/src/api.gen.d.ts +1 -5
- package/package.json +1 -1
- package/src/api.gen.ts +1529 -976
package/src/api.gen.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// sequence-api v0.4.0
|
|
2
|
+
// sequence-api v0.4.0 c7a95904c3e083c5e5239662c725ee904ab4492a
|
|
3
3
|
// --
|
|
4
4
|
// Code generated by Webrpc-gen@v0.31.0 with typescript generator. DO NOT EDIT.
|
|
5
5
|
//
|
|
6
6
|
// webrpc-gen -schema=api.ridl -target=typescript -client -out=./clients/api.gen.ts
|
|
7
7
|
|
|
8
8
|
// Webrpc description and code-gen version
|
|
9
|
-
export const WebrpcVersion =
|
|
9
|
+
export const WebrpcVersion = 'v1'
|
|
10
10
|
|
|
11
11
|
// Schema version of your RIDL schema
|
|
12
|
-
export const WebrpcSchemaVersion =
|
|
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 = 'c7a95904c3e083c5e5239662c725ee904ab4492a'
|
|
16
16
|
|
|
17
17
|
//
|
|
18
18
|
// Client interface
|
|
@@ -20,9 +20,9 @@ export const WebrpcSchemaHash = "d7026da603b2c29baf21c6aceeebc86eada372d8"
|
|
|
20
20
|
|
|
21
21
|
export interface APIClient {
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
*
|
|
24
24
|
* Runtime
|
|
25
|
-
*
|
|
25
|
+
*
|
|
26
26
|
*/
|
|
27
27
|
ping(headers?: object, signal?: AbortSignal): Promise<PingResponse>
|
|
28
28
|
|
|
@@ -35,25 +35,29 @@ export interface APIClient {
|
|
|
35
35
|
getSequenceContext(headers?: object, signal?: AbortSignal): Promise<GetSequenceContextResponse>
|
|
36
36
|
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
38
|
+
*
|
|
39
39
|
* Auth
|
|
40
|
-
*
|
|
40
|
+
*
|
|
41
41
|
* TODO: rename 'ewtString' arg to 'ethauthProof'
|
|
42
42
|
*/
|
|
43
43
|
getAuthToken(req: GetAuthTokenRequest, headers?: object, signal?: AbortSignal): Promise<GetAuthTokenResponse>
|
|
44
44
|
|
|
45
45
|
getAuthToken2(req: GetAuthToken2Request, headers?: object, signal?: AbortSignal): Promise<GetAuthToken2Response>
|
|
46
46
|
|
|
47
|
-
sendPasswordlessLink(
|
|
47
|
+
sendPasswordlessLink(
|
|
48
|
+
req: SendPasswordlessLinkRequest,
|
|
49
|
+
headers?: object,
|
|
50
|
+
signal?: AbortSignal
|
|
51
|
+
): Promise<SendPasswordlessLinkResponse>
|
|
48
52
|
|
|
49
53
|
registerPublicKey(req: RegisterPublicKeyRequest, headers?: object, signal?: AbortSignal): Promise<RegisterPublicKeyResponse>
|
|
50
54
|
|
|
51
55
|
getPublicKey(req: GetPublicKeyRequest, headers?: object, signal?: AbortSignal): Promise<GetPublicKeyResponse>
|
|
52
56
|
|
|
53
57
|
/**
|
|
54
|
-
*
|
|
58
|
+
*
|
|
55
59
|
* Contacts / Friends
|
|
56
|
-
*
|
|
60
|
+
*
|
|
57
61
|
*/
|
|
58
62
|
friendList(req: FriendListRequest, headers?: object, signal?: AbortSignal): Promise<FriendListResponse>
|
|
59
63
|
|
|
@@ -63,25 +67,33 @@ export interface APIClient {
|
|
|
63
67
|
|
|
64
68
|
addFriend(req: AddFriendRequest, headers?: object, signal?: AbortSignal): Promise<AddFriendResponse>
|
|
65
69
|
|
|
66
|
-
updateFriendNickname(
|
|
70
|
+
updateFriendNickname(
|
|
71
|
+
req: UpdateFriendNicknameRequest,
|
|
72
|
+
headers?: object,
|
|
73
|
+
signal?: AbortSignal
|
|
74
|
+
): Promise<UpdateFriendNicknameResponse>
|
|
67
75
|
|
|
68
76
|
removeFriend(req: RemoveFriendRequest, headers?: object, signal?: AbortSignal): Promise<RemoveFriendResponse>
|
|
69
77
|
|
|
70
78
|
/**
|
|
71
|
-
*
|
|
79
|
+
*
|
|
72
80
|
* Chain-Utils
|
|
73
|
-
*
|
|
81
|
+
*
|
|
74
82
|
*/
|
|
75
83
|
contractCall(req: ContractCallRequest, headers?: object, signal?: AbortSignal): Promise<ContractCallResponse>
|
|
76
84
|
|
|
77
85
|
decodeContractCall(req: DecodeContractCallRequest, headers?: object, signal?: AbortSignal): Promise<DecodeContractCallResponse>
|
|
78
86
|
|
|
79
|
-
lookupContractCallSelectors(
|
|
87
|
+
lookupContractCallSelectors(
|
|
88
|
+
req: LookupContractCallSelectorsRequest,
|
|
89
|
+
headers?: object,
|
|
90
|
+
signal?: AbortSignal
|
|
91
|
+
): Promise<LookupContractCallSelectorsResponse>
|
|
80
92
|
|
|
81
93
|
/**
|
|
82
|
-
*
|
|
94
|
+
*
|
|
83
95
|
* User Storage
|
|
84
|
-
*
|
|
96
|
+
*
|
|
85
97
|
*/
|
|
86
98
|
userStorageFetch(req: UserStorageFetchRequest, headers?: object, signal?: AbortSignal): Promise<UserStorageFetchResponse>
|
|
87
99
|
|
|
@@ -89,12 +101,16 @@ export interface APIClient {
|
|
|
89
101
|
|
|
90
102
|
userStorageDelete(req: UserStorageDeleteRequest, headers?: object, signal?: AbortSignal): Promise<UserStorageDeleteResponse>
|
|
91
103
|
|
|
92
|
-
userStorageFetchAll(
|
|
104
|
+
userStorageFetchAll(
|
|
105
|
+
req: UserStorageFetchAllRequest,
|
|
106
|
+
headers?: object,
|
|
107
|
+
signal?: AbortSignal
|
|
108
|
+
): Promise<UserStorageFetchAllResponse>
|
|
93
109
|
|
|
94
110
|
/**
|
|
95
|
-
*
|
|
111
|
+
*
|
|
96
112
|
* Wallet utils
|
|
97
|
-
*
|
|
113
|
+
*
|
|
98
114
|
*/
|
|
99
115
|
getMoonpayLink(req: GetMoonpayLinkRequest, headers?: object, signal?: AbortSignal): Promise<GetMoonpayLinkResponse>
|
|
100
116
|
|
|
@@ -109,11 +125,23 @@ export interface APIClient {
|
|
|
109
125
|
*/
|
|
110
126
|
isValidSignature(req: IsValidSignatureRequest, headers?: object, signal?: AbortSignal): Promise<IsValidSignatureResponse>
|
|
111
127
|
|
|
112
|
-
isValidMessageSignature(
|
|
128
|
+
isValidMessageSignature(
|
|
129
|
+
req: IsValidMessageSignatureRequest,
|
|
130
|
+
headers?: object,
|
|
131
|
+
signal?: AbortSignal
|
|
132
|
+
): Promise<IsValidMessageSignatureResponse>
|
|
113
133
|
|
|
114
|
-
isValidTypedDataSignature(
|
|
134
|
+
isValidTypedDataSignature(
|
|
135
|
+
req: IsValidTypedDataSignatureRequest,
|
|
136
|
+
headers?: object,
|
|
137
|
+
signal?: AbortSignal
|
|
138
|
+
): Promise<IsValidTypedDataSignatureResponse>
|
|
115
139
|
|
|
116
|
-
isValidETHAuthProof(
|
|
140
|
+
isValidETHAuthProof(
|
|
141
|
+
req: IsValidETHAuthProofRequest,
|
|
142
|
+
headers?: object,
|
|
143
|
+
signal?: AbortSignal
|
|
144
|
+
): Promise<IsValidETHAuthProofResponse>
|
|
117
145
|
|
|
118
146
|
getOnRampURL(req: GetOnRampURLRequest, headers?: object, signal?: AbortSignal): Promise<GetOnRampURLResponse>
|
|
119
147
|
|
|
@@ -125,39 +153,50 @@ export interface APIClient {
|
|
|
125
153
|
|
|
126
154
|
transakGetPrice(req: TransakGetPriceRequest, headers?: object, signal?: AbortSignal): Promise<TransakGetPriceResponse>
|
|
127
155
|
|
|
128
|
-
transakGetSupportedNFTCheckoutChains(
|
|
156
|
+
transakGetSupportedNFTCheckoutChains(
|
|
157
|
+
headers?: object,
|
|
158
|
+
signal?: AbortSignal
|
|
159
|
+
): Promise<TransakGetSupportedNFTCheckoutChainsResponse>
|
|
129
160
|
|
|
130
|
-
transakGetWidgetURL(
|
|
161
|
+
transakGetWidgetURL(
|
|
162
|
+
req: TransakGetWidgetURLRequest,
|
|
163
|
+
headers?: object,
|
|
164
|
+
signal?: AbortSignal
|
|
165
|
+
): Promise<TransakGetWidgetURLResponse>
|
|
131
166
|
|
|
132
167
|
/**
|
|
133
|
-
*
|
|
168
|
+
*
|
|
134
169
|
* Price Feed
|
|
135
|
-
*
|
|
170
|
+
*
|
|
136
171
|
*/
|
|
137
172
|
getCoinPrices(req: GetCoinPricesRequest, headers?: object, signal?: AbortSignal): Promise<GetCoinPricesResponse>
|
|
138
173
|
|
|
139
|
-
getCollectiblePrices(
|
|
174
|
+
getCollectiblePrices(
|
|
175
|
+
req: GetCollectiblePricesRequest,
|
|
176
|
+
headers?: object,
|
|
177
|
+
signal?: AbortSignal
|
|
178
|
+
): Promise<GetCollectiblePricesResponse>
|
|
140
179
|
|
|
141
180
|
/**
|
|
142
|
-
*
|
|
181
|
+
*
|
|
143
182
|
* Price Feed utils
|
|
144
|
-
*
|
|
183
|
+
*
|
|
145
184
|
*/
|
|
146
185
|
getExchangeRate(req: GetExchangeRateRequest, headers?: object, signal?: AbortSignal): Promise<GetExchangeRateResponse>
|
|
147
186
|
|
|
148
187
|
/**
|
|
149
|
-
*
|
|
188
|
+
*
|
|
150
189
|
* Util / misc
|
|
151
|
-
*
|
|
190
|
+
*
|
|
152
191
|
*/
|
|
153
192
|
memoryStore(req: MemoryStoreRequest, headers?: object, signal?: AbortSignal): Promise<MemoryStoreResponse>
|
|
154
193
|
|
|
155
194
|
memoryLoad(req: MemoryLoadRequest, headers?: object, signal?: AbortSignal): Promise<MemoryLoadResponse>
|
|
156
195
|
|
|
157
196
|
/**
|
|
158
|
-
*
|
|
197
|
+
*
|
|
159
198
|
* Legacy
|
|
160
|
-
*
|
|
199
|
+
*
|
|
161
200
|
*/
|
|
162
201
|
getInviteInfo(headers?: object, signal?: AbortSignal): Promise<GetInviteInfoResponse>
|
|
163
202
|
|
|
@@ -166,7 +205,11 @@ export interface APIClient {
|
|
|
166
205
|
*/
|
|
167
206
|
isValidAccessCode(req: IsValidAccessCodeRequest, headers?: object, signal?: AbortSignal): Promise<IsValidAccessCodeResponse>
|
|
168
207
|
|
|
169
|
-
internalClaimAccessCode(
|
|
208
|
+
internalClaimAccessCode(
|
|
209
|
+
req: InternalClaimAccessCodeRequest,
|
|
210
|
+
headers?: object,
|
|
211
|
+
signal?: AbortSignal
|
|
212
|
+
): Promise<InternalClaimAccessCodeResponse>
|
|
170
213
|
|
|
171
214
|
/**
|
|
172
215
|
* Utils
|
|
@@ -174,19 +217,23 @@ export interface APIClient {
|
|
|
174
217
|
blockNumberAtTime(req: BlockNumberAtTimeRequest, headers?: object, signal?: AbortSignal): Promise<BlockNumberAtTimeResponse>
|
|
175
218
|
|
|
176
219
|
/**
|
|
177
|
-
*
|
|
220
|
+
*
|
|
178
221
|
* Paper
|
|
179
222
|
* TODO: deprecate in the future
|
|
180
|
-
*
|
|
223
|
+
*
|
|
181
224
|
*/
|
|
182
225
|
paperSessionSecret(req: PaperSessionSecretRequest, headers?: object, signal?: AbortSignal): Promise<PaperSessionSecretResponse>
|
|
183
226
|
|
|
184
|
-
paperSessionSecret2(
|
|
227
|
+
paperSessionSecret2(
|
|
228
|
+
req: PaperSessionSecret2Request,
|
|
229
|
+
headers?: object,
|
|
230
|
+
signal?: AbortSignal
|
|
231
|
+
): Promise<PaperSessionSecret2Response>
|
|
185
232
|
|
|
186
233
|
/**
|
|
187
|
-
*
|
|
234
|
+
*
|
|
188
235
|
* Linked wallets (v0 -- simple support)
|
|
189
|
-
*
|
|
236
|
+
*
|
|
190
237
|
*/
|
|
191
238
|
linkWallet(req: LinkWalletRequest, headers?: object, signal?: AbortSignal): Promise<LinkWalletResponse>
|
|
192
239
|
|
|
@@ -198,15 +245,23 @@ export interface APIClient {
|
|
|
198
245
|
* NOTE: these methods are deprecated, please do not use them. We may resurface them in the future, but just wanted
|
|
199
246
|
* to be clear, they are not necessary for our linked wallets.
|
|
200
247
|
*/
|
|
201
|
-
generateWaaSVerificationURL(
|
|
202
|
-
|
|
203
|
-
|
|
248
|
+
generateWaaSVerificationURL(
|
|
249
|
+
req: GenerateWaaSVerificationURLRequest,
|
|
250
|
+
headers?: object,
|
|
251
|
+
signal?: AbortSignal
|
|
252
|
+
): Promise<GenerateWaaSVerificationURLResponse>
|
|
253
|
+
|
|
254
|
+
validateWaaSVerificationNonce(
|
|
255
|
+
req: ValidateWaaSVerificationNonceRequest,
|
|
256
|
+
headers?: object,
|
|
257
|
+
signal?: AbortSignal
|
|
258
|
+
): Promise<ValidateWaaSVerificationNonceResponse>
|
|
204
259
|
|
|
205
260
|
/**
|
|
206
|
-
*
|
|
207
|
-
*
|
|
261
|
+
*
|
|
262
|
+
*
|
|
208
263
|
* WaaS child wallet adoption
|
|
209
|
-
*
|
|
264
|
+
*
|
|
210
265
|
*/
|
|
211
266
|
listAdoptedWallets(req: ListAdoptedWalletsRequest, headers?: object, signal?: AbortSignal): Promise<ListAdoptedWalletsResponse>
|
|
212
267
|
|
|
@@ -223,41 +278,73 @@ export interface APIClient {
|
|
|
223
278
|
getLifiSwapQuote(req: GetLifiSwapQuoteRequest, headers?: object, signal?: AbortSignal): Promise<GetLifiSwapQuoteResponse>
|
|
224
279
|
|
|
225
280
|
/**
|
|
226
|
-
*
|
|
281
|
+
*
|
|
227
282
|
* Chain abstraction
|
|
228
|
-
*
|
|
283
|
+
*
|
|
229
284
|
*/
|
|
230
|
-
getIntentCallsPayloads(
|
|
285
|
+
getIntentCallsPayloads(
|
|
286
|
+
req: GetIntentCallsPayloadsRequest,
|
|
287
|
+
headers?: object,
|
|
288
|
+
signal?: AbortSignal
|
|
289
|
+
): Promise<GetIntentCallsPayloadsResponse>
|
|
231
290
|
|
|
232
291
|
commitIntentConfig(req: CommitIntentConfigRequest, headers?: object, signal?: AbortSignal): Promise<CommitIntentConfigResponse>
|
|
233
292
|
|
|
234
293
|
getIntentConfig(req: GetIntentConfigRequest, headers?: object, signal?: AbortSignal): Promise<GetIntentConfigResponse>
|
|
235
294
|
|
|
236
295
|
/**
|
|
237
|
-
*
|
|
296
|
+
*
|
|
238
297
|
* Inventory, payments and management
|
|
239
|
-
*
|
|
298
|
+
*
|
|
240
299
|
*/
|
|
241
300
|
listCurrencyGroups(headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsResponse>
|
|
242
301
|
|
|
243
|
-
addOffchainInventory(
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
302
|
+
addOffchainInventory(
|
|
303
|
+
req: AddOffchainInventoryRequest,
|
|
304
|
+
headers?: object,
|
|
305
|
+
signal?: AbortSignal
|
|
306
|
+
): Promise<AddOffchainInventoryResponse>
|
|
307
|
+
|
|
308
|
+
getOffchainInventory(
|
|
309
|
+
req: GetOffchainInventoryRequest,
|
|
310
|
+
headers?: object,
|
|
311
|
+
signal?: AbortSignal
|
|
312
|
+
): Promise<GetOffchainInventoryResponse>
|
|
313
|
+
|
|
314
|
+
listOffchainInventories(
|
|
315
|
+
req: ListOffchainInventoriesRequest,
|
|
316
|
+
headers?: object,
|
|
317
|
+
signal?: AbortSignal
|
|
318
|
+
): Promise<ListOffchainInventoriesResponse>
|
|
319
|
+
|
|
320
|
+
updateOffchainInventory(
|
|
321
|
+
req: UpdateOffchainInventoryRequest,
|
|
322
|
+
headers?: object,
|
|
323
|
+
signal?: AbortSignal
|
|
324
|
+
): Promise<UpdateOffchainInventoryResponse>
|
|
325
|
+
|
|
326
|
+
deleteOffchainInventory(
|
|
327
|
+
req: DeleteOffchainInventoryRequest,
|
|
328
|
+
headers?: object,
|
|
329
|
+
signal?: AbortSignal
|
|
330
|
+
): Promise<DeleteOffchainInventoryResponse>
|
|
331
|
+
|
|
332
|
+
requestOffchainPayment(
|
|
333
|
+
req: RequestOffchainPaymentRequest,
|
|
334
|
+
headers?: object,
|
|
335
|
+
signal?: AbortSignal
|
|
336
|
+
): Promise<RequestOffchainPaymentResponse>
|
|
337
|
+
|
|
338
|
+
listOffchainPayments(
|
|
339
|
+
req: ListOffchainPaymentsRequest,
|
|
340
|
+
headers?: object,
|
|
341
|
+
signal?: AbortSignal
|
|
342
|
+
): Promise<ListOffchainPaymentsResponse>
|
|
256
343
|
|
|
257
344
|
/**
|
|
258
|
-
*
|
|
345
|
+
*
|
|
259
346
|
* Packs
|
|
260
|
-
*
|
|
347
|
+
*
|
|
261
348
|
*/
|
|
262
349
|
savePack(req: SavePackRequest, headers?: object, signal?: AbortSignal): Promise<SavePackResponse>
|
|
263
350
|
|
|
@@ -271,40 +358,71 @@ export interface APIClient {
|
|
|
271
358
|
|
|
272
359
|
getRevealTxData(req: GetRevealTxDataRequest, headers?: object, signal?: AbortSignal): Promise<GetRevealTxDataResponse>
|
|
273
360
|
|
|
274
|
-
checkoutOptionsPrimary(
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
361
|
+
checkoutOptionsPrimary(
|
|
362
|
+
req: CheckoutOptionsPrimaryRequest,
|
|
363
|
+
headers?: object,
|
|
364
|
+
signal?: AbortSignal
|
|
365
|
+
): Promise<CheckoutOptionsPrimaryResponse>
|
|
366
|
+
|
|
367
|
+
checkoutOptionsSecondary(
|
|
368
|
+
req: CheckoutOptionsSecondaryRequest,
|
|
369
|
+
headers?: object,
|
|
370
|
+
signal?: AbortSignal
|
|
371
|
+
): Promise<CheckoutOptionsSecondaryResponse>
|
|
372
|
+
|
|
373
|
+
checkoutOptionsGetTransakContractID(
|
|
374
|
+
req: CheckoutOptionsGetTransakContractIDRequest,
|
|
375
|
+
headers?: object,
|
|
376
|
+
signal?: AbortSignal
|
|
377
|
+
): Promise<CheckoutOptionsGetTransakContractIDResponse>
|
|
378
|
+
|
|
379
|
+
fortePayCreateIntent(
|
|
380
|
+
req: FortePayCreateIntentRequest,
|
|
381
|
+
headers?: object,
|
|
382
|
+
signal?: AbortSignal
|
|
383
|
+
): Promise<FortePayCreateIntentResponse>
|
|
384
|
+
|
|
385
|
+
fortePayGetPaymentStatuses(
|
|
386
|
+
req: FortePayGetPaymentStatusesRequest,
|
|
387
|
+
headers?: object,
|
|
388
|
+
signal?: AbortSignal
|
|
389
|
+
): Promise<FortePayGetPaymentStatusesResponse>
|
|
283
390
|
|
|
284
391
|
/**
|
|
285
|
-
*
|
|
392
|
+
*
|
|
286
393
|
* CCTP
|
|
287
|
-
*
|
|
394
|
+
*
|
|
288
395
|
*/
|
|
289
396
|
getCCTPTransfer(req: GetCCTPTransferRequest, headers?: object, signal?: AbortSignal): Promise<GetCCTPTransferResponse>
|
|
290
397
|
|
|
291
398
|
queueCCTPTransfer(req: QueueCCTPTransferRequest, headers?: object, signal?: AbortSignal): Promise<QueueCCTPTransferResponse>
|
|
292
399
|
|
|
293
400
|
/**
|
|
294
|
-
*
|
|
401
|
+
*
|
|
295
402
|
* Intent Machine Worker
|
|
296
|
-
*
|
|
403
|
+
*
|
|
297
404
|
*/
|
|
298
|
-
queueIntentConfigExecution(
|
|
299
|
-
|
|
300
|
-
|
|
405
|
+
queueIntentConfigExecution(
|
|
406
|
+
req: QueueIntentConfigExecutionRequest,
|
|
407
|
+
headers?: object,
|
|
408
|
+
signal?: AbortSignal
|
|
409
|
+
): Promise<QueueIntentConfigExecutionResponse>
|
|
410
|
+
|
|
411
|
+
getIntentConfigExecutionStatus(
|
|
412
|
+
req: GetIntentConfigExecutionStatusRequest,
|
|
413
|
+
headers?: object,
|
|
414
|
+
signal?: AbortSignal
|
|
415
|
+
): Promise<GetIntentConfigExecutionStatusResponse>
|
|
301
416
|
|
|
302
417
|
listIntentConfigs(req: ListIntentConfigsRequest, headers?: object, signal?: AbortSignal): Promise<ListIntentConfigsResponse>
|
|
303
418
|
|
|
304
|
-
queueMetaTxnReceipt(
|
|
419
|
+
queueMetaTxnReceipt(
|
|
420
|
+
req: QueueMetaTxnReceiptRequest,
|
|
421
|
+
headers?: object,
|
|
422
|
+
signal?: AbortSignal
|
|
423
|
+
): Promise<QueueMetaTxnReceiptResponse>
|
|
305
424
|
}
|
|
306
425
|
|
|
307
|
-
|
|
308
426
|
//
|
|
309
427
|
// Schema types
|
|
310
428
|
//
|
|
@@ -372,7 +490,7 @@ export interface RuntimeStatus {
|
|
|
372
490
|
branch: string
|
|
373
491
|
commitHash: string
|
|
374
492
|
checks: RuntimeChecks
|
|
375
|
-
numTxnsRelayed: {[key: string]: NumTxnsRelayed}
|
|
493
|
+
numTxnsRelayed: { [key: string]: NumTxnsRelayed }
|
|
376
494
|
}
|
|
377
495
|
|
|
378
496
|
export interface NumTxnsRelayed {
|
|
@@ -382,8 +500,7 @@ export interface NumTxnsRelayed {
|
|
|
382
500
|
period: number
|
|
383
501
|
}
|
|
384
502
|
|
|
385
|
-
export interface RuntimeChecks {
|
|
386
|
-
}
|
|
503
|
+
export interface RuntimeChecks {}
|
|
387
504
|
|
|
388
505
|
export interface SequenceContext {
|
|
389
506
|
factory: string
|
|
@@ -1059,39 +1176,34 @@ export interface IntentQuote {
|
|
|
1059
1176
|
quoteProvider: string
|
|
1060
1177
|
quoteProviderRequestId: string
|
|
1061
1178
|
quoteProviderFeeUsd: string
|
|
1062
|
-
feeQuotes: {[key: string]: string}
|
|
1179
|
+
feeQuotes: { [key: string]: string }
|
|
1063
1180
|
}
|
|
1064
1181
|
|
|
1065
|
-
export interface PingRequest {
|
|
1066
|
-
}
|
|
1182
|
+
export interface PingRequest {}
|
|
1067
1183
|
|
|
1068
1184
|
export interface PingResponse {
|
|
1069
1185
|
status: boolean
|
|
1070
1186
|
}
|
|
1071
1187
|
|
|
1072
|
-
export interface VersionRequest {
|
|
1073
|
-
}
|
|
1188
|
+
export interface VersionRequest {}
|
|
1074
1189
|
|
|
1075
1190
|
export interface VersionResponse {
|
|
1076
1191
|
version: Version
|
|
1077
1192
|
}
|
|
1078
1193
|
|
|
1079
|
-
export interface RuntimeStatusRequest {
|
|
1080
|
-
}
|
|
1194
|
+
export interface RuntimeStatusRequest {}
|
|
1081
1195
|
|
|
1082
1196
|
export interface RuntimeStatusResponse {
|
|
1083
1197
|
status: RuntimeStatus
|
|
1084
1198
|
}
|
|
1085
1199
|
|
|
1086
|
-
export interface ClockRequest {
|
|
1087
|
-
}
|
|
1200
|
+
export interface ClockRequest {}
|
|
1088
1201
|
|
|
1089
1202
|
export interface ClockResponse {
|
|
1090
1203
|
serverTime: string
|
|
1091
1204
|
}
|
|
1092
1205
|
|
|
1093
|
-
export interface GetSequenceContextRequest {
|
|
1094
|
-
}
|
|
1206
|
+
export interface GetSequenceContextRequest {}
|
|
1095
1207
|
|
|
1096
1208
|
export interface GetSequenceContextResponse {
|
|
1097
1209
|
data: SequenceContext
|
|
@@ -1261,7 +1373,7 @@ export interface UserStorageFetchAllRequest {
|
|
|
1261
1373
|
}
|
|
1262
1374
|
|
|
1263
1375
|
export interface UserStorageFetchAllResponse {
|
|
1264
|
-
objects: {[key: string]: any}
|
|
1376
|
+
objects: { [key: string]: any }
|
|
1265
1377
|
}
|
|
1266
1378
|
|
|
1267
1379
|
export interface GetMoonpayLinkRequest {
|
|
@@ -1332,22 +1444,19 @@ export interface GetOnRampURLResponse {
|
|
|
1332
1444
|
url: string
|
|
1333
1445
|
}
|
|
1334
1446
|
|
|
1335
|
-
export interface TransakGetCountriesRequest {
|
|
1336
|
-
}
|
|
1447
|
+
export interface TransakGetCountriesRequest {}
|
|
1337
1448
|
|
|
1338
1449
|
export interface TransakGetCountriesResponse {
|
|
1339
1450
|
regions: Array<TransakCountry>
|
|
1340
1451
|
}
|
|
1341
1452
|
|
|
1342
|
-
export interface TransakGetCryptoCurrenciesRequest {
|
|
1343
|
-
}
|
|
1453
|
+
export interface TransakGetCryptoCurrenciesRequest {}
|
|
1344
1454
|
|
|
1345
1455
|
export interface TransakGetCryptoCurrenciesResponse {
|
|
1346
1456
|
currencies: Array<TransakCryptoCurrency>
|
|
1347
1457
|
}
|
|
1348
1458
|
|
|
1349
|
-
export interface TransakGetFiatCurrenciesRequest {
|
|
1350
|
-
}
|
|
1459
|
+
export interface TransakGetFiatCurrenciesRequest {}
|
|
1351
1460
|
|
|
1352
1461
|
export interface TransakGetFiatCurrenciesResponse {
|
|
1353
1462
|
currencies: Array<TransakFiatCurrency>
|
|
@@ -1361,8 +1470,7 @@ export interface TransakGetPriceResponse {
|
|
|
1361
1470
|
price: TransakPrice
|
|
1362
1471
|
}
|
|
1363
1472
|
|
|
1364
|
-
export interface TransakGetSupportedNFTCheckoutChainsRequest {
|
|
1365
|
-
}
|
|
1473
|
+
export interface TransakGetSupportedNFTCheckoutChainsRequest {}
|
|
1366
1474
|
|
|
1367
1475
|
export interface TransakGetSupportedNFTCheckoutChainsResponse {
|
|
1368
1476
|
chains: Array<TransakChain>
|
|
@@ -1417,8 +1525,7 @@ export interface MemoryLoadResponse {
|
|
|
1417
1525
|
value: string
|
|
1418
1526
|
}
|
|
1419
1527
|
|
|
1420
|
-
export interface GetInviteInfoRequest {
|
|
1421
|
-
}
|
|
1528
|
+
export interface GetInviteInfoRequest {}
|
|
1422
1529
|
|
|
1423
1530
|
export interface GetInviteInfoResponse {
|
|
1424
1531
|
inviteInfo: InviteInfo
|
|
@@ -1539,8 +1646,7 @@ export interface ListAdoptedWalletsResponse {
|
|
|
1539
1646
|
wallets: Array<AdoptedChildWallet>
|
|
1540
1647
|
}
|
|
1541
1648
|
|
|
1542
|
-
export interface GetLifiChainsRequest {
|
|
1543
|
-
}
|
|
1649
|
+
export interface GetLifiChainsRequest {}
|
|
1544
1650
|
|
|
1545
1651
|
export interface GetLifiChainsResponse {
|
|
1546
1652
|
chains: Array<number>
|
|
@@ -1556,10 +1662,6 @@ export interface GetLifiTokensResponse {
|
|
|
1556
1662
|
|
|
1557
1663
|
export interface GetLifiSwapRoutesRequest {
|
|
1558
1664
|
params: GetLifiSwapRouteParams
|
|
1559
|
-
chainId: number
|
|
1560
|
-
toTokenAddress: string
|
|
1561
|
-
toTokenAmount: string
|
|
1562
|
-
walletAddress: string
|
|
1563
1665
|
}
|
|
1564
1666
|
|
|
1565
1667
|
export interface GetLifiSwapRoutesResponse {
|
|
@@ -1599,7 +1701,7 @@ export interface GetIntentCallsPayloadsResponse {
|
|
|
1599
1701
|
metaTxns: Array<MetaTxn>
|
|
1600
1702
|
trailsFee: TrailsFee
|
|
1601
1703
|
quote: IntentQuote
|
|
1602
|
-
feeQuotes: {[key: string]: string}
|
|
1704
|
+
feeQuotes: { [key: string]: string }
|
|
1603
1705
|
originIntentAddress: string
|
|
1604
1706
|
destinationIntentAddress: string
|
|
1605
1707
|
}
|
|
@@ -1625,8 +1727,7 @@ export interface GetIntentConfigResponse {
|
|
|
1625
1727
|
config: IntentConfig
|
|
1626
1728
|
}
|
|
1627
1729
|
|
|
1628
|
-
export interface ListCurrencyGroupsRequest {
|
|
1629
|
-
}
|
|
1730
|
+
export interface ListCurrencyGroupsRequest {}
|
|
1630
1731
|
|
|
1631
1732
|
export interface ListCurrencyGroupsResponse {
|
|
1632
1733
|
currencyGroups: Array<CurrencyGroup>
|
|
@@ -1660,8 +1761,7 @@ export interface UpdateOffchainInventoryRequest {
|
|
|
1660
1761
|
inventory: OffchainInventory
|
|
1661
1762
|
}
|
|
1662
1763
|
|
|
1663
|
-
export interface UpdateOffchainInventoryResponse {
|
|
1664
|
-
}
|
|
1764
|
+
export interface UpdateOffchainInventoryResponse {}
|
|
1665
1765
|
|
|
1666
1766
|
export interface DeleteOffchainInventoryRequest {
|
|
1667
1767
|
inventoryId: number
|
|
@@ -1848,8 +1948,6 @@ export interface QueueMetaTxnReceiptResponse {
|
|
|
1848
1948
|
status: boolean
|
|
1849
1949
|
}
|
|
1850
1950
|
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
1951
|
//
|
|
1854
1952
|
// Client
|
|
1855
1953
|
//
|
|
@@ -1867,7 +1965,7 @@ export class API implements APIClient {
|
|
|
1867
1965
|
private url(name: string): string {
|
|
1868
1966
|
return this.hostname + this.path + name
|
|
1869
1967
|
}
|
|
1870
|
-
|
|
1968
|
+
|
|
1871
1969
|
queryKey = {
|
|
1872
1970
|
ping: () => ['API', 'ping'] as const,
|
|
1873
1971
|
version: () => ['API', 'version'] as const,
|
|
@@ -1887,7 +1985,8 @@ export class API implements APIClient {
|
|
|
1887
1985
|
removeFriend: (req: RemoveFriendRequest) => ['API', 'removeFriend', req] as const,
|
|
1888
1986
|
contractCall: (req: ContractCallRequest) => ['API', 'contractCall', req] as const,
|
|
1889
1987
|
decodeContractCall: (req: DecodeContractCallRequest) => ['API', 'decodeContractCall', req] as const,
|
|
1890
|
-
lookupContractCallSelectors: (req: LookupContractCallSelectorsRequest) =>
|
|
1988
|
+
lookupContractCallSelectors: (req: LookupContractCallSelectorsRequest) =>
|
|
1989
|
+
['API', 'lookupContractCallSelectors', req] as const,
|
|
1891
1990
|
userStorageFetch: (req: UserStorageFetchRequest) => ['API', 'userStorageFetch', req] as const,
|
|
1892
1991
|
userStorageSave: (req: UserStorageSaveRequest) => ['API', 'userStorageSave', req] as const,
|
|
1893
1992
|
userStorageDelete: (req: UserStorageDeleteRequest) => ['API', 'userStorageDelete', req] as const,
|
|
@@ -1919,8 +2018,10 @@ export class API implements APIClient {
|
|
|
1919
2018
|
linkWallet: (req: LinkWalletRequest) => ['API', 'linkWallet', req] as const,
|
|
1920
2019
|
getLinkedWallets: (req: GetLinkedWalletsRequest) => ['API', 'getLinkedWallets', req] as const,
|
|
1921
2020
|
removeLinkedWallet: (req: RemoveLinkedWalletRequest) => ['API', 'removeLinkedWallet', req] as const,
|
|
1922
|
-
generateWaaSVerificationURL: (req: GenerateWaaSVerificationURLRequest) =>
|
|
1923
|
-
|
|
2021
|
+
generateWaaSVerificationURL: (req: GenerateWaaSVerificationURLRequest) =>
|
|
2022
|
+
['API', 'generateWaaSVerificationURL', req] as const,
|
|
2023
|
+
validateWaaSVerificationNonce: (req: ValidateWaaSVerificationNonceRequest) =>
|
|
2024
|
+
['API', 'validateWaaSVerificationNonce', req] as const,
|
|
1924
2025
|
listAdoptedWallets: (req: ListAdoptedWalletsRequest) => ['API', 'listAdoptedWallets', req] as const,
|
|
1925
2026
|
getLifiChains: () => ['API', 'getLifiChains'] as const,
|
|
1926
2027
|
getLifiTokens: (req: GetLifiTokensRequest) => ['API', 'getLifiTokens', req] as const,
|
|
@@ -1945,1041 +2046,1503 @@ export class API implements APIClient {
|
|
|
1945
2046
|
getRevealTxData: (req: GetRevealTxDataRequest) => ['API', 'getRevealTxData', req] as const,
|
|
1946
2047
|
checkoutOptionsPrimary: (req: CheckoutOptionsPrimaryRequest) => ['API', 'checkoutOptionsPrimary', req] as const,
|
|
1947
2048
|
checkoutOptionsSecondary: (req: CheckoutOptionsSecondaryRequest) => ['API', 'checkoutOptionsSecondary', req] as const,
|
|
1948
|
-
checkoutOptionsGetTransakContractID: (req: CheckoutOptionsGetTransakContractIDRequest) =>
|
|
2049
|
+
checkoutOptionsGetTransakContractID: (req: CheckoutOptionsGetTransakContractIDRequest) =>
|
|
2050
|
+
['API', 'checkoutOptionsGetTransakContractID', req] as const,
|
|
1949
2051
|
fortePayCreateIntent: (req: FortePayCreateIntentRequest) => ['API', 'fortePayCreateIntent', req] as const,
|
|
1950
2052
|
fortePayGetPaymentStatuses: (req: FortePayGetPaymentStatusesRequest) => ['API', 'fortePayGetPaymentStatuses', req] as const,
|
|
1951
2053
|
getCCTPTransfer: (req: GetCCTPTransferRequest) => ['API', 'getCCTPTransfer', req] as const,
|
|
1952
2054
|
queueCCTPTransfer: (req: QueueCCTPTransferRequest) => ['API', 'queueCCTPTransfer', req] as const,
|
|
1953
2055
|
queueIntentConfigExecution: (req: QueueIntentConfigExecutionRequest) => ['API', 'queueIntentConfigExecution', req] as const,
|
|
1954
|
-
getIntentConfigExecutionStatus: (req: GetIntentConfigExecutionStatusRequest) =>
|
|
2056
|
+
getIntentConfigExecutionStatus: (req: GetIntentConfigExecutionStatusRequest) =>
|
|
2057
|
+
['API', 'getIntentConfigExecutionStatus', req] as const,
|
|
1955
2058
|
listIntentConfigs: (req: ListIntentConfigsRequest) => ['API', 'listIntentConfigs', req] as const,
|
|
1956
|
-
queueMetaTxnReceipt: (req: QueueMetaTxnReceiptRequest) => ['API', 'queueMetaTxnReceipt', req] as const
|
|
2059
|
+
queueMetaTxnReceipt: (req: QueueMetaTxnReceiptRequest) => ['API', 'queueMetaTxnReceipt', req] as const
|
|
1957
2060
|
}
|
|
1958
2061
|
|
|
1959
2062
|
ping = (headers?: object, signal?: AbortSignal): Promise<PingResponse> => {
|
|
1960
|
-
return this.fetch(
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
}
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
2063
|
+
return this.fetch(this.url('Ping'), createHttpRequest('{}', headers, signal)).then(
|
|
2064
|
+
res => {
|
|
2065
|
+
return buildResponse(res).then(_data => {
|
|
2066
|
+
return JsonDecode<PingResponse>(_data, 'PingResponse')
|
|
2067
|
+
})
|
|
2068
|
+
},
|
|
2069
|
+
error => {
|
|
2070
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2071
|
+
}
|
|
2072
|
+
)
|
|
1969
2073
|
}
|
|
1970
2074
|
|
|
1971
2075
|
version = (headers?: object, signal?: AbortSignal): Promise<VersionResponse> => {
|
|
1972
|
-
return this.fetch(
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
}
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
2076
|
+
return this.fetch(this.url('Version'), createHttpRequest('{}', headers, signal)).then(
|
|
2077
|
+
res => {
|
|
2078
|
+
return buildResponse(res).then(_data => {
|
|
2079
|
+
return JsonDecode<VersionResponse>(_data, 'VersionResponse')
|
|
2080
|
+
})
|
|
2081
|
+
},
|
|
2082
|
+
error => {
|
|
2083
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2084
|
+
}
|
|
2085
|
+
)
|
|
1981
2086
|
}
|
|
1982
2087
|
|
|
1983
2088
|
runtimeStatus = (headers?: object, signal?: AbortSignal): Promise<RuntimeStatusResponse> => {
|
|
1984
|
-
return this.fetch(
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
}
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
2089
|
+
return this.fetch(this.url('RuntimeStatus'), createHttpRequest('{}', headers, signal)).then(
|
|
2090
|
+
res => {
|
|
2091
|
+
return buildResponse(res).then(_data => {
|
|
2092
|
+
return JsonDecode<RuntimeStatusResponse>(_data, 'RuntimeStatusResponse')
|
|
2093
|
+
})
|
|
2094
|
+
},
|
|
2095
|
+
error => {
|
|
2096
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2097
|
+
}
|
|
2098
|
+
)
|
|
1993
2099
|
}
|
|
1994
2100
|
|
|
1995
2101
|
clock = (headers?: object, signal?: AbortSignal): Promise<ClockResponse> => {
|
|
1996
|
-
return this.fetch(
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
}
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2102
|
+
return this.fetch(this.url('Clock'), createHttpRequest('{}', headers, signal)).then(
|
|
2103
|
+
res => {
|
|
2104
|
+
return buildResponse(res).then(_data => {
|
|
2105
|
+
return JsonDecode<ClockResponse>(_data, 'ClockResponse')
|
|
2106
|
+
})
|
|
2107
|
+
},
|
|
2108
|
+
error => {
|
|
2109
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2110
|
+
}
|
|
2111
|
+
)
|
|
2005
2112
|
}
|
|
2006
2113
|
|
|
2007
2114
|
getSequenceContext = (headers?: object, signal?: AbortSignal): Promise<GetSequenceContextResponse> => {
|
|
2008
|
-
return this.fetch(
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
}
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2115
|
+
return this.fetch(this.url('GetSequenceContext'), createHttpRequest('{}', headers, signal)).then(
|
|
2116
|
+
res => {
|
|
2117
|
+
return buildResponse(res).then(_data => {
|
|
2118
|
+
return JsonDecode<GetSequenceContextResponse>(_data, 'GetSequenceContextResponse')
|
|
2119
|
+
})
|
|
2120
|
+
},
|
|
2121
|
+
error => {
|
|
2122
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2123
|
+
}
|
|
2124
|
+
)
|
|
2017
2125
|
}
|
|
2018
2126
|
|
|
2019
2127
|
getAuthToken = (req: GetAuthTokenRequest, headers?: object, signal?: AbortSignal): Promise<GetAuthTokenResponse> => {
|
|
2020
|
-
return this.fetch(
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
}
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2128
|
+
return this.fetch(this.url('GetAuthToken'), createHttpRequest(JsonEncode(req, 'GetAuthTokenRequest'), headers, signal)).then(
|
|
2129
|
+
res => {
|
|
2130
|
+
return buildResponse(res).then(_data => {
|
|
2131
|
+
return JsonDecode<GetAuthTokenResponse>(_data, 'GetAuthTokenResponse')
|
|
2132
|
+
})
|
|
2133
|
+
},
|
|
2134
|
+
error => {
|
|
2135
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2136
|
+
}
|
|
2137
|
+
)
|
|
2029
2138
|
}
|
|
2030
2139
|
|
|
2031
2140
|
getAuthToken2 = (req: GetAuthToken2Request, headers?: object, signal?: AbortSignal): Promise<GetAuthToken2Response> => {
|
|
2032
2141
|
return this.fetch(
|
|
2033
2142
|
this.url('GetAuthToken2'),
|
|
2034
|
-
createHttpRequest(JsonEncode(req, 'GetAuthToken2Request'), headers, signal)
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2143
|
+
createHttpRequest(JsonEncode(req, 'GetAuthToken2Request'), headers, signal)
|
|
2144
|
+
).then(
|
|
2145
|
+
res => {
|
|
2146
|
+
return buildResponse(res).then(_data => {
|
|
2147
|
+
return JsonDecode<GetAuthToken2Response>(_data, 'GetAuthToken2Response')
|
|
2148
|
+
})
|
|
2149
|
+
},
|
|
2150
|
+
error => {
|
|
2151
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2152
|
+
}
|
|
2153
|
+
)
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
sendPasswordlessLink = (
|
|
2157
|
+
req: SendPasswordlessLinkRequest,
|
|
2158
|
+
headers?: object,
|
|
2159
|
+
signal?: AbortSignal
|
|
2160
|
+
): Promise<SendPasswordlessLinkResponse> => {
|
|
2044
2161
|
return this.fetch(
|
|
2045
2162
|
this.url('SendPasswordlessLink'),
|
|
2046
|
-
createHttpRequest(JsonEncode(req, 'SendPasswordlessLinkRequest'), headers, signal)
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2163
|
+
createHttpRequest(JsonEncode(req, 'SendPasswordlessLinkRequest'), headers, signal)
|
|
2164
|
+
).then(
|
|
2165
|
+
res => {
|
|
2166
|
+
return buildResponse(res).then(_data => {
|
|
2167
|
+
return JsonDecode<SendPasswordlessLinkResponse>(_data, 'SendPasswordlessLinkResponse')
|
|
2168
|
+
})
|
|
2169
|
+
},
|
|
2170
|
+
error => {
|
|
2171
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2172
|
+
}
|
|
2173
|
+
)
|
|
2174
|
+
}
|
|
2175
|
+
|
|
2176
|
+
registerPublicKey = (
|
|
2177
|
+
req: RegisterPublicKeyRequest,
|
|
2178
|
+
headers?: object,
|
|
2179
|
+
signal?: AbortSignal
|
|
2180
|
+
): Promise<RegisterPublicKeyResponse> => {
|
|
2056
2181
|
return this.fetch(
|
|
2057
2182
|
this.url('RegisterPublicKey'),
|
|
2058
|
-
createHttpRequest(JsonEncode(req, 'RegisterPublicKeyRequest'), headers, signal)
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2183
|
+
createHttpRequest(JsonEncode(req, 'RegisterPublicKeyRequest'), headers, signal)
|
|
2184
|
+
).then(
|
|
2185
|
+
res => {
|
|
2186
|
+
return buildResponse(res).then(_data => {
|
|
2187
|
+
return JsonDecode<RegisterPublicKeyResponse>(_data, 'RegisterPublicKeyResponse')
|
|
2188
|
+
})
|
|
2189
|
+
},
|
|
2190
|
+
error => {
|
|
2191
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2192
|
+
}
|
|
2193
|
+
)
|
|
2065
2194
|
}
|
|
2066
2195
|
|
|
2067
2196
|
getPublicKey = (req: GetPublicKeyRequest, headers?: object, signal?: AbortSignal): Promise<GetPublicKeyResponse> => {
|
|
2068
|
-
return this.fetch(
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
}
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2197
|
+
return this.fetch(this.url('GetPublicKey'), createHttpRequest(JsonEncode(req, 'GetPublicKeyRequest'), headers, signal)).then(
|
|
2198
|
+
res => {
|
|
2199
|
+
return buildResponse(res).then(_data => {
|
|
2200
|
+
return JsonDecode<GetPublicKeyResponse>(_data, 'GetPublicKeyResponse')
|
|
2201
|
+
})
|
|
2202
|
+
},
|
|
2203
|
+
error => {
|
|
2204
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2205
|
+
}
|
|
2206
|
+
)
|
|
2077
2207
|
}
|
|
2078
2208
|
|
|
2079
2209
|
friendList = (req: FriendListRequest, headers?: object, signal?: AbortSignal): Promise<FriendListResponse> => {
|
|
2080
|
-
return this.fetch(
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
}
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2210
|
+
return this.fetch(this.url('FriendList'), createHttpRequest(JsonEncode(req, 'FriendListRequest'), headers, signal)).then(
|
|
2211
|
+
res => {
|
|
2212
|
+
return buildResponse(res).then(_data => {
|
|
2213
|
+
return JsonDecode<FriendListResponse>(_data, 'FriendListResponse')
|
|
2214
|
+
})
|
|
2215
|
+
},
|
|
2216
|
+
error => {
|
|
2217
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2218
|
+
}
|
|
2219
|
+
)
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2222
|
+
getFriendByAddress = (
|
|
2223
|
+
req: GetFriendByAddressRequest,
|
|
2224
|
+
headers?: object,
|
|
2225
|
+
signal?: AbortSignal
|
|
2226
|
+
): Promise<GetFriendByAddressResponse> => {
|
|
2092
2227
|
return this.fetch(
|
|
2093
2228
|
this.url('GetFriendByAddress'),
|
|
2094
|
-
createHttpRequest(JsonEncode(req, 'GetFriendByAddressRequest'), headers, signal)
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2229
|
+
createHttpRequest(JsonEncode(req, 'GetFriendByAddressRequest'), headers, signal)
|
|
2230
|
+
).then(
|
|
2231
|
+
res => {
|
|
2232
|
+
return buildResponse(res).then(_data => {
|
|
2233
|
+
return JsonDecode<GetFriendByAddressResponse>(_data, 'GetFriendByAddressResponse')
|
|
2234
|
+
})
|
|
2235
|
+
},
|
|
2236
|
+
error => {
|
|
2237
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2238
|
+
}
|
|
2239
|
+
)
|
|
2101
2240
|
}
|
|
2102
2241
|
|
|
2103
2242
|
searchFriends = (req: SearchFriendsRequest, headers?: object, signal?: AbortSignal): Promise<SearchFriendsResponse> => {
|
|
2104
2243
|
return this.fetch(
|
|
2105
2244
|
this.url('SearchFriends'),
|
|
2106
|
-
createHttpRequest(JsonEncode(req, 'SearchFriendsRequest'), headers, signal)
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2245
|
+
createHttpRequest(JsonEncode(req, 'SearchFriendsRequest'), headers, signal)
|
|
2246
|
+
).then(
|
|
2247
|
+
res => {
|
|
2248
|
+
return buildResponse(res).then(_data => {
|
|
2249
|
+
return JsonDecode<SearchFriendsResponse>(_data, 'SearchFriendsResponse')
|
|
2250
|
+
})
|
|
2251
|
+
},
|
|
2252
|
+
error => {
|
|
2253
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2254
|
+
}
|
|
2255
|
+
)
|
|
2113
2256
|
}
|
|
2114
2257
|
|
|
2115
2258
|
addFriend = (req: AddFriendRequest, headers?: object, signal?: AbortSignal): Promise<AddFriendResponse> => {
|
|
2116
|
-
return this.fetch(
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
}
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2259
|
+
return this.fetch(this.url('AddFriend'), createHttpRequest(JsonEncode(req, 'AddFriendRequest'), headers, signal)).then(
|
|
2260
|
+
res => {
|
|
2261
|
+
return buildResponse(res).then(_data => {
|
|
2262
|
+
return JsonDecode<AddFriendResponse>(_data, 'AddFriendResponse')
|
|
2263
|
+
})
|
|
2264
|
+
},
|
|
2265
|
+
error => {
|
|
2266
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2267
|
+
}
|
|
2268
|
+
)
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
updateFriendNickname = (
|
|
2272
|
+
req: UpdateFriendNicknameRequest,
|
|
2273
|
+
headers?: object,
|
|
2274
|
+
signal?: AbortSignal
|
|
2275
|
+
): Promise<UpdateFriendNicknameResponse> => {
|
|
2128
2276
|
return this.fetch(
|
|
2129
2277
|
this.url('UpdateFriendNickname'),
|
|
2130
|
-
createHttpRequest(JsonEncode(req, 'UpdateFriendNicknameRequest'), headers, signal)
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2278
|
+
createHttpRequest(JsonEncode(req, 'UpdateFriendNicknameRequest'), headers, signal)
|
|
2279
|
+
).then(
|
|
2280
|
+
res => {
|
|
2281
|
+
return buildResponse(res).then(_data => {
|
|
2282
|
+
return JsonDecode<UpdateFriendNicknameResponse>(_data, 'UpdateFriendNicknameResponse')
|
|
2283
|
+
})
|
|
2284
|
+
},
|
|
2285
|
+
error => {
|
|
2286
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2287
|
+
}
|
|
2288
|
+
)
|
|
2137
2289
|
}
|
|
2138
2290
|
|
|
2139
2291
|
removeFriend = (req: RemoveFriendRequest, headers?: object, signal?: AbortSignal): Promise<RemoveFriendResponse> => {
|
|
2140
|
-
return this.fetch(
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
}
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2292
|
+
return this.fetch(this.url('RemoveFriend'), createHttpRequest(JsonEncode(req, 'RemoveFriendRequest'), headers, signal)).then(
|
|
2293
|
+
res => {
|
|
2294
|
+
return buildResponse(res).then(_data => {
|
|
2295
|
+
return JsonDecode<RemoveFriendResponse>(_data, 'RemoveFriendResponse')
|
|
2296
|
+
})
|
|
2297
|
+
},
|
|
2298
|
+
error => {
|
|
2299
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2300
|
+
}
|
|
2301
|
+
)
|
|
2149
2302
|
}
|
|
2150
2303
|
|
|
2151
2304
|
contractCall = (req: ContractCallRequest, headers?: object, signal?: AbortSignal): Promise<ContractCallResponse> => {
|
|
2152
|
-
return this.fetch(
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
}
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2305
|
+
return this.fetch(this.url('ContractCall'), createHttpRequest(JsonEncode(req, 'ContractCallRequest'), headers, signal)).then(
|
|
2306
|
+
res => {
|
|
2307
|
+
return buildResponse(res).then(_data => {
|
|
2308
|
+
return JsonDecode<ContractCallResponse>(_data, 'ContractCallResponse')
|
|
2309
|
+
})
|
|
2310
|
+
},
|
|
2311
|
+
error => {
|
|
2312
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2313
|
+
}
|
|
2314
|
+
)
|
|
2315
|
+
}
|
|
2316
|
+
|
|
2317
|
+
decodeContractCall = (
|
|
2318
|
+
req: DecodeContractCallRequest,
|
|
2319
|
+
headers?: object,
|
|
2320
|
+
signal?: AbortSignal
|
|
2321
|
+
): Promise<DecodeContractCallResponse> => {
|
|
2164
2322
|
return this.fetch(
|
|
2165
2323
|
this.url('DecodeContractCall'),
|
|
2166
|
-
createHttpRequest(JsonEncode(req, 'DecodeContractCallRequest'), headers, signal)
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2324
|
+
createHttpRequest(JsonEncode(req, 'DecodeContractCallRequest'), headers, signal)
|
|
2325
|
+
).then(
|
|
2326
|
+
res => {
|
|
2327
|
+
return buildResponse(res).then(_data => {
|
|
2328
|
+
return JsonDecode<DecodeContractCallResponse>(_data, 'DecodeContractCallResponse')
|
|
2329
|
+
})
|
|
2330
|
+
},
|
|
2331
|
+
error => {
|
|
2332
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2333
|
+
}
|
|
2334
|
+
)
|
|
2335
|
+
}
|
|
2336
|
+
|
|
2337
|
+
lookupContractCallSelectors = (
|
|
2338
|
+
req: LookupContractCallSelectorsRequest,
|
|
2339
|
+
headers?: object,
|
|
2340
|
+
signal?: AbortSignal
|
|
2341
|
+
): Promise<LookupContractCallSelectorsResponse> => {
|
|
2176
2342
|
return this.fetch(
|
|
2177
2343
|
this.url('LookupContractCallSelectors'),
|
|
2178
|
-
createHttpRequest(JsonEncode(req, 'LookupContractCallSelectorsRequest'), headers, signal)
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2344
|
+
createHttpRequest(JsonEncode(req, 'LookupContractCallSelectorsRequest'), headers, signal)
|
|
2345
|
+
).then(
|
|
2346
|
+
res => {
|
|
2347
|
+
return buildResponse(res).then(_data => {
|
|
2348
|
+
return JsonDecode<LookupContractCallSelectorsResponse>(_data, 'LookupContractCallSelectorsResponse')
|
|
2349
|
+
})
|
|
2350
|
+
},
|
|
2351
|
+
error => {
|
|
2352
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2353
|
+
}
|
|
2354
|
+
)
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2357
|
+
userStorageFetch = (
|
|
2358
|
+
req: UserStorageFetchRequest,
|
|
2359
|
+
headers?: object,
|
|
2360
|
+
signal?: AbortSignal
|
|
2361
|
+
): Promise<UserStorageFetchResponse> => {
|
|
2188
2362
|
return this.fetch(
|
|
2189
2363
|
this.url('UserStorageFetch'),
|
|
2190
|
-
createHttpRequest(JsonEncode(req, 'UserStorageFetchRequest'), headers, signal)
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2364
|
+
createHttpRequest(JsonEncode(req, 'UserStorageFetchRequest'), headers, signal)
|
|
2365
|
+
).then(
|
|
2366
|
+
res => {
|
|
2367
|
+
return buildResponse(res).then(_data => {
|
|
2368
|
+
return JsonDecode<UserStorageFetchResponse>(_data, 'UserStorageFetchResponse')
|
|
2369
|
+
})
|
|
2370
|
+
},
|
|
2371
|
+
error => {
|
|
2372
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2373
|
+
}
|
|
2374
|
+
)
|
|
2197
2375
|
}
|
|
2198
2376
|
|
|
2199
2377
|
userStorageSave = (req: UserStorageSaveRequest, headers?: object, signal?: AbortSignal): Promise<UserStorageSaveResponse> => {
|
|
2200
2378
|
return this.fetch(
|
|
2201
2379
|
this.url('UserStorageSave'),
|
|
2202
|
-
createHttpRequest(JsonEncode(req, 'UserStorageSaveRequest'), headers, signal)
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2380
|
+
createHttpRequest(JsonEncode(req, 'UserStorageSaveRequest'), headers, signal)
|
|
2381
|
+
).then(
|
|
2382
|
+
res => {
|
|
2383
|
+
return buildResponse(res).then(_data => {
|
|
2384
|
+
return JsonDecode<UserStorageSaveResponse>(_data, 'UserStorageSaveResponse')
|
|
2385
|
+
})
|
|
2386
|
+
},
|
|
2387
|
+
error => {
|
|
2388
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2389
|
+
}
|
|
2390
|
+
)
|
|
2391
|
+
}
|
|
2392
|
+
|
|
2393
|
+
userStorageDelete = (
|
|
2394
|
+
req: UserStorageDeleteRequest,
|
|
2395
|
+
headers?: object,
|
|
2396
|
+
signal?: AbortSignal
|
|
2397
|
+
): Promise<UserStorageDeleteResponse> => {
|
|
2212
2398
|
return this.fetch(
|
|
2213
2399
|
this.url('UserStorageDelete'),
|
|
2214
|
-
createHttpRequest(JsonEncode(req, 'UserStorageDeleteRequest'), headers, signal)
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2400
|
+
createHttpRequest(JsonEncode(req, 'UserStorageDeleteRequest'), headers, signal)
|
|
2401
|
+
).then(
|
|
2402
|
+
res => {
|
|
2403
|
+
return buildResponse(res).then(_data => {
|
|
2404
|
+
return JsonDecode<UserStorageDeleteResponse>(_data, 'UserStorageDeleteResponse')
|
|
2405
|
+
})
|
|
2406
|
+
},
|
|
2407
|
+
error => {
|
|
2408
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2409
|
+
}
|
|
2410
|
+
)
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
userStorageFetchAll = (
|
|
2414
|
+
req: UserStorageFetchAllRequest,
|
|
2415
|
+
headers?: object,
|
|
2416
|
+
signal?: AbortSignal
|
|
2417
|
+
): Promise<UserStorageFetchAllResponse> => {
|
|
2224
2418
|
return this.fetch(
|
|
2225
2419
|
this.url('UserStorageFetchAll'),
|
|
2226
|
-
createHttpRequest(JsonEncode(req, 'UserStorageFetchAllRequest'), headers, signal)
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2420
|
+
createHttpRequest(JsonEncode(req, 'UserStorageFetchAllRequest'), headers, signal)
|
|
2421
|
+
).then(
|
|
2422
|
+
res => {
|
|
2423
|
+
return buildResponse(res).then(_data => {
|
|
2424
|
+
return JsonDecode<UserStorageFetchAllResponse>(_data, 'UserStorageFetchAllResponse')
|
|
2425
|
+
})
|
|
2426
|
+
},
|
|
2427
|
+
error => {
|
|
2428
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2429
|
+
}
|
|
2430
|
+
)
|
|
2233
2431
|
}
|
|
2234
2432
|
|
|
2235
2433
|
getMoonpayLink = (req: GetMoonpayLinkRequest, headers?: object, signal?: AbortSignal): Promise<GetMoonpayLinkResponse> => {
|
|
2236
2434
|
return this.fetch(
|
|
2237
2435
|
this.url('GetMoonpayLink'),
|
|
2238
|
-
createHttpRequest(JsonEncode(req, 'GetMoonpayLinkRequest'), headers, signal)
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2436
|
+
createHttpRequest(JsonEncode(req, 'GetMoonpayLinkRequest'), headers, signal)
|
|
2437
|
+
).then(
|
|
2438
|
+
res => {
|
|
2439
|
+
return buildResponse(res).then(_data => {
|
|
2440
|
+
return JsonDecode<GetMoonpayLinkResponse>(_data, 'GetMoonpayLinkResponse')
|
|
2441
|
+
})
|
|
2442
|
+
},
|
|
2443
|
+
error => {
|
|
2444
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2445
|
+
}
|
|
2446
|
+
)
|
|
2447
|
+
}
|
|
2448
|
+
|
|
2449
|
+
resolveENSAddress = (
|
|
2450
|
+
req: ResolveENSAddressRequest,
|
|
2451
|
+
headers?: object,
|
|
2452
|
+
signal?: AbortSignal
|
|
2453
|
+
): Promise<ResolveENSAddressResponse> => {
|
|
2248
2454
|
return this.fetch(
|
|
2249
2455
|
this.url('ResolveENSAddress'),
|
|
2250
|
-
createHttpRequest(JsonEncode(req, 'ResolveENSAddressRequest'), headers, signal)
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2456
|
+
createHttpRequest(JsonEncode(req, 'ResolveENSAddressRequest'), headers, signal)
|
|
2457
|
+
).then(
|
|
2458
|
+
res => {
|
|
2459
|
+
return buildResponse(res).then(_data => {
|
|
2460
|
+
return JsonDecode<ResolveENSAddressResponse>(_data, 'ResolveENSAddressResponse')
|
|
2461
|
+
})
|
|
2462
|
+
},
|
|
2463
|
+
error => {
|
|
2464
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2465
|
+
}
|
|
2466
|
+
)
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
isValidSignature = (
|
|
2470
|
+
req: IsValidSignatureRequest,
|
|
2471
|
+
headers?: object,
|
|
2472
|
+
signal?: AbortSignal
|
|
2473
|
+
): Promise<IsValidSignatureResponse> => {
|
|
2260
2474
|
return this.fetch(
|
|
2261
2475
|
this.url('IsValidSignature'),
|
|
2262
|
-
createHttpRequest(JsonEncode(req, 'IsValidSignatureRequest'), headers, signal)
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2476
|
+
createHttpRequest(JsonEncode(req, 'IsValidSignatureRequest'), headers, signal)
|
|
2477
|
+
).then(
|
|
2478
|
+
res => {
|
|
2479
|
+
return buildResponse(res).then(_data => {
|
|
2480
|
+
return JsonDecode<IsValidSignatureResponse>(_data, 'IsValidSignatureResponse')
|
|
2481
|
+
})
|
|
2482
|
+
},
|
|
2483
|
+
error => {
|
|
2484
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2485
|
+
}
|
|
2486
|
+
)
|
|
2487
|
+
}
|
|
2488
|
+
|
|
2489
|
+
isValidMessageSignature = (
|
|
2490
|
+
req: IsValidMessageSignatureRequest,
|
|
2491
|
+
headers?: object,
|
|
2492
|
+
signal?: AbortSignal
|
|
2493
|
+
): Promise<IsValidMessageSignatureResponse> => {
|
|
2272
2494
|
return this.fetch(
|
|
2273
2495
|
this.url('IsValidMessageSignature'),
|
|
2274
|
-
createHttpRequest(JsonEncode(req, 'IsValidMessageSignatureRequest'), headers, signal)
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2496
|
+
createHttpRequest(JsonEncode(req, 'IsValidMessageSignatureRequest'), headers, signal)
|
|
2497
|
+
).then(
|
|
2498
|
+
res => {
|
|
2499
|
+
return buildResponse(res).then(_data => {
|
|
2500
|
+
return JsonDecode<IsValidMessageSignatureResponse>(_data, 'IsValidMessageSignatureResponse')
|
|
2501
|
+
})
|
|
2502
|
+
},
|
|
2503
|
+
error => {
|
|
2504
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2505
|
+
}
|
|
2506
|
+
)
|
|
2507
|
+
}
|
|
2508
|
+
|
|
2509
|
+
isValidTypedDataSignature = (
|
|
2510
|
+
req: IsValidTypedDataSignatureRequest,
|
|
2511
|
+
headers?: object,
|
|
2512
|
+
signal?: AbortSignal
|
|
2513
|
+
): Promise<IsValidTypedDataSignatureResponse> => {
|
|
2284
2514
|
return this.fetch(
|
|
2285
2515
|
this.url('IsValidTypedDataSignature'),
|
|
2286
|
-
createHttpRequest(JsonEncode(req, 'IsValidTypedDataSignatureRequest'), headers, signal)
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2516
|
+
createHttpRequest(JsonEncode(req, 'IsValidTypedDataSignatureRequest'), headers, signal)
|
|
2517
|
+
).then(
|
|
2518
|
+
res => {
|
|
2519
|
+
return buildResponse(res).then(_data => {
|
|
2520
|
+
return JsonDecode<IsValidTypedDataSignatureResponse>(_data, 'IsValidTypedDataSignatureResponse')
|
|
2521
|
+
})
|
|
2522
|
+
},
|
|
2523
|
+
error => {
|
|
2524
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2525
|
+
}
|
|
2526
|
+
)
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
isValidETHAuthProof = (
|
|
2530
|
+
req: IsValidETHAuthProofRequest,
|
|
2531
|
+
headers?: object,
|
|
2532
|
+
signal?: AbortSignal
|
|
2533
|
+
): Promise<IsValidETHAuthProofResponse> => {
|
|
2296
2534
|
return this.fetch(
|
|
2297
2535
|
this.url('IsValidETHAuthProof'),
|
|
2298
|
-
createHttpRequest(JsonEncode(req, 'IsValidETHAuthProofRequest'), headers, signal)
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2536
|
+
createHttpRequest(JsonEncode(req, 'IsValidETHAuthProofRequest'), headers, signal)
|
|
2537
|
+
).then(
|
|
2538
|
+
res => {
|
|
2539
|
+
return buildResponse(res).then(_data => {
|
|
2540
|
+
return JsonDecode<IsValidETHAuthProofResponse>(_data, 'IsValidETHAuthProofResponse')
|
|
2541
|
+
})
|
|
2542
|
+
},
|
|
2543
|
+
error => {
|
|
2544
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2545
|
+
}
|
|
2546
|
+
)
|
|
2305
2547
|
}
|
|
2306
2548
|
|
|
2307
2549
|
getOnRampURL = (req: GetOnRampURLRequest, headers?: object, signal?: AbortSignal): Promise<GetOnRampURLResponse> => {
|
|
2308
|
-
return this.fetch(
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
}
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2550
|
+
return this.fetch(this.url('GetOnRampURL'), createHttpRequest(JsonEncode(req, 'GetOnRampURLRequest'), headers, signal)).then(
|
|
2551
|
+
res => {
|
|
2552
|
+
return buildResponse(res).then(_data => {
|
|
2553
|
+
return JsonDecode<GetOnRampURLResponse>(_data, 'GetOnRampURLResponse')
|
|
2554
|
+
})
|
|
2555
|
+
},
|
|
2556
|
+
error => {
|
|
2557
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2558
|
+
}
|
|
2559
|
+
)
|
|
2317
2560
|
}
|
|
2318
2561
|
|
|
2319
2562
|
transakGetCountries = (headers?: object, signal?: AbortSignal): Promise<TransakGetCountriesResponse> => {
|
|
2320
|
-
return this.fetch(
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
}
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2563
|
+
return this.fetch(this.url('TransakGetCountries'), createHttpRequest('{}', headers, signal)).then(
|
|
2564
|
+
res => {
|
|
2565
|
+
return buildResponse(res).then(_data => {
|
|
2566
|
+
return JsonDecode<TransakGetCountriesResponse>(_data, 'TransakGetCountriesResponse')
|
|
2567
|
+
})
|
|
2568
|
+
},
|
|
2569
|
+
error => {
|
|
2570
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2571
|
+
}
|
|
2572
|
+
)
|
|
2329
2573
|
}
|
|
2330
2574
|
|
|
2331
2575
|
transakGetCryptoCurrencies = (headers?: object, signal?: AbortSignal): Promise<TransakGetCryptoCurrenciesResponse> => {
|
|
2332
|
-
return this.fetch(
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
}
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2576
|
+
return this.fetch(this.url('TransakGetCryptoCurrencies'), createHttpRequest('{}', headers, signal)).then(
|
|
2577
|
+
res => {
|
|
2578
|
+
return buildResponse(res).then(_data => {
|
|
2579
|
+
return JsonDecode<TransakGetCryptoCurrenciesResponse>(_data, 'TransakGetCryptoCurrenciesResponse')
|
|
2580
|
+
})
|
|
2581
|
+
},
|
|
2582
|
+
error => {
|
|
2583
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2584
|
+
}
|
|
2585
|
+
)
|
|
2341
2586
|
}
|
|
2342
2587
|
|
|
2343
2588
|
transakGetFiatCurrencies = (headers?: object, signal?: AbortSignal): Promise<TransakGetFiatCurrenciesResponse> => {
|
|
2344
|
-
return this.fetch(
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
}
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2589
|
+
return this.fetch(this.url('TransakGetFiatCurrencies'), createHttpRequest('{}', headers, signal)).then(
|
|
2590
|
+
res => {
|
|
2591
|
+
return buildResponse(res).then(_data => {
|
|
2592
|
+
return JsonDecode<TransakGetFiatCurrenciesResponse>(_data, 'TransakGetFiatCurrenciesResponse')
|
|
2593
|
+
})
|
|
2594
|
+
},
|
|
2595
|
+
error => {
|
|
2596
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2597
|
+
}
|
|
2598
|
+
)
|
|
2353
2599
|
}
|
|
2354
2600
|
|
|
2355
2601
|
transakGetPrice = (req: TransakGetPriceRequest, headers?: object, signal?: AbortSignal): Promise<TransakGetPriceResponse> => {
|
|
2356
2602
|
return this.fetch(
|
|
2357
2603
|
this.url('TransakGetPrice'),
|
|
2358
|
-
createHttpRequest(JsonEncode(req, 'TransakGetPriceRequest'), headers, signal)
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2604
|
+
createHttpRequest(JsonEncode(req, 'TransakGetPriceRequest'), headers, signal)
|
|
2605
|
+
).then(
|
|
2606
|
+
res => {
|
|
2607
|
+
return buildResponse(res).then(_data => {
|
|
2608
|
+
return JsonDecode<TransakGetPriceResponse>(_data, 'TransakGetPriceResponse')
|
|
2609
|
+
})
|
|
2610
|
+
},
|
|
2611
|
+
error => {
|
|
2612
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2613
|
+
}
|
|
2614
|
+
)
|
|
2615
|
+
}
|
|
2616
|
+
|
|
2617
|
+
transakGetSupportedNFTCheckoutChains = (
|
|
2618
|
+
headers?: object,
|
|
2619
|
+
signal?: AbortSignal
|
|
2620
|
+
): Promise<TransakGetSupportedNFTCheckoutChainsResponse> => {
|
|
2621
|
+
return this.fetch(this.url('TransakGetSupportedNFTCheckoutChains'), createHttpRequest('{}', headers, signal)).then(
|
|
2622
|
+
res => {
|
|
2623
|
+
return buildResponse(res).then(_data => {
|
|
2624
|
+
return JsonDecode<TransakGetSupportedNFTCheckoutChainsResponse>(_data, 'TransakGetSupportedNFTCheckoutChainsResponse')
|
|
2625
|
+
})
|
|
2626
|
+
},
|
|
2627
|
+
error => {
|
|
2628
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2629
|
+
}
|
|
2630
|
+
)
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2633
|
+
transakGetWidgetURL = (
|
|
2634
|
+
req: TransakGetWidgetURLRequest,
|
|
2635
|
+
headers?: object,
|
|
2636
|
+
signal?: AbortSignal
|
|
2637
|
+
): Promise<TransakGetWidgetURLResponse> => {
|
|
2380
2638
|
return this.fetch(
|
|
2381
2639
|
this.url('TransakGetWidgetURL'),
|
|
2382
|
-
createHttpRequest(JsonEncode(req, 'TransakGetWidgetURLRequest'), headers, signal)
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2640
|
+
createHttpRequest(JsonEncode(req, 'TransakGetWidgetURLRequest'), headers, signal)
|
|
2641
|
+
).then(
|
|
2642
|
+
res => {
|
|
2643
|
+
return buildResponse(res).then(_data => {
|
|
2644
|
+
return JsonDecode<TransakGetWidgetURLResponse>(_data, 'TransakGetWidgetURLResponse')
|
|
2645
|
+
})
|
|
2646
|
+
},
|
|
2647
|
+
error => {
|
|
2648
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2649
|
+
}
|
|
2650
|
+
)
|
|
2389
2651
|
}
|
|
2390
2652
|
|
|
2391
2653
|
getCoinPrices = (req: GetCoinPricesRequest, headers?: object, signal?: AbortSignal): Promise<GetCoinPricesResponse> => {
|
|
2392
2654
|
return this.fetch(
|
|
2393
2655
|
this.url('GetCoinPrices'),
|
|
2394
|
-
createHttpRequest(JsonEncode(req, 'GetCoinPricesRequest'), headers, signal)
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2656
|
+
createHttpRequest(JsonEncode(req, 'GetCoinPricesRequest'), headers, signal)
|
|
2657
|
+
).then(
|
|
2658
|
+
res => {
|
|
2659
|
+
return buildResponse(res).then(_data => {
|
|
2660
|
+
return JsonDecode<GetCoinPricesResponse>(_data, 'GetCoinPricesResponse')
|
|
2661
|
+
})
|
|
2662
|
+
},
|
|
2663
|
+
error => {
|
|
2664
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2665
|
+
}
|
|
2666
|
+
)
|
|
2667
|
+
}
|
|
2668
|
+
|
|
2669
|
+
getCollectiblePrices = (
|
|
2670
|
+
req: GetCollectiblePricesRequest,
|
|
2671
|
+
headers?: object,
|
|
2672
|
+
signal?: AbortSignal
|
|
2673
|
+
): Promise<GetCollectiblePricesResponse> => {
|
|
2404
2674
|
return this.fetch(
|
|
2405
2675
|
this.url('GetCollectiblePrices'),
|
|
2406
|
-
createHttpRequest(JsonEncode(req, 'GetCollectiblePricesRequest'), headers, signal)
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2676
|
+
createHttpRequest(JsonEncode(req, 'GetCollectiblePricesRequest'), headers, signal)
|
|
2677
|
+
).then(
|
|
2678
|
+
res => {
|
|
2679
|
+
return buildResponse(res).then(_data => {
|
|
2680
|
+
return JsonDecode<GetCollectiblePricesResponse>(_data, 'GetCollectiblePricesResponse')
|
|
2681
|
+
})
|
|
2682
|
+
},
|
|
2683
|
+
error => {
|
|
2684
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2685
|
+
}
|
|
2686
|
+
)
|
|
2413
2687
|
}
|
|
2414
2688
|
|
|
2415
2689
|
getExchangeRate = (req: GetExchangeRateRequest, headers?: object, signal?: AbortSignal): Promise<GetExchangeRateResponse> => {
|
|
2416
2690
|
return this.fetch(
|
|
2417
2691
|
this.url('GetExchangeRate'),
|
|
2418
|
-
createHttpRequest(JsonEncode(req, 'GetExchangeRateRequest'), headers, signal)
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2692
|
+
createHttpRequest(JsonEncode(req, 'GetExchangeRateRequest'), headers, signal)
|
|
2693
|
+
).then(
|
|
2694
|
+
res => {
|
|
2695
|
+
return buildResponse(res).then(_data => {
|
|
2696
|
+
return JsonDecode<GetExchangeRateResponse>(_data, 'GetExchangeRateResponse')
|
|
2697
|
+
})
|
|
2698
|
+
},
|
|
2699
|
+
error => {
|
|
2700
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2701
|
+
}
|
|
2702
|
+
)
|
|
2425
2703
|
}
|
|
2426
2704
|
|
|
2427
2705
|
memoryStore = (req: MemoryStoreRequest, headers?: object, signal?: AbortSignal): Promise<MemoryStoreResponse> => {
|
|
2428
|
-
return this.fetch(
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
}
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2706
|
+
return this.fetch(this.url('MemoryStore'), createHttpRequest(JsonEncode(req, 'MemoryStoreRequest'), headers, signal)).then(
|
|
2707
|
+
res => {
|
|
2708
|
+
return buildResponse(res).then(_data => {
|
|
2709
|
+
return JsonDecode<MemoryStoreResponse>(_data, 'MemoryStoreResponse')
|
|
2710
|
+
})
|
|
2711
|
+
},
|
|
2712
|
+
error => {
|
|
2713
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2714
|
+
}
|
|
2715
|
+
)
|
|
2437
2716
|
}
|
|
2438
2717
|
|
|
2439
2718
|
memoryLoad = (req: MemoryLoadRequest, headers?: object, signal?: AbortSignal): Promise<MemoryLoadResponse> => {
|
|
2440
|
-
return this.fetch(
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
}
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2719
|
+
return this.fetch(this.url('MemoryLoad'), createHttpRequest(JsonEncode(req, 'MemoryLoadRequest'), headers, signal)).then(
|
|
2720
|
+
res => {
|
|
2721
|
+
return buildResponse(res).then(_data => {
|
|
2722
|
+
return JsonDecode<MemoryLoadResponse>(_data, 'MemoryLoadResponse')
|
|
2723
|
+
})
|
|
2724
|
+
},
|
|
2725
|
+
error => {
|
|
2726
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2727
|
+
}
|
|
2728
|
+
)
|
|
2449
2729
|
}
|
|
2450
2730
|
|
|
2451
2731
|
getInviteInfo = (headers?: object, signal?: AbortSignal): Promise<GetInviteInfoResponse> => {
|
|
2452
|
-
return this.fetch(
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
}
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2732
|
+
return this.fetch(this.url('GetInviteInfo'), createHttpRequest('{}', headers, signal)).then(
|
|
2733
|
+
res => {
|
|
2734
|
+
return buildResponse(res).then(_data => {
|
|
2735
|
+
return JsonDecode<GetInviteInfoResponse>(_data, 'GetInviteInfoResponse')
|
|
2736
|
+
})
|
|
2737
|
+
},
|
|
2738
|
+
error => {
|
|
2739
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2740
|
+
}
|
|
2741
|
+
)
|
|
2742
|
+
}
|
|
2743
|
+
|
|
2744
|
+
isValidAccessCode = (
|
|
2745
|
+
req: IsValidAccessCodeRequest,
|
|
2746
|
+
headers?: object,
|
|
2747
|
+
signal?: AbortSignal
|
|
2748
|
+
): Promise<IsValidAccessCodeResponse> => {
|
|
2464
2749
|
return this.fetch(
|
|
2465
2750
|
this.url('IsValidAccessCode'),
|
|
2466
|
-
createHttpRequest(JsonEncode(req, 'IsValidAccessCodeRequest'), headers, signal)
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2751
|
+
createHttpRequest(JsonEncode(req, 'IsValidAccessCodeRequest'), headers, signal)
|
|
2752
|
+
).then(
|
|
2753
|
+
res => {
|
|
2754
|
+
return buildResponse(res).then(_data => {
|
|
2755
|
+
return JsonDecode<IsValidAccessCodeResponse>(_data, 'IsValidAccessCodeResponse')
|
|
2756
|
+
})
|
|
2757
|
+
},
|
|
2758
|
+
error => {
|
|
2759
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2760
|
+
}
|
|
2761
|
+
)
|
|
2762
|
+
}
|
|
2763
|
+
|
|
2764
|
+
internalClaimAccessCode = (
|
|
2765
|
+
req: InternalClaimAccessCodeRequest,
|
|
2766
|
+
headers?: object,
|
|
2767
|
+
signal?: AbortSignal
|
|
2768
|
+
): Promise<InternalClaimAccessCodeResponse> => {
|
|
2476
2769
|
return this.fetch(
|
|
2477
2770
|
this.url('InternalClaimAccessCode'),
|
|
2478
|
-
createHttpRequest(JsonEncode(req, 'InternalClaimAccessCodeRequest'), headers, signal)
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2771
|
+
createHttpRequest(JsonEncode(req, 'InternalClaimAccessCodeRequest'), headers, signal)
|
|
2772
|
+
).then(
|
|
2773
|
+
res => {
|
|
2774
|
+
return buildResponse(res).then(_data => {
|
|
2775
|
+
return JsonDecode<InternalClaimAccessCodeResponse>(_data, 'InternalClaimAccessCodeResponse')
|
|
2776
|
+
})
|
|
2777
|
+
},
|
|
2778
|
+
error => {
|
|
2779
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2780
|
+
}
|
|
2781
|
+
)
|
|
2782
|
+
}
|
|
2783
|
+
|
|
2784
|
+
blockNumberAtTime = (
|
|
2785
|
+
req: BlockNumberAtTimeRequest,
|
|
2786
|
+
headers?: object,
|
|
2787
|
+
signal?: AbortSignal
|
|
2788
|
+
): Promise<BlockNumberAtTimeResponse> => {
|
|
2488
2789
|
return this.fetch(
|
|
2489
2790
|
this.url('BlockNumberAtTime'),
|
|
2490
|
-
createHttpRequest(JsonEncode(req, 'BlockNumberAtTimeRequest'), headers, signal)
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2791
|
+
createHttpRequest(JsonEncode(req, 'BlockNumberAtTimeRequest'), headers, signal)
|
|
2792
|
+
).then(
|
|
2793
|
+
res => {
|
|
2794
|
+
return buildResponse(res).then(_data => {
|
|
2795
|
+
return JsonDecode<BlockNumberAtTimeResponse>(_data, 'BlockNumberAtTimeResponse')
|
|
2796
|
+
})
|
|
2797
|
+
},
|
|
2798
|
+
error => {
|
|
2799
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2800
|
+
}
|
|
2801
|
+
)
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2804
|
+
paperSessionSecret = (
|
|
2805
|
+
req: PaperSessionSecretRequest,
|
|
2806
|
+
headers?: object,
|
|
2807
|
+
signal?: AbortSignal
|
|
2808
|
+
): Promise<PaperSessionSecretResponse> => {
|
|
2500
2809
|
return this.fetch(
|
|
2501
2810
|
this.url('PaperSessionSecret'),
|
|
2502
|
-
createHttpRequest(JsonEncode(req, 'PaperSessionSecretRequest'), headers, signal)
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2811
|
+
createHttpRequest(JsonEncode(req, 'PaperSessionSecretRequest'), headers, signal)
|
|
2812
|
+
).then(
|
|
2813
|
+
res => {
|
|
2814
|
+
return buildResponse(res).then(_data => {
|
|
2815
|
+
return JsonDecode<PaperSessionSecretResponse>(_data, 'PaperSessionSecretResponse')
|
|
2816
|
+
})
|
|
2817
|
+
},
|
|
2818
|
+
error => {
|
|
2819
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2820
|
+
}
|
|
2821
|
+
)
|
|
2822
|
+
}
|
|
2823
|
+
|
|
2824
|
+
paperSessionSecret2 = (
|
|
2825
|
+
req: PaperSessionSecret2Request,
|
|
2826
|
+
headers?: object,
|
|
2827
|
+
signal?: AbortSignal
|
|
2828
|
+
): Promise<PaperSessionSecret2Response> => {
|
|
2512
2829
|
return this.fetch(
|
|
2513
2830
|
this.url('PaperSessionSecret2'),
|
|
2514
|
-
createHttpRequest(JsonEncode(req, 'PaperSessionSecret2Request'), headers, signal)
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2831
|
+
createHttpRequest(JsonEncode(req, 'PaperSessionSecret2Request'), headers, signal)
|
|
2832
|
+
).then(
|
|
2833
|
+
res => {
|
|
2834
|
+
return buildResponse(res).then(_data => {
|
|
2835
|
+
return JsonDecode<PaperSessionSecret2Response>(_data, 'PaperSessionSecret2Response')
|
|
2836
|
+
})
|
|
2837
|
+
},
|
|
2838
|
+
error => {
|
|
2839
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2840
|
+
}
|
|
2841
|
+
)
|
|
2521
2842
|
}
|
|
2522
2843
|
|
|
2523
2844
|
linkWallet = (req: LinkWalletRequest, headers?: object, signal?: AbortSignal): Promise<LinkWalletResponse> => {
|
|
2524
|
-
return this.fetch(
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
}
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2845
|
+
return this.fetch(this.url('LinkWallet'), createHttpRequest(JsonEncode(req, 'LinkWalletRequest'), headers, signal)).then(
|
|
2846
|
+
res => {
|
|
2847
|
+
return buildResponse(res).then(_data => {
|
|
2848
|
+
return JsonDecode<LinkWalletResponse>(_data, 'LinkWalletResponse')
|
|
2849
|
+
})
|
|
2850
|
+
},
|
|
2851
|
+
error => {
|
|
2852
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2853
|
+
}
|
|
2854
|
+
)
|
|
2855
|
+
}
|
|
2856
|
+
|
|
2857
|
+
getLinkedWallets = (
|
|
2858
|
+
req: GetLinkedWalletsRequest,
|
|
2859
|
+
headers?: object,
|
|
2860
|
+
signal?: AbortSignal
|
|
2861
|
+
): Promise<GetLinkedWalletsResponse> => {
|
|
2536
2862
|
return this.fetch(
|
|
2537
2863
|
this.url('GetLinkedWallets'),
|
|
2538
|
-
createHttpRequest(JsonEncode(req, 'GetLinkedWalletsRequest'), headers, signal)
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2864
|
+
createHttpRequest(JsonEncode(req, 'GetLinkedWalletsRequest'), headers, signal)
|
|
2865
|
+
).then(
|
|
2866
|
+
res => {
|
|
2867
|
+
return buildResponse(res).then(_data => {
|
|
2868
|
+
return JsonDecode<GetLinkedWalletsResponse>(_data, 'GetLinkedWalletsResponse')
|
|
2869
|
+
})
|
|
2870
|
+
},
|
|
2871
|
+
error => {
|
|
2872
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2873
|
+
}
|
|
2874
|
+
)
|
|
2875
|
+
}
|
|
2876
|
+
|
|
2877
|
+
removeLinkedWallet = (
|
|
2878
|
+
req: RemoveLinkedWalletRequest,
|
|
2879
|
+
headers?: object,
|
|
2880
|
+
signal?: AbortSignal
|
|
2881
|
+
): Promise<RemoveLinkedWalletResponse> => {
|
|
2548
2882
|
return this.fetch(
|
|
2549
2883
|
this.url('RemoveLinkedWallet'),
|
|
2550
|
-
createHttpRequest(JsonEncode(req, 'RemoveLinkedWalletRequest'), headers, signal)
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2884
|
+
createHttpRequest(JsonEncode(req, 'RemoveLinkedWalletRequest'), headers, signal)
|
|
2885
|
+
).then(
|
|
2886
|
+
res => {
|
|
2887
|
+
return buildResponse(res).then(_data => {
|
|
2888
|
+
return JsonDecode<RemoveLinkedWalletResponse>(_data, 'RemoveLinkedWalletResponse')
|
|
2889
|
+
})
|
|
2890
|
+
},
|
|
2891
|
+
error => {
|
|
2892
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2893
|
+
}
|
|
2894
|
+
)
|
|
2895
|
+
}
|
|
2896
|
+
|
|
2897
|
+
generateWaaSVerificationURL = (
|
|
2898
|
+
req: GenerateWaaSVerificationURLRequest,
|
|
2899
|
+
headers?: object,
|
|
2900
|
+
signal?: AbortSignal
|
|
2901
|
+
): Promise<GenerateWaaSVerificationURLResponse> => {
|
|
2560
2902
|
return this.fetch(
|
|
2561
2903
|
this.url('GenerateWaaSVerificationURL'),
|
|
2562
|
-
createHttpRequest(JsonEncode(req, 'GenerateWaaSVerificationURLRequest'), headers, signal)
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2904
|
+
createHttpRequest(JsonEncode(req, 'GenerateWaaSVerificationURLRequest'), headers, signal)
|
|
2905
|
+
).then(
|
|
2906
|
+
res => {
|
|
2907
|
+
return buildResponse(res).then(_data => {
|
|
2908
|
+
return JsonDecode<GenerateWaaSVerificationURLResponse>(_data, 'GenerateWaaSVerificationURLResponse')
|
|
2909
|
+
})
|
|
2910
|
+
},
|
|
2911
|
+
error => {
|
|
2912
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2913
|
+
}
|
|
2914
|
+
)
|
|
2915
|
+
}
|
|
2916
|
+
|
|
2917
|
+
validateWaaSVerificationNonce = (
|
|
2918
|
+
req: ValidateWaaSVerificationNonceRequest,
|
|
2919
|
+
headers?: object,
|
|
2920
|
+
signal?: AbortSignal
|
|
2921
|
+
): Promise<ValidateWaaSVerificationNonceResponse> => {
|
|
2572
2922
|
return this.fetch(
|
|
2573
2923
|
this.url('ValidateWaaSVerificationNonce'),
|
|
2574
|
-
createHttpRequest(JsonEncode(req, 'ValidateWaaSVerificationNonceRequest'), headers, signal)
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2924
|
+
createHttpRequest(JsonEncode(req, 'ValidateWaaSVerificationNonceRequest'), headers, signal)
|
|
2925
|
+
).then(
|
|
2926
|
+
res => {
|
|
2927
|
+
return buildResponse(res).then(_data => {
|
|
2928
|
+
return JsonDecode<ValidateWaaSVerificationNonceResponse>(_data, 'ValidateWaaSVerificationNonceResponse')
|
|
2929
|
+
})
|
|
2930
|
+
},
|
|
2931
|
+
error => {
|
|
2932
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2933
|
+
}
|
|
2934
|
+
)
|
|
2935
|
+
}
|
|
2936
|
+
|
|
2937
|
+
listAdoptedWallets = (
|
|
2938
|
+
req: ListAdoptedWalletsRequest,
|
|
2939
|
+
headers?: object,
|
|
2940
|
+
signal?: AbortSignal
|
|
2941
|
+
): Promise<ListAdoptedWalletsResponse> => {
|
|
2584
2942
|
return this.fetch(
|
|
2585
2943
|
this.url('ListAdoptedWallets'),
|
|
2586
|
-
createHttpRequest(JsonEncode(req, 'ListAdoptedWalletsRequest'), headers, signal)
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2944
|
+
createHttpRequest(JsonEncode(req, 'ListAdoptedWalletsRequest'), headers, signal)
|
|
2945
|
+
).then(
|
|
2946
|
+
res => {
|
|
2947
|
+
return buildResponse(res).then(_data => {
|
|
2948
|
+
return JsonDecode<ListAdoptedWalletsResponse>(_data, 'ListAdoptedWalletsResponse')
|
|
2949
|
+
})
|
|
2950
|
+
},
|
|
2951
|
+
error => {
|
|
2952
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2953
|
+
}
|
|
2954
|
+
)
|
|
2593
2955
|
}
|
|
2594
2956
|
|
|
2595
2957
|
getLifiChains = (headers?: object, signal?: AbortSignal): Promise<GetLifiChainsResponse> => {
|
|
2596
|
-
return this.fetch(
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
}
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2958
|
+
return this.fetch(this.url('GetLifiChains'), createHttpRequest('{}', headers, signal)).then(
|
|
2959
|
+
res => {
|
|
2960
|
+
return buildResponse(res).then(_data => {
|
|
2961
|
+
return JsonDecode<GetLifiChainsResponse>(_data, 'GetLifiChainsResponse')
|
|
2962
|
+
})
|
|
2963
|
+
},
|
|
2964
|
+
error => {
|
|
2965
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2966
|
+
}
|
|
2967
|
+
)
|
|
2605
2968
|
}
|
|
2606
2969
|
|
|
2607
2970
|
getLifiTokens = (req: GetLifiTokensRequest, headers?: object, signal?: AbortSignal): Promise<GetLifiTokensResponse> => {
|
|
2608
2971
|
return this.fetch(
|
|
2609
2972
|
this.url('GetLifiTokens'),
|
|
2610
|
-
createHttpRequest(JsonEncode(req, 'GetLifiTokensRequest'), headers, signal)
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2973
|
+
createHttpRequest(JsonEncode(req, 'GetLifiTokensRequest'), headers, signal)
|
|
2974
|
+
).then(
|
|
2975
|
+
res => {
|
|
2976
|
+
return buildResponse(res).then(_data => {
|
|
2977
|
+
return JsonDecode<GetLifiTokensResponse>(_data, 'GetLifiTokensResponse')
|
|
2978
|
+
})
|
|
2979
|
+
},
|
|
2980
|
+
error => {
|
|
2981
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
2982
|
+
}
|
|
2983
|
+
)
|
|
2984
|
+
}
|
|
2985
|
+
|
|
2986
|
+
getLifiSwapRoutes = (
|
|
2987
|
+
req: GetLifiSwapRoutesRequest,
|
|
2988
|
+
headers?: object,
|
|
2989
|
+
signal?: AbortSignal
|
|
2990
|
+
): Promise<GetLifiSwapRoutesResponse> => {
|
|
2620
2991
|
return this.fetch(
|
|
2621
2992
|
this.url('GetLifiSwapRoutes'),
|
|
2622
|
-
createHttpRequest(JsonEncode(req, 'GetLifiSwapRoutesRequest'), headers, signal)
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2993
|
+
createHttpRequest(JsonEncode(req, 'GetLifiSwapRoutesRequest'), headers, signal)
|
|
2994
|
+
).then(
|
|
2995
|
+
res => {
|
|
2996
|
+
return buildResponse(res).then(_data => {
|
|
2997
|
+
return JsonDecode<GetLifiSwapRoutesResponse>(_data, 'GetLifiSwapRoutesResponse')
|
|
2998
|
+
})
|
|
2999
|
+
},
|
|
3000
|
+
error => {
|
|
3001
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3002
|
+
}
|
|
3003
|
+
)
|
|
3004
|
+
}
|
|
3005
|
+
|
|
3006
|
+
getLifiSwapQuote = (
|
|
3007
|
+
req: GetLifiSwapQuoteRequest,
|
|
3008
|
+
headers?: object,
|
|
3009
|
+
signal?: AbortSignal
|
|
3010
|
+
): Promise<GetLifiSwapQuoteResponse> => {
|
|
2632
3011
|
return this.fetch(
|
|
2633
3012
|
this.url('GetLifiSwapQuote'),
|
|
2634
|
-
createHttpRequest(JsonEncode(req, 'GetLifiSwapQuoteRequest'), headers, signal)
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
3013
|
+
createHttpRequest(JsonEncode(req, 'GetLifiSwapQuoteRequest'), headers, signal)
|
|
3014
|
+
).then(
|
|
3015
|
+
res => {
|
|
3016
|
+
return buildResponse(res).then(_data => {
|
|
3017
|
+
return JsonDecode<GetLifiSwapQuoteResponse>(_data, 'GetLifiSwapQuoteResponse')
|
|
3018
|
+
})
|
|
3019
|
+
},
|
|
3020
|
+
error => {
|
|
3021
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3022
|
+
}
|
|
3023
|
+
)
|
|
3024
|
+
}
|
|
3025
|
+
|
|
3026
|
+
getIntentCallsPayloads = (
|
|
3027
|
+
req: GetIntentCallsPayloadsRequest,
|
|
3028
|
+
headers?: object,
|
|
3029
|
+
signal?: AbortSignal
|
|
3030
|
+
): Promise<GetIntentCallsPayloadsResponse> => {
|
|
2644
3031
|
return this.fetch(
|
|
2645
3032
|
this.url('GetIntentCallsPayloads'),
|
|
2646
|
-
createHttpRequest(JsonEncode(req, 'GetIntentCallsPayloadsRequest'), headers, signal)
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
3033
|
+
createHttpRequest(JsonEncode(req, 'GetIntentCallsPayloadsRequest'), headers, signal)
|
|
3034
|
+
).then(
|
|
3035
|
+
res => {
|
|
3036
|
+
return buildResponse(res).then(_data => {
|
|
3037
|
+
return JsonDecode<GetIntentCallsPayloadsResponse>(_data, 'GetIntentCallsPayloadsResponse')
|
|
3038
|
+
})
|
|
3039
|
+
},
|
|
3040
|
+
error => {
|
|
3041
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3042
|
+
}
|
|
3043
|
+
)
|
|
3044
|
+
}
|
|
3045
|
+
|
|
3046
|
+
commitIntentConfig = (
|
|
3047
|
+
req: CommitIntentConfigRequest,
|
|
3048
|
+
headers?: object,
|
|
3049
|
+
signal?: AbortSignal
|
|
3050
|
+
): Promise<CommitIntentConfigResponse> => {
|
|
2656
3051
|
return this.fetch(
|
|
2657
3052
|
this.url('CommitIntentConfig'),
|
|
2658
|
-
createHttpRequest(JsonEncode(req, 'CommitIntentConfigRequest'), headers, signal)
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
3053
|
+
createHttpRequest(JsonEncode(req, 'CommitIntentConfigRequest'), headers, signal)
|
|
3054
|
+
).then(
|
|
3055
|
+
res => {
|
|
3056
|
+
return buildResponse(res).then(_data => {
|
|
3057
|
+
return JsonDecode<CommitIntentConfigResponse>(_data, 'CommitIntentConfigResponse')
|
|
3058
|
+
})
|
|
3059
|
+
},
|
|
3060
|
+
error => {
|
|
3061
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3062
|
+
}
|
|
3063
|
+
)
|
|
2665
3064
|
}
|
|
2666
3065
|
|
|
2667
3066
|
getIntentConfig = (req: GetIntentConfigRequest, headers?: object, signal?: AbortSignal): Promise<GetIntentConfigResponse> => {
|
|
2668
3067
|
return this.fetch(
|
|
2669
3068
|
this.url('GetIntentConfig'),
|
|
2670
|
-
createHttpRequest(JsonEncode(req, 'GetIntentConfigRequest'), headers, signal)
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
3069
|
+
createHttpRequest(JsonEncode(req, 'GetIntentConfigRequest'), headers, signal)
|
|
3070
|
+
).then(
|
|
3071
|
+
res => {
|
|
3072
|
+
return buildResponse(res).then(_data => {
|
|
3073
|
+
return JsonDecode<GetIntentConfigResponse>(_data, 'GetIntentConfigResponse')
|
|
3074
|
+
})
|
|
3075
|
+
},
|
|
3076
|
+
error => {
|
|
3077
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3078
|
+
}
|
|
3079
|
+
)
|
|
2677
3080
|
}
|
|
2678
3081
|
|
|
2679
3082
|
listCurrencyGroups = (headers?: object, signal?: AbortSignal): Promise<ListCurrencyGroupsResponse> => {
|
|
2680
|
-
return this.fetch(
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
}
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
3083
|
+
return this.fetch(this.url('ListCurrencyGroups'), createHttpRequest('{}', headers, signal)).then(
|
|
3084
|
+
res => {
|
|
3085
|
+
return buildResponse(res).then(_data => {
|
|
3086
|
+
return JsonDecode<ListCurrencyGroupsResponse>(_data, 'ListCurrencyGroupsResponse')
|
|
3087
|
+
})
|
|
3088
|
+
},
|
|
3089
|
+
error => {
|
|
3090
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3091
|
+
}
|
|
3092
|
+
)
|
|
3093
|
+
}
|
|
3094
|
+
|
|
3095
|
+
addOffchainInventory = (
|
|
3096
|
+
req: AddOffchainInventoryRequest,
|
|
3097
|
+
headers?: object,
|
|
3098
|
+
signal?: AbortSignal
|
|
3099
|
+
): Promise<AddOffchainInventoryResponse> => {
|
|
2692
3100
|
return this.fetch(
|
|
2693
3101
|
this.url('AddOffchainInventory'),
|
|
2694
|
-
createHttpRequest(JsonEncode(req, 'AddOffchainInventoryRequest'), headers, signal)
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
3102
|
+
createHttpRequest(JsonEncode(req, 'AddOffchainInventoryRequest'), headers, signal)
|
|
3103
|
+
).then(
|
|
3104
|
+
res => {
|
|
3105
|
+
return buildResponse(res).then(_data => {
|
|
3106
|
+
return JsonDecode<AddOffchainInventoryResponse>(_data, 'AddOffchainInventoryResponse')
|
|
3107
|
+
})
|
|
3108
|
+
},
|
|
3109
|
+
error => {
|
|
3110
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3111
|
+
}
|
|
3112
|
+
)
|
|
3113
|
+
}
|
|
3114
|
+
|
|
3115
|
+
getOffchainInventory = (
|
|
3116
|
+
req: GetOffchainInventoryRequest,
|
|
3117
|
+
headers?: object,
|
|
3118
|
+
signal?: AbortSignal
|
|
3119
|
+
): Promise<GetOffchainInventoryResponse> => {
|
|
2704
3120
|
return this.fetch(
|
|
2705
3121
|
this.url('GetOffchainInventory'),
|
|
2706
|
-
createHttpRequest(JsonEncode(req, 'GetOffchainInventoryRequest'), headers, signal)
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
3122
|
+
createHttpRequest(JsonEncode(req, 'GetOffchainInventoryRequest'), headers, signal)
|
|
3123
|
+
).then(
|
|
3124
|
+
res => {
|
|
3125
|
+
return buildResponse(res).then(_data => {
|
|
3126
|
+
return JsonDecode<GetOffchainInventoryResponse>(_data, 'GetOffchainInventoryResponse')
|
|
3127
|
+
})
|
|
3128
|
+
},
|
|
3129
|
+
error => {
|
|
3130
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3131
|
+
}
|
|
3132
|
+
)
|
|
3133
|
+
}
|
|
3134
|
+
|
|
3135
|
+
listOffchainInventories = (
|
|
3136
|
+
req: ListOffchainInventoriesRequest,
|
|
3137
|
+
headers?: object,
|
|
3138
|
+
signal?: AbortSignal
|
|
3139
|
+
): Promise<ListOffchainInventoriesResponse> => {
|
|
2716
3140
|
return this.fetch(
|
|
2717
3141
|
this.url('ListOffchainInventories'),
|
|
2718
|
-
createHttpRequest(JsonEncode(req, 'ListOffchainInventoriesRequest'), headers, signal)
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
3142
|
+
createHttpRequest(JsonEncode(req, 'ListOffchainInventoriesRequest'), headers, signal)
|
|
3143
|
+
).then(
|
|
3144
|
+
res => {
|
|
3145
|
+
return buildResponse(res).then(_data => {
|
|
3146
|
+
return JsonDecode<ListOffchainInventoriesResponse>(_data, 'ListOffchainInventoriesResponse')
|
|
3147
|
+
})
|
|
3148
|
+
},
|
|
3149
|
+
error => {
|
|
3150
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3151
|
+
}
|
|
3152
|
+
)
|
|
3153
|
+
}
|
|
3154
|
+
|
|
3155
|
+
updateOffchainInventory = (
|
|
3156
|
+
req: UpdateOffchainInventoryRequest,
|
|
3157
|
+
headers?: object,
|
|
3158
|
+
signal?: AbortSignal
|
|
3159
|
+
): Promise<UpdateOffchainInventoryResponse> => {
|
|
2728
3160
|
return this.fetch(
|
|
2729
3161
|
this.url('UpdateOffchainInventory'),
|
|
2730
|
-
createHttpRequest(JsonEncode(req, 'UpdateOffchainInventoryRequest'), headers, signal)
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
3162
|
+
createHttpRequest(JsonEncode(req, 'UpdateOffchainInventoryRequest'), headers, signal)
|
|
3163
|
+
).then(
|
|
3164
|
+
res => {
|
|
3165
|
+
return buildResponse(res).then(_data => {
|
|
3166
|
+
return JsonDecode<UpdateOffchainInventoryResponse>(_data, 'UpdateOffchainInventoryResponse')
|
|
3167
|
+
})
|
|
3168
|
+
},
|
|
3169
|
+
error => {
|
|
3170
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3171
|
+
}
|
|
3172
|
+
)
|
|
3173
|
+
}
|
|
3174
|
+
|
|
3175
|
+
deleteOffchainInventory = (
|
|
3176
|
+
req: DeleteOffchainInventoryRequest,
|
|
3177
|
+
headers?: object,
|
|
3178
|
+
signal?: AbortSignal
|
|
3179
|
+
): Promise<DeleteOffchainInventoryResponse> => {
|
|
2740
3180
|
return this.fetch(
|
|
2741
3181
|
this.url('DeleteOffchainInventory'),
|
|
2742
|
-
createHttpRequest(JsonEncode(req, 'DeleteOffchainInventoryRequest'), headers, signal)
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
3182
|
+
createHttpRequest(JsonEncode(req, 'DeleteOffchainInventoryRequest'), headers, signal)
|
|
3183
|
+
).then(
|
|
3184
|
+
res => {
|
|
3185
|
+
return buildResponse(res).then(_data => {
|
|
3186
|
+
return JsonDecode<DeleteOffchainInventoryResponse>(_data, 'DeleteOffchainInventoryResponse')
|
|
3187
|
+
})
|
|
3188
|
+
},
|
|
3189
|
+
error => {
|
|
3190
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3191
|
+
}
|
|
3192
|
+
)
|
|
3193
|
+
}
|
|
3194
|
+
|
|
3195
|
+
requestOffchainPayment = (
|
|
3196
|
+
req: RequestOffchainPaymentRequest,
|
|
3197
|
+
headers?: object,
|
|
3198
|
+
signal?: AbortSignal
|
|
3199
|
+
): Promise<RequestOffchainPaymentResponse> => {
|
|
2752
3200
|
return this.fetch(
|
|
2753
3201
|
this.url('RequestOffchainPayment'),
|
|
2754
|
-
createHttpRequest(JsonEncode(req, 'RequestOffchainPaymentRequest'), headers, signal)
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
3202
|
+
createHttpRequest(JsonEncode(req, 'RequestOffchainPaymentRequest'), headers, signal)
|
|
3203
|
+
).then(
|
|
3204
|
+
res => {
|
|
3205
|
+
return buildResponse(res).then(_data => {
|
|
3206
|
+
return JsonDecode<RequestOffchainPaymentResponse>(_data, 'RequestOffchainPaymentResponse')
|
|
3207
|
+
})
|
|
3208
|
+
},
|
|
3209
|
+
error => {
|
|
3210
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3211
|
+
}
|
|
3212
|
+
)
|
|
3213
|
+
}
|
|
3214
|
+
|
|
3215
|
+
listOffchainPayments = (
|
|
3216
|
+
req: ListOffchainPaymentsRequest,
|
|
3217
|
+
headers?: object,
|
|
3218
|
+
signal?: AbortSignal
|
|
3219
|
+
): Promise<ListOffchainPaymentsResponse> => {
|
|
2764
3220
|
return this.fetch(
|
|
2765
3221
|
this.url('ListOffchainPayments'),
|
|
2766
|
-
createHttpRequest(JsonEncode(req, 'ListOffchainPaymentsRequest'), headers, signal)
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
3222
|
+
createHttpRequest(JsonEncode(req, 'ListOffchainPaymentsRequest'), headers, signal)
|
|
3223
|
+
).then(
|
|
3224
|
+
res => {
|
|
3225
|
+
return buildResponse(res).then(_data => {
|
|
3226
|
+
return JsonDecode<ListOffchainPaymentsResponse>(_data, 'ListOffchainPaymentsResponse')
|
|
3227
|
+
})
|
|
3228
|
+
},
|
|
3229
|
+
error => {
|
|
3230
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3231
|
+
}
|
|
3232
|
+
)
|
|
2773
3233
|
}
|
|
2774
3234
|
|
|
2775
3235
|
savePack = (req: SavePackRequest, headers?: object, signal?: AbortSignal): Promise<SavePackResponse> => {
|
|
2776
|
-
return this.fetch(
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
}
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
3236
|
+
return this.fetch(this.url('SavePack'), createHttpRequest(JsonEncode(req, 'SavePackRequest'), headers, signal)).then(
|
|
3237
|
+
res => {
|
|
3238
|
+
return buildResponse(res).then(_data => {
|
|
3239
|
+
return JsonDecode<SavePackResponse>(_data, 'SavePackResponse')
|
|
3240
|
+
})
|
|
3241
|
+
},
|
|
3242
|
+
error => {
|
|
3243
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3244
|
+
}
|
|
3245
|
+
)
|
|
2785
3246
|
}
|
|
2786
3247
|
|
|
2787
3248
|
getPack = (req: GetPackRequest, headers?: object, signal?: AbortSignal): Promise<GetPackResponse> => {
|
|
2788
|
-
return this.fetch(
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
}
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
3249
|
+
return this.fetch(this.url('GetPack'), createHttpRequest(JsonEncode(req, 'GetPackRequest'), headers, signal)).then(
|
|
3250
|
+
res => {
|
|
3251
|
+
return buildResponse(res).then(_data => {
|
|
3252
|
+
return JsonDecode<GetPackResponse>(_data, 'GetPackResponse')
|
|
3253
|
+
})
|
|
3254
|
+
},
|
|
3255
|
+
error => {
|
|
3256
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3257
|
+
}
|
|
3258
|
+
)
|
|
2797
3259
|
}
|
|
2798
3260
|
|
|
2799
3261
|
getPackIds = (req: GetPackIdsRequest, headers?: object, signal?: AbortSignal): Promise<GetPackIdsResponse> => {
|
|
2800
|
-
return this.fetch(
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
}
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
3262
|
+
return this.fetch(this.url('GetPackIds'), createHttpRequest(JsonEncode(req, 'GetPackIdsRequest'), headers, signal)).then(
|
|
3263
|
+
res => {
|
|
3264
|
+
return buildResponse(res).then(_data => {
|
|
3265
|
+
return JsonDecode<GetPackIdsResponse>(_data, 'GetPackIdsResponse')
|
|
3266
|
+
})
|
|
3267
|
+
},
|
|
3268
|
+
error => {
|
|
3269
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3270
|
+
}
|
|
3271
|
+
)
|
|
2809
3272
|
}
|
|
2810
3273
|
|
|
2811
3274
|
deletePack = (req: DeletePackRequest, headers?: object, signal?: AbortSignal): Promise<DeletePackResponse> => {
|
|
2812
|
-
return this.fetch(
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
}
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
3275
|
+
return this.fetch(this.url('DeletePack'), createHttpRequest(JsonEncode(req, 'DeletePackRequest'), headers, signal)).then(
|
|
3276
|
+
res => {
|
|
3277
|
+
return buildResponse(res).then(_data => {
|
|
3278
|
+
return JsonDecode<DeletePackResponse>(_data, 'DeletePackResponse')
|
|
3279
|
+
})
|
|
3280
|
+
},
|
|
3281
|
+
error => {
|
|
3282
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3283
|
+
}
|
|
3284
|
+
)
|
|
3285
|
+
}
|
|
3286
|
+
|
|
3287
|
+
updatePackContent = (
|
|
3288
|
+
req: UpdatePackContentRequest,
|
|
3289
|
+
headers?: object,
|
|
3290
|
+
signal?: AbortSignal
|
|
3291
|
+
): Promise<UpdatePackContentResponse> => {
|
|
2824
3292
|
return this.fetch(
|
|
2825
3293
|
this.url('UpdatePackContent'),
|
|
2826
|
-
createHttpRequest(JsonEncode(req, 'UpdatePackContentRequest'), headers, signal)
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
3294
|
+
createHttpRequest(JsonEncode(req, 'UpdatePackContentRequest'), headers, signal)
|
|
3295
|
+
).then(
|
|
3296
|
+
res => {
|
|
3297
|
+
return buildResponse(res).then(_data => {
|
|
3298
|
+
return JsonDecode<UpdatePackContentResponse>(_data, 'UpdatePackContentResponse')
|
|
3299
|
+
})
|
|
3300
|
+
},
|
|
3301
|
+
error => {
|
|
3302
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3303
|
+
}
|
|
3304
|
+
)
|
|
2833
3305
|
}
|
|
2834
3306
|
|
|
2835
3307
|
getRevealTxData = (req: GetRevealTxDataRequest, headers?: object, signal?: AbortSignal): Promise<GetRevealTxDataResponse> => {
|
|
2836
3308
|
return this.fetch(
|
|
2837
3309
|
this.url('GetRevealTxData'),
|
|
2838
|
-
createHttpRequest(JsonEncode(req, 'GetRevealTxDataRequest'), headers, signal)
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
3310
|
+
createHttpRequest(JsonEncode(req, 'GetRevealTxDataRequest'), headers, signal)
|
|
3311
|
+
).then(
|
|
3312
|
+
res => {
|
|
3313
|
+
return buildResponse(res).then(_data => {
|
|
3314
|
+
return JsonDecode<GetRevealTxDataResponse>(_data, 'GetRevealTxDataResponse')
|
|
3315
|
+
})
|
|
3316
|
+
},
|
|
3317
|
+
error => {
|
|
3318
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3319
|
+
}
|
|
3320
|
+
)
|
|
3321
|
+
}
|
|
3322
|
+
|
|
3323
|
+
checkoutOptionsPrimary = (
|
|
3324
|
+
req: CheckoutOptionsPrimaryRequest,
|
|
3325
|
+
headers?: object,
|
|
3326
|
+
signal?: AbortSignal
|
|
3327
|
+
): Promise<CheckoutOptionsPrimaryResponse> => {
|
|
2848
3328
|
return this.fetch(
|
|
2849
3329
|
this.url('CheckoutOptionsPrimary'),
|
|
2850
|
-
createHttpRequest(JsonEncode(req, 'CheckoutOptionsPrimaryRequest'), headers, signal)
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
3330
|
+
createHttpRequest(JsonEncode(req, 'CheckoutOptionsPrimaryRequest'), headers, signal)
|
|
3331
|
+
).then(
|
|
3332
|
+
res => {
|
|
3333
|
+
return buildResponse(res).then(_data => {
|
|
3334
|
+
return JsonDecode<CheckoutOptionsPrimaryResponse>(_data, 'CheckoutOptionsPrimaryResponse')
|
|
3335
|
+
})
|
|
3336
|
+
},
|
|
3337
|
+
error => {
|
|
3338
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3339
|
+
}
|
|
3340
|
+
)
|
|
3341
|
+
}
|
|
3342
|
+
|
|
3343
|
+
checkoutOptionsSecondary = (
|
|
3344
|
+
req: CheckoutOptionsSecondaryRequest,
|
|
3345
|
+
headers?: object,
|
|
3346
|
+
signal?: AbortSignal
|
|
3347
|
+
): Promise<CheckoutOptionsSecondaryResponse> => {
|
|
2860
3348
|
return this.fetch(
|
|
2861
3349
|
this.url('CheckoutOptionsSecondary'),
|
|
2862
|
-
createHttpRequest(JsonEncode(req, 'CheckoutOptionsSecondaryRequest'), headers, signal)
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
3350
|
+
createHttpRequest(JsonEncode(req, 'CheckoutOptionsSecondaryRequest'), headers, signal)
|
|
3351
|
+
).then(
|
|
3352
|
+
res => {
|
|
3353
|
+
return buildResponse(res).then(_data => {
|
|
3354
|
+
return JsonDecode<CheckoutOptionsSecondaryResponse>(_data, 'CheckoutOptionsSecondaryResponse')
|
|
3355
|
+
})
|
|
3356
|
+
},
|
|
3357
|
+
error => {
|
|
3358
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3359
|
+
}
|
|
3360
|
+
)
|
|
3361
|
+
}
|
|
3362
|
+
|
|
3363
|
+
checkoutOptionsGetTransakContractID = (
|
|
3364
|
+
req: CheckoutOptionsGetTransakContractIDRequest,
|
|
3365
|
+
headers?: object,
|
|
3366
|
+
signal?: AbortSignal
|
|
3367
|
+
): Promise<CheckoutOptionsGetTransakContractIDResponse> => {
|
|
2872
3368
|
return this.fetch(
|
|
2873
3369
|
this.url('CheckoutOptionsGetTransakContractID'),
|
|
2874
|
-
createHttpRequest(JsonEncode(req, 'CheckoutOptionsGetTransakContractIDRequest'), headers, signal)
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
3370
|
+
createHttpRequest(JsonEncode(req, 'CheckoutOptionsGetTransakContractIDRequest'), headers, signal)
|
|
3371
|
+
).then(
|
|
3372
|
+
res => {
|
|
3373
|
+
return buildResponse(res).then(_data => {
|
|
3374
|
+
return JsonDecode<CheckoutOptionsGetTransakContractIDResponse>(_data, 'CheckoutOptionsGetTransakContractIDResponse')
|
|
3375
|
+
})
|
|
3376
|
+
},
|
|
3377
|
+
error => {
|
|
3378
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3379
|
+
}
|
|
3380
|
+
)
|
|
3381
|
+
}
|
|
3382
|
+
|
|
3383
|
+
fortePayCreateIntent = (
|
|
3384
|
+
req: FortePayCreateIntentRequest,
|
|
3385
|
+
headers?: object,
|
|
3386
|
+
signal?: AbortSignal
|
|
3387
|
+
): Promise<FortePayCreateIntentResponse> => {
|
|
2884
3388
|
return this.fetch(
|
|
2885
3389
|
this.url('FortePayCreateIntent'),
|
|
2886
|
-
createHttpRequest(JsonEncode(req, 'FortePayCreateIntentRequest'), headers, signal)
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
3390
|
+
createHttpRequest(JsonEncode(req, 'FortePayCreateIntentRequest'), headers, signal)
|
|
3391
|
+
).then(
|
|
3392
|
+
res => {
|
|
3393
|
+
return buildResponse(res).then(_data => {
|
|
3394
|
+
return JsonDecode<FortePayCreateIntentResponse>(_data, 'FortePayCreateIntentResponse')
|
|
3395
|
+
})
|
|
3396
|
+
},
|
|
3397
|
+
error => {
|
|
3398
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3399
|
+
}
|
|
3400
|
+
)
|
|
3401
|
+
}
|
|
3402
|
+
|
|
3403
|
+
fortePayGetPaymentStatuses = (
|
|
3404
|
+
req: FortePayGetPaymentStatusesRequest,
|
|
3405
|
+
headers?: object,
|
|
3406
|
+
signal?: AbortSignal
|
|
3407
|
+
): Promise<FortePayGetPaymentStatusesResponse> => {
|
|
2896
3408
|
return this.fetch(
|
|
2897
3409
|
this.url('FortePayGetPaymentStatuses'),
|
|
2898
|
-
createHttpRequest(JsonEncode(req, 'FortePayGetPaymentStatusesRequest'), headers, signal)
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
3410
|
+
createHttpRequest(JsonEncode(req, 'FortePayGetPaymentStatusesRequest'), headers, signal)
|
|
3411
|
+
).then(
|
|
3412
|
+
res => {
|
|
3413
|
+
return buildResponse(res).then(_data => {
|
|
3414
|
+
return JsonDecode<FortePayGetPaymentStatusesResponse>(_data, 'FortePayGetPaymentStatusesResponse')
|
|
3415
|
+
})
|
|
3416
|
+
},
|
|
3417
|
+
error => {
|
|
3418
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3419
|
+
}
|
|
3420
|
+
)
|
|
2905
3421
|
}
|
|
2906
3422
|
|
|
2907
3423
|
getCCTPTransfer = (req: GetCCTPTransferRequest, headers?: object, signal?: AbortSignal): Promise<GetCCTPTransferResponse> => {
|
|
2908
3424
|
return this.fetch(
|
|
2909
3425
|
this.url('GetCCTPTransfer'),
|
|
2910
|
-
createHttpRequest(JsonEncode(req, 'GetCCTPTransferRequest'), headers, signal)
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
3426
|
+
createHttpRequest(JsonEncode(req, 'GetCCTPTransferRequest'), headers, signal)
|
|
3427
|
+
).then(
|
|
3428
|
+
res => {
|
|
3429
|
+
return buildResponse(res).then(_data => {
|
|
3430
|
+
return JsonDecode<GetCCTPTransferResponse>(_data, 'GetCCTPTransferResponse')
|
|
3431
|
+
})
|
|
3432
|
+
},
|
|
3433
|
+
error => {
|
|
3434
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3435
|
+
}
|
|
3436
|
+
)
|
|
3437
|
+
}
|
|
3438
|
+
|
|
3439
|
+
queueCCTPTransfer = (
|
|
3440
|
+
req: QueueCCTPTransferRequest,
|
|
3441
|
+
headers?: object,
|
|
3442
|
+
signal?: AbortSignal
|
|
3443
|
+
): Promise<QueueCCTPTransferResponse> => {
|
|
2920
3444
|
return this.fetch(
|
|
2921
3445
|
this.url('QueueCCTPTransfer'),
|
|
2922
|
-
createHttpRequest(JsonEncode(req, 'QueueCCTPTransferRequest'), headers, signal)
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
|
|
2931
|
-
|
|
3446
|
+
createHttpRequest(JsonEncode(req, 'QueueCCTPTransferRequest'), headers, signal)
|
|
3447
|
+
).then(
|
|
3448
|
+
res => {
|
|
3449
|
+
return buildResponse(res).then(_data => {
|
|
3450
|
+
return JsonDecode<QueueCCTPTransferResponse>(_data, 'QueueCCTPTransferResponse')
|
|
3451
|
+
})
|
|
3452
|
+
},
|
|
3453
|
+
error => {
|
|
3454
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3455
|
+
}
|
|
3456
|
+
)
|
|
3457
|
+
}
|
|
3458
|
+
|
|
3459
|
+
queueIntentConfigExecution = (
|
|
3460
|
+
req: QueueIntentConfigExecutionRequest,
|
|
3461
|
+
headers?: object,
|
|
3462
|
+
signal?: AbortSignal
|
|
3463
|
+
): Promise<QueueIntentConfigExecutionResponse> => {
|
|
2932
3464
|
return this.fetch(
|
|
2933
3465
|
this.url('QueueIntentConfigExecution'),
|
|
2934
|
-
createHttpRequest(JsonEncode(req, 'QueueIntentConfigExecutionRequest'), headers, signal)
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
3466
|
+
createHttpRequest(JsonEncode(req, 'QueueIntentConfigExecutionRequest'), headers, signal)
|
|
3467
|
+
).then(
|
|
3468
|
+
res => {
|
|
3469
|
+
return buildResponse(res).then(_data => {
|
|
3470
|
+
return JsonDecode<QueueIntentConfigExecutionResponse>(_data, 'QueueIntentConfigExecutionResponse')
|
|
3471
|
+
})
|
|
3472
|
+
},
|
|
3473
|
+
error => {
|
|
3474
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3475
|
+
}
|
|
3476
|
+
)
|
|
3477
|
+
}
|
|
3478
|
+
|
|
3479
|
+
getIntentConfigExecutionStatus = (
|
|
3480
|
+
req: GetIntentConfigExecutionStatusRequest,
|
|
3481
|
+
headers?: object,
|
|
3482
|
+
signal?: AbortSignal
|
|
3483
|
+
): Promise<GetIntentConfigExecutionStatusResponse> => {
|
|
2944
3484
|
return this.fetch(
|
|
2945
3485
|
this.url('GetIntentConfigExecutionStatus'),
|
|
2946
|
-
createHttpRequest(JsonEncode(req, 'GetIntentConfigExecutionStatusRequest'), headers, signal)
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
3486
|
+
createHttpRequest(JsonEncode(req, 'GetIntentConfigExecutionStatusRequest'), headers, signal)
|
|
3487
|
+
).then(
|
|
3488
|
+
res => {
|
|
3489
|
+
return buildResponse(res).then(_data => {
|
|
3490
|
+
return JsonDecode<GetIntentConfigExecutionStatusResponse>(_data, 'GetIntentConfigExecutionStatusResponse')
|
|
3491
|
+
})
|
|
3492
|
+
},
|
|
3493
|
+
error => {
|
|
3494
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3495
|
+
}
|
|
3496
|
+
)
|
|
3497
|
+
}
|
|
3498
|
+
|
|
3499
|
+
listIntentConfigs = (
|
|
3500
|
+
req: ListIntentConfigsRequest,
|
|
3501
|
+
headers?: object,
|
|
3502
|
+
signal?: AbortSignal
|
|
3503
|
+
): Promise<ListIntentConfigsResponse> => {
|
|
2956
3504
|
return this.fetch(
|
|
2957
3505
|
this.url('ListIntentConfigs'),
|
|
2958
|
-
createHttpRequest(JsonEncode(req, 'ListIntentConfigsRequest'), headers, signal)
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
3506
|
+
createHttpRequest(JsonEncode(req, 'ListIntentConfigsRequest'), headers, signal)
|
|
3507
|
+
).then(
|
|
3508
|
+
res => {
|
|
3509
|
+
return buildResponse(res).then(_data => {
|
|
3510
|
+
return JsonDecode<ListIntentConfigsResponse>(_data, 'ListIntentConfigsResponse')
|
|
3511
|
+
})
|
|
3512
|
+
},
|
|
3513
|
+
error => {
|
|
3514
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3515
|
+
}
|
|
3516
|
+
)
|
|
3517
|
+
}
|
|
3518
|
+
|
|
3519
|
+
queueMetaTxnReceipt = (
|
|
3520
|
+
req: QueueMetaTxnReceiptRequest,
|
|
3521
|
+
headers?: object,
|
|
3522
|
+
signal?: AbortSignal
|
|
3523
|
+
): Promise<QueueMetaTxnReceiptResponse> => {
|
|
2968
3524
|
return this.fetch(
|
|
2969
3525
|
this.url('QueueMetaTxnReceipt'),
|
|
2970
|
-
createHttpRequest(JsonEncode(req, 'QueueMetaTxnReceiptRequest'), headers, signal)
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
3526
|
+
createHttpRequest(JsonEncode(req, 'QueueMetaTxnReceiptRequest'), headers, signal)
|
|
3527
|
+
).then(
|
|
3528
|
+
res => {
|
|
3529
|
+
return buildResponse(res).then(_data => {
|
|
3530
|
+
return JsonDecode<QueueMetaTxnReceiptResponse>(_data, 'QueueMetaTxnReceiptResponse')
|
|
3531
|
+
})
|
|
3532
|
+
},
|
|
3533
|
+
error => {
|
|
3534
|
+
throw WebrpcRequestFailedError.new({ cause: `fetch(): ${error instanceof Error ? error.message : String(error)}` })
|
|
3535
|
+
}
|
|
3536
|
+
)
|
|
2977
3537
|
}
|
|
2978
|
-
|
|
2979
3538
|
}
|
|
2980
3539
|
|
|
2981
3540
|
const createHttpRequest = (body: string = '{}', headers: object = {}, signal: AbortSignal | null = null): object => {
|
|
2982
|
-
const reqHeaders: { [key: string]: string } = {
|
|
3541
|
+
const reqHeaders: { [key: string]: string } = {
|
|
3542
|
+
...headers,
|
|
3543
|
+
'Content-Type': 'application/json',
|
|
3544
|
+
[WebrpcHeader]: WebrpcHeaderValue
|
|
3545
|
+
}
|
|
2983
3546
|
return { method: 'POST', headers: reqHeaders, body, signal }
|
|
2984
3547
|
}
|
|
2985
3548
|
|
|
@@ -2988,14 +3551,14 @@ const buildResponse = (res: Response): Promise<any> => {
|
|
|
2988
3551
|
let data
|
|
2989
3552
|
try {
|
|
2990
3553
|
data = JSON.parse(text)
|
|
2991
|
-
} catch(error) {
|
|
3554
|
+
} catch (error) {
|
|
2992
3555
|
throw WebrpcBadResponseError.new({
|
|
2993
3556
|
status: res.status,
|
|
2994
|
-
cause: `JSON.parse(): ${error instanceof Error ? error.message : String(error)}: response text: ${text}`
|
|
2995
|
-
)
|
|
3557
|
+
cause: `JSON.parse(): ${error instanceof Error ? error.message : String(error)}: response text: ${text}`
|
|
3558
|
+
})
|
|
2996
3559
|
}
|
|
2997
3560
|
if (!res.ok) {
|
|
2998
|
-
const code: number =
|
|
3561
|
+
const code: number = typeof data.code === 'number' ? data.code : 0
|
|
2999
3562
|
throw (webrpcErrorByCode[code] || WebrpcError).new(data)
|
|
3000
3563
|
}
|
|
3001
3564
|
return data
|
|
@@ -3004,11 +3567,6 @@ const buildResponse = (res: Response): Promise<any> => {
|
|
|
3004
3567
|
|
|
3005
3568
|
export type Fetch = (input: RequestInfo, init?: RequestInit) => Promise<Response>
|
|
3006
3569
|
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
3570
|
export const JsonEncode = <T = any>(obj: T, _typ: string = ''): string => {
|
|
3013
3571
|
return JSON.stringify(obj)
|
|
3014
3572
|
}
|
|
@@ -3016,19 +3574,20 @@ export const JsonEncode = <T = any>(obj: T, _typ: string = ''): string => {
|
|
|
3016
3574
|
export const JsonDecode = <T = any>(data: string | any, _typ: string = ''): T => {
|
|
3017
3575
|
let parsed: any = data
|
|
3018
3576
|
if (typeof data === 'string') {
|
|
3019
|
-
try {
|
|
3577
|
+
try {
|
|
3578
|
+
parsed = JSON.parse(data)
|
|
3579
|
+
} catch (err) {
|
|
3020
3580
|
throw WebrpcBadResponseError.new({ cause: `JsonDecode: JSON.parse failed: ${(err as Error).message}` })
|
|
3021
3581
|
}
|
|
3022
3582
|
}
|
|
3023
3583
|
return parsed as T
|
|
3024
3584
|
}
|
|
3025
3585
|
|
|
3026
|
-
|
|
3027
3586
|
//
|
|
3028
3587
|
// Errors
|
|
3029
3588
|
//
|
|
3030
3589
|
|
|
3031
|
-
type WebrpcErrorParams = { name?: string
|
|
3590
|
+
type WebrpcErrorParams = { name?: string; code?: number; message?: string; status?: number; cause?: string }
|
|
3032
3591
|
|
|
3033
3592
|
export class WebrpcError extends Error {
|
|
3034
3593
|
code: number
|
|
@@ -3049,7 +3608,6 @@ export class WebrpcError extends Error {
|
|
|
3049
3608
|
}
|
|
3050
3609
|
}
|
|
3051
3610
|
|
|
3052
|
-
|
|
3053
3611
|
export class WebrpcEndpointError extends WebrpcError {
|
|
3054
3612
|
constructor(error: WebrpcErrorParams = {}) {
|
|
3055
3613
|
super(error)
|
|
@@ -3182,7 +3740,6 @@ export class WebrpcStreamFinishedError extends WebrpcError {
|
|
|
3182
3740
|
}
|
|
3183
3741
|
}
|
|
3184
3742
|
|
|
3185
|
-
|
|
3186
3743
|
//
|
|
3187
3744
|
// Schema errors
|
|
3188
3745
|
//
|
|
@@ -3487,7 +4044,6 @@ export class UnsupportedNetworkError extends WebrpcError {
|
|
|
3487
4044
|
}
|
|
3488
4045
|
}
|
|
3489
4046
|
|
|
3490
|
-
|
|
3491
4047
|
export enum errors {
|
|
3492
4048
|
WebrpcEndpoint = 'WebrpcEndpoint',
|
|
3493
4049
|
WebrpcRequestFailed = 'WebrpcRequestFailed',
|
|
@@ -3524,7 +4080,7 @@ export enum errors {
|
|
|
3524
4080
|
Unavailable = 'Unavailable',
|
|
3525
4081
|
QueryFailed = 'QueryFailed',
|
|
3526
4082
|
NotFound = 'NotFound',
|
|
3527
|
-
UnsupportedNetwork = 'UnsupportedNetwork'
|
|
4083
|
+
UnsupportedNetwork = 'UnsupportedNetwork'
|
|
3528
4084
|
}
|
|
3529
4085
|
|
|
3530
4086
|
export enum WebrpcErrorCodes {
|
|
@@ -3563,7 +4119,7 @@ export enum WebrpcErrorCodes {
|
|
|
3563
4119
|
Unavailable = 2002,
|
|
3564
4120
|
QueryFailed = 2003,
|
|
3565
4121
|
NotFound = 3000,
|
|
3566
|
-
UnsupportedNetwork = 3008
|
|
4122
|
+
UnsupportedNetwork = 3008
|
|
3567
4123
|
}
|
|
3568
4124
|
|
|
3569
4125
|
export const webrpcErrorByCode: { [code: number]: any } = {
|
|
@@ -3602,64 +4158,61 @@ export const webrpcErrorByCode: { [code: number]: any } = {
|
|
|
3602
4158
|
[2002]: UnavailableError,
|
|
3603
4159
|
[2003]: QueryFailedError,
|
|
3604
4160
|
[3000]: NotFoundError,
|
|
3605
|
-
[3008]: UnsupportedNetworkError
|
|
4161
|
+
[3008]: UnsupportedNetworkError
|
|
3606
4162
|
}
|
|
3607
4163
|
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
4164
|
//
|
|
3611
4165
|
// Webrpc
|
|
3612
4166
|
//
|
|
3613
4167
|
|
|
3614
|
-
export const WebrpcHeader =
|
|
4168
|
+
export const WebrpcHeader = 'Webrpc'
|
|
3615
4169
|
|
|
3616
|
-
export const WebrpcHeaderValue =
|
|
4170
|
+
export const WebrpcHeaderValue = 'webrpc@v0.31.0;gen-typescript@v0.22.5;sequence-api@v0.4.0'
|
|
3617
4171
|
|
|
3618
4172
|
type WebrpcGenVersions = {
|
|
3619
|
-
WebrpcGenVersion: string
|
|
3620
|
-
codeGenName: string
|
|
3621
|
-
codeGenVersion: string
|
|
3622
|
-
schemaName: string
|
|
3623
|
-
schemaVersion: string
|
|
3624
|
-
}
|
|
4173
|
+
WebrpcGenVersion: string
|
|
4174
|
+
codeGenName: string
|
|
4175
|
+
codeGenVersion: string
|
|
4176
|
+
schemaName: string
|
|
4177
|
+
schemaVersion: string
|
|
4178
|
+
}
|
|
3625
4179
|
|
|
3626
4180
|
export function VersionFromHeader(headers: Headers): WebrpcGenVersions {
|
|
3627
4181
|
const headerValue = headers.get(WebrpcHeader)
|
|
3628
4182
|
if (!headerValue) {
|
|
3629
4183
|
return {
|
|
3630
|
-
WebrpcGenVersion:
|
|
3631
|
-
codeGenName:
|
|
3632
|
-
codeGenVersion:
|
|
3633
|
-
schemaName:
|
|
3634
|
-
schemaVersion:
|
|
3635
|
-
}
|
|
4184
|
+
WebrpcGenVersion: '',
|
|
4185
|
+
codeGenName: '',
|
|
4186
|
+
codeGenVersion: '',
|
|
4187
|
+
schemaName: '',
|
|
4188
|
+
schemaVersion: ''
|
|
4189
|
+
}
|
|
3636
4190
|
}
|
|
3637
4191
|
|
|
3638
4192
|
return parseWebrpcGenVersions(headerValue)
|
|
3639
4193
|
}
|
|
3640
4194
|
|
|
3641
4195
|
function parseWebrpcGenVersions(header: string): WebrpcGenVersions {
|
|
3642
|
-
const versions = header.split(
|
|
4196
|
+
const versions = header.split(';')
|
|
3643
4197
|
if (versions.length < 3) {
|
|
3644
4198
|
return {
|
|
3645
|
-
WebrpcGenVersion:
|
|
3646
|
-
codeGenName:
|
|
3647
|
-
codeGenVersion:
|
|
3648
|
-
schemaName:
|
|
3649
|
-
schemaVersion:
|
|
3650
|
-
}
|
|
4199
|
+
WebrpcGenVersion: '',
|
|
4200
|
+
codeGenName: '',
|
|
4201
|
+
codeGenVersion: '',
|
|
4202
|
+
schemaName: '',
|
|
4203
|
+
schemaVersion: ''
|
|
4204
|
+
}
|
|
3651
4205
|
}
|
|
3652
4206
|
|
|
3653
|
-
const [_, WebrpcGenVersion] = versions[0]!.split(
|
|
3654
|
-
const [codeGenName, codeGenVersion] = versions[1]!.split(
|
|
3655
|
-
const [schemaName, schemaVersion] = versions[2]!.split(
|
|
4207
|
+
const [_, WebrpcGenVersion] = versions[0]!.split('@')
|
|
4208
|
+
const [codeGenName, codeGenVersion] = versions[1]!.split('@')
|
|
4209
|
+
const [schemaName, schemaVersion] = versions[2]!.split('@')
|
|
3656
4210
|
|
|
3657
4211
|
return {
|
|
3658
|
-
WebrpcGenVersion: WebrpcGenVersion ??
|
|
3659
|
-
codeGenName: codeGenName ??
|
|
3660
|
-
codeGenVersion: codeGenVersion ??
|
|
3661
|
-
schemaName: schemaName ??
|
|
3662
|
-
schemaVersion: schemaVersion ??
|
|
3663
|
-
}
|
|
4212
|
+
WebrpcGenVersion: WebrpcGenVersion ?? '',
|
|
4213
|
+
codeGenName: codeGenName ?? '',
|
|
4214
|
+
codeGenVersion: codeGenVersion ?? '',
|
|
4215
|
+
schemaName: schemaName ?? '',
|
|
4216
|
+
schemaVersion: schemaVersion ?? ''
|
|
4217
|
+
}
|
|
3664
4218
|
}
|
|
3665
|
-
|