@compass-labs/api-sdk 0.0.16 → 0.0.18
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/README.md +2 -0
- package/bin/mcp-server.js +898 -447
- package/bin/mcp-server.js.map +29 -13
- package/dist/commonjs/funcs/aaveV3HistoricalTransactions.d.ts +23 -0
- package/dist/commonjs/funcs/aaveV3HistoricalTransactions.d.ts.map +1 -0
- package/dist/commonjs/funcs/aaveV3HistoricalTransactions.js +128 -0
- package/dist/commonjs/funcs/aaveV3HistoricalTransactions.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +3 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/aaveV3HistoricalTransactions.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/aaveV3HistoricalTransactions.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/aaveV3HistoricalTransactions.js +69 -0
- package/dist/commonjs/mcp-server/tools/aaveV3HistoricalTransactions.js.map +1 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionbase.d.ts +57 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionbase.d.ts.map +1 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionbase.js +97 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionbase.js.map +1 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.d.ts +39 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.js +76 -0
- package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.js.map +1 -0
- package/dist/commonjs/models/components/action.d.ts +43 -0
- package/dist/commonjs/models/components/action.d.ts.map +1 -0
- package/dist/commonjs/models/components/action.js +66 -0
- package/dist/commonjs/models/components/action.js.map +1 -0
- package/dist/commonjs/models/components/borrow.d.ts +42 -0
- package/dist/commonjs/models/components/borrow.d.ts.map +1 -0
- package/dist/commonjs/models/components/borrow.js +83 -0
- package/dist/commonjs/models/components/borrow.js.map +1 -0
- package/dist/commonjs/models/components/collateralreserve.d.ts +31 -0
- package/dist/commonjs/models/components/collateralreserve.d.ts.map +1 -0
- package/dist/commonjs/models/components/collateralreserve.js +71 -0
- package/dist/commonjs/models/components/collateralreserve.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +13 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +13 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/liquidationcall.d.ts +41 -0
- package/dist/commonjs/models/components/liquidationcall.d.ts.map +1 -0
- package/dist/commonjs/models/components/liquidationcall.js +81 -0
- package/dist/commonjs/models/components/liquidationcall.js.map +1 -0
- package/dist/commonjs/models/components/multicallauthorizationrequest.d.ts +2 -0
- package/dist/commonjs/models/components/multicallauthorizationrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/multicallauthorizationrequest.js.map +1 -1
- package/dist/commonjs/models/components/principalreserve.d.ts +31 -0
- package/dist/commonjs/models/components/principalreserve.d.ts.map +1 -0
- package/dist/commonjs/models/components/principalreserve.js +71 -0
- package/dist/commonjs/models/components/principalreserve.js.map +1 -0
- package/dist/commonjs/models/components/redeemunderlying.d.ts +34 -0
- package/dist/commonjs/models/components/redeemunderlying.d.ts.map +1 -0
- package/dist/commonjs/models/components/redeemunderlying.js +74 -0
- package/dist/commonjs/models/components/redeemunderlying.js.map +1 -0
- package/dist/commonjs/models/components/repay.d.ts +34 -0
- package/dist/commonjs/models/components/repay.d.ts.map +1 -0
- package/dist/commonjs/models/components/repay.js +75 -0
- package/dist/commonjs/models/components/repay.js.map +1 -0
- package/dist/commonjs/models/components/reserve.d.ts +31 -0
- package/dist/commonjs/models/components/reserve.d.ts.map +1 -0
- package/dist/commonjs/models/components/reserve.js +71 -0
- package/dist/commonjs/models/components/reserve.js.map +1 -0
- package/dist/commonjs/models/components/supply.d.ts +34 -0
- package/dist/commonjs/models/components/supply.d.ts.map +1 -0
- package/dist/commonjs/models/components/supply.js +75 -0
- package/dist/commonjs/models/components/supply.js.map +1 -0
- package/dist/commonjs/models/components/swapborrowrate.d.ts +38 -0
- package/dist/commonjs/models/components/swapborrowrate.d.ts.map +1 -0
- package/dist/commonjs/models/components/swapborrowrate.js +78 -0
- package/dist/commonjs/models/components/swapborrowrate.js.map +1 -0
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts +3 -27
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.js +5 -28
- package/dist/commonjs/models/components/uniswapbuyexactlyparams.js.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.d.ts +3 -27
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.js +5 -28
- package/dist/commonjs/models/components/uniswapbuyexactlyrequest.js.map +1 -1
- package/dist/commonjs/models/components/uniswapsellexactlyparams.d.ts +18 -42
- package/dist/commonjs/models/components/uniswapsellexactlyparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapsellexactlyparams.js +22 -47
- package/dist/commonjs/models/components/uniswapsellexactlyparams.js.map +1 -1
- package/dist/commonjs/models/components/uniswapsellexactlyrequest.d.ts +18 -42
- package/dist/commonjs/models/components/uniswapsellexactlyrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/uniswapsellexactlyrequest.js +22 -47
- package/dist/commonjs/models/components/uniswapsellexactlyrequest.js.map +1 -1
- package/dist/commonjs/models/components/usageascollateral.d.ts +34 -0
- package/dist/commonjs/models/components/usageascollateral.d.ts.map +1 -0
- package/dist/commonjs/models/components/usageascollateral.js +74 -0
- package/dist/commonjs/models/components/usageascollateral.js.map +1 -0
- package/dist/commonjs/models/operations/aavehistoricaltransactions.d.ts +73 -0
- package/dist/commonjs/models/operations/aavehistoricaltransactions.d.ts.map +1 -0
- package/dist/commonjs/models/operations/aavehistoricaltransactions.js +107 -0
- package/dist/commonjs/models/operations/aavehistoricaltransactions.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/sdk/aavev3.d.ts +12 -0
- package/dist/commonjs/sdk/aavev3.d.ts.map +1 -1
- package/dist/commonjs/sdk/aavev3.js +15 -0
- package/dist/commonjs/sdk/aavev3.js.map +1 -1
- package/dist/esm/funcs/aaveV3HistoricalTransactions.d.ts +23 -0
- package/dist/esm/funcs/aaveV3HistoricalTransactions.d.ts.map +1 -0
- package/dist/esm/funcs/aaveV3HistoricalTransactions.js +92 -0
- package/dist/esm/funcs/aaveV3HistoricalTransactions.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +3 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/aaveV3HistoricalTransactions.d.ts +8 -0
- package/dist/esm/mcp-server/tools/aaveV3HistoricalTransactions.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/aaveV3HistoricalTransactions.js +33 -0
- package/dist/esm/mcp-server/tools/aaveV3HistoricalTransactions.js.map +1 -0
- package/dist/esm/models/components/aavehistoricaltransactionbase.d.ts +57 -0
- package/dist/esm/models/components/aavehistoricaltransactionbase.d.ts.map +1 -0
- package/dist/esm/models/components/aavehistoricaltransactionbase.js +59 -0
- package/dist/esm/models/components/aavehistoricaltransactionbase.js.map +1 -0
- package/dist/esm/models/components/aavehistoricaltransactionsresponse.d.ts +39 -0
- package/dist/esm/models/components/aavehistoricaltransactionsresponse.d.ts.map +1 -0
- package/dist/esm/models/components/aavehistoricaltransactionsresponse.js +38 -0
- package/dist/esm/models/components/aavehistoricaltransactionsresponse.js.map +1 -0
- package/dist/esm/models/components/action.d.ts +43 -0
- package/dist/esm/models/components/action.d.ts.map +1 -0
- package/dist/esm/models/components/action.js +30 -0
- package/dist/esm/models/components/action.js.map +1 -0
- package/dist/esm/models/components/borrow.d.ts +42 -0
- package/dist/esm/models/components/borrow.d.ts.map +1 -0
- package/dist/esm/models/components/borrow.js +45 -0
- package/dist/esm/models/components/borrow.js.map +1 -0
- package/dist/esm/models/components/collateralreserve.d.ts +31 -0
- package/dist/esm/models/components/collateralreserve.d.ts.map +1 -0
- package/dist/esm/models/components/collateralreserve.js +33 -0
- package/dist/esm/models/components/collateralreserve.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +13 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +13 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/liquidationcall.d.ts +41 -0
- package/dist/esm/models/components/liquidationcall.d.ts.map +1 -0
- package/dist/esm/models/components/liquidationcall.js +43 -0
- package/dist/esm/models/components/liquidationcall.js.map +1 -0
- package/dist/esm/models/components/multicallauthorizationrequest.d.ts +2 -0
- package/dist/esm/models/components/multicallauthorizationrequest.d.ts.map +1 -1
- package/dist/esm/models/components/multicallauthorizationrequest.js.map +1 -1
- package/dist/esm/models/components/principalreserve.d.ts +31 -0
- package/dist/esm/models/components/principalreserve.d.ts.map +1 -0
- package/dist/esm/models/components/principalreserve.js +33 -0
- package/dist/esm/models/components/principalreserve.js.map +1 -0
- package/dist/esm/models/components/redeemunderlying.d.ts +34 -0
- package/dist/esm/models/components/redeemunderlying.d.ts.map +1 -0
- package/dist/esm/models/components/redeemunderlying.js +36 -0
- package/dist/esm/models/components/redeemunderlying.js.map +1 -0
- package/dist/esm/models/components/repay.d.ts +34 -0
- package/dist/esm/models/components/repay.d.ts.map +1 -0
- package/dist/esm/models/components/repay.js +37 -0
- package/dist/esm/models/components/repay.js.map +1 -0
- package/dist/esm/models/components/reserve.d.ts +31 -0
- package/dist/esm/models/components/reserve.d.ts.map +1 -0
- package/dist/esm/models/components/reserve.js +33 -0
- package/dist/esm/models/components/reserve.js.map +1 -0
- package/dist/esm/models/components/supply.d.ts +34 -0
- package/dist/esm/models/components/supply.d.ts.map +1 -0
- package/dist/esm/models/components/supply.js +37 -0
- package/dist/esm/models/components/supply.js.map +1 -0
- package/dist/esm/models/components/swapborrowrate.d.ts +38 -0
- package/dist/esm/models/components/swapborrowrate.d.ts.map +1 -0
- package/dist/esm/models/components/swapborrowrate.js +40 -0
- package/dist/esm/models/components/swapborrowrate.js.map +1 -0
- package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts +3 -27
- package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyparams.js +4 -25
- package/dist/esm/models/components/uniswapbuyexactlyparams.js.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyrequest.d.ts +3 -27
- package/dist/esm/models/components/uniswapbuyexactlyrequest.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapbuyexactlyrequest.js +4 -25
- package/dist/esm/models/components/uniswapbuyexactlyrequest.js.map +1 -1
- package/dist/esm/models/components/uniswapsellexactlyparams.d.ts +18 -42
- package/dist/esm/models/components/uniswapsellexactlyparams.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapsellexactlyparams.js +19 -42
- package/dist/esm/models/components/uniswapsellexactlyparams.js.map +1 -1
- package/dist/esm/models/components/uniswapsellexactlyrequest.d.ts +18 -42
- package/dist/esm/models/components/uniswapsellexactlyrequest.d.ts.map +1 -1
- package/dist/esm/models/components/uniswapsellexactlyrequest.js +19 -42
- package/dist/esm/models/components/uniswapsellexactlyrequest.js.map +1 -1
- package/dist/esm/models/components/usageascollateral.d.ts +34 -0
- package/dist/esm/models/components/usageascollateral.d.ts.map +1 -0
- package/dist/esm/models/components/usageascollateral.js +36 -0
- package/dist/esm/models/components/usageascollateral.js.map +1 -0
- package/dist/esm/models/operations/aavehistoricaltransactions.d.ts +73 -0
- package/dist/esm/models/operations/aavehistoricaltransactions.d.ts.map +1 -0
- package/dist/esm/models/operations/aavehistoricaltransactions.js +69 -0
- package/dist/esm/models/operations/aavehistoricaltransactions.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/sdk/aavev3.d.ts +12 -0
- package/dist/esm/sdk/aavev3.d.ts.map +1 -1
- package/dist/esm/sdk/aavev3.js +15 -0
- package/dist/esm/sdk/aavev3.js.map +1 -1
- package/docs/sdks/aavev3/README.md +85 -0
- package/docs/sdks/transactionbatching/README.md +2 -2
- package/docs/sdks/uniswapv3/README.md +6 -6
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/aaveV3HistoricalTransactions.ts +177 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/aaveV3HistoricalTransactions.ts +42 -0
- package/src/models/components/aavehistoricaltransactionbase.ts +155 -0
- package/src/models/components/aavehistoricaltransactionsresponse.ts +91 -0
- package/src/models/components/action.ts +36 -0
- package/src/models/components/borrow.ts +89 -0
- package/src/models/components/collateralreserve.ts +70 -0
- package/src/models/components/index.ts +13 -0
- package/src/models/components/liquidationcall.ts +96 -0
- package/src/models/components/multicallauthorizationrequest.ts +2 -0
- package/src/models/components/principalreserve.ts +70 -0
- package/src/models/components/redeemunderlying.ts +80 -0
- package/src/models/components/repay.ts +73 -0
- package/src/models/components/reserve.ts +63 -0
- package/src/models/components/supply.ts +73 -0
- package/src/models/components/swapborrowrate.ts +84 -0
- package/src/models/components/uniswapbuyexactlyparams.ts +7 -66
- package/src/models/components/uniswapbuyexactlyrequest.ts +7 -71
- package/src/models/components/uniswapsellexactlyparams.ts +33 -99
- package/src/models/components/uniswapsellexactlyrequest.ts +33 -103
- package/src/models/components/usageascollateral.ts +80 -0
- package/src/models/operations/aavehistoricaltransactions.ts +136 -0
- package/src/models/operations/index.ts +1 -0
- package/src/sdk/aavev3.ts +23 -0
|
@@ -22,12 +22,7 @@ import {
|
|
|
22
22
|
/**
|
|
23
23
|
* The amount of the token to swap from
|
|
24
24
|
*/
|
|
25
|
-
export type
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* The minimum amount of the token to swap to, defaults to 0
|
|
29
|
-
*/
|
|
30
|
-
export type UniswapSellExactlyRequestAmountOutMinimum = number | string;
|
|
25
|
+
export type UniswapSellExactlyRequestAmount = number | string;
|
|
31
26
|
|
|
32
27
|
/**
|
|
33
28
|
* Request model for selling exactly an amount of tokens.
|
|
@@ -62,11 +57,11 @@ export type UniswapSellExactlyRequest = {
|
|
|
62
57
|
/**
|
|
63
58
|
* The amount of the token to swap from
|
|
64
59
|
*/
|
|
65
|
-
|
|
60
|
+
amount: number | string;
|
|
66
61
|
/**
|
|
67
|
-
* The
|
|
62
|
+
* The maximum slippage allowed in percent. e.g. `1` means `1 %` slippage allowed.
|
|
68
63
|
*/
|
|
69
|
-
|
|
64
|
+
maxSlippagePercent: number;
|
|
70
65
|
/**
|
|
71
66
|
* Whether to wrap ETH to WETH, only use when swapping WETH into something
|
|
72
67
|
*/
|
|
@@ -82,115 +77,52 @@ export type UniswapSellExactlyRequest = {
|
|
|
82
77
|
};
|
|
83
78
|
|
|
84
79
|
/** @internal */
|
|
85
|
-
export const
|
|
86
|
-
|
|
80
|
+
export const UniswapSellExactlyRequestAmount$inboundSchema: z.ZodType<
|
|
81
|
+
UniswapSellExactlyRequestAmount,
|
|
87
82
|
z.ZodTypeDef,
|
|
88
83
|
unknown
|
|
89
84
|
> = z.union([z.number(), z.string()]);
|
|
90
85
|
|
|
91
86
|
/** @internal */
|
|
92
|
-
export type
|
|
93
|
-
|
|
94
|
-
/** @internal */
|
|
95
|
-
export const UniswapSellExactlyRequestAmountIn$outboundSchema: z.ZodType<
|
|
96
|
-
UniswapSellExactlyRequestAmountIn$Outbound,
|
|
97
|
-
z.ZodTypeDef,
|
|
98
|
-
UniswapSellExactlyRequestAmountIn
|
|
99
|
-
> = z.union([z.number(), z.string()]);
|
|
100
|
-
|
|
101
|
-
/**
|
|
102
|
-
* @internal
|
|
103
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
104
|
-
*/
|
|
105
|
-
export namespace UniswapSellExactlyRequestAmountIn$ {
|
|
106
|
-
/** @deprecated use `UniswapSellExactlyRequestAmountIn$inboundSchema` instead. */
|
|
107
|
-
export const inboundSchema = UniswapSellExactlyRequestAmountIn$inboundSchema;
|
|
108
|
-
/** @deprecated use `UniswapSellExactlyRequestAmountIn$outboundSchema` instead. */
|
|
109
|
-
export const outboundSchema =
|
|
110
|
-
UniswapSellExactlyRequestAmountIn$outboundSchema;
|
|
111
|
-
/** @deprecated use `UniswapSellExactlyRequestAmountIn$Outbound` instead. */
|
|
112
|
-
export type Outbound = UniswapSellExactlyRequestAmountIn$Outbound;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export function uniswapSellExactlyRequestAmountInToJSON(
|
|
116
|
-
uniswapSellExactlyRequestAmountIn: UniswapSellExactlyRequestAmountIn,
|
|
117
|
-
): string {
|
|
118
|
-
return JSON.stringify(
|
|
119
|
-
UniswapSellExactlyRequestAmountIn$outboundSchema.parse(
|
|
120
|
-
uniswapSellExactlyRequestAmountIn,
|
|
121
|
-
),
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export function uniswapSellExactlyRequestAmountInFromJSON(
|
|
126
|
-
jsonString: string,
|
|
127
|
-
): SafeParseResult<UniswapSellExactlyRequestAmountIn, SDKValidationError> {
|
|
128
|
-
return safeParse(
|
|
129
|
-
jsonString,
|
|
130
|
-
(x) => UniswapSellExactlyRequestAmountIn$inboundSchema.parse(JSON.parse(x)),
|
|
131
|
-
`Failed to parse 'UniswapSellExactlyRequestAmountIn' from JSON`,
|
|
132
|
-
);
|
|
133
|
-
}
|
|
87
|
+
export type UniswapSellExactlyRequestAmount$Outbound = number | string;
|
|
134
88
|
|
|
135
89
|
/** @internal */
|
|
136
|
-
export const
|
|
137
|
-
|
|
90
|
+
export const UniswapSellExactlyRequestAmount$outboundSchema: z.ZodType<
|
|
91
|
+
UniswapSellExactlyRequestAmount$Outbound,
|
|
138
92
|
z.ZodTypeDef,
|
|
139
|
-
|
|
93
|
+
UniswapSellExactlyRequestAmount
|
|
140
94
|
> = z.union([z.number(), z.string()]);
|
|
141
95
|
|
|
142
|
-
/** @internal */
|
|
143
|
-
export type UniswapSellExactlyRequestAmountOutMinimum$Outbound =
|
|
144
|
-
| number
|
|
145
|
-
| string;
|
|
146
|
-
|
|
147
|
-
/** @internal */
|
|
148
|
-
export const UniswapSellExactlyRequestAmountOutMinimum$outboundSchema:
|
|
149
|
-
z.ZodType<
|
|
150
|
-
UniswapSellExactlyRequestAmountOutMinimum$Outbound,
|
|
151
|
-
z.ZodTypeDef,
|
|
152
|
-
UniswapSellExactlyRequestAmountOutMinimum
|
|
153
|
-
> = z.union([z.number(), z.string()]);
|
|
154
|
-
|
|
155
96
|
/**
|
|
156
97
|
* @internal
|
|
157
98
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
158
99
|
*/
|
|
159
|
-
export namespace
|
|
160
|
-
/** @deprecated use `
|
|
161
|
-
export const inboundSchema =
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
/** @deprecated use `UniswapSellExactlyRequestAmountOutMinimum$Outbound` instead. */
|
|
167
|
-
export type Outbound = UniswapSellExactlyRequestAmountOutMinimum$Outbound;
|
|
100
|
+
export namespace UniswapSellExactlyRequestAmount$ {
|
|
101
|
+
/** @deprecated use `UniswapSellExactlyRequestAmount$inboundSchema` instead. */
|
|
102
|
+
export const inboundSchema = UniswapSellExactlyRequestAmount$inboundSchema;
|
|
103
|
+
/** @deprecated use `UniswapSellExactlyRequestAmount$outboundSchema` instead. */
|
|
104
|
+
export const outboundSchema = UniswapSellExactlyRequestAmount$outboundSchema;
|
|
105
|
+
/** @deprecated use `UniswapSellExactlyRequestAmount$Outbound` instead. */
|
|
106
|
+
export type Outbound = UniswapSellExactlyRequestAmount$Outbound;
|
|
168
107
|
}
|
|
169
108
|
|
|
170
|
-
export function
|
|
171
|
-
|
|
172
|
-
UniswapSellExactlyRequestAmountOutMinimum,
|
|
109
|
+
export function uniswapSellExactlyRequestAmountToJSON(
|
|
110
|
+
uniswapSellExactlyRequestAmount: UniswapSellExactlyRequestAmount,
|
|
173
111
|
): string {
|
|
174
112
|
return JSON.stringify(
|
|
175
|
-
|
|
176
|
-
|
|
113
|
+
UniswapSellExactlyRequestAmount$outboundSchema.parse(
|
|
114
|
+
uniswapSellExactlyRequestAmount,
|
|
177
115
|
),
|
|
178
116
|
);
|
|
179
117
|
}
|
|
180
118
|
|
|
181
|
-
export function
|
|
119
|
+
export function uniswapSellExactlyRequestAmountFromJSON(
|
|
182
120
|
jsonString: string,
|
|
183
|
-
): SafeParseResult<
|
|
184
|
-
UniswapSellExactlyRequestAmountOutMinimum,
|
|
185
|
-
SDKValidationError
|
|
186
|
-
> {
|
|
121
|
+
): SafeParseResult<UniswapSellExactlyRequestAmount, SDKValidationError> {
|
|
187
122
|
return safeParse(
|
|
188
123
|
jsonString,
|
|
189
|
-
(x) =>
|
|
190
|
-
|
|
191
|
-
JSON.parse(x),
|
|
192
|
-
),
|
|
193
|
-
`Failed to parse 'UniswapSellExactlyRequestAmountOutMinimum' from JSON`,
|
|
124
|
+
(x) => UniswapSellExactlyRequestAmount$inboundSchema.parse(JSON.parse(x)),
|
|
125
|
+
`Failed to parse 'UniswapSellExactlyRequestAmount' from JSON`,
|
|
194
126
|
);
|
|
195
127
|
}
|
|
196
128
|
|
|
@@ -203,8 +135,8 @@ export const UniswapSellExactlyRequest$inboundSchema: z.ZodType<
|
|
|
203
135
|
token_in: TokenEnum$inboundSchema,
|
|
204
136
|
token_out: TokenEnum$inboundSchema,
|
|
205
137
|
fee: FeeEnum$inboundSchema,
|
|
206
|
-
|
|
207
|
-
|
|
138
|
+
amount: z.union([z.number(), z.string()]),
|
|
139
|
+
max_slippage_percent: z.number(),
|
|
208
140
|
wrap_eth: z.boolean().default(false),
|
|
209
141
|
chain: Chain$inboundSchema,
|
|
210
142
|
sender: z.string(),
|
|
@@ -212,8 +144,7 @@ export const UniswapSellExactlyRequest$inboundSchema: z.ZodType<
|
|
|
212
144
|
return remap$(v, {
|
|
213
145
|
"token_in": "tokenIn",
|
|
214
146
|
"token_out": "tokenOut",
|
|
215
|
-
"
|
|
216
|
-
"amount_out_minimum": "amountOutMinimum",
|
|
147
|
+
"max_slippage_percent": "maxSlippagePercent",
|
|
217
148
|
"wrap_eth": "wrapEth",
|
|
218
149
|
});
|
|
219
150
|
});
|
|
@@ -223,8 +154,8 @@ export type UniswapSellExactlyRequest$Outbound = {
|
|
|
223
154
|
token_in: string;
|
|
224
155
|
token_out: string;
|
|
225
156
|
fee: string;
|
|
226
|
-
|
|
227
|
-
|
|
157
|
+
amount: number | string;
|
|
158
|
+
max_slippage_percent: number;
|
|
228
159
|
wrap_eth: boolean;
|
|
229
160
|
chain: string;
|
|
230
161
|
sender: string;
|
|
@@ -239,8 +170,8 @@ export const UniswapSellExactlyRequest$outboundSchema: z.ZodType<
|
|
|
239
170
|
tokenIn: TokenEnum$outboundSchema,
|
|
240
171
|
tokenOut: TokenEnum$outboundSchema,
|
|
241
172
|
fee: FeeEnum$outboundSchema,
|
|
242
|
-
|
|
243
|
-
|
|
173
|
+
amount: z.union([z.number(), z.string()]),
|
|
174
|
+
maxSlippagePercent: z.number(),
|
|
244
175
|
wrapEth: z.boolean().default(false),
|
|
245
176
|
chain: Chain$outboundSchema,
|
|
246
177
|
sender: z.string(),
|
|
@@ -248,8 +179,7 @@ export const UniswapSellExactlyRequest$outboundSchema: z.ZodType<
|
|
|
248
179
|
return remap$(v, {
|
|
249
180
|
tokenIn: "token_in",
|
|
250
181
|
tokenOut: "token_out",
|
|
251
|
-
|
|
252
|
-
amountOutMinimum: "amount_out_minimum",
|
|
182
|
+
maxSlippagePercent: "max_slippage_percent",
|
|
253
183
|
wrapEth: "wrap_eth",
|
|
254
184
|
});
|
|
255
185
|
});
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
Reserve,
|
|
11
|
+
Reserve$inboundSchema,
|
|
12
|
+
Reserve$Outbound,
|
|
13
|
+
Reserve$outboundSchema,
|
|
14
|
+
} from "./reserve.js";
|
|
15
|
+
|
|
16
|
+
export type UsageAsCollateral = {
|
|
17
|
+
fromState: string;
|
|
18
|
+
toState: string;
|
|
19
|
+
reserve: Reserve;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const UsageAsCollateral$inboundSchema: z.ZodType<
|
|
24
|
+
UsageAsCollateral,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
fromState: z.string(),
|
|
29
|
+
toState: z.string(),
|
|
30
|
+
reserve: Reserve$inboundSchema,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type UsageAsCollateral$Outbound = {
|
|
35
|
+
fromState: string;
|
|
36
|
+
toState: string;
|
|
37
|
+
reserve: Reserve$Outbound;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const UsageAsCollateral$outboundSchema: z.ZodType<
|
|
42
|
+
UsageAsCollateral$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
UsageAsCollateral
|
|
45
|
+
> = z.object({
|
|
46
|
+
fromState: z.string(),
|
|
47
|
+
toState: z.string(),
|
|
48
|
+
reserve: Reserve$outboundSchema,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
54
|
+
*/
|
|
55
|
+
export namespace UsageAsCollateral$ {
|
|
56
|
+
/** @deprecated use `UsageAsCollateral$inboundSchema` instead. */
|
|
57
|
+
export const inboundSchema = UsageAsCollateral$inboundSchema;
|
|
58
|
+
/** @deprecated use `UsageAsCollateral$outboundSchema` instead. */
|
|
59
|
+
export const outboundSchema = UsageAsCollateral$outboundSchema;
|
|
60
|
+
/** @deprecated use `UsageAsCollateral$Outbound` instead. */
|
|
61
|
+
export type Outbound = UsageAsCollateral$Outbound;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function usageAsCollateralToJSON(
|
|
65
|
+
usageAsCollateral: UsageAsCollateral,
|
|
66
|
+
): string {
|
|
67
|
+
return JSON.stringify(
|
|
68
|
+
UsageAsCollateral$outboundSchema.parse(usageAsCollateral),
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function usageAsCollateralFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<UsageAsCollateral, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => UsageAsCollateral$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'UsageAsCollateral' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The chain to use.
|
|
14
|
+
*/
|
|
15
|
+
export const AaveHistoricalTransactionsChain = {
|
|
16
|
+
BaseMainnet: "base:mainnet",
|
|
17
|
+
EthereumMainnet: "ethereum:mainnet",
|
|
18
|
+
ArbitrumMainnet: "arbitrum:mainnet",
|
|
19
|
+
} as const;
|
|
20
|
+
/**
|
|
21
|
+
* The chain to use.
|
|
22
|
+
*/
|
|
23
|
+
export type AaveHistoricalTransactionsChain = ClosedEnum<
|
|
24
|
+
typeof AaveHistoricalTransactionsChain
|
|
25
|
+
>;
|
|
26
|
+
|
|
27
|
+
export type AaveHistoricalTransactionsRequest = {
|
|
28
|
+
offset?: number | undefined;
|
|
29
|
+
limit?: number | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* The chain to use.
|
|
32
|
+
*/
|
|
33
|
+
chain?: AaveHistoricalTransactionsChain | undefined;
|
|
34
|
+
userAddress?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const AaveHistoricalTransactionsChain$inboundSchema: z.ZodNativeEnum<
|
|
39
|
+
typeof AaveHistoricalTransactionsChain
|
|
40
|
+
> = z.nativeEnum(AaveHistoricalTransactionsChain);
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const AaveHistoricalTransactionsChain$outboundSchema: z.ZodNativeEnum<
|
|
44
|
+
typeof AaveHistoricalTransactionsChain
|
|
45
|
+
> = AaveHistoricalTransactionsChain$inboundSchema;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
50
|
+
*/
|
|
51
|
+
export namespace AaveHistoricalTransactionsChain$ {
|
|
52
|
+
/** @deprecated use `AaveHistoricalTransactionsChain$inboundSchema` instead. */
|
|
53
|
+
export const inboundSchema = AaveHistoricalTransactionsChain$inboundSchema;
|
|
54
|
+
/** @deprecated use `AaveHistoricalTransactionsChain$outboundSchema` instead. */
|
|
55
|
+
export const outboundSchema = AaveHistoricalTransactionsChain$outboundSchema;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/** @internal */
|
|
59
|
+
export const AaveHistoricalTransactionsRequest$inboundSchema: z.ZodType<
|
|
60
|
+
AaveHistoricalTransactionsRequest,
|
|
61
|
+
z.ZodTypeDef,
|
|
62
|
+
unknown
|
|
63
|
+
> = z.object({
|
|
64
|
+
offset: z.number().int().default(0),
|
|
65
|
+
limit: z.number().int().default(100),
|
|
66
|
+
chain: AaveHistoricalTransactionsChain$inboundSchema.default(
|
|
67
|
+
"arbitrum:mainnet",
|
|
68
|
+
),
|
|
69
|
+
user_address: z.string().default(
|
|
70
|
+
"0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B",
|
|
71
|
+
),
|
|
72
|
+
}).transform((v) => {
|
|
73
|
+
return remap$(v, {
|
|
74
|
+
"user_address": "userAddress",
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
/** @internal */
|
|
79
|
+
export type AaveHistoricalTransactionsRequest$Outbound = {
|
|
80
|
+
offset: number;
|
|
81
|
+
limit: number;
|
|
82
|
+
chain: string;
|
|
83
|
+
user_address: string;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const AaveHistoricalTransactionsRequest$outboundSchema: z.ZodType<
|
|
88
|
+
AaveHistoricalTransactionsRequest$Outbound,
|
|
89
|
+
z.ZodTypeDef,
|
|
90
|
+
AaveHistoricalTransactionsRequest
|
|
91
|
+
> = z.object({
|
|
92
|
+
offset: z.number().int().default(0),
|
|
93
|
+
limit: z.number().int().default(100),
|
|
94
|
+
chain: AaveHistoricalTransactionsChain$outboundSchema.default(
|
|
95
|
+
"arbitrum:mainnet",
|
|
96
|
+
),
|
|
97
|
+
userAddress: z.string().default("0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"),
|
|
98
|
+
}).transform((v) => {
|
|
99
|
+
return remap$(v, {
|
|
100
|
+
userAddress: "user_address",
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @internal
|
|
106
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
107
|
+
*/
|
|
108
|
+
export namespace AaveHistoricalTransactionsRequest$ {
|
|
109
|
+
/** @deprecated use `AaveHistoricalTransactionsRequest$inboundSchema` instead. */
|
|
110
|
+
export const inboundSchema = AaveHistoricalTransactionsRequest$inboundSchema;
|
|
111
|
+
/** @deprecated use `AaveHistoricalTransactionsRequest$outboundSchema` instead. */
|
|
112
|
+
export const outboundSchema =
|
|
113
|
+
AaveHistoricalTransactionsRequest$outboundSchema;
|
|
114
|
+
/** @deprecated use `AaveHistoricalTransactionsRequest$Outbound` instead. */
|
|
115
|
+
export type Outbound = AaveHistoricalTransactionsRequest$Outbound;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function aaveHistoricalTransactionsRequestToJSON(
|
|
119
|
+
aaveHistoricalTransactionsRequest: AaveHistoricalTransactionsRequest,
|
|
120
|
+
): string {
|
|
121
|
+
return JSON.stringify(
|
|
122
|
+
AaveHistoricalTransactionsRequest$outboundSchema.parse(
|
|
123
|
+
aaveHistoricalTransactionsRequest,
|
|
124
|
+
),
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function aaveHistoricalTransactionsRequestFromJSON(
|
|
129
|
+
jsonString: string,
|
|
130
|
+
): SafeParseResult<AaveHistoricalTransactionsRequest, SDKValidationError> {
|
|
131
|
+
return safeParse(
|
|
132
|
+
jsonString,
|
|
133
|
+
(x) => AaveHistoricalTransactionsRequest$inboundSchema.parse(JSON.parse(x)),
|
|
134
|
+
`Failed to parse 'AaveHistoricalTransactionsRequest' from JSON`,
|
|
135
|
+
);
|
|
136
|
+
}
|
package/src/sdk/aavev3.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { aaveV3Borrow } from "../funcs/aaveV3Borrow.js";
|
|
6
|
+
import { aaveV3HistoricalTransactions } from "../funcs/aaveV3HistoricalTransactions.js";
|
|
6
7
|
import { aaveV3LiquidityChange } from "../funcs/aaveV3LiquidityChange.js";
|
|
7
8
|
import { aaveV3Repay } from "../funcs/aaveV3Repay.js";
|
|
8
9
|
import { aaveV3Supply } from "../funcs/aaveV3Supply.js";
|
|
@@ -116,6 +117,28 @@ export class AaveV3 extends ClientSDK {
|
|
|
116
117
|
));
|
|
117
118
|
}
|
|
118
119
|
|
|
120
|
+
/**
|
|
121
|
+
* Historical transactions
|
|
122
|
+
*
|
|
123
|
+
* @remarks
|
|
124
|
+
* This endpoint retrieves historical transactions for a user on the AAVE platform.
|
|
125
|
+
*
|
|
126
|
+
* It returns a list of transactions including deposits, withdrawals, borrows, and
|
|
127
|
+
* repayments. Each transaction includes details such as the token, amount, timestamp,
|
|
128
|
+
* and transaction type. This provides a comprehensive view of the user's historical
|
|
129
|
+
* activity within the AAVE protocol.
|
|
130
|
+
*/
|
|
131
|
+
async historicalTransactions(
|
|
132
|
+
request: operations.AaveHistoricalTransactionsRequest,
|
|
133
|
+
options?: RequestOptions,
|
|
134
|
+
): Promise<components.AaveHistoricalTransactionsResponse> {
|
|
135
|
+
return unwrapAsync(aaveV3HistoricalTransactions(
|
|
136
|
+
this,
|
|
137
|
+
request,
|
|
138
|
+
options,
|
|
139
|
+
));
|
|
140
|
+
}
|
|
141
|
+
|
|
119
142
|
/**
|
|
120
143
|
* Supply/Lend
|
|
121
144
|
*
|