@emberai/onchain-actions-registry 1.0.0-alpha.1

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.
@@ -0,0 +1,1119 @@
1
+ import { z } from 'zod';
2
+ import { DecreasePositionSwapType, OrderType } from '@gmx-io/sdk/types/orders';
3
+
4
+ /**
5
+ * Configuration for a blockchain network.
6
+ */
7
+ type ChainConfig = {
8
+ chainId: number;
9
+ name: string;
10
+ rpcUrl: string;
11
+ wrappedNativeToken?: string;
12
+ };
13
+
14
+ declare const BorrowTokensRequestSchema: z.ZodObject<{
15
+ borrowToken: z.ZodObject<{
16
+ tokenUid: z.ZodObject<{
17
+ chainId: z.ZodString;
18
+ address: z.ZodString;
19
+ }, z.core.$strip>;
20
+ name: z.ZodString;
21
+ symbol: z.ZodString;
22
+ isNative: z.ZodBoolean;
23
+ decimals: z.ZodNumber;
24
+ iconUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
+ isVetted: z.ZodBoolean;
26
+ }, z.core.$strip>;
27
+ amount: z.ZodBigInt;
28
+ walletAddress: z.ZodString;
29
+ }, z.core.$strip>;
30
+ type BorrowTokensRequest = z.infer<typeof BorrowTokensRequestSchema>;
31
+ declare const BorrowTokensResponseSchema: z.ZodObject<{
32
+ currentBorrowApy: z.ZodString;
33
+ liquidationThreshold: z.ZodString;
34
+ feeBreakdown: z.ZodOptional<z.ZodObject<{
35
+ serviceFee: z.ZodString;
36
+ slippageCost: z.ZodString;
37
+ total: z.ZodString;
38
+ feeDenomination: z.ZodString;
39
+ }, z.core.$strip>>;
40
+ transactions: z.ZodArray<z.ZodObject<{
41
+ type: z.ZodEnum<{
42
+ [x: string]: string;
43
+ }>;
44
+ to: z.ZodString;
45
+ data: z.ZodString;
46
+ value: z.ZodString;
47
+ chainId: z.ZodString;
48
+ }, z.core.$strip>>;
49
+ }, z.core.$strip>;
50
+ type BorrowTokensResponse = z.infer<typeof BorrowTokensResponseSchema>;
51
+ declare const RepayTokensRequestSchema: z.ZodObject<{
52
+ repayToken: z.ZodObject<{
53
+ tokenUid: z.ZodObject<{
54
+ chainId: z.ZodString;
55
+ address: z.ZodString;
56
+ }, z.core.$strip>;
57
+ name: z.ZodString;
58
+ symbol: z.ZodString;
59
+ isNative: z.ZodBoolean;
60
+ decimals: z.ZodNumber;
61
+ iconUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
+ isVetted: z.ZodBoolean;
63
+ }, z.core.$strip>;
64
+ amount: z.ZodBigInt;
65
+ walletAddress: z.ZodString;
66
+ }, z.core.$strip>;
67
+ type RepayTokensRequest = z.infer<typeof RepayTokensRequestSchema>;
68
+ declare const RepayTokensResponseSchema: z.ZodObject<{
69
+ feeBreakdown: z.ZodOptional<z.ZodObject<{
70
+ serviceFee: z.ZodString;
71
+ slippageCost: z.ZodString;
72
+ total: z.ZodString;
73
+ feeDenomination: z.ZodString;
74
+ }, z.core.$strip>>;
75
+ transactions: z.ZodArray<z.ZodObject<{
76
+ type: z.ZodEnum<{
77
+ [x: string]: string;
78
+ }>;
79
+ to: z.ZodString;
80
+ data: z.ZodString;
81
+ value: z.ZodString;
82
+ chainId: z.ZodString;
83
+ }, z.core.$strip>>;
84
+ }, z.core.$strip>;
85
+ type RepayTokensResponse = z.infer<typeof RepayTokensResponseSchema>;
86
+ declare const SupplyTokensRequestSchema: z.ZodObject<{
87
+ supplyToken: z.ZodObject<{
88
+ tokenUid: z.ZodObject<{
89
+ chainId: z.ZodString;
90
+ address: z.ZodString;
91
+ }, z.core.$strip>;
92
+ name: z.ZodString;
93
+ symbol: z.ZodString;
94
+ isNative: z.ZodBoolean;
95
+ decimals: z.ZodNumber;
96
+ iconUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
97
+ isVetted: z.ZodBoolean;
98
+ }, z.core.$strip>;
99
+ amount: z.ZodBigInt;
100
+ walletAddress: z.ZodString;
101
+ }, z.core.$strip>;
102
+ type SupplyTokensRequest = z.infer<typeof SupplyTokensRequestSchema>;
103
+ declare const SupplyTokensResponseSchema: z.ZodObject<{
104
+ feeBreakdown: z.ZodOptional<z.ZodObject<{
105
+ serviceFee: z.ZodString;
106
+ slippageCost: z.ZodString;
107
+ total: z.ZodString;
108
+ feeDenomination: z.ZodString;
109
+ }, z.core.$strip>>;
110
+ transactions: z.ZodArray<z.ZodObject<{
111
+ type: z.ZodEnum<{
112
+ [x: string]: string;
113
+ }>;
114
+ to: z.ZodString;
115
+ data: z.ZodString;
116
+ value: z.ZodString;
117
+ chainId: z.ZodString;
118
+ }, z.core.$strip>>;
119
+ }, z.core.$strip>;
120
+ type SupplyTokensResponse = z.infer<typeof SupplyTokensResponseSchema>;
121
+ declare const WithdrawTokensRequestSchema: z.ZodObject<{
122
+ tokenToWithdraw: z.ZodObject<{
123
+ tokenUid: z.ZodObject<{
124
+ chainId: z.ZodString;
125
+ address: z.ZodString;
126
+ }, z.core.$strip>;
127
+ name: z.ZodString;
128
+ symbol: z.ZodString;
129
+ isNative: z.ZodBoolean;
130
+ decimals: z.ZodNumber;
131
+ iconUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
132
+ isVetted: z.ZodBoolean;
133
+ }, z.core.$strip>;
134
+ amount: z.ZodBigInt;
135
+ walletAddress: z.ZodString;
136
+ }, z.core.$strip>;
137
+ type WithdrawTokensRequest = z.infer<typeof WithdrawTokensRequestSchema>;
138
+ declare const WithdrawTokensResponseSchema: z.ZodObject<{
139
+ feeBreakdown: z.ZodOptional<z.ZodObject<{
140
+ serviceFee: z.ZodString;
141
+ slippageCost: z.ZodString;
142
+ total: z.ZodString;
143
+ feeDenomination: z.ZodString;
144
+ }, z.core.$strip>>;
145
+ transactions: z.ZodArray<z.ZodObject<{
146
+ type: z.ZodEnum<{
147
+ [x: string]: string;
148
+ }>;
149
+ to: z.ZodString;
150
+ data: z.ZodString;
151
+ value: z.ZodString;
152
+ chainId: z.ZodString;
153
+ }, z.core.$strip>>;
154
+ }, z.core.$strip>;
155
+ type WithdrawTokensResponse = z.infer<typeof WithdrawTokensResponseSchema>;
156
+ declare const GetWalletLendingPositionsRequestSchema: z.ZodObject<{
157
+ walletAddress: z.ZodString;
158
+ }, z.core.$strip>;
159
+ type GetWalletLendingPositionsRequest = z.infer<typeof GetWalletLendingPositionsRequestSchema>;
160
+ declare const LendTokenDetailSchema: z.ZodObject<{
161
+ tokenUid: z.ZodObject<{
162
+ chainId: z.ZodString;
163
+ address: z.ZodString;
164
+ }, z.core.$strip>;
165
+ underlyingBalance: z.ZodString;
166
+ underlyingBalanceUsd: z.ZodString;
167
+ variableBorrows: z.ZodString;
168
+ variableBorrowsUsd: z.ZodString;
169
+ totalBorrows: z.ZodString;
170
+ totalBorrowsUsd: z.ZodString;
171
+ }, z.core.$strip>;
172
+ type LendTokenDetail = z.infer<typeof LendTokenDetailSchema>;
173
+ declare const GetWalletLendingPositionsResponseSchema: z.ZodObject<{
174
+ userReserves: z.ZodArray<z.ZodObject<{
175
+ tokenUid: z.ZodObject<{
176
+ chainId: z.ZodString;
177
+ address: z.ZodString;
178
+ }, z.core.$strip>;
179
+ underlyingBalance: z.ZodString;
180
+ underlyingBalanceUsd: z.ZodString;
181
+ variableBorrows: z.ZodString;
182
+ variableBorrowsUsd: z.ZodString;
183
+ totalBorrows: z.ZodString;
184
+ totalBorrowsUsd: z.ZodString;
185
+ }, z.core.$strip>>;
186
+ totalLiquidityUsd: z.ZodString;
187
+ totalCollateralUsd: z.ZodString;
188
+ totalBorrowsUsd: z.ZodString;
189
+ netWorthUsd: z.ZodString;
190
+ availableBorrowsUsd: z.ZodString;
191
+ currentLoanToValue: z.ZodString;
192
+ currentLiquidationThreshold: z.ZodString;
193
+ healthFactor: z.ZodString;
194
+ }, z.core.$strip>;
195
+ type GetWalletLendingPositionsResponse = z.infer<typeof GetWalletLendingPositionsResponseSchema>;
196
+
197
+ /**
198
+ * Callback function type for the borrow action.
199
+ */
200
+ type LendingBorrowCallback = (request: BorrowTokensRequest) => Promise<BorrowTokensResponse>;
201
+ /**
202
+ * Callback function type for the repay tokens action.
203
+ */
204
+ type LendingRepayTokensCallback = (request: RepayTokensRequest) => Promise<RepayTokensResponse>;
205
+ /**
206
+ * Callback function type for the supply action.
207
+ */
208
+ type LendingSupplyCallback = (request: SupplyTokensRequest) => Promise<SupplyTokensResponse>;
209
+ /**
210
+ * Callback function type for the withdraw action.
211
+ */
212
+ type LendingWithdrawCallback = (request: WithdrawTokensRequest) => Promise<WithdrawTokensResponse>;
213
+ /**
214
+ * The possible actions related to lending.
215
+ */
216
+ type LendingActions = 'lending-borrow' | 'lending-repay' | 'lending-supply' | 'lending-withdraw';
217
+
218
+ declare const LimitedLiquidityProvisionRangeSchema: z.ZodObject<{
219
+ minPrice: z.ZodString;
220
+ maxPrice: z.ZodString;
221
+ }, z.core.$strip>;
222
+ type LimitedLiquidityProvisionRange = z.infer<typeof LimitedLiquidityProvisionRangeSchema>;
223
+ declare const LiquidityProvisionRangeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
224
+ type: z.ZodLiteral<"full">;
225
+ }, z.core.$strip>, z.ZodObject<{
226
+ type: z.ZodLiteral<"limited">;
227
+ minPrice: z.ZodString;
228
+ maxPrice: z.ZodString;
229
+ }, z.core.$strip>], "type">;
230
+ type LiquidityProvisionRange = z.infer<typeof LiquidityProvisionRangeSchema>;
231
+ declare const LiquidityPositionRangeSchema: z.ZodObject<{
232
+ fromPrice: z.ZodString;
233
+ toPrice: z.ZodString;
234
+ }, z.core.$strip>;
235
+ type LiquidityPositionRange = z.infer<typeof LiquidityPositionRangeSchema>;
236
+ declare const LiquiditySuppliedTokenSchema: z.ZodObject<{
237
+ tokenUid: z.ZodObject<{
238
+ chainId: z.ZodString;
239
+ address: z.ZodString;
240
+ }, z.core.$strip>;
241
+ suppliedAmount: z.ZodString;
242
+ owedTokens: z.ZodString;
243
+ }, z.core.$strip>;
244
+ type LiquiditySuppliedToken = z.infer<typeof LiquiditySuppliedTokenSchema>;
245
+ declare const LiquidityPositionSchema: z.ZodObject<{
246
+ poolIdentifier: z.ZodObject<{
247
+ chainId: z.ZodString;
248
+ address: z.ZodString;
249
+ }, z.core.$strip>;
250
+ operator: z.ZodString;
251
+ suppliedTokens: z.ZodArray<z.ZodObject<{
252
+ tokenUid: z.ZodObject<{
253
+ chainId: z.ZodString;
254
+ address: z.ZodString;
255
+ }, z.core.$strip>;
256
+ suppliedAmount: z.ZodString;
257
+ owedTokens: z.ZodString;
258
+ }, z.core.$strip>>;
259
+ price: z.ZodString;
260
+ providerId: z.ZodString;
261
+ positionRange: z.ZodOptional<z.ZodObject<{
262
+ fromPrice: z.ZodString;
263
+ toPrice: z.ZodString;
264
+ }, z.core.$strip>>;
265
+ }, z.core.$strip>;
266
+ type LiquidityPosition = z.infer<typeof LiquidityPositionSchema>;
267
+ declare const LiquidityPoolTokens: z.ZodObject<{
268
+ tokenUid: z.ZodObject<{
269
+ chainId: z.ZodString;
270
+ address: z.ZodString;
271
+ }, z.core.$strip>;
272
+ }, z.core.$strip>;
273
+ type LiquidityPoolTokens = z.infer<typeof LiquidityPoolTokens>;
274
+ declare const LiquidityPoolSchema: z.ZodObject<{
275
+ identifier: z.ZodObject<{
276
+ chainId: z.ZodString;
277
+ address: z.ZodString;
278
+ }, z.core.$strip>;
279
+ tokens: z.ZodArray<z.ZodObject<{
280
+ tokenUid: z.ZodObject<{
281
+ chainId: z.ZodString;
282
+ address: z.ZodString;
283
+ }, z.core.$strip>;
284
+ }, z.core.$strip>>;
285
+ price: z.ZodString;
286
+ providerId: z.ZodString;
287
+ }, z.core.$strip>;
288
+ type LiquidityPool = z.infer<typeof LiquidityPoolSchema>;
289
+ declare const LiquidityPayTokensSchema: z.ZodObject<{
290
+ token: z.ZodObject<{
291
+ tokenUid: z.ZodObject<{
292
+ chainId: z.ZodString;
293
+ address: z.ZodString;
294
+ }, z.core.$strip>;
295
+ name: z.ZodString;
296
+ symbol: z.ZodString;
297
+ isNative: z.ZodBoolean;
298
+ decimals: z.ZodNumber;
299
+ iconUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
300
+ isVetted: z.ZodBoolean;
301
+ }, z.core.$strip>;
302
+ supplyAmount: z.ZodBigInt;
303
+ }, z.core.$strip>;
304
+ type LiquidityPayTokens = z.infer<typeof LiquidityPayTokensSchema>;
305
+ declare const SupplyLiquidityRequestSchema: z.ZodObject<{
306
+ walletAddress: z.ZodString;
307
+ poolToken: z.ZodObject<{
308
+ tokenUid: z.ZodObject<{
309
+ chainId: z.ZodString;
310
+ address: z.ZodString;
311
+ }, z.core.$strip>;
312
+ name: z.ZodString;
313
+ symbol: z.ZodString;
314
+ isNative: z.ZodBoolean;
315
+ decimals: z.ZodNumber;
316
+ iconUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
317
+ isVetted: z.ZodBoolean;
318
+ }, z.core.$strip>;
319
+ payTokens: z.ZodArray<z.ZodObject<{
320
+ token: z.ZodObject<{
321
+ tokenUid: z.ZodObject<{
322
+ chainId: z.ZodString;
323
+ address: z.ZodString;
324
+ }, z.core.$strip>;
325
+ name: z.ZodString;
326
+ symbol: z.ZodString;
327
+ isNative: z.ZodBoolean;
328
+ decimals: z.ZodNumber;
329
+ iconUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
330
+ isVetted: z.ZodBoolean;
331
+ }, z.core.$strip>;
332
+ supplyAmount: z.ZodBigInt;
333
+ }, z.core.$strip>>;
334
+ range: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
335
+ type: z.ZodLiteral<"full">;
336
+ }, z.core.$strip>, z.ZodObject<{
337
+ type: z.ZodLiteral<"limited">;
338
+ minPrice: z.ZodString;
339
+ maxPrice: z.ZodString;
340
+ }, z.core.$strip>], "type">>;
341
+ }, z.core.$strip>;
342
+ type SupplyLiquidityRequest = z.infer<typeof SupplyLiquidityRequestSchema>;
343
+ declare const SupplyLiquidityResponseSchema: z.ZodObject<{
344
+ transactions: z.ZodArray<z.ZodObject<{
345
+ type: z.ZodEnum<{
346
+ [x: string]: string;
347
+ }>;
348
+ to: z.ZodString;
349
+ data: z.ZodString;
350
+ value: z.ZodString;
351
+ chainId: z.ZodString;
352
+ }, z.core.$strip>>;
353
+ poolIdentifier: z.ZodObject<{
354
+ chainId: z.ZodString;
355
+ address: z.ZodString;
356
+ }, z.core.$strip>;
357
+ }, z.core.$strip>;
358
+ type SupplyLiquidityResponse = z.infer<typeof SupplyLiquidityResponseSchema>;
359
+ declare const WithdrawLiquidityRequestSchema: z.ZodObject<{
360
+ poolToken: z.ZodObject<{
361
+ tokenUid: z.ZodObject<{
362
+ chainId: z.ZodString;
363
+ address: z.ZodString;
364
+ }, z.core.$strip>;
365
+ name: z.ZodString;
366
+ symbol: z.ZodString;
367
+ isNative: z.ZodBoolean;
368
+ decimals: z.ZodNumber;
369
+ iconUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
370
+ isVetted: z.ZodBoolean;
371
+ }, z.core.$strip>;
372
+ walletAddress: z.ZodString;
373
+ }, z.core.$strip>;
374
+ type WithdrawLiquidityRequest = z.infer<typeof WithdrawLiquidityRequestSchema>;
375
+ declare const WithdrawLiquidityResponseSchema: z.ZodObject<{
376
+ transactions: z.ZodArray<z.ZodObject<{
377
+ type: z.ZodEnum<{
378
+ [x: string]: string;
379
+ }>;
380
+ to: z.ZodString;
381
+ data: z.ZodString;
382
+ value: z.ZodString;
383
+ chainId: z.ZodString;
384
+ }, z.core.$strip>>;
385
+ chainId: z.ZodString;
386
+ }, z.core.$strip>;
387
+ type WithdrawLiquidityResponse = z.infer<typeof WithdrawLiquidityResponseSchema>;
388
+ declare const GetWalletLiquidityPositionsRequestSchema: z.ZodObject<{
389
+ walletAddress: z.ZodString;
390
+ }, z.core.$strip>;
391
+ type GetWalletLiquidityPositionsRequest = z.infer<typeof GetWalletLiquidityPositionsRequestSchema>;
392
+ declare const GetWalletLiquidityPositionsResponseSchema: z.ZodObject<{
393
+ positions: z.ZodArray<z.ZodObject<{
394
+ poolIdentifier: z.ZodObject<{
395
+ chainId: z.ZodString;
396
+ address: z.ZodString;
397
+ }, z.core.$strip>;
398
+ operator: z.ZodString;
399
+ suppliedTokens: z.ZodArray<z.ZodObject<{
400
+ tokenUid: z.ZodObject<{
401
+ chainId: z.ZodString;
402
+ address: z.ZodString;
403
+ }, z.core.$strip>;
404
+ suppliedAmount: z.ZodString;
405
+ owedTokens: z.ZodString;
406
+ }, z.core.$strip>>;
407
+ price: z.ZodString;
408
+ providerId: z.ZodString;
409
+ positionRange: z.ZodOptional<z.ZodObject<{
410
+ fromPrice: z.ZodString;
411
+ toPrice: z.ZodString;
412
+ }, z.core.$strip>>;
413
+ }, z.core.$strip>>;
414
+ }, z.core.$strip>;
415
+ type GetWalletLiquidityPositionsResponse = z.infer<typeof GetWalletLiquidityPositionsResponseSchema>;
416
+ declare const GetLiquidityPoolsResponseSchema: z.ZodObject<{
417
+ liquidityPools: z.ZodArray<z.ZodObject<{
418
+ identifier: z.ZodObject<{
419
+ chainId: z.ZodString;
420
+ address: z.ZodString;
421
+ }, z.core.$strip>;
422
+ tokens: z.ZodArray<z.ZodObject<{
423
+ tokenUid: z.ZodObject<{
424
+ chainId: z.ZodString;
425
+ address: z.ZodString;
426
+ }, z.core.$strip>;
427
+ }, z.core.$strip>>;
428
+ price: z.ZodString;
429
+ providerId: z.ZodString;
430
+ }, z.core.$strip>>;
431
+ }, z.core.$strip>;
432
+ type GetLiquidityPoolsResponse = z.infer<typeof GetLiquidityPoolsResponseSchema>;
433
+
434
+ /**
435
+ * The callback function type for the supply liquidity action.
436
+ */
437
+ type LiquiditySupplyCallback = (request: SupplyLiquidityRequest) => Promise<SupplyLiquidityResponse>;
438
+ /**
439
+ * The callback function type for the withdraw liquidity action.
440
+ */
441
+ type LiquidityWithdrawCallback = (request: WithdrawLiquidityRequest) => Promise<WithdrawLiquidityResponse>;
442
+ /**
443
+ * The possible actions related to liquidity.
444
+ */
445
+ type LiquidityActions = 'liquidity-supply' | 'liquidity-withdraw';
446
+
447
+ declare const DecreasePositionSwapTypeSchema: z.ZodEnum<typeof DecreasePositionSwapType>;
448
+ declare const PositionSideSchema: z.ZodUnion<readonly [z.ZodLiteral<"long">, z.ZodLiteral<"short">]>;
449
+ type PositionSide = z.infer<typeof PositionSideSchema>;
450
+ declare const PositionSchema: z.ZodObject<{
451
+ chainId: z.ZodString;
452
+ key: z.ZodString;
453
+ contractKey: z.ZodString;
454
+ account: z.ZodString;
455
+ marketAddress: z.ZodString;
456
+ collateralTokenAddress: z.ZodString;
457
+ sizeInUsd: z.ZodString;
458
+ sizeInTokens: z.ZodString;
459
+ collateralAmount: z.ZodString;
460
+ pendingBorrowingFeesUsd: z.ZodString;
461
+ increasedAtTime: z.ZodString;
462
+ decreasedAtTime: z.ZodString;
463
+ positionSide: z.ZodUnion<readonly [z.ZodLiteral<"long">, z.ZodLiteral<"short">]>;
464
+ isLong: z.ZodBoolean;
465
+ fundingFeeAmount: z.ZodString;
466
+ claimableLongTokenAmount: z.ZodString;
467
+ claimableShortTokenAmount: z.ZodString;
468
+ isOpening: z.ZodOptional<z.ZodBoolean>;
469
+ pnl: z.ZodString;
470
+ positionFeeAmount: z.ZodString;
471
+ traderDiscountAmount: z.ZodString;
472
+ uiFeeAmount: z.ZodString;
473
+ data: z.ZodOptional<z.ZodString>;
474
+ }, z.core.$strip>;
475
+ type PerpetualsPosition = z.infer<typeof PositionSchema>;
476
+ declare const PositionsDataSchema: z.ZodArray<z.ZodObject<{
477
+ chainId: z.ZodString;
478
+ key: z.ZodString;
479
+ contractKey: z.ZodString;
480
+ account: z.ZodString;
481
+ marketAddress: z.ZodString;
482
+ collateralTokenAddress: z.ZodString;
483
+ sizeInUsd: z.ZodString;
484
+ sizeInTokens: z.ZodString;
485
+ collateralAmount: z.ZodString;
486
+ pendingBorrowingFeesUsd: z.ZodString;
487
+ increasedAtTime: z.ZodString;
488
+ decreasedAtTime: z.ZodString;
489
+ positionSide: z.ZodUnion<readonly [z.ZodLiteral<"long">, z.ZodLiteral<"short">]>;
490
+ isLong: z.ZodBoolean;
491
+ fundingFeeAmount: z.ZodString;
492
+ claimableLongTokenAmount: z.ZodString;
493
+ claimableShortTokenAmount: z.ZodString;
494
+ isOpening: z.ZodOptional<z.ZodBoolean>;
495
+ pnl: z.ZodString;
496
+ positionFeeAmount: z.ZodString;
497
+ traderDiscountAmount: z.ZodString;
498
+ uiFeeAmount: z.ZodString;
499
+ data: z.ZodOptional<z.ZodString>;
500
+ }, z.core.$strip>>;
501
+ declare const OrderSchema: z.ZodObject<{
502
+ chainId: z.ZodString;
503
+ key: z.ZodString;
504
+ account: z.ZodString;
505
+ callbackContract: z.ZodString;
506
+ initialCollateralTokenAddress: z.ZodString;
507
+ marketAddress: z.ZodString;
508
+ decreasePositionSwapType: z.ZodEnum<typeof DecreasePositionSwapType>;
509
+ receiver: z.ZodString;
510
+ swapPath: z.ZodArray<z.ZodString>;
511
+ contractAcceptablePrice: z.ZodString;
512
+ contractTriggerPrice: z.ZodString;
513
+ callbackGasLimit: z.ZodString;
514
+ executionFee: z.ZodString;
515
+ initialCollateralDeltaAmount: z.ZodString;
516
+ minOutputAmount: z.ZodString;
517
+ sizeDeltaUsd: z.ZodString;
518
+ updatedAtTime: z.ZodString;
519
+ isFrozen: z.ZodBoolean;
520
+ positionSide: z.ZodUnion<readonly [z.ZodLiteral<"long">, z.ZodLiteral<"short">]>;
521
+ orderType: z.ZodEnum<typeof OrderType>;
522
+ shouldUnwrapNativeToken: z.ZodBoolean;
523
+ autoCancel: z.ZodBoolean;
524
+ data: z.ZodOptional<z.ZodString>;
525
+ uiFeeReceiver: z.ZodString;
526
+ validFromTime: z.ZodString;
527
+ title: z.ZodOptional<z.ZodString>;
528
+ }, z.core.$strip>;
529
+ type PerpetualsOrder = z.infer<typeof OrderSchema>;
530
+ declare const OrdersDataSchema: z.ZodArray<z.ZodObject<{
531
+ chainId: z.ZodString;
532
+ key: z.ZodString;
533
+ account: z.ZodString;
534
+ callbackContract: z.ZodString;
535
+ initialCollateralTokenAddress: z.ZodString;
536
+ marketAddress: z.ZodString;
537
+ decreasePositionSwapType: z.ZodEnum<typeof DecreasePositionSwapType>;
538
+ receiver: z.ZodString;
539
+ swapPath: z.ZodArray<z.ZodString>;
540
+ contractAcceptablePrice: z.ZodString;
541
+ contractTriggerPrice: z.ZodString;
542
+ callbackGasLimit: z.ZodString;
543
+ executionFee: z.ZodString;
544
+ initialCollateralDeltaAmount: z.ZodString;
545
+ minOutputAmount: z.ZodString;
546
+ sizeDeltaUsd: z.ZodString;
547
+ updatedAtTime: z.ZodString;
548
+ isFrozen: z.ZodBoolean;
549
+ positionSide: z.ZodUnion<readonly [z.ZodLiteral<"long">, z.ZodLiteral<"short">]>;
550
+ orderType: z.ZodEnum<typeof OrderType>;
551
+ shouldUnwrapNativeToken: z.ZodBoolean;
552
+ autoCancel: z.ZodBoolean;
553
+ data: z.ZodOptional<z.ZodString>;
554
+ uiFeeReceiver: z.ZodString;
555
+ validFromTime: z.ZodString;
556
+ title: z.ZodOptional<z.ZodString>;
557
+ }, z.core.$strip>>;
558
+ declare const CreatePerpetualsPositionRequestSchema: z.ZodObject<{
559
+ amount: z.ZodBigInt;
560
+ walletAddress: z.ZodString;
561
+ chainId: z.ZodString;
562
+ marketAddress: z.ZodString;
563
+ payTokenAddress: z.ZodString;
564
+ collateralTokenAddress: z.ZodString;
565
+ referralCode: z.ZodOptional<z.ZodString>;
566
+ limitPrice: z.ZodOptional<z.ZodString>;
567
+ leverage: z.ZodString;
568
+ }, z.core.$strip>;
569
+ type CreatePerpetualsPositionRequest = z.infer<typeof CreatePerpetualsPositionRequestSchema>;
570
+ declare const CreatePerpetualsPositionResponseSchema: z.ZodObject<{
571
+ transactions: z.ZodArray<z.ZodObject<{
572
+ type: z.ZodEnum<{
573
+ [x: string]: string;
574
+ }>;
575
+ to: z.ZodString;
576
+ data: z.ZodString;
577
+ value: z.ZodString;
578
+ chainId: z.ZodString;
579
+ }, z.core.$strip>>;
580
+ }, z.core.$strip>;
581
+ type CreatePerpetualsPositionResponse = z.infer<typeof CreatePerpetualsPositionResponseSchema>;
582
+ declare const GetPerpetualsMarketsPositionsRequestSchema: z.ZodObject<{
583
+ walletAddress: z.ZodString;
584
+ }, z.core.$strip>;
585
+ type GetPerpetualsMarketsPositionsRequest = z.infer<typeof GetPerpetualsMarketsPositionsRequestSchema>;
586
+ declare const GetPerpetualsMarketsPositionsResponseSchema: z.ZodObject<{
587
+ positions: z.ZodArray<z.ZodObject<{
588
+ chainId: z.ZodString;
589
+ key: z.ZodString;
590
+ contractKey: z.ZodString;
591
+ account: z.ZodString;
592
+ marketAddress: z.ZodString;
593
+ collateralTokenAddress: z.ZodString;
594
+ sizeInUsd: z.ZodString;
595
+ sizeInTokens: z.ZodString;
596
+ collateralAmount: z.ZodString;
597
+ pendingBorrowingFeesUsd: z.ZodString;
598
+ increasedAtTime: z.ZodString;
599
+ decreasedAtTime: z.ZodString;
600
+ positionSide: z.ZodUnion<readonly [z.ZodLiteral<"long">, z.ZodLiteral<"short">]>;
601
+ isLong: z.ZodBoolean;
602
+ fundingFeeAmount: z.ZodString;
603
+ claimableLongTokenAmount: z.ZodString;
604
+ claimableShortTokenAmount: z.ZodString;
605
+ isOpening: z.ZodOptional<z.ZodBoolean>;
606
+ pnl: z.ZodString;
607
+ positionFeeAmount: z.ZodString;
608
+ traderDiscountAmount: z.ZodString;
609
+ uiFeeAmount: z.ZodString;
610
+ data: z.ZodOptional<z.ZodString>;
611
+ }, z.core.$strip>>;
612
+ }, z.core.$strip>;
613
+ type GetPerpetualsMarketsPositionsResponse = z.infer<typeof GetPerpetualsMarketsPositionsResponseSchema>;
614
+ declare const GetPerpetualsMarketsOrdersRequestSchema: z.ZodObject<{
615
+ walletAddress: z.ZodString;
616
+ }, z.core.$strip>;
617
+ type GetPerpetualsMarketsOrdersRequest = z.infer<typeof GetPerpetualsMarketsOrdersRequestSchema>;
618
+ declare const GetPerpetualsMarketsOrdersResponseSchema: z.ZodObject<{
619
+ orders: z.ZodArray<z.ZodObject<{
620
+ chainId: z.ZodString;
621
+ key: z.ZodString;
622
+ account: z.ZodString;
623
+ callbackContract: z.ZodString;
624
+ initialCollateralTokenAddress: z.ZodString;
625
+ marketAddress: z.ZodString;
626
+ decreasePositionSwapType: z.ZodEnum<typeof DecreasePositionSwapType>;
627
+ receiver: z.ZodString;
628
+ swapPath: z.ZodArray<z.ZodString>;
629
+ contractAcceptablePrice: z.ZodString;
630
+ contractTriggerPrice: z.ZodString;
631
+ callbackGasLimit: z.ZodString;
632
+ executionFee: z.ZodString;
633
+ initialCollateralDeltaAmount: z.ZodString;
634
+ minOutputAmount: z.ZodString;
635
+ sizeDeltaUsd: z.ZodString;
636
+ updatedAtTime: z.ZodString;
637
+ isFrozen: z.ZodBoolean;
638
+ positionSide: z.ZodUnion<readonly [z.ZodLiteral<"long">, z.ZodLiteral<"short">]>;
639
+ orderType: z.ZodEnum<typeof OrderType>;
640
+ shouldUnwrapNativeToken: z.ZodBoolean;
641
+ autoCancel: z.ZodBoolean;
642
+ data: z.ZodOptional<z.ZodString>;
643
+ uiFeeReceiver: z.ZodString;
644
+ validFromTime: z.ZodString;
645
+ title: z.ZodOptional<z.ZodString>;
646
+ }, z.core.$strip>>;
647
+ }, z.core.$strip>;
648
+ type GetPerpetualsMarketsOrdersResponse = z.infer<typeof GetPerpetualsMarketsOrdersResponseSchema>;
649
+ declare const ClosePerpetualsOrdersRequestSchema: z.ZodObject<{
650
+ walletAddress: z.ZodString;
651
+ key: z.ZodString;
652
+ }, z.core.$strip>;
653
+ type ClosePerpetualsOrdersRequest = z.infer<typeof ClosePerpetualsOrdersRequestSchema>;
654
+ declare const ClosePerpetualsOrdersResponseSchema: z.ZodObject<{
655
+ transactions: z.ZodArray<z.ZodObject<{
656
+ type: z.ZodEnum<{
657
+ [x: string]: string;
658
+ }>;
659
+ to: z.ZodString;
660
+ data: z.ZodString;
661
+ value: z.ZodString;
662
+ chainId: z.ZodString;
663
+ }, z.core.$strip>>;
664
+ }, z.core.$strip>;
665
+ type ClosePerpetualsOrdersResponse = z.infer<typeof ClosePerpetualsOrdersResponseSchema>;
666
+ declare const GetPerpetualsMarketsRequestSchema: z.ZodObject<{
667
+ chainIds: z.ZodArray<z.ZodString>;
668
+ }, z.core.$strip>;
669
+ type GetPerpetualsMarketsRequest = z.infer<typeof GetPerpetualsMarketsRequestSchema>;
670
+ declare const PerpetualMarketSchema: z.ZodObject<{
671
+ marketToken: z.ZodObject<{
672
+ chainId: z.ZodString;
673
+ address: z.ZodString;
674
+ }, z.core.$strip>;
675
+ indexToken: z.ZodObject<{
676
+ chainId: z.ZodString;
677
+ address: z.ZodString;
678
+ }, z.core.$strip>;
679
+ longToken: z.ZodObject<{
680
+ chainId: z.ZodString;
681
+ address: z.ZodString;
682
+ }, z.core.$strip>;
683
+ shortToken: z.ZodObject<{
684
+ chainId: z.ZodString;
685
+ address: z.ZodString;
686
+ }, z.core.$strip>;
687
+ longFundingFee: z.ZodString;
688
+ shortFundingFee: z.ZodString;
689
+ longBorrowingFee: z.ZodString;
690
+ shortBorrowingFee: z.ZodString;
691
+ chainId: z.ZodString;
692
+ name: z.ZodString;
693
+ }, z.core.$strip>;
694
+ type PerpetualMarket = z.infer<typeof PerpetualMarketSchema>;
695
+ declare const GetPerpetualsMarketsResponseSchema: z.ZodObject<{
696
+ markets: z.ZodArray<z.ZodObject<{
697
+ marketToken: z.ZodObject<{
698
+ chainId: z.ZodString;
699
+ address: z.ZodString;
700
+ }, z.core.$strip>;
701
+ indexToken: z.ZodObject<{
702
+ chainId: z.ZodString;
703
+ address: z.ZodString;
704
+ }, z.core.$strip>;
705
+ longToken: z.ZodObject<{
706
+ chainId: z.ZodString;
707
+ address: z.ZodString;
708
+ }, z.core.$strip>;
709
+ shortToken: z.ZodObject<{
710
+ chainId: z.ZodString;
711
+ address: z.ZodString;
712
+ }, z.core.$strip>;
713
+ longFundingFee: z.ZodString;
714
+ shortFundingFee: z.ZodString;
715
+ longBorrowingFee: z.ZodString;
716
+ shortBorrowingFee: z.ZodString;
717
+ chainId: z.ZodString;
718
+ name: z.ZodString;
719
+ }, z.core.$strip>>;
720
+ }, z.core.$strip>;
721
+ type GetPerpetualsMarketsResponse = z.infer<typeof GetPerpetualsMarketsResponseSchema>;
722
+
723
+ type PerpetualsCreateShortPositionCallback = (request: CreatePerpetualsPositionRequest) => Promise<CreatePerpetualsPositionResponse>;
724
+ type PerpetualsCreateLongPositionCallback = (request: CreatePerpetualsPositionRequest) => Promise<CreatePerpetualsPositionResponse>;
725
+ type PerpetualsCloseOrdersCallback = (request: ClosePerpetualsOrdersRequest) => Promise<ClosePerpetualsOrdersResponse>;
726
+ type PerpetualsActions = 'perpetuals-short' | 'perpetuals-long' | 'perpetuals-close';
727
+
728
+ declare const SwapTokensRequestSchema: z.ZodObject<{
729
+ fromToken: z.ZodObject<{
730
+ tokenUid: z.ZodObject<{
731
+ chainId: z.ZodString;
732
+ address: z.ZodString;
733
+ }, z.core.$strip>;
734
+ name: z.ZodString;
735
+ symbol: z.ZodString;
736
+ isNative: z.ZodBoolean;
737
+ decimals: z.ZodNumber;
738
+ iconUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
739
+ isVetted: z.ZodBoolean;
740
+ }, z.core.$strip>;
741
+ toToken: z.ZodObject<{
742
+ tokenUid: z.ZodObject<{
743
+ chainId: z.ZodString;
744
+ address: z.ZodString;
745
+ }, z.core.$strip>;
746
+ name: z.ZodString;
747
+ symbol: z.ZodString;
748
+ isNative: z.ZodBoolean;
749
+ decimals: z.ZodNumber;
750
+ iconUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
751
+ isVetted: z.ZodBoolean;
752
+ }, z.core.$strip>;
753
+ amount: z.ZodBigInt;
754
+ limitPrice: z.ZodOptional<z.ZodString>;
755
+ slippageTolerance: z.ZodOptional<z.ZodString>;
756
+ expiration: z.ZodOptional<z.ZodString>;
757
+ recipient: z.ZodString;
758
+ }, z.core.$strip>;
759
+ type SwapTokensRequest = z.infer<typeof SwapTokensRequestSchema>;
760
+ declare const SwapTokensResponseSchema: z.ZodObject<{
761
+ fromToken: z.ZodObject<{
762
+ tokenUid: z.ZodObject<{
763
+ chainId: z.ZodString;
764
+ address: z.ZodString;
765
+ }, z.core.$strip>;
766
+ name: z.ZodString;
767
+ symbol: z.ZodString;
768
+ isNative: z.ZodBoolean;
769
+ decimals: z.ZodNumber;
770
+ iconUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
771
+ isVetted: z.ZodBoolean;
772
+ }, z.core.$strip>;
773
+ toToken: z.ZodObject<{
774
+ tokenUid: z.ZodObject<{
775
+ chainId: z.ZodString;
776
+ address: z.ZodString;
777
+ }, z.core.$strip>;
778
+ name: z.ZodString;
779
+ symbol: z.ZodString;
780
+ isNative: z.ZodBoolean;
781
+ decimals: z.ZodNumber;
782
+ iconUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
783
+ isVetted: z.ZodBoolean;
784
+ }, z.core.$strip>;
785
+ exactFromAmount: z.ZodString;
786
+ displayFromAmount: z.ZodString;
787
+ exactToAmount: z.ZodString;
788
+ displayToAmount: z.ZodString;
789
+ transactions: z.ZodArray<z.ZodObject<{
790
+ type: z.ZodEnum<{
791
+ [x: string]: string;
792
+ }>;
793
+ to: z.ZodString;
794
+ data: z.ZodString;
795
+ value: z.ZodString;
796
+ chainId: z.ZodString;
797
+ }, z.core.$strip>>;
798
+ feeBreakdown: z.ZodOptional<z.ZodObject<{
799
+ serviceFee: z.ZodString;
800
+ slippageCost: z.ZodString;
801
+ total: z.ZodString;
802
+ feeDenomination: z.ZodString;
803
+ }, z.core.$strip>>;
804
+ estimation: z.ZodOptional<z.ZodObject<{
805
+ effectivePrice: z.ZodString;
806
+ timeEstimate: z.ZodString;
807
+ expiration: z.ZodString;
808
+ }, z.core.$strip>>;
809
+ providerTracking: z.ZodOptional<z.ZodObject<{
810
+ requestId: z.ZodString;
811
+ providerName: z.ZodString;
812
+ explorerUrl: z.ZodString;
813
+ }, z.core.$strip>>;
814
+ }, z.core.$strip>;
815
+ type SwapTokensResponse = z.infer<typeof SwapTokensResponseSchema>;
816
+
817
+ /**
818
+ * Callback function type for the swap action.
819
+ */
820
+ type SwapActionCallback = (request: SwapTokensRequest) => Promise<SwapTokensResponse>;
821
+ /**
822
+ * The possible actions related to swapping tokens.
823
+ */
824
+ type SwapActions = 'swap';
825
+
826
+ /**
827
+ * The possible actions an ember plugin can perform.
828
+ */
829
+ type Action = LendingActions | LiquidityActions | SwapActions | PerpetualsActions;
830
+ /**
831
+ * Type mapping for action callbacks.
832
+ */
833
+ type CallbacksRecord = {
834
+ swap: SwapActionCallback;
835
+ 'lending-borrow': LendingBorrowCallback;
836
+ 'lending-repay': LendingRepayTokensCallback;
837
+ 'lending-supply': LendingSupplyCallback;
838
+ 'lending-withdraw': LendingWithdrawCallback;
839
+ 'liquidity-supply': LiquiditySupplyCallback;
840
+ 'liquidity-withdraw': LiquidityWithdrawCallback;
841
+ 'perpetuals-short': PerpetualsCreateShortPositionCallback;
842
+ 'perpetuals-long': PerpetualsCreateLongPositionCallback;
843
+ 'perpetuals-close': PerpetualsCloseOrdersCallback;
844
+ };
845
+ /**
846
+ * Type mapping for action callbacks.
847
+ */
848
+ type ActionCallback<T extends keyof CallbacksRecord> = CallbacksRecord[T];
849
+ /**
850
+ * Represents a grouping of tokens associated with a specific chain.
851
+ */
852
+ interface TokenSet {
853
+ /**
854
+ * The chain id to which the tokens belong.
855
+ */
856
+ chainId: string;
857
+ /**
858
+ * The set of tokens addresses associated with the chain.
859
+ */
860
+ tokens: string[];
861
+ }
862
+ /**
863
+ * Definition of an action that can be performed by the Ember plugin.
864
+ */
865
+ interface ActionDefinition<T extends Action> {
866
+ /**
867
+ * The name for the action, should be unique across all actions in the plugin.
868
+ */
869
+ name: string;
870
+ /**
871
+ * The action type
872
+ */
873
+ type: T;
874
+ /**
875
+ * The callback function to execute when the action is triggered.
876
+ */
877
+ callback: ActionCallback<T>;
878
+ /**
879
+ * This function returns the possible input tokens for the action in all chains.
880
+ * @returns The list of token sets that can be used as input for the action.
881
+ */
882
+ inputTokens: () => Promise<TokenSet[]>;
883
+ /**
884
+ * This function returns the possible output tokens for the action in all chains.
885
+ * If not provided, all input input token sets will be considered possible output sets.
886
+ * @returns The list of tokens that can be used as output for the action.
887
+ */
888
+ outputTokens?: () => Promise<TokenSet[]>;
889
+ }
890
+
891
+ /**
892
+ * Get lending positions for a wallet.
893
+ */
894
+ type LendingGetPositions = (request: GetWalletLendingPositionsRequest) => Promise<GetWalletLendingPositionsResponse>;
895
+ /**
896
+ * All the queries related to lending.
897
+ */
898
+ type LendingQueries = {
899
+ getPositions: LendingGetPositions;
900
+ };
901
+
902
+ /**
903
+ * Get liquidity positions for a wallet.
904
+ */
905
+ type LiquidityGetWalletPositions = (request: GetWalletLiquidityPositionsRequest) => Promise<GetWalletLiquidityPositionsResponse>;
906
+ /**
907
+ * Get all liquidity pools.
908
+ */
909
+ type LiquidityGetPools = () => Promise<GetLiquidityPoolsResponse>;
910
+ /**
911
+ * All the queries related to liquidity.
912
+ */
913
+ type LiquidityQueries = {
914
+ getWalletPositions: LiquidityGetWalletPositions;
915
+ getPools: LiquidityGetPools;
916
+ };
917
+
918
+ type PerpetualsGetMarkets = (request: GetPerpetualsMarketsRequest) => Promise<GetPerpetualsMarketsResponse>;
919
+ type PerpetualsGetPositions = (request: GetPerpetualsMarketsPositionsRequest) => Promise<GetPerpetualsMarketsPositionsResponse>;
920
+ type PerpetualsGetOrders = (request: GetPerpetualsMarketsOrdersRequest) => Promise<GetPerpetualsMarketsOrdersResponse>;
921
+ type PerpetualsQueries = {
922
+ getMarkets: PerpetualsGetMarkets;
923
+ getPositions: PerpetualsGetPositions;
924
+ getOrders: PerpetualsGetOrders;
925
+ };
926
+
927
+ /**
928
+ * The type of actions and queries the plugin supports.
929
+ */
930
+ type PluginType = 'lending' | 'liquidity' | 'swap' | 'perpetuals';
931
+ /**
932
+ * The possible actions an ember plugin can perform.
933
+ */
934
+ type AvailableActions = {
935
+ lending: LendingActions;
936
+ liquidity: LiquidityActions;
937
+ swap: SwapActions;
938
+ perpetuals: PerpetualsActions;
939
+ };
940
+ /**
941
+ * The possible queries an ember plugin can perform.
942
+ */
943
+ type AvailableQueries = {
944
+ lending: LendingQueries;
945
+ liquidity: LiquidityQueries;
946
+ swap: Record<string, never> | undefined;
947
+ perpetuals: PerpetualsQueries;
948
+ };
949
+
950
+ declare const TokenIdentifierSchema: z.ZodObject<{
951
+ chainId: z.ZodString;
952
+ address: z.ZodString;
953
+ }, z.core.$strip>;
954
+ type TokenIdentifier = z.infer<typeof TokenIdentifierSchema>;
955
+ declare const TokenSchema: z.ZodObject<{
956
+ tokenUid: z.ZodObject<{
957
+ chainId: z.ZodString;
958
+ address: z.ZodString;
959
+ }, z.core.$strip>;
960
+ name: z.ZodString;
961
+ symbol: z.ZodString;
962
+ isNative: z.ZodBoolean;
963
+ decimals: z.ZodNumber;
964
+ iconUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
965
+ isVetted: z.ZodBoolean;
966
+ }, z.core.$strip>;
967
+ type Token = z.infer<typeof TokenSchema>;
968
+ declare const ChainSchema: z.ZodObject<{
969
+ chainId: z.ZodString;
970
+ type: z.ZodEnum<{
971
+ UNSPECIFIED: "UNSPECIFIED";
972
+ EVM: "EVM";
973
+ SOLANA: "SOLANA";
974
+ COSMOS: "COSMOS";
975
+ }>;
976
+ iconUri: z.ZodString;
977
+ nativeToken: z.ZodObject<{
978
+ tokenUid: z.ZodObject<{
979
+ chainId: z.ZodString;
980
+ address: z.ZodString;
981
+ }, z.core.$strip>;
982
+ name: z.ZodString;
983
+ symbol: z.ZodString;
984
+ isNative: z.ZodBoolean;
985
+ decimals: z.ZodNumber;
986
+ iconUri: z.ZodOptional<z.ZodNullable<z.ZodString>>;
987
+ isVetted: z.ZodBoolean;
988
+ }, z.core.$strip>;
989
+ httpRpcUrl: z.ZodString;
990
+ name: z.ZodString;
991
+ blockExplorerUrls: z.ZodArray<z.ZodString>;
992
+ }, z.core.$strip>;
993
+ type Chain = z.infer<typeof ChainSchema>;
994
+ declare const FeeBreakdownSchema: z.ZodObject<{
995
+ serviceFee: z.ZodString;
996
+ slippageCost: z.ZodString;
997
+ total: z.ZodString;
998
+ feeDenomination: z.ZodString;
999
+ }, z.core.$strip>;
1000
+ type FeeBreakdown = z.infer<typeof FeeBreakdownSchema>;
1001
+ declare const TransactionPlanSchema: z.ZodObject<{
1002
+ type: z.ZodEnum<{
1003
+ [x: string]: string;
1004
+ }>;
1005
+ to: z.ZodString;
1006
+ data: z.ZodString;
1007
+ value: z.ZodString;
1008
+ chainId: z.ZodString;
1009
+ }, z.core.$strip>;
1010
+ type TransactionPlan = z.infer<typeof TransactionPlanSchema>;
1011
+ declare const TransactionPlanErrorSchema: z.ZodObject<{
1012
+ code: z.ZodString;
1013
+ message: z.ZodString;
1014
+ details: z.ZodRecord<z.ZodString, z.ZodString>;
1015
+ }, z.core.$strip>;
1016
+ type TransactionPlanError = z.infer<typeof TransactionPlanErrorSchema>;
1017
+ declare const ProviderTrackingInfoSchema: z.ZodObject<{
1018
+ requestId: z.ZodString;
1019
+ providerName: z.ZodString;
1020
+ explorerUrl: z.ZodString;
1021
+ }, z.core.$strip>;
1022
+ type ProviderTrackingInfo = z.infer<typeof ProviderTrackingInfoSchema>;
1023
+ declare const SwapEstimationSchema: z.ZodObject<{
1024
+ effectivePrice: z.ZodString;
1025
+ timeEstimate: z.ZodString;
1026
+ expiration: z.ZodString;
1027
+ }, z.core.$strip>;
1028
+ type SwapEstimation = z.infer<typeof SwapEstimationSchema>;
1029
+ declare const ProviderTrackingStatusSchema: z.ZodObject<{
1030
+ requestId: z.ZodString;
1031
+ transactionId: z.ZodString;
1032
+ providerName: z.ZodString;
1033
+ explorerUrl: z.ZodString;
1034
+ status: z.ZodString;
1035
+ }, z.core.$strip>;
1036
+ type ProviderTrackingStatus = z.infer<typeof ProviderTrackingStatusSchema>;
1037
+
1038
+ declare const ChainTypeSchema: z.ZodEnum<{
1039
+ UNSPECIFIED: "UNSPECIFIED";
1040
+ EVM: "EVM";
1041
+ SOLANA: "SOLANA";
1042
+ COSMOS: "COSMOS";
1043
+ }>;
1044
+ type ChainType = z.infer<typeof ChainTypeSchema>;
1045
+ declare const TransactionTypes: {
1046
+ readonly TRANSACTION_TYPE_UNSPECIFIED: "TRANSACTION_TYPE_UNSPECIFIED";
1047
+ readonly EVM_TX: "EVM_TX";
1048
+ readonly SOLANA_TX: "SOLANA_TX";
1049
+ };
1050
+ declare const TransactionTypeSchema: z.ZodEnum<{
1051
+ [x: string]: string;
1052
+ }>;
1053
+ type TransactionType = keyof typeof TransactionTypes;
1054
+
1055
+ interface EmberPlugin<Type extends PluginType> {
1056
+ /**
1057
+ * The unique identifier for the plugin.
1058
+ */
1059
+ id?: string;
1060
+ /**
1061
+ * The type of the plugin, which determines the actions and queries it supports.
1062
+ */
1063
+ type: Type;
1064
+ /**
1065
+ * The possible actions that the plugin can perform.
1066
+ */
1067
+ actions: ActionDefinition<AvailableActions[Type]>[];
1068
+ /**
1069
+ * The metadata getters that the plugin can provide.
1070
+ */
1071
+ queries: AvailableQueries[Type];
1072
+ /**
1073
+ * The name of the plugin.
1074
+ */
1075
+ name: string;
1076
+ /**
1077
+ * An optional description of the plugin.
1078
+ */
1079
+ description?: string;
1080
+ /**
1081
+ * The twitter URL for the plugin or its creator.
1082
+ */
1083
+ x?: string;
1084
+ /**
1085
+ * The website URL for the plugin or its creator.
1086
+ */
1087
+ website?: string;
1088
+ }
1089
+
1090
+ /**
1091
+ * Registry for public Ember plugins.
1092
+ */
1093
+ declare class PublicEmberPluginRegistry {
1094
+ private plugins;
1095
+ private deferredPlugins;
1096
+ /**
1097
+ * Register a new Ember plugin.
1098
+ * @param plugin The plugin to register.
1099
+ */
1100
+ registerPlugin(plugin: EmberPlugin<PluginType>): void;
1101
+ /**
1102
+ * Register a new deferred Ember plugin.
1103
+ * @param pluginPromise The promise resolving to the plugin to register.
1104
+ */
1105
+ registerDeferredPlugin(pluginPromise: Promise<EmberPlugin<PluginType>>): void;
1106
+ /**
1107
+ * Iterator for the registered Ember plugins.
1108
+ */
1109
+ getPlugins(): AsyncIterable<EmberPlugin<PluginType>>;
1110
+ get emberPlugins(): EmberPlugin<PluginType>[];
1111
+ }
1112
+
1113
+ /**
1114
+ * Initialize the public Ember plugin registry.
1115
+ * @returns The initialized public Ember plugin registry with registered plugins.
1116
+ */
1117
+ declare function initializePublicRegistry(chainConfigs: ChainConfig[]): PublicEmberPluginRegistry;
1118
+
1119
+ export { type Action, type ActionDefinition, type AvailableActions, type AvailableQueries, type BorrowTokensRequest, BorrowTokensRequestSchema, type BorrowTokensResponse, BorrowTokensResponseSchema, type Chain, type ChainConfig, ChainSchema, type ChainType, ChainTypeSchema, type ClosePerpetualsOrdersRequest, ClosePerpetualsOrdersRequestSchema, type ClosePerpetualsOrdersResponse, ClosePerpetualsOrdersResponseSchema, type CreatePerpetualsPositionRequest, CreatePerpetualsPositionRequestSchema, type CreatePerpetualsPositionResponse, CreatePerpetualsPositionResponseSchema, DecreasePositionSwapTypeSchema, type EmberPlugin, type FeeBreakdown, FeeBreakdownSchema, type GetLiquidityPoolsResponse, GetLiquidityPoolsResponseSchema, type GetPerpetualsMarketsOrdersRequest, GetPerpetualsMarketsOrdersRequestSchema, type GetPerpetualsMarketsOrdersResponse, GetPerpetualsMarketsOrdersResponseSchema, type GetPerpetualsMarketsPositionsRequest, GetPerpetualsMarketsPositionsRequestSchema, type GetPerpetualsMarketsPositionsResponse, GetPerpetualsMarketsPositionsResponseSchema, type GetPerpetualsMarketsRequest, GetPerpetualsMarketsRequestSchema, type GetPerpetualsMarketsResponse, GetPerpetualsMarketsResponseSchema, type GetWalletLendingPositionsRequest, GetWalletLendingPositionsRequestSchema, type GetWalletLendingPositionsResponse, GetWalletLendingPositionsResponseSchema, type GetWalletLiquidityPositionsRequest, GetWalletLiquidityPositionsRequestSchema, type GetWalletLiquidityPositionsResponse, GetWalletLiquidityPositionsResponseSchema, type LendTokenDetail, LendTokenDetailSchema, type LendingActions, type LendingGetPositions, type LendingQueries, type LimitedLiquidityProvisionRange, LimitedLiquidityProvisionRangeSchema, type LiquidityActions, type LiquidityGetPools, type LiquidityGetWalletPositions, type LiquidityPayTokens, LiquidityPayTokensSchema, type LiquidityPool, LiquidityPoolSchema, LiquidityPoolTokens, type LiquidityPosition, type LiquidityPositionRange, LiquidityPositionRangeSchema, LiquidityPositionSchema, type LiquidityProvisionRange, LiquidityProvisionRangeSchema, type LiquidityQueries, type LiquiditySuppliedToken, LiquiditySuppliedTokenSchema, OrderSchema, OrdersDataSchema, type PerpetualMarket, PerpetualMarketSchema, type PerpetualsActions, type PerpetualsGetMarkets, type PerpetualsGetOrders, type PerpetualsGetPositions, type PerpetualsOrder, type PerpetualsPosition, type PerpetualsQueries, type PluginType, PositionSchema, type PositionSide, PositionSideSchema, PositionsDataSchema, type ProviderTrackingInfo, ProviderTrackingInfoSchema, type ProviderTrackingStatus, ProviderTrackingStatusSchema, PublicEmberPluginRegistry, type RepayTokensRequest, RepayTokensRequestSchema, type RepayTokensResponse, RepayTokensResponseSchema, type SupplyLiquidityRequest, SupplyLiquidityRequestSchema, type SupplyLiquidityResponse, SupplyLiquidityResponseSchema, type SupplyTokensRequest, SupplyTokensRequestSchema, type SupplyTokensResponse, SupplyTokensResponseSchema, type SwapActions, type SwapEstimation, SwapEstimationSchema, type SwapTokensRequest, SwapTokensRequestSchema, type SwapTokensResponse, SwapTokensResponseSchema, type Token, type TokenIdentifier, TokenIdentifierSchema, TokenSchema, type TokenSet, type TransactionPlan, type TransactionPlanError, TransactionPlanErrorSchema, TransactionPlanSchema, type TransactionType, TransactionTypeSchema, TransactionTypes, type WithdrawLiquidityRequest, WithdrawLiquidityRequestSchema, type WithdrawLiquidityResponse, WithdrawLiquidityResponseSchema, type WithdrawTokensRequest, WithdrawTokensRequestSchema, type WithdrawTokensResponse, WithdrawTokensResponseSchema, initializePublicRegistry };