@emberai/onchain-actions-registry 4.1.2 → 4.2.0
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/chunk-z5eko27R.mjs +13 -0
- package/dist/index.cjs +698 -7
- package/dist/index.d.cts +6954 -518
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +6956 -522
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +680 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as __export } from "./chunk-z5eko27R.mjs";
|
|
1
2
|
import { InterestRate, LegacyUiPoolDataProvider, Pool, PoolBundle, UiPoolDataProvider } from "@aave/contract-helpers";
|
|
2
3
|
import { ethers, utils } from "ethers";
|
|
3
4
|
import { z } from "zod";
|
|
@@ -155,11 +156,6 @@ const LiquidityPositionRangeSchema = z.object({
|
|
|
155
156
|
fromPrice: z.string(),
|
|
156
157
|
toPrice: z.string()
|
|
157
158
|
});
|
|
158
|
-
const LiquiditySuppliedTokenSchema = z.object({
|
|
159
|
-
tokenUid: TokenIdentifierSchema,
|
|
160
|
-
suppliedAmount: z.string(),
|
|
161
|
-
owedTokens: z.string()
|
|
162
|
-
});
|
|
163
159
|
const LiquidityRewardsOwedTokenSchema = z.object({
|
|
164
160
|
tokenUid: TokenIdentifierSchema,
|
|
165
161
|
amount: z.string(),
|
|
@@ -169,12 +165,18 @@ const LiquidityRewardsOwedTokenSchema = z.object({
|
|
|
169
165
|
});
|
|
170
166
|
const LiquidityPooledTokenSchema = z.object({
|
|
171
167
|
tokenUid: TokenIdentifierSchema,
|
|
168
|
+
name: z.string(),
|
|
169
|
+
symbol: z.string(),
|
|
170
|
+
decimals: z.number().int(),
|
|
172
171
|
amount: z.string(),
|
|
173
172
|
usdPrice: z.string().optional(),
|
|
174
173
|
valueUsd: z.string().optional()
|
|
175
174
|
});
|
|
176
175
|
const LiquidityFeesOwedTokenSchema = z.object({
|
|
177
176
|
tokenUid: TokenIdentifierSchema,
|
|
177
|
+
name: z.string(),
|
|
178
|
+
symbol: z.string(),
|
|
179
|
+
decimals: z.number().int(),
|
|
178
180
|
amount: z.string(),
|
|
179
181
|
usdPrice: z.string().optional(),
|
|
180
182
|
valueUsd: z.string().optional()
|
|
@@ -183,7 +185,6 @@ const LiquidityPositionSchema = z.object({
|
|
|
183
185
|
positionId: z.string(),
|
|
184
186
|
poolIdentifier: TokenIdentifierSchema,
|
|
185
187
|
operator: z.string(),
|
|
186
|
-
suppliedTokens: z.array(LiquiditySuppliedTokenSchema),
|
|
187
188
|
pooledTokens: z.array(LiquidityPooledTokenSchema),
|
|
188
189
|
feesOwedTokens: z.array(LiquidityFeesOwedTokenSchema),
|
|
189
190
|
rewardsOwedTokens: z.array(LiquidityRewardsOwedTokenSchema),
|
|
@@ -485,6 +486,90 @@ const TokenizedYieldUserPositionsRequestSchema = z.object({
|
|
|
485
486
|
});
|
|
486
487
|
const TokenizedYieldUserPositionsResponseSchema = z.object({ positions: z.array(TokenizedYieldUserPositionSchema).describe("Array of user positions in tokenized yield markets") });
|
|
487
488
|
|
|
489
|
+
//#endregion
|
|
490
|
+
//#region src/core/index.ts
|
|
491
|
+
var core_exports = /* @__PURE__ */ __export({
|
|
492
|
+
BorrowTokensRequestSchema: () => BorrowTokensRequestSchema,
|
|
493
|
+
BorrowTokensResponseSchema: () => BorrowTokensResponseSchema,
|
|
494
|
+
BuyPtRequestSchema: () => BuyPtRequestSchema,
|
|
495
|
+
BuyPtResponseSchema: () => BuyPtResponseSchema,
|
|
496
|
+
BuyYtRequestSchema: () => BuyYtRequestSchema,
|
|
497
|
+
BuyYtResponseSchema: () => BuyYtResponseSchema,
|
|
498
|
+
ChainSchema: () => ChainSchema,
|
|
499
|
+
ChainTypeSchema: () => ChainTypeSchema,
|
|
500
|
+
ClaimRewardsRequestSchema: () => ClaimRewardsRequestSchema,
|
|
501
|
+
ClaimRewardsResponseSchema: () => ClaimRewardsResponseSchema,
|
|
502
|
+
ClosePerpetualsOrdersRequestSchema: () => ClosePerpetualsOrdersRequestSchema,
|
|
503
|
+
ClosePerpetualsOrdersResponseSchema: () => ClosePerpetualsOrdersResponseSchema,
|
|
504
|
+
CreatePerpetualsPositionRequestSchema: () => CreatePerpetualsPositionRequestSchema,
|
|
505
|
+
CreatePerpetualsPositionResponseSchema: () => CreatePerpetualsPositionResponseSchema,
|
|
506
|
+
DecreasePositionSwapTypeSchema: () => DecreasePositionSwapTypeSchema,
|
|
507
|
+
FeeBreakdownSchema: () => FeeBreakdownSchema,
|
|
508
|
+
GetLiquidityPoolsResponseSchema: () => GetLiquidityPoolsResponseSchema,
|
|
509
|
+
GetPerpetualsMarketsOrdersRequestSchema: () => GetPerpetualsMarketsOrdersRequestSchema,
|
|
510
|
+
GetPerpetualsMarketsOrdersResponseSchema: () => GetPerpetualsMarketsOrdersResponseSchema,
|
|
511
|
+
GetPerpetualsMarketsPositionsRequestSchema: () => GetPerpetualsMarketsPositionsRequestSchema,
|
|
512
|
+
GetPerpetualsMarketsPositionsResponseSchema: () => GetPerpetualsMarketsPositionsResponseSchema,
|
|
513
|
+
GetPerpetualsMarketsRequestSchema: () => GetPerpetualsMarketsRequestSchema,
|
|
514
|
+
GetPerpetualsMarketsResponseSchema: () => GetPerpetualsMarketsResponseSchema,
|
|
515
|
+
GetWalletLendingPositionsRequestSchema: () => GetWalletLendingPositionsRequestSchema,
|
|
516
|
+
GetWalletLendingPositionsResponseSchema: () => GetWalletLendingPositionsResponseSchema,
|
|
517
|
+
GetWalletLiquidityPositionsRequestSchema: () => GetWalletLiquidityPositionsRequestSchema,
|
|
518
|
+
GetWalletLiquidityPositionsResponseSchema: () => GetWalletLiquidityPositionsResponseSchema,
|
|
519
|
+
LendTokenDetailSchema: () => LendTokenDetailSchema,
|
|
520
|
+
LiquidityFeesOwedTokenSchema: () => LiquidityFeesOwedTokenSchema,
|
|
521
|
+
LiquidityPayTokensSchema: () => LiquidityPayTokensSchema,
|
|
522
|
+
LiquidityPoolSchema: () => LiquidityPoolSchema,
|
|
523
|
+
LiquidityPoolTokens: () => LiquidityPoolTokens,
|
|
524
|
+
LiquidityPooledTokenSchema: () => LiquidityPooledTokenSchema,
|
|
525
|
+
LiquidityPositionRangeSchema: () => LiquidityPositionRangeSchema,
|
|
526
|
+
LiquidityPositionSchema: () => LiquidityPositionSchema,
|
|
527
|
+
LiquidityProvisionRangeSchema: () => LiquidityProvisionRangeSchema,
|
|
528
|
+
LiquidityRewardsOwedTokenSchema: () => LiquidityRewardsOwedTokenSchema,
|
|
529
|
+
MarketTokenizedYieldRequestSchema: () => MarketTokenizedYieldRequestSchema,
|
|
530
|
+
MarketTokenizedYieldResponseSchema: () => MarketTokenizedYieldResponseSchema,
|
|
531
|
+
MintPtAndYtRequestSchema: () => MintPtAndYtRequestSchema,
|
|
532
|
+
MintPtAndYtResponseSchema: () => MintPtAndYtResponseSchema,
|
|
533
|
+
OrderSchema: () => OrderSchema,
|
|
534
|
+
OrderTypeSchema: () => OrderTypeSchema,
|
|
535
|
+
OrdersDataSchema: () => OrdersDataSchema,
|
|
536
|
+
PerpetualMarketSchema: () => PerpetualMarketSchema,
|
|
537
|
+
PositionSchema: () => PositionSchema,
|
|
538
|
+
PositionSideSchema: () => PositionSideSchema,
|
|
539
|
+
PositionsDataSchema: () => PositionsDataSchema,
|
|
540
|
+
ProviderTrackingInfoSchema: () => ProviderTrackingInfoSchema,
|
|
541
|
+
ProviderTrackingStatusSchema: () => ProviderTrackingStatusSchema,
|
|
542
|
+
RedeemPtRequestSchema: () => RedeemPtRequestSchema,
|
|
543
|
+
RedeemPtResponseSchema: () => RedeemPtResponseSchema,
|
|
544
|
+
RepayTokensRequestSchema: () => RepayTokensRequestSchema,
|
|
545
|
+
RepayTokensResponseSchema: () => RepayTokensResponseSchema,
|
|
546
|
+
SellPtRequestSchema: () => SellPtRequestSchema,
|
|
547
|
+
SellPtResponseSchema: () => SellPtResponseSchema,
|
|
548
|
+
SellYtRequestSchema: () => SellYtRequestSchema,
|
|
549
|
+
SellYtResponseSchema: () => SellYtResponseSchema,
|
|
550
|
+
SupplyLiquidityRequestSchema: () => SupplyLiquidityRequestSchema,
|
|
551
|
+
SupplyLiquidityResponseSchema: () => SupplyLiquidityResponseSchema,
|
|
552
|
+
SupplyTokensRequestSchema: () => SupplyTokensRequestSchema,
|
|
553
|
+
SupplyTokensResponseSchema: () => SupplyTokensResponseSchema,
|
|
554
|
+
SwapEstimationSchema: () => SwapEstimationSchema,
|
|
555
|
+
SwapTokensRequestSchema: () => SwapTokensRequestSchema,
|
|
556
|
+
SwapTokensResponseSchema: () => SwapTokensResponseSchema,
|
|
557
|
+
TokenIdentifierSchema: () => TokenIdentifierSchema,
|
|
558
|
+
TokenSchema: () => TokenSchema,
|
|
559
|
+
TokenizedYieldMarketSchema: () => TokenizedYieldMarketSchema,
|
|
560
|
+
TokenizedYieldUserPositionSchema: () => TokenizedYieldUserPositionSchema,
|
|
561
|
+
TokenizedYieldUserPositionsRequestSchema: () => TokenizedYieldUserPositionsRequestSchema,
|
|
562
|
+
TokenizedYieldUserPositionsResponseSchema: () => TokenizedYieldUserPositionsResponseSchema,
|
|
563
|
+
TransactionPlanErrorSchema: () => TransactionPlanErrorSchema,
|
|
564
|
+
TransactionPlanSchema: () => TransactionPlanSchema,
|
|
565
|
+
TransactionTypeSchema: () => TransactionTypeSchema,
|
|
566
|
+
TransactionTypes: () => TransactionTypes,
|
|
567
|
+
WithdrawLiquidityRequestSchema: () => WithdrawLiquidityRequestSchema,
|
|
568
|
+
WithdrawLiquidityResponseSchema: () => WithdrawLiquidityResponseSchema,
|
|
569
|
+
WithdrawTokensRequestSchema: () => WithdrawTokensRequestSchema,
|
|
570
|
+
WithdrawTokensResponseSchema: () => WithdrawTokensResponseSchema
|
|
571
|
+
});
|
|
572
|
+
|
|
488
573
|
//#endregion
|
|
489
574
|
//#region src/aave-lending-plugin/chain.ts
|
|
490
575
|
/**
|
|
@@ -1409,6 +1494,594 @@ var PublicEmberPluginRegistry = class {
|
|
|
1409
1494
|
}
|
|
1410
1495
|
};
|
|
1411
1496
|
|
|
1497
|
+
//#endregion
|
|
1498
|
+
//#region src/endpoint-interfaces/pagination.ts
|
|
1499
|
+
const PaginatedPossibleResultsRequestSchema = z.object({
|
|
1500
|
+
cursor: z.string().optional().describe("Pagination cursor for cached results"),
|
|
1501
|
+
page: z.number().int().positive().optional().describe("Page number to retrieve (defaults to 1)")
|
|
1502
|
+
});
|
|
1503
|
+
const PaginatedPossibleResultsResponseSchema = z.object({
|
|
1504
|
+
cursor: z.string().describe("Pagination cursor for retrieving next/previous pages"),
|
|
1505
|
+
currentPage: z.number().int().describe("Current page number"),
|
|
1506
|
+
totalPages: z.number().int().describe("Total number of pages"),
|
|
1507
|
+
totalItems: z.number().int().describe("Total number of items across all pages")
|
|
1508
|
+
});
|
|
1509
|
+
|
|
1510
|
+
//#endregion
|
|
1511
|
+
//#region src/endpoint-interfaces/lending.ts
|
|
1512
|
+
const CreateLendingSupplyRequestSchema = z.object({
|
|
1513
|
+
walletAddress: z.string().describe("The wallet address that will supply tokens to the lending protocol"),
|
|
1514
|
+
amount: z.string().describe("The amount of tokens to supply to the lending protocol"),
|
|
1515
|
+
supplyChain: z.string().describe("The blockchain network where the lending protocol exists"),
|
|
1516
|
+
supplyToken: z.string().describe("The token symbol or name to supply to the lending protocol")
|
|
1517
|
+
});
|
|
1518
|
+
const PromptLendingSupplyRequestSchema = CreateLendingSupplyRequestSchema.pick({
|
|
1519
|
+
walletAddress: true,
|
|
1520
|
+
supplyToken: true,
|
|
1521
|
+
supplyChain: true
|
|
1522
|
+
}).partial();
|
|
1523
|
+
const PossibleLendingSupplyRequestSchema = PaginatedPossibleResultsRequestSchema.merge(PromptLendingSupplyRequestSchema);
|
|
1524
|
+
const PossibleLendingSupplyOptionSchema = z.object({
|
|
1525
|
+
createRequest: CreateLendingSupplyRequestSchema.pick({
|
|
1526
|
+
supplyToken: true,
|
|
1527
|
+
supplyChain: true
|
|
1528
|
+
}),
|
|
1529
|
+
data: z.object({}).describe("Additional lending supply data (currently empty)")
|
|
1530
|
+
});
|
|
1531
|
+
const PossibleLendingSupplyResponseSchema = PaginatedPossibleResultsResponseSchema.extend({ options: z.array(PossibleLendingSupplyOptionSchema).describe("Available tokens and chains where you can supply to lending protocols") });
|
|
1532
|
+
const CreateSupplyEndpointRequestSchema = SupplyTokensRequestSchema.omit({
|
|
1533
|
+
supplyToken: true,
|
|
1534
|
+
amount: true
|
|
1535
|
+
}).extend({
|
|
1536
|
+
supplyTokenUid: TokenIdentifierSchema,
|
|
1537
|
+
amount: z.string().transform((arg) => BigInt(arg))
|
|
1538
|
+
});
|
|
1539
|
+
const CreateLendingBorrowRequestSchema = z.object({
|
|
1540
|
+
walletAddress: z.string().describe("The wallet address that will borrow tokens from the lending protocol"),
|
|
1541
|
+
amount: z.string().describe("The amount of tokens to borrow from the lending protocol"),
|
|
1542
|
+
borrowChain: z.string().describe("The blockchain network where the borrowing will occur"),
|
|
1543
|
+
borrowToken: z.string().describe("The token symbol or name to borrow from lending protocols")
|
|
1544
|
+
});
|
|
1545
|
+
const PromptLendingBorrowRequestSchema = CreateLendingBorrowRequestSchema.pick({
|
|
1546
|
+
walletAddress: true,
|
|
1547
|
+
borrowToken: true,
|
|
1548
|
+
borrowChain: true
|
|
1549
|
+
}).partial();
|
|
1550
|
+
const PossibleLendingBorrowRequestSchema = PaginatedPossibleResultsRequestSchema.merge(PromptLendingBorrowRequestSchema);
|
|
1551
|
+
const PossibleLendingBorrowOptionSchema = z.object({
|
|
1552
|
+
createRequest: CreateLendingBorrowRequestSchema.pick({
|
|
1553
|
+
borrowToken: true,
|
|
1554
|
+
borrowChain: true
|
|
1555
|
+
}),
|
|
1556
|
+
data: z.object({}).describe("Additional borrow data (currently empty)")
|
|
1557
|
+
});
|
|
1558
|
+
const PossibleLendingBorrowResponseSchema = PaginatedPossibleResultsResponseSchema.extend({ options: z.array(PossibleLendingBorrowOptionSchema).describe("Available tokens and chains where you can borrow from lending protocols") });
|
|
1559
|
+
const CreateBorrowEndpointRequestSchema = BorrowTokensRequestSchema.omit({
|
|
1560
|
+
borrowToken: true,
|
|
1561
|
+
amount: true
|
|
1562
|
+
}).extend({
|
|
1563
|
+
borrowTokenUid: TokenIdentifierSchema,
|
|
1564
|
+
amount: z.string().transform((arg) => BigInt(arg))
|
|
1565
|
+
});
|
|
1566
|
+
const CreateLendingRepayRequestSchema = z.object({
|
|
1567
|
+
walletAddress: z.string().describe("The wallet address that will repay tokens to the lending protocol"),
|
|
1568
|
+
amount: z.string().describe("The amount of tokens to repay to the lending protocol"),
|
|
1569
|
+
repayChain: z.string().describe("The blockchain network where repayment will occur"),
|
|
1570
|
+
repayToken: z.string().describe("The token symbol or name to repay to lending protocols")
|
|
1571
|
+
});
|
|
1572
|
+
const PromptLendingRepayRequestSchema = CreateLendingRepayRequestSchema.pick({
|
|
1573
|
+
walletAddress: true,
|
|
1574
|
+
repayToken: true,
|
|
1575
|
+
repayChain: true
|
|
1576
|
+
}).partial();
|
|
1577
|
+
const PossibleLendingRepayRequestSchema = PaginatedPossibleResultsRequestSchema.merge(PromptLendingRepayRequestSchema);
|
|
1578
|
+
const PossibleLendingRepayOptionSchema = z.object({
|
|
1579
|
+
createRequest: CreateLendingRepayRequestSchema.pick({
|
|
1580
|
+
repayToken: true,
|
|
1581
|
+
repayChain: true
|
|
1582
|
+
}),
|
|
1583
|
+
data: z.object({}).describe("Additional repay data (currently empty)")
|
|
1584
|
+
});
|
|
1585
|
+
const PossibleLendingRepayResponseSchema = PaginatedPossibleResultsResponseSchema.extend({ options: z.array(PossibleLendingRepayOptionSchema).describe("Available tokens and chains where you can repay to lending protocols") });
|
|
1586
|
+
const CreateRepayEndpointRequestSchema = RepayTokensRequestSchema.omit({
|
|
1587
|
+
repayToken: true,
|
|
1588
|
+
amount: true
|
|
1589
|
+
}).extend({
|
|
1590
|
+
repayTokenUid: TokenIdentifierSchema,
|
|
1591
|
+
amount: z.string().transform((arg) => BigInt(arg))
|
|
1592
|
+
});
|
|
1593
|
+
const CreateLendingWithdrawRequestSchema = z.object({
|
|
1594
|
+
walletAddress: z.string().describe("The wallet address that will withdraw tokens from the lending protocol"),
|
|
1595
|
+
amount: z.string().describe("The amount of tokens to withdraw from the lending protocol"),
|
|
1596
|
+
withdrawChain: z.string().describe("The blockchain network where the withdrawal will occur"),
|
|
1597
|
+
withdrawToken: z.string().describe("The token symbol or name to withdraw from lending protocols")
|
|
1598
|
+
});
|
|
1599
|
+
const PromptLendingWithdrawRequestSchema = CreateLendingWithdrawRequestSchema.pick({
|
|
1600
|
+
walletAddress: true,
|
|
1601
|
+
withdrawToken: true,
|
|
1602
|
+
withdrawChain: true
|
|
1603
|
+
}).partial();
|
|
1604
|
+
const PossibleLendingWithdrawRequestSchema = PaginatedPossibleResultsRequestSchema.merge(PromptLendingWithdrawRequestSchema);
|
|
1605
|
+
const PossibleLendingWithdrawOptionSchema = z.object({
|
|
1606
|
+
createRequest: CreateLendingWithdrawRequestSchema.pick({
|
|
1607
|
+
withdrawToken: true,
|
|
1608
|
+
withdrawChain: true
|
|
1609
|
+
}),
|
|
1610
|
+
data: z.object({}).describe("Additional withdraw data (currently empty)")
|
|
1611
|
+
});
|
|
1612
|
+
const PossibleLendingWithdrawResponseSchema = PaginatedPossibleResultsResponseSchema.extend({ options: z.array(PossibleLendingWithdrawOptionSchema).describe("Available tokens and chains where you can withdraw from lending protocols") });
|
|
1613
|
+
const CreateWithdrawEndpointRequestSchema = WithdrawTokensRequestSchema.omit({
|
|
1614
|
+
tokenToWithdraw: true,
|
|
1615
|
+
amount: true
|
|
1616
|
+
}).extend({
|
|
1617
|
+
tokenUidToWidthraw: TokenIdentifierSchema,
|
|
1618
|
+
amount: z.string().transform((arg) => BigInt(arg))
|
|
1619
|
+
});
|
|
1620
|
+
|
|
1621
|
+
//#endregion
|
|
1622
|
+
//#region src/endpoint-interfaces/liquidity.ts
|
|
1623
|
+
const NonMappedPayableTokens = z.object({
|
|
1624
|
+
token: z.string().describe("The token to be paid"),
|
|
1625
|
+
amount: z.string().describe("The amount of the token to be paid as a string")
|
|
1626
|
+
});
|
|
1627
|
+
const CreateLiquiditySupplyRequestSchema = z.object({
|
|
1628
|
+
walletAddress: z.string().describe("The wallet address that will supply liquidity to the pool"),
|
|
1629
|
+
payableTokens: z.array(NonMappedPayableTokens).describe("The tokens and amounts to be supplied to the liquidity pool"),
|
|
1630
|
+
poolToken: z.string().describe("The liquidity pool token"),
|
|
1631
|
+
supplyChain: z.string().describe("The blockchain network where the liquidity pool exists"),
|
|
1632
|
+
range: LiquidityProvisionRangeSchema.describe("The price range for concentrated liquidity provision").optional()
|
|
1633
|
+
});
|
|
1634
|
+
const CreateLiquiditySupplyPayableTokenSchema = z.object({
|
|
1635
|
+
tokenUid: TokenIdentifierSchema.describe("The token to be paid"),
|
|
1636
|
+
amount: z.string().describe("The amount of the token to be paid as a string")
|
|
1637
|
+
});
|
|
1638
|
+
const CreateLiquiditySupplyEndpointRequestSchema = CreateLiquiditySupplyRequestSchema.omit({
|
|
1639
|
+
payableTokens: true,
|
|
1640
|
+
poolToken: true
|
|
1641
|
+
}).extend({
|
|
1642
|
+
payableTokens: z.array(CreateLiquiditySupplyPayableTokenSchema).describe("The tokens and amounts to be supplied to the liquidity pool"),
|
|
1643
|
+
poolIdentifier: TokenIdentifierSchema.describe("The liquidity pool token")
|
|
1644
|
+
});
|
|
1645
|
+
const CreateLiquidityWithdrawRequestSchema = z.object({
|
|
1646
|
+
walletAddress: z.string().describe("The wallet address that owns the liquidity position to withdraw"),
|
|
1647
|
+
poolToken: z.string().describe("The LP token representing the liquidity position")
|
|
1648
|
+
});
|
|
1649
|
+
const PromptLiquidityWithdrawRequestSchema = CreateLiquidityWithdrawRequestSchema.partial();
|
|
1650
|
+
const PossibleLiquidityWithdrawRequestSchema = PaginatedPossibleResultsRequestSchema.merge(PromptLiquidityWithdrawRequestSchema);
|
|
1651
|
+
const LiquidityWithdrawOptionSchema = z.object({
|
|
1652
|
+
createRequest: CreateLiquidityWithdrawRequestSchema.pick({
|
|
1653
|
+
walletAddress: true,
|
|
1654
|
+
poolToken: true
|
|
1655
|
+
}),
|
|
1656
|
+
data: z.object({})
|
|
1657
|
+
});
|
|
1658
|
+
const PossibleLiquidityWithdrawResponseSchema = PaginatedPossibleResultsResponseSchema.extend({ options: z.array(LiquidityWithdrawOptionSchema).describe("Available liquidity positions that can be withdrawn") });
|
|
1659
|
+
const CreateLiquidityWithdrawEndpointRequestSchema = z.object({
|
|
1660
|
+
walletAddress: z.string().describe("The wallet owning the liquidity position to withdraw"),
|
|
1661
|
+
poolTokenUid: TokenIdentifierSchema.describe("The LP token identifier")
|
|
1662
|
+
});
|
|
1663
|
+
|
|
1664
|
+
//#endregion
|
|
1665
|
+
//#region src/endpoint-interfaces/perpetuals.ts
|
|
1666
|
+
const PerpetualsCreatePositionRequestSchema = z.object({
|
|
1667
|
+
amount: z.string().describe("The amount of tokens to use for opening the perpetual position"),
|
|
1668
|
+
walletAddress: z.string().describe("The wallet address that will create the perpetual position"),
|
|
1669
|
+
chain: z.string().describe("The blockchain network where the perpetual position will be created"),
|
|
1670
|
+
market: z.string().describe("The perpetual futures market to trade (e.g., BTC-USD, ETH-USD)"),
|
|
1671
|
+
payToken: z.string().describe("The token used to pay for opening the position"),
|
|
1672
|
+
collateralToken: z.string().describe("The token used as collateral for the perpetual position"),
|
|
1673
|
+
referralCode: z.string().optional().describe("Optional referral code for fee discounts"),
|
|
1674
|
+
limitPrice: z.string().optional().describe("Limit price for the order. If not provided, will execute at market price"),
|
|
1675
|
+
leverage: z.string().describe("The leverage multiplier for the position (e.g., '2', '5', '10')")
|
|
1676
|
+
});
|
|
1677
|
+
const PerpetualsPositionPromptSchema = PerpetualsCreatePositionRequestSchema.pick({
|
|
1678
|
+
chain: true,
|
|
1679
|
+
market: true,
|
|
1680
|
+
payToken: true,
|
|
1681
|
+
collateralToken: true,
|
|
1682
|
+
walletAddress: true
|
|
1683
|
+
}).partial();
|
|
1684
|
+
const PossiblePerpetualPositionsRequestSchema = PaginatedPossibleResultsRequestSchema.merge(PerpetualsPositionPromptSchema);
|
|
1685
|
+
const PossiblePerpetualPositionsOptionSchema = z.object({
|
|
1686
|
+
createRequest: PerpetualsCreatePositionRequestSchema.pick({
|
|
1687
|
+
market: true,
|
|
1688
|
+
collateralToken: true,
|
|
1689
|
+
payToken: true,
|
|
1690
|
+
chain: true
|
|
1691
|
+
}),
|
|
1692
|
+
data: z.object({
|
|
1693
|
+
fundingFee: z.string().describe("The funding fee rate for this perpetual market"),
|
|
1694
|
+
borrowingFee: z.string().describe("The borrowing fee rate for this perpetual market")
|
|
1695
|
+
})
|
|
1696
|
+
});
|
|
1697
|
+
const PossiblePerpetualPositionsResponseSchema = z.object({ options: z.array(PossiblePerpetualPositionsOptionSchema) }).merge(PaginatedPossibleResultsResponseSchema);
|
|
1698
|
+
const CreatePerpetualClosePositionRequestSchema = z.object({
|
|
1699
|
+
walletAddress: z.string().describe("The wallet address that owns the perpetual position to close"),
|
|
1700
|
+
providerName: z.string().describe("The DeFi protocol provider where the position exists (e.g., GMX, dYdX)"),
|
|
1701
|
+
market: z.string().describe("The perpetual futures market of the position to close"),
|
|
1702
|
+
collateralToken: z.string().describe("The collateral token used in the position"),
|
|
1703
|
+
positionSide: PositionSideSchema.describe("Whether the position is long or short"),
|
|
1704
|
+
isLimit: z.boolean().describe("Whether to close using a limit order (true) or market order (false)")
|
|
1705
|
+
});
|
|
1706
|
+
const PerpetualsCloseOrderPromptSchema = CreatePerpetualClosePositionRequestSchema.pick({
|
|
1707
|
+
walletAddress: true,
|
|
1708
|
+
providerName: true,
|
|
1709
|
+
market: true,
|
|
1710
|
+
collateralToken: true,
|
|
1711
|
+
positionSide: true
|
|
1712
|
+
}).extend({ isLimit: z.string().describe("Whether to use limit order ('true') or market order ('false') for closing") }).partial();
|
|
1713
|
+
const PossiblePerpetualCloseRequestSchema = PaginatedPossibleResultsRequestSchema.merge(CreatePerpetualClosePositionRequestSchema.omit({ walletAddress: true }).partial()).extend({ walletAddress: z.string().describe("The wallet address to check for closeable perpetual positions") });
|
|
1714
|
+
const PositionDataSchema = z.object({
|
|
1715
|
+
sizeInUsd: z.string().describe("The size of the position in USD value"),
|
|
1716
|
+
increasedAtTime: z.string().describe("Timestamp when the position was last increased"),
|
|
1717
|
+
decreasedAtTime: z.string().describe("Timestamp when the position was last decreased"),
|
|
1718
|
+
pnl: z.string().describe("Current profit and loss of the position in USD")
|
|
1719
|
+
});
|
|
1720
|
+
const LimitOrderDataSchema = z.object({
|
|
1721
|
+
sizeDeltaUsd: z.string().describe("The USD size change for the limit order"),
|
|
1722
|
+
acceptablePrice: z.string().describe("The acceptable execution price for the limit order"),
|
|
1723
|
+
triggerPrice: z.string().describe("The trigger price that activates the limit order")
|
|
1724
|
+
});
|
|
1725
|
+
const TradingPositionDataSchema = z.discriminatedUnion("type", [z.object({ type: z.literal("limit") }).merge(LimitOrderDataSchema), z.object({ type: z.literal("market") }).merge(PositionDataSchema)]);
|
|
1726
|
+
const PerpetualCloseOptionSchema = z.object({
|
|
1727
|
+
createRequest: CreatePerpetualClosePositionRequestSchema.pick({
|
|
1728
|
+
providerName: true,
|
|
1729
|
+
market: true,
|
|
1730
|
+
collateralToken: true,
|
|
1731
|
+
positionSide: true,
|
|
1732
|
+
isLimit: true
|
|
1733
|
+
}),
|
|
1734
|
+
data: z.object({
|
|
1735
|
+
collateralAmount: z.string().describe("The amount of collateral tokens in the position"),
|
|
1736
|
+
orderData: TradingPositionDataSchema.describe("Details about the position or order to be closed")
|
|
1737
|
+
})
|
|
1738
|
+
});
|
|
1739
|
+
const PossiblePerpetualCloseResponseSchema = z.object({ options: z.array(PerpetualCloseOptionSchema).describe("Available perpetual positions and orders that can be closed") }).merge(PaginatedPossibleResultsResponseSchema);
|
|
1740
|
+
const CreatePerpetualCloseSimplifiedEndpointRequestSchema = z.object({
|
|
1741
|
+
walletAddress: z.string().describe("Wallet owning the perpetual position/order to close"),
|
|
1742
|
+
marketAddress: z.string().describe("Perpetual market contract address").min(1),
|
|
1743
|
+
positionSide: PositionSideSchema.optional().describe("long or short (optional filter)"),
|
|
1744
|
+
isLimit: z.boolean().optional().describe("If true, target a limit order; if false, target a market position; if omitted, try market then limit")
|
|
1745
|
+
});
|
|
1746
|
+
|
|
1747
|
+
//#endregion
|
|
1748
|
+
//#region src/endpoint-interfaces/queries.ts
|
|
1749
|
+
const GetChainsRequestSchema = z.object({});
|
|
1750
|
+
const GetChainsResponseSchema = z.object({ chains: z.array(ChainSchema) });
|
|
1751
|
+
const GetTokensRequestSchema = z.object({ chainIds: z.array(z.string()).optional() });
|
|
1752
|
+
const GetTokensResponseSchema = z.object({ tokens: z.array(TokenSchema) });
|
|
1753
|
+
const ProviderSchema = z.object({
|
|
1754
|
+
id: z.string(),
|
|
1755
|
+
name: z.string(),
|
|
1756
|
+
description: z.string().optional(),
|
|
1757
|
+
website: z.string().optional(),
|
|
1758
|
+
x: z.string().optional(),
|
|
1759
|
+
type: z.string()
|
|
1760
|
+
});
|
|
1761
|
+
const GetProvidersRequestSchema = z.object({});
|
|
1762
|
+
const GetProvidersResponseSchema = z.object({ providers: z.array(ProviderSchema) });
|
|
1763
|
+
const BalanceSchema = z.object({
|
|
1764
|
+
tokenUid: TokenIdentifierSchema,
|
|
1765
|
+
amount: z.string(),
|
|
1766
|
+
symbol: z.string().optional(),
|
|
1767
|
+
valueUsd: z.number().optional(),
|
|
1768
|
+
decimals: z.number().int().optional()
|
|
1769
|
+
});
|
|
1770
|
+
const GetWalletBalancesRequestSchema = z.object({ walletAddress: z.string() });
|
|
1771
|
+
const GetWalletBalancesResponseSchema = z.object({ balances: z.array(BalanceSchema) });
|
|
1772
|
+
|
|
1773
|
+
//#endregion
|
|
1774
|
+
//#region src/endpoint-interfaces/swap.ts
|
|
1775
|
+
const AmountTypeSchema = z.union([z.literal("exactIn").describe("Specify exact input amount - you know how much you want to spend"), z.literal("exactOut").describe("Specify exact output amount - you know how much you want to receive")]);
|
|
1776
|
+
const CreateSwapRequestSchema = z.object({
|
|
1777
|
+
walletAddress: z.string().describe("The wallet address that will perform the token swap"),
|
|
1778
|
+
amount: z.string().describe("The amount of tokens to swap (input amount for exactIn, output amount for exactOut)"),
|
|
1779
|
+
amountType: AmountTypeSchema.describe("Whether the amount represents input tokens (exactIn) or desired output tokens (exactOut)"),
|
|
1780
|
+
toChain: z.string().describe("The destination blockchain network for the token swap"),
|
|
1781
|
+
fromChain: z.string().describe("The source blockchain network for the token swap"),
|
|
1782
|
+
fromToken: z.string().describe("The token to swap from (source token symbol or name)"),
|
|
1783
|
+
toToken: z.string().describe("The token to swap to (destination token symbol or name)"),
|
|
1784
|
+
slippageTolerance: z.string().optional().describe("Maximum acceptable slippage percentage (e.g., '0.5' for 0.5%)"),
|
|
1785
|
+
expiration: z.string().optional().describe("Transaction expiration time in seconds from now")
|
|
1786
|
+
});
|
|
1787
|
+
const PromptSwapRequestSchema = CreateSwapRequestSchema.pick({
|
|
1788
|
+
walletAddress: true,
|
|
1789
|
+
fromToken: true,
|
|
1790
|
+
toToken: true,
|
|
1791
|
+
fromChain: true,
|
|
1792
|
+
toChain: true
|
|
1793
|
+
}).partial();
|
|
1794
|
+
const PossibleSwapsRequestSchema = PaginatedPossibleResultsRequestSchema.merge(PromptSwapRequestSchema);
|
|
1795
|
+
const PossibleSwapOptionSchema = z.object({
|
|
1796
|
+
createRequest: CreateSwapRequestSchema.pick({
|
|
1797
|
+
fromToken: true,
|
|
1798
|
+
fromChain: true,
|
|
1799
|
+
toToken: true,
|
|
1800
|
+
toChain: true
|
|
1801
|
+
}),
|
|
1802
|
+
data: z.object({}).describe("Additional swap data (currently empty)")
|
|
1803
|
+
});
|
|
1804
|
+
const PossibleSwapsResponseSchema = PaginatedPossibleResultsResponseSchema.extend({ options: z.array(PossibleSwapOptionSchema).describe("Available token swap pairs across different blockchain networks") });
|
|
1805
|
+
const CreateSwapEndpointRequestSchema = CreateSwapRequestSchema.omit({
|
|
1806
|
+
fromToken: true,
|
|
1807
|
+
toToken: true,
|
|
1808
|
+
fromChain: true,
|
|
1809
|
+
toChain: true
|
|
1810
|
+
}).extend({
|
|
1811
|
+
fromTokenUid: TokenIdentifierSchema.describe("Identifier (chainId + address) for the source token"),
|
|
1812
|
+
toTokenUid: TokenIdentifierSchema.describe("Identifier (chainId + address) for the destination token")
|
|
1813
|
+
});
|
|
1814
|
+
|
|
1815
|
+
//#endregion
|
|
1816
|
+
//#region src/endpoint-interfaces/tokenizedYield.ts
|
|
1817
|
+
const CreateTokenizedYieldBuyPtEndpointRequestSchema = BuyPtRequestSchema.omit({
|
|
1818
|
+
inputToken: true,
|
|
1819
|
+
amount: true
|
|
1820
|
+
}).extend({
|
|
1821
|
+
inputTokenUid: TokenIdentifierSchema,
|
|
1822
|
+
amount: z.string().transform((arg) => BigInt(arg))
|
|
1823
|
+
});
|
|
1824
|
+
const CreateTokenizedYieldBuyPtResponseSchema = BuyPtResponseSchema.omit({ ptTokenIdentifier: true }).extend({
|
|
1825
|
+
ptToken: TokenSchema,
|
|
1826
|
+
displayPtAmount: z.string()
|
|
1827
|
+
});
|
|
1828
|
+
const CreateTokenizedYieldBuyPtSchema = z.object({
|
|
1829
|
+
walletAddress: z.string().describe("The wallet address that will buy the PT tokens"),
|
|
1830
|
+
inputToken: z.string().describe("The token symbol or name to be used as input"),
|
|
1831
|
+
amount: z.string().describe("The amount of tokens to be used as input for buying PT"),
|
|
1832
|
+
slippage: z.string().describe("The maximum acceptable slippage percentage for the buying transaction").default("0.01"),
|
|
1833
|
+
chain: z.string().describe("The blockchain network to perform the action on"),
|
|
1834
|
+
minimumMarketExpiry: z.string().describe("The minimum expiry date of the market to use")
|
|
1835
|
+
});
|
|
1836
|
+
const PromptTokenizedYieldBuyPtRequestSchema = CreateTokenizedYieldBuyPtSchema.pick({
|
|
1837
|
+
walletAddress: true,
|
|
1838
|
+
inputToken: true,
|
|
1839
|
+
amount: true,
|
|
1840
|
+
chain: true,
|
|
1841
|
+
minimumMarketExpiry: true
|
|
1842
|
+
}).partial();
|
|
1843
|
+
const CreateTokenizedYieldBuyYtEndpointRequestSchema = BuyYtRequestSchema.omit({
|
|
1844
|
+
inputToken: true,
|
|
1845
|
+
amount: true
|
|
1846
|
+
}).extend({
|
|
1847
|
+
inputTokenUid: TokenIdentifierSchema,
|
|
1848
|
+
amount: z.string().transform((arg) => BigInt(arg))
|
|
1849
|
+
});
|
|
1850
|
+
const CreateTokenizedYieldBuyYtResponseSchema = BuyYtResponseSchema.omit({ ytTokenIdentifier: true }).extend({
|
|
1851
|
+
ytToken: TokenSchema,
|
|
1852
|
+
displayYtAmount: z.string()
|
|
1853
|
+
});
|
|
1854
|
+
const CreateTokenizedYieldBuyYtSchema = z.object({
|
|
1855
|
+
walletAddress: z.string().describe("The wallet address that will buy the YT tokens"),
|
|
1856
|
+
inputToken: z.string().describe("The token symbol or name to be used as input"),
|
|
1857
|
+
amount: z.string().describe("The amount of tokens to be used as input for buying YT"),
|
|
1858
|
+
slippage: z.string().describe("The maximum acceptable slippage percentage for the buying transaction").default("0.01"),
|
|
1859
|
+
chain: z.string().describe("The blockchain network to perform the action on"),
|
|
1860
|
+
minimumMarketExpiry: z.string().describe("The minimum expiry date of the market to use")
|
|
1861
|
+
});
|
|
1862
|
+
const PromptTokenizedYieldBuyYtRequestSchema = CreateTokenizedYieldBuyYtSchema.pick({
|
|
1863
|
+
walletAddress: true,
|
|
1864
|
+
inputToken: true,
|
|
1865
|
+
amount: true,
|
|
1866
|
+
chain: true,
|
|
1867
|
+
minimumMarketExpiry: true
|
|
1868
|
+
}).partial();
|
|
1869
|
+
const CreateTokenizedYieldSellPtEndpointRequestSchema = SellPtRequestSchema.omit({
|
|
1870
|
+
ptToken: true,
|
|
1871
|
+
amount: true
|
|
1872
|
+
}).extend({
|
|
1873
|
+
ptTokenUid: TokenIdentifierSchema,
|
|
1874
|
+
amount: z.string().transform((arg) => BigInt(arg))
|
|
1875
|
+
});
|
|
1876
|
+
const CreateTokenizedYieldSellPtResponseSchema = SellPtResponseSchema.omit({ tokenOutIdentifier: true }).extend({
|
|
1877
|
+
tokenOut: TokenSchema,
|
|
1878
|
+
displayAmountOut: z.string()
|
|
1879
|
+
});
|
|
1880
|
+
const CreateTokenizedYieldSellPtSchema = z.object({
|
|
1881
|
+
walletAddress: z.string().describe("The wallet address that will sell the PT tokens"),
|
|
1882
|
+
ptToken: z.string().describe("The PT token symbol or name to be sold"),
|
|
1883
|
+
amount: z.string().describe("The amount of PT tokens to sell"),
|
|
1884
|
+
slippage: z.string().describe("The maximum acceptable slippage percentage for the selling transaction").default("0.01"),
|
|
1885
|
+
chain: z.string().describe("The blockchain network to perform the action on")
|
|
1886
|
+
});
|
|
1887
|
+
const PromptTokenizedYieldSellPtRequestSchema = CreateTokenizedYieldSellPtSchema.pick({
|
|
1888
|
+
walletAddress: true,
|
|
1889
|
+
ptToken: true,
|
|
1890
|
+
amount: true,
|
|
1891
|
+
chain: true
|
|
1892
|
+
}).partial();
|
|
1893
|
+
const CreateTokenizedYieldSellYtEndpointRequestSchema = SellYtRequestSchema.omit({
|
|
1894
|
+
ytToken: true,
|
|
1895
|
+
amount: true
|
|
1896
|
+
}).extend({
|
|
1897
|
+
ytTokenUid: TokenIdentifierSchema,
|
|
1898
|
+
amount: z.string().transform((arg) => BigInt(arg))
|
|
1899
|
+
});
|
|
1900
|
+
const CreateTokenizedYieldSellYtResponseSchema = SellYtResponseSchema.omit({ tokenOutIdentifier: true }).extend({
|
|
1901
|
+
tokenOut: TokenSchema,
|
|
1902
|
+
displayAmountOut: z.string()
|
|
1903
|
+
});
|
|
1904
|
+
const CreateTokenizedYieldSellYtSchema = z.object({
|
|
1905
|
+
walletAddress: z.string().describe("The wallet address that will sell the YT tokens"),
|
|
1906
|
+
ytToken: z.string().describe("The YT token symbol or name to be sold"),
|
|
1907
|
+
amount: z.string().describe("The amount of YT tokens to sell"),
|
|
1908
|
+
slippage: z.string().describe("The maximum acceptable slippage percentage for the selling transaction").default("0.01"),
|
|
1909
|
+
chain: z.string().describe("The blockchain network to perform the action on")
|
|
1910
|
+
});
|
|
1911
|
+
const PromptTokenizedYieldSellYtRequestSchema = CreateTokenizedYieldSellYtSchema.pick({
|
|
1912
|
+
walletAddress: true,
|
|
1913
|
+
ytToken: true,
|
|
1914
|
+
amount: true,
|
|
1915
|
+
chain: true
|
|
1916
|
+
}).partial();
|
|
1917
|
+
const CreateTokenizedYieldMintPtAndYtEndpointRequestSchema = MintPtAndYtRequestSchema.omit({
|
|
1918
|
+
inputToken: true,
|
|
1919
|
+
amount: true
|
|
1920
|
+
}).extend({
|
|
1921
|
+
inputTokenUid: TokenIdentifierSchema,
|
|
1922
|
+
amount: z.string().transform((arg) => BigInt(arg))
|
|
1923
|
+
});
|
|
1924
|
+
const CreateTokenizedYieldMintPtAndYtResponseSchema = MintPtAndYtResponseSchema.omit({
|
|
1925
|
+
ptTokenIdentifier: true,
|
|
1926
|
+
ytTokenIdentifier: true
|
|
1927
|
+
}).extend({
|
|
1928
|
+
ptToken: TokenSchema,
|
|
1929
|
+
displayPtAmount: z.string(),
|
|
1930
|
+
ytToken: TokenSchema,
|
|
1931
|
+
displayYtAmount: z.string()
|
|
1932
|
+
});
|
|
1933
|
+
const CreateTokenizedYieldMintPtAndYtSchema = z.object({
|
|
1934
|
+
walletAddress: z.string().describe("The wallet address that will mint the PT and YT tokens"),
|
|
1935
|
+
inputToken: z.string().describe("The token symbol or name to be used as input"),
|
|
1936
|
+
amount: z.string().describe("The amount of tokens to be used as input for minting PT and YT"),
|
|
1937
|
+
slippage: z.string().describe("The maximum acceptable slippage percentage for the minting transaction").default("0.01"),
|
|
1938
|
+
chain: z.string().describe("The blockchain network to perform the action on"),
|
|
1939
|
+
minimumMarketExpiry: z.string().describe("The minimum expiry date of the market to use")
|
|
1940
|
+
});
|
|
1941
|
+
const PromptTokenizedYieldMintPtAndYtRequestSchema = CreateTokenizedYieldMintPtAndYtSchema.pick({
|
|
1942
|
+
walletAddress: true,
|
|
1943
|
+
inputToken: true,
|
|
1944
|
+
amount: true,
|
|
1945
|
+
chain: true,
|
|
1946
|
+
minimumMarketExpiry: true
|
|
1947
|
+
}).partial();
|
|
1948
|
+
const CreateTokenizedYieldRedeemPtEndpointRequestSchema = RedeemPtRequestSchema.omit({
|
|
1949
|
+
ptToken: true,
|
|
1950
|
+
amount: true
|
|
1951
|
+
}).extend({
|
|
1952
|
+
ptTokenUid: TokenIdentifierSchema,
|
|
1953
|
+
amount: z.string().transform((arg) => BigInt(arg))
|
|
1954
|
+
});
|
|
1955
|
+
const CreateTokenizedYieldRedeemPtResponseSchema = RedeemPtResponseSchema.omit({ underlyingTokenIdentifier: true }).extend({
|
|
1956
|
+
underlyingToken: TokenSchema,
|
|
1957
|
+
displayUnderlyingAmount: z.string()
|
|
1958
|
+
});
|
|
1959
|
+
const CreateTokenizedYieldRedeemPtSchema = z.object({
|
|
1960
|
+
walletAddress: z.string().describe("The wallet address that will redeem the PT tokens"),
|
|
1961
|
+
ptToken: z.string().describe("The PT token symbol or name to be redeemed after maturity"),
|
|
1962
|
+
amount: z.string().describe("The amount of PT tokens to redeem"),
|
|
1963
|
+
chain: z.string().describe("The blockchain network to perform the action on")
|
|
1964
|
+
});
|
|
1965
|
+
const PromptTokenizedYieldRedeemPtRequestSchema = CreateTokenizedYieldRedeemPtSchema.pick({
|
|
1966
|
+
walletAddress: true,
|
|
1967
|
+
ptToken: true,
|
|
1968
|
+
amount: true,
|
|
1969
|
+
chain: true
|
|
1970
|
+
}).partial();
|
|
1971
|
+
const CreateTokenizedYieldClaimRewardsEndpointRequestSchema = ClaimRewardsRequestSchema.omit({ ytToken: true }).extend({ ytTokenUid: TokenIdentifierSchema });
|
|
1972
|
+
const CreateTokenizedYieldClaimRewardsResponseSchema = ClaimRewardsResponseSchema;
|
|
1973
|
+
const CreateTokenizedYieldClaimRewardsSchema = z.object({
|
|
1974
|
+
walletAddress: z.string().describe("The wallet address that will claim the rewards"),
|
|
1975
|
+
ytToken: z.string().describe("The YT token symbol or name to claim rewards from"),
|
|
1976
|
+
chain: z.string().describe("The blockchain network to perform the action on")
|
|
1977
|
+
});
|
|
1978
|
+
const PromptTokenizedYieldClaimRewardsRequestSchema = CreateTokenizedYieldClaimRewardsSchema.pick({
|
|
1979
|
+
walletAddress: true,
|
|
1980
|
+
ytToken: true,
|
|
1981
|
+
chain: true
|
|
1982
|
+
}).partial();
|
|
1983
|
+
|
|
1984
|
+
//#endregion
|
|
1985
|
+
//#region src/endpoint-interfaces/index.ts
|
|
1986
|
+
let EndpointInterfaces;
|
|
1987
|
+
(function(_EndpointInterfaces) {
|
|
1988
|
+
_EndpointInterfaces.PaginatedPossibleResultsRequestSchema = PaginatedPossibleResultsRequestSchema;
|
|
1989
|
+
_EndpointInterfaces.PaginatedPossibleResultsResponseSchema = PaginatedPossibleResultsResponseSchema;
|
|
1990
|
+
_EndpointInterfaces.AmountTypeSchema = AmountTypeSchema;
|
|
1991
|
+
_EndpointInterfaces.CreateSwapRequestSchema = CreateSwapRequestSchema;
|
|
1992
|
+
_EndpointInterfaces.PromptSwapRequestSchema = PromptSwapRequestSchema;
|
|
1993
|
+
_EndpointInterfaces.PossibleSwapsRequestSchema = PossibleSwapsRequestSchema;
|
|
1994
|
+
_EndpointInterfaces.PossibleSwapOptionSchema = PossibleSwapOptionSchema;
|
|
1995
|
+
_EndpointInterfaces.PossibleSwapsResponseSchema = PossibleSwapsResponseSchema;
|
|
1996
|
+
_EndpointInterfaces.CreateSwapEndpointRequestSchema = CreateSwapEndpointRequestSchema;
|
|
1997
|
+
_EndpointInterfaces.CreateLendingSupplyRequestSchema = CreateLendingSupplyRequestSchema;
|
|
1998
|
+
_EndpointInterfaces.PromptLendingSupplyRequestSchema = PromptLendingSupplyRequestSchema;
|
|
1999
|
+
_EndpointInterfaces.PossibleLendingSupplyRequestSchema = PossibleLendingSupplyRequestSchema;
|
|
2000
|
+
_EndpointInterfaces.PossibleLendingSupplyOptionSchema = PossibleLendingSupplyOptionSchema;
|
|
2001
|
+
_EndpointInterfaces.PossibleLendingSupplyResponseSchema = PossibleLendingSupplyResponseSchema;
|
|
2002
|
+
_EndpointInterfaces.CreateSupplyEndpointRequestSchema = CreateSupplyEndpointRequestSchema;
|
|
2003
|
+
_EndpointInterfaces.CreateLendingBorrowRequestSchema = CreateLendingBorrowRequestSchema;
|
|
2004
|
+
_EndpointInterfaces.PromptLendingBorrowRequestSchema = PromptLendingBorrowRequestSchema;
|
|
2005
|
+
_EndpointInterfaces.PossibleLendingBorrowRequestSchema = PossibleLendingBorrowRequestSchema;
|
|
2006
|
+
_EndpointInterfaces.PossibleLendingBorrowOptionSchema = PossibleLendingBorrowOptionSchema;
|
|
2007
|
+
_EndpointInterfaces.PossibleLendingBorrowResponseSchema = PossibleLendingBorrowResponseSchema;
|
|
2008
|
+
_EndpointInterfaces.CreateBorrowEndpointRequestSchema = CreateBorrowEndpointRequestSchema;
|
|
2009
|
+
_EndpointInterfaces.CreateLendingRepayRequestSchema = CreateLendingRepayRequestSchema;
|
|
2010
|
+
_EndpointInterfaces.PromptLendingRepayRequestSchema = PromptLendingRepayRequestSchema;
|
|
2011
|
+
_EndpointInterfaces.PossibleLendingRepayRequestSchema = PossibleLendingRepayRequestSchema;
|
|
2012
|
+
_EndpointInterfaces.PossibleLendingRepayOptionSchema = PossibleLendingRepayOptionSchema;
|
|
2013
|
+
_EndpointInterfaces.PossibleLendingRepayResponseSchema = PossibleLendingRepayResponseSchema;
|
|
2014
|
+
_EndpointInterfaces.CreateRepayEndpointRequestSchema = CreateRepayEndpointRequestSchema;
|
|
2015
|
+
_EndpointInterfaces.CreateLendingWithdrawRequestSchema = CreateLendingWithdrawRequestSchema;
|
|
2016
|
+
_EndpointInterfaces.PromptLendingWithdrawRequestSchema = PromptLendingWithdrawRequestSchema;
|
|
2017
|
+
_EndpointInterfaces.PossibleLendingWithdrawRequestSchema = PossibleLendingWithdrawRequestSchema;
|
|
2018
|
+
_EndpointInterfaces.PossibleLendingWithdrawOptionSchema = PossibleLendingWithdrawOptionSchema;
|
|
2019
|
+
_EndpointInterfaces.PossibleLendingWithdrawResponseSchema = PossibleLendingWithdrawResponseSchema;
|
|
2020
|
+
_EndpointInterfaces.CreateWithdrawEndpointRequestSchema = CreateWithdrawEndpointRequestSchema;
|
|
2021
|
+
_EndpointInterfaces.NonMappedPayableTokens = NonMappedPayableTokens;
|
|
2022
|
+
_EndpointInterfaces.CreateLiquiditySupplyRequestSchema = CreateLiquiditySupplyRequestSchema;
|
|
2023
|
+
_EndpointInterfaces.CreateLiquiditySupplyPayableTokenSchema = CreateLiquiditySupplyPayableTokenSchema;
|
|
2024
|
+
_EndpointInterfaces.CreateLiquiditySupplyEndpointRequestSchema = CreateLiquiditySupplyEndpointRequestSchema;
|
|
2025
|
+
_EndpointInterfaces.CreateLiquidityWithdrawRequestSchema = CreateLiquidityWithdrawRequestSchema;
|
|
2026
|
+
_EndpointInterfaces.PromptLiquidityWithdrawRequestSchema = PromptLiquidityWithdrawRequestSchema;
|
|
2027
|
+
_EndpointInterfaces.PossibleLiquidityWithdrawRequestSchema = PossibleLiquidityWithdrawRequestSchema;
|
|
2028
|
+
_EndpointInterfaces.LiquidityWithdrawOptionSchema = LiquidityWithdrawOptionSchema;
|
|
2029
|
+
_EndpointInterfaces.PossibleLiquidityWithdrawResponseSchema = PossibleLiquidityWithdrawResponseSchema;
|
|
2030
|
+
_EndpointInterfaces.CreateLiquidityWithdrawEndpointRequestSchema = CreateLiquidityWithdrawEndpointRequestSchema;
|
|
2031
|
+
_EndpointInterfaces.CreateTokenizedYieldBuyPtEndpointRequestSchema = CreateTokenizedYieldBuyPtEndpointRequestSchema;
|
|
2032
|
+
_EndpointInterfaces.CreateTokenizedYieldBuyPtResponseSchema = CreateTokenizedYieldBuyPtResponseSchema;
|
|
2033
|
+
_EndpointInterfaces.CreateTokenizedYieldBuyPtSchema = CreateTokenizedYieldBuyPtSchema;
|
|
2034
|
+
_EndpointInterfaces.PromptTokenizedYieldBuyPtRequestSchema = PromptTokenizedYieldBuyPtRequestSchema;
|
|
2035
|
+
_EndpointInterfaces.CreateTokenizedYieldBuyYtEndpointRequestSchema = CreateTokenizedYieldBuyYtEndpointRequestSchema;
|
|
2036
|
+
_EndpointInterfaces.CreateTokenizedYieldBuyYtResponseSchema = CreateTokenizedYieldBuyYtResponseSchema;
|
|
2037
|
+
_EndpointInterfaces.CreateTokenizedYieldBuyYtSchema = CreateTokenizedYieldBuyYtSchema;
|
|
2038
|
+
_EndpointInterfaces.PromptTokenizedYieldBuyYtRequestSchema = PromptTokenizedYieldBuyYtRequestSchema;
|
|
2039
|
+
_EndpointInterfaces.CreateTokenizedYieldSellPtEndpointRequestSchema = CreateTokenizedYieldSellPtEndpointRequestSchema;
|
|
2040
|
+
_EndpointInterfaces.CreateTokenizedYieldSellPtResponseSchema = CreateTokenizedYieldSellPtResponseSchema;
|
|
2041
|
+
_EndpointInterfaces.CreateTokenizedYieldSellPtSchema = CreateTokenizedYieldSellPtSchema;
|
|
2042
|
+
_EndpointInterfaces.PromptTokenizedYieldSellPtRequestSchema = PromptTokenizedYieldSellPtRequestSchema;
|
|
2043
|
+
_EndpointInterfaces.CreateTokenizedYieldSellYtEndpointRequestSchema = CreateTokenizedYieldSellYtEndpointRequestSchema;
|
|
2044
|
+
_EndpointInterfaces.CreateTokenizedYieldSellYtResponseSchema = CreateTokenizedYieldSellYtResponseSchema;
|
|
2045
|
+
_EndpointInterfaces.CreateTokenizedYieldSellYtSchema = CreateTokenizedYieldSellYtSchema;
|
|
2046
|
+
_EndpointInterfaces.PromptTokenizedYieldSellYtRequestSchema = PromptTokenizedYieldSellYtRequestSchema;
|
|
2047
|
+
_EndpointInterfaces.CreateTokenizedYieldMintPtAndYtEndpointRequestSchema = CreateTokenizedYieldMintPtAndYtEndpointRequestSchema;
|
|
2048
|
+
_EndpointInterfaces.CreateTokenizedYieldMintPtAndYtResponseSchema = CreateTokenizedYieldMintPtAndYtResponseSchema;
|
|
2049
|
+
_EndpointInterfaces.CreateTokenizedYieldMintPtAndYtSchema = CreateTokenizedYieldMintPtAndYtSchema;
|
|
2050
|
+
_EndpointInterfaces.PromptTokenizedYieldMintPtAndYtRequestSchema = PromptTokenizedYieldMintPtAndYtRequestSchema;
|
|
2051
|
+
_EndpointInterfaces.CreateTokenizedYieldRedeemPtEndpointRequestSchema = CreateTokenizedYieldRedeemPtEndpointRequestSchema;
|
|
2052
|
+
_EndpointInterfaces.CreateTokenizedYieldRedeemPtResponseSchema = CreateTokenizedYieldRedeemPtResponseSchema;
|
|
2053
|
+
_EndpointInterfaces.CreateTokenizedYieldRedeemPtSchema = CreateTokenizedYieldRedeemPtSchema;
|
|
2054
|
+
_EndpointInterfaces.PromptTokenizedYieldRedeemPtRequestSchema = PromptTokenizedYieldRedeemPtRequestSchema;
|
|
2055
|
+
_EndpointInterfaces.CreateTokenizedYieldClaimRewardsEndpointRequestSchema = CreateTokenizedYieldClaimRewardsEndpointRequestSchema;
|
|
2056
|
+
_EndpointInterfaces.CreateTokenizedYieldClaimRewardsResponseSchema = CreateTokenizedYieldClaimRewardsResponseSchema;
|
|
2057
|
+
_EndpointInterfaces.CreateTokenizedYieldClaimRewardsSchema = CreateTokenizedYieldClaimRewardsSchema;
|
|
2058
|
+
_EndpointInterfaces.PromptTokenizedYieldClaimRewardsRequestSchema = PromptTokenizedYieldClaimRewardsRequestSchema;
|
|
2059
|
+
_EndpointInterfaces.PerpetualsCreatePositionRequestSchema = PerpetualsCreatePositionRequestSchema;
|
|
2060
|
+
_EndpointInterfaces.PerpetualsPositionPromptSchema = PerpetualsPositionPromptSchema;
|
|
2061
|
+
_EndpointInterfaces.PossiblePerpetualPositionsRequestSchema = PossiblePerpetualPositionsRequestSchema;
|
|
2062
|
+
_EndpointInterfaces.PossiblePerpetualPositionsOptionSchema = PossiblePerpetualPositionsOptionSchema;
|
|
2063
|
+
_EndpointInterfaces.PossiblePerpetualPositionsResponseSchema = PossiblePerpetualPositionsResponseSchema;
|
|
2064
|
+
_EndpointInterfaces.CreatePerpetualClosePositionRequestSchema = CreatePerpetualClosePositionRequestSchema;
|
|
2065
|
+
_EndpointInterfaces.PerpetualsCloseOrderPromptSchema = PerpetualsCloseOrderPromptSchema;
|
|
2066
|
+
_EndpointInterfaces.PossiblePerpetualCloseRequestSchema = PossiblePerpetualCloseRequestSchema;
|
|
2067
|
+
_EndpointInterfaces.PositionDataSchema = PositionDataSchema;
|
|
2068
|
+
_EndpointInterfaces.LimitOrderDataSchema = LimitOrderDataSchema;
|
|
2069
|
+
_EndpointInterfaces.TradingPositionDataSchema = TradingPositionDataSchema;
|
|
2070
|
+
_EndpointInterfaces.PerpetualCloseOptionSchema = PerpetualCloseOptionSchema;
|
|
2071
|
+
_EndpointInterfaces.PossiblePerpetualCloseResponseSchema = PossiblePerpetualCloseResponseSchema;
|
|
2072
|
+
_EndpointInterfaces.CreatePerpetualCloseSimplifiedEndpointRequestSchema = CreatePerpetualCloseSimplifiedEndpointRequestSchema;
|
|
2073
|
+
_EndpointInterfaces.GetChainsRequestSchema = GetChainsRequestSchema;
|
|
2074
|
+
_EndpointInterfaces.GetChainsResponseSchema = GetChainsResponseSchema;
|
|
2075
|
+
_EndpointInterfaces.GetTokensRequestSchema = GetTokensRequestSchema;
|
|
2076
|
+
_EndpointInterfaces.GetTokensResponseSchema = GetTokensResponseSchema;
|
|
2077
|
+
_EndpointInterfaces.ProviderSchema = ProviderSchema;
|
|
2078
|
+
_EndpointInterfaces.GetProvidersRequestSchema = GetProvidersRequestSchema;
|
|
2079
|
+
_EndpointInterfaces.GetProvidersResponseSchema = GetProvidersResponseSchema;
|
|
2080
|
+
_EndpointInterfaces.BalanceSchema = BalanceSchema;
|
|
2081
|
+
_EndpointInterfaces.GetWalletBalancesRequestSchema = GetWalletBalancesRequestSchema;
|
|
2082
|
+
_EndpointInterfaces.GetWalletBalancesResponseSchema = GetWalletBalancesResponseSchema;
|
|
2083
|
+
})(EndpointInterfaces || (EndpointInterfaces = {}));
|
|
2084
|
+
|
|
1412
2085
|
//#endregion
|
|
1413
2086
|
//#region src/index.ts
|
|
1414
2087
|
/**
|
|
@@ -1422,5 +2095,5 @@ function initializePublicRegistry(chainConfigs) {
|
|
|
1422
2095
|
}
|
|
1423
2096
|
|
|
1424
2097
|
//#endregion
|
|
1425
|
-
export { BorrowTokensRequestSchema, BorrowTokensResponseSchema, BuyPtRequestSchema, BuyPtResponseSchema, BuyYtRequestSchema, BuyYtResponseSchema, ChainSchema, ChainTypeSchema, ClaimRewardsRequestSchema, ClaimRewardsResponseSchema, ClosePerpetualsOrdersRequestSchema, ClosePerpetualsOrdersResponseSchema, CreatePerpetualsPositionRequestSchema, CreatePerpetualsPositionResponseSchema, DecreasePositionSwapTypeSchema, FeeBreakdownSchema, GetLiquidityPoolsResponseSchema, GetPerpetualsMarketsOrdersRequestSchema, GetPerpetualsMarketsOrdersResponseSchema, GetPerpetualsMarketsPositionsRequestSchema, GetPerpetualsMarketsPositionsResponseSchema, GetPerpetualsMarketsRequestSchema, GetPerpetualsMarketsResponseSchema, GetWalletLendingPositionsRequestSchema, GetWalletLendingPositionsResponseSchema, GetWalletLiquidityPositionsRequestSchema, GetWalletLiquidityPositionsResponseSchema, LendTokenDetailSchema, LiquidityFeesOwedTokenSchema, LiquidityPayTokensSchema, LiquidityPoolSchema, LiquidityPoolTokens, LiquidityPooledTokenSchema, LiquidityPositionRangeSchema, LiquidityPositionSchema, LiquidityProvisionRangeSchema, LiquidityRewardsOwedTokenSchema,
|
|
2098
|
+
export { BorrowTokensRequestSchema, BorrowTokensResponseSchema, BuyPtRequestSchema, BuyPtResponseSchema, BuyYtRequestSchema, BuyYtResponseSchema, ChainSchema, ChainTypeSchema, ClaimRewardsRequestSchema, ClaimRewardsResponseSchema, ClosePerpetualsOrdersRequestSchema, ClosePerpetualsOrdersResponseSchema, CreatePerpetualsPositionRequestSchema, CreatePerpetualsPositionResponseSchema, DecreasePositionSwapTypeSchema, EndpointInterfaces, FeeBreakdownSchema, GetLiquidityPoolsResponseSchema, GetPerpetualsMarketsOrdersRequestSchema, GetPerpetualsMarketsOrdersResponseSchema, GetPerpetualsMarketsPositionsRequestSchema, GetPerpetualsMarketsPositionsResponseSchema, GetPerpetualsMarketsRequestSchema, GetPerpetualsMarketsResponseSchema, GetWalletLendingPositionsRequestSchema, GetWalletLendingPositionsResponseSchema, GetWalletLiquidityPositionsRequestSchema, GetWalletLiquidityPositionsResponseSchema, LendTokenDetailSchema, LiquidityFeesOwedTokenSchema, LiquidityPayTokensSchema, LiquidityPoolSchema, LiquidityPoolTokens, LiquidityPooledTokenSchema, LiquidityPositionRangeSchema, LiquidityPositionSchema, LiquidityProvisionRangeSchema, LiquidityRewardsOwedTokenSchema, MarketTokenizedYieldRequestSchema, MarketTokenizedYieldResponseSchema, MintPtAndYtRequestSchema, MintPtAndYtResponseSchema, OrderSchema, OrderTypeSchema, OrdersDataSchema, PerpetualMarketSchema, core_exports as PluginInterfaces, PositionSchema, PositionSideSchema, PositionsDataSchema, ProviderTrackingInfoSchema, ProviderTrackingStatusSchema, PublicEmberPluginRegistry, RedeemPtRequestSchema, RedeemPtResponseSchema, RepayTokensRequestSchema, RepayTokensResponseSchema, SellPtRequestSchema, SellPtResponseSchema, SellYtRequestSchema, SellYtResponseSchema, SupplyLiquidityRequestSchema, SupplyLiquidityResponseSchema, SupplyTokensRequestSchema, SupplyTokensResponseSchema, SwapEstimationSchema, SwapTokensRequestSchema, SwapTokensResponseSchema, TokenIdentifierSchema, TokenSchema, TokenizedYieldMarketSchema, TokenizedYieldUserPositionSchema, TokenizedYieldUserPositionsRequestSchema, TokenizedYieldUserPositionsResponseSchema, TransactionPlanErrorSchema, TransactionPlanSchema, TransactionTypeSchema, TransactionTypes, WithdrawLiquidityRequestSchema, WithdrawLiquidityResponseSchema, WithdrawTokensRequestSchema, WithdrawTokensResponseSchema, initializePublicRegistry };
|
|
1426
2099
|
//# sourceMappingURL=index.mjs.map
|