@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
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
AaveHistoricalTransactionBase,
|
|
11
|
+
AaveHistoricalTransactionBase$inboundSchema,
|
|
12
|
+
AaveHistoricalTransactionBase$Outbound,
|
|
13
|
+
AaveHistoricalTransactionBase$outboundSchema,
|
|
14
|
+
} from "./aavehistoricaltransactionbase.js";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Response model for getting Aave historical transactions.
|
|
18
|
+
*/
|
|
19
|
+
export type AaveHistoricalTransactionsResponse = {
|
|
20
|
+
total: number;
|
|
21
|
+
offset: number;
|
|
22
|
+
limit: number;
|
|
23
|
+
transactions: Array<AaveHistoricalTransactionBase>;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const AaveHistoricalTransactionsResponse$inboundSchema: z.ZodType<
|
|
28
|
+
AaveHistoricalTransactionsResponse,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
total: z.number().int(),
|
|
33
|
+
offset: z.number().int(),
|
|
34
|
+
limit: z.number().int(),
|
|
35
|
+
transactions: z.array(AaveHistoricalTransactionBase$inboundSchema),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type AaveHistoricalTransactionsResponse$Outbound = {
|
|
40
|
+
total: number;
|
|
41
|
+
offset: number;
|
|
42
|
+
limit: number;
|
|
43
|
+
transactions: Array<AaveHistoricalTransactionBase$Outbound>;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const AaveHistoricalTransactionsResponse$outboundSchema: z.ZodType<
|
|
48
|
+
AaveHistoricalTransactionsResponse$Outbound,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
AaveHistoricalTransactionsResponse
|
|
51
|
+
> = z.object({
|
|
52
|
+
total: z.number().int(),
|
|
53
|
+
offset: z.number().int(),
|
|
54
|
+
limit: z.number().int(),
|
|
55
|
+
transactions: z.array(AaveHistoricalTransactionBase$outboundSchema),
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @internal
|
|
60
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
61
|
+
*/
|
|
62
|
+
export namespace AaveHistoricalTransactionsResponse$ {
|
|
63
|
+
/** @deprecated use `AaveHistoricalTransactionsResponse$inboundSchema` instead. */
|
|
64
|
+
export const inboundSchema = AaveHistoricalTransactionsResponse$inboundSchema;
|
|
65
|
+
/** @deprecated use `AaveHistoricalTransactionsResponse$outboundSchema` instead. */
|
|
66
|
+
export const outboundSchema =
|
|
67
|
+
AaveHistoricalTransactionsResponse$outboundSchema;
|
|
68
|
+
/** @deprecated use `AaveHistoricalTransactionsResponse$Outbound` instead. */
|
|
69
|
+
export type Outbound = AaveHistoricalTransactionsResponse$Outbound;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function aaveHistoricalTransactionsResponseToJSON(
|
|
73
|
+
aaveHistoricalTransactionsResponse: AaveHistoricalTransactionsResponse,
|
|
74
|
+
): string {
|
|
75
|
+
return JSON.stringify(
|
|
76
|
+
AaveHistoricalTransactionsResponse$outboundSchema.parse(
|
|
77
|
+
aaveHistoricalTransactionsResponse,
|
|
78
|
+
),
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function aaveHistoricalTransactionsResponseFromJSON(
|
|
83
|
+
jsonString: string,
|
|
84
|
+
): SafeParseResult<AaveHistoricalTransactionsResponse, SDKValidationError> {
|
|
85
|
+
return safeParse(
|
|
86
|
+
jsonString,
|
|
87
|
+
(x) =>
|
|
88
|
+
AaveHistoricalTransactionsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
+
`Failed to parse 'AaveHistoricalTransactionsResponse' from JSON`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
export const Action = {
|
|
9
|
+
Supply: "supply",
|
|
10
|
+
RedeemUnderlying: "redeemUnderlying",
|
|
11
|
+
Borrow: "borrow",
|
|
12
|
+
UsageAsCollateral: "usageAsCollateral",
|
|
13
|
+
Repay: "repay",
|
|
14
|
+
SwapBorrowRate: "swapBorrowRate",
|
|
15
|
+
LiquidationCall: "liquidationCall",
|
|
16
|
+
} as const;
|
|
17
|
+
export type Action = ClosedEnum<typeof Action>;
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const Action$inboundSchema: z.ZodNativeEnum<typeof Action> = z
|
|
21
|
+
.nativeEnum(Action);
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const Action$outboundSchema: z.ZodNativeEnum<typeof Action> =
|
|
25
|
+
Action$inboundSchema;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @internal
|
|
29
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
30
|
+
*/
|
|
31
|
+
export namespace Action$ {
|
|
32
|
+
/** @deprecated use `Action$inboundSchema` instead. */
|
|
33
|
+
export const inboundSchema = Action$inboundSchema;
|
|
34
|
+
/** @deprecated use `Action$outboundSchema` instead. */
|
|
35
|
+
export const outboundSchema = Action$outboundSchema;
|
|
36
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
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 Borrow = {
|
|
17
|
+
amount: string;
|
|
18
|
+
borrowRateMode: string;
|
|
19
|
+
borrowRate: string;
|
|
20
|
+
stableTokenDebt: string;
|
|
21
|
+
variableTokenDebt: string;
|
|
22
|
+
reserve: Reserve;
|
|
23
|
+
assetPriceUSD: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const Borrow$inboundSchema: z.ZodType<Borrow, z.ZodTypeDef, unknown> = z
|
|
28
|
+
.object({
|
|
29
|
+
amount: z.string(),
|
|
30
|
+
borrowRateMode: z.string(),
|
|
31
|
+
borrowRate: z.string(),
|
|
32
|
+
stableTokenDebt: z.string(),
|
|
33
|
+
variableTokenDebt: z.string(),
|
|
34
|
+
reserve: Reserve$inboundSchema,
|
|
35
|
+
assetPriceUSD: z.string(),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type Borrow$Outbound = {
|
|
40
|
+
amount: string;
|
|
41
|
+
borrowRateMode: string;
|
|
42
|
+
borrowRate: string;
|
|
43
|
+
stableTokenDebt: string;
|
|
44
|
+
variableTokenDebt: string;
|
|
45
|
+
reserve: Reserve$Outbound;
|
|
46
|
+
assetPriceUSD: string;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const Borrow$outboundSchema: z.ZodType<
|
|
51
|
+
Borrow$Outbound,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
Borrow
|
|
54
|
+
> = z.object({
|
|
55
|
+
amount: z.string(),
|
|
56
|
+
borrowRateMode: z.string(),
|
|
57
|
+
borrowRate: z.string(),
|
|
58
|
+
stableTokenDebt: z.string(),
|
|
59
|
+
variableTokenDebt: z.string(),
|
|
60
|
+
reserve: Reserve$outboundSchema,
|
|
61
|
+
assetPriceUSD: z.string(),
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* @internal
|
|
66
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
67
|
+
*/
|
|
68
|
+
export namespace Borrow$ {
|
|
69
|
+
/** @deprecated use `Borrow$inboundSchema` instead. */
|
|
70
|
+
export const inboundSchema = Borrow$inboundSchema;
|
|
71
|
+
/** @deprecated use `Borrow$outboundSchema` instead. */
|
|
72
|
+
export const outboundSchema = Borrow$outboundSchema;
|
|
73
|
+
/** @deprecated use `Borrow$Outbound` instead. */
|
|
74
|
+
export type Outbound = Borrow$Outbound;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function borrowToJSON(borrow: Borrow): string {
|
|
78
|
+
return JSON.stringify(Borrow$outboundSchema.parse(borrow));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function borrowFromJSON(
|
|
82
|
+
jsonString: string,
|
|
83
|
+
): SafeParseResult<Borrow, SDKValidationError> {
|
|
84
|
+
return safeParse(
|
|
85
|
+
jsonString,
|
|
86
|
+
(x) => Borrow$inboundSchema.parse(JSON.parse(x)),
|
|
87
|
+
`Failed to parse 'Borrow' from JSON`,
|
|
88
|
+
);
|
|
89
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
|
|
10
|
+
export type CollateralReserve = {
|
|
11
|
+
symbol: string;
|
|
12
|
+
decimals: number;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const CollateralReserve$inboundSchema: z.ZodType<
|
|
17
|
+
CollateralReserve,
|
|
18
|
+
z.ZodTypeDef,
|
|
19
|
+
unknown
|
|
20
|
+
> = z.object({
|
|
21
|
+
symbol: z.string(),
|
|
22
|
+
decimals: z.number().int(),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export type CollateralReserve$Outbound = {
|
|
27
|
+
symbol: string;
|
|
28
|
+
decimals: number;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const CollateralReserve$outboundSchema: z.ZodType<
|
|
33
|
+
CollateralReserve$Outbound,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
CollateralReserve
|
|
36
|
+
> = z.object({
|
|
37
|
+
symbol: z.string(),
|
|
38
|
+
decimals: z.number().int(),
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
44
|
+
*/
|
|
45
|
+
export namespace CollateralReserve$ {
|
|
46
|
+
/** @deprecated use `CollateralReserve$inboundSchema` instead. */
|
|
47
|
+
export const inboundSchema = CollateralReserve$inboundSchema;
|
|
48
|
+
/** @deprecated use `CollateralReserve$outboundSchema` instead. */
|
|
49
|
+
export const outboundSchema = CollateralReserve$outboundSchema;
|
|
50
|
+
/** @deprecated use `CollateralReserve$Outbound` instead. */
|
|
51
|
+
export type Outbound = CollateralReserve$Outbound;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function collateralReserveToJSON(
|
|
55
|
+
collateralReserve: CollateralReserve,
|
|
56
|
+
): string {
|
|
57
|
+
return JSON.stringify(
|
|
58
|
+
CollateralReserve$outboundSchema.parse(collateralReserve),
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function collateralReserveFromJSON(
|
|
63
|
+
jsonString: string,
|
|
64
|
+
): SafeParseResult<CollateralReserve, SDKValidationError> {
|
|
65
|
+
return safeParse(
|
|
66
|
+
jsonString,
|
|
67
|
+
(x) => CollateralReserve$inboundSchema.parse(JSON.parse(x)),
|
|
68
|
+
`Failed to parse 'CollateralReserve' from JSON`,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
export * from "./aaveborrowparams.js";
|
|
6
6
|
export * from "./aaveborrowrequest.js";
|
|
7
|
+
export * from "./aavehistoricaltransactionbase.js";
|
|
8
|
+
export * from "./aavehistoricaltransactionsresponse.js";
|
|
7
9
|
export * from "./aaveliquiditychangeresponse.js";
|
|
8
10
|
export * from "./aaverepayparams.js";
|
|
9
11
|
export * from "./aaverepayrequest.js";
|
|
@@ -14,6 +16,7 @@ export * from "./aaveuserpositionpertokenresponse.js";
|
|
|
14
16
|
export * from "./aaveuserpositionsummaryresponse.js";
|
|
15
17
|
export * from "./aavewithdrawparams.js";
|
|
16
18
|
export * from "./aavewithdrawrequest.js";
|
|
19
|
+
export * from "./action.js";
|
|
17
20
|
export * from "./aerodromeaddliquidityethparams.js";
|
|
18
21
|
export * from "./aerodromeaddliquidityparams.js";
|
|
19
22
|
export * from "./aerodromelppositionsresponse.js";
|
|
@@ -35,8 +38,10 @@ export * from "./aerodromeswapethfortokenparams.js";
|
|
|
35
38
|
export * from "./aerodromeswaptokenforethparams.js";
|
|
36
39
|
export * from "./aerodromeswaptokensparams.js";
|
|
37
40
|
export * from "./allowanceinforesponse.js";
|
|
41
|
+
export * from "./borrow.js";
|
|
38
42
|
export * from "./chain.js";
|
|
39
43
|
export * from "./chaininfo.js";
|
|
44
|
+
export * from "./collateralreserve.js";
|
|
40
45
|
export * from "./compassapibackendmodelsmorphoreadresponsegetmarketsasset.js";
|
|
41
46
|
export * from "./compassapibackendmodelsmorphoreadresponsegetvaultsasset.js";
|
|
42
47
|
export * from "./contractname.js";
|
|
@@ -47,6 +52,7 @@ export * from "./increaseallowanceanyparams.js";
|
|
|
47
52
|
export * from "./increaseallowanceparams.js";
|
|
48
53
|
export * from "./increaseallowancerequest.js";
|
|
49
54
|
export * from "./interestratemode.js";
|
|
55
|
+
export * from "./liquidationcall.js";
|
|
50
56
|
export * from "./marketstate.js";
|
|
51
57
|
export * from "./morphoborrowrequest.js";
|
|
52
58
|
export * from "./morphocheckmarketpositionresponse.js";
|
|
@@ -67,6 +73,10 @@ export * from "./multicallauthorizationrequest.js";
|
|
|
67
73
|
export * from "./multicallauthorizationresponse.js";
|
|
68
74
|
export * from "./multicallexecuterequest.js";
|
|
69
75
|
export * from "./portfolio.js";
|
|
76
|
+
export * from "./principalreserve.js";
|
|
77
|
+
export * from "./redeemunderlying.js";
|
|
78
|
+
export * from "./repay.js";
|
|
79
|
+
export * from "./reserve.js";
|
|
70
80
|
export * from "./security.js";
|
|
71
81
|
export * from "./signedauthorization.js";
|
|
72
82
|
export * from "./skybuyrequest.js";
|
|
@@ -74,6 +84,8 @@ export * from "./skycheckpositionresponse.js";
|
|
|
74
84
|
export * from "./skydepositrequest.js";
|
|
75
85
|
export * from "./skysellrequest.js";
|
|
76
86
|
export * from "./skywithdrawrequest.js";
|
|
87
|
+
export * from "./supply.js";
|
|
88
|
+
export * from "./swapborrowrate.js";
|
|
77
89
|
export * from "./tokenaddressresponse.js";
|
|
78
90
|
export * from "./tokenbalance.js";
|
|
79
91
|
export * from "./tokenbalanceresponse.js";
|
|
@@ -102,6 +114,7 @@ export * from "./unsignedmulticalltransaction.js";
|
|
|
102
114
|
export * from "./unsignedtransaction.js";
|
|
103
115
|
export * from "./unwrapwethparams.js";
|
|
104
116
|
export * from "./unwrapwethrequest.js";
|
|
117
|
+
export * from "./usageascollateral.js";
|
|
105
118
|
export * from "./validationerror.js";
|
|
106
119
|
export * from "./vaultstate.js";
|
|
107
120
|
export * from "./weeklyapys.js";
|
|
@@ -0,0 +1,96 @@
|
|
|
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
|
+
CollateralReserve,
|
|
11
|
+
CollateralReserve$inboundSchema,
|
|
12
|
+
CollateralReserve$Outbound,
|
|
13
|
+
CollateralReserve$outboundSchema,
|
|
14
|
+
} from "./collateralreserve.js";
|
|
15
|
+
import {
|
|
16
|
+
PrincipalReserve,
|
|
17
|
+
PrincipalReserve$inboundSchema,
|
|
18
|
+
PrincipalReserve$Outbound,
|
|
19
|
+
PrincipalReserve$outboundSchema,
|
|
20
|
+
} from "./principalreserve.js";
|
|
21
|
+
|
|
22
|
+
export type LiquidationCall = {
|
|
23
|
+
collateralAmount: string;
|
|
24
|
+
collateralReserve: CollateralReserve;
|
|
25
|
+
principalAmount: string;
|
|
26
|
+
principalReserve: PrincipalReserve;
|
|
27
|
+
collateralAssetPriceUSD: string;
|
|
28
|
+
borrowAssetPriceUSD: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const LiquidationCall$inboundSchema: z.ZodType<
|
|
33
|
+
LiquidationCall,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
unknown
|
|
36
|
+
> = z.object({
|
|
37
|
+
collateralAmount: z.string(),
|
|
38
|
+
collateralReserve: CollateralReserve$inboundSchema,
|
|
39
|
+
principalAmount: z.string(),
|
|
40
|
+
principalReserve: PrincipalReserve$inboundSchema,
|
|
41
|
+
collateralAssetPriceUSD: z.string(),
|
|
42
|
+
borrowAssetPriceUSD: z.string(),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type LiquidationCall$Outbound = {
|
|
47
|
+
collateralAmount: string;
|
|
48
|
+
collateralReserve: CollateralReserve$Outbound;
|
|
49
|
+
principalAmount: string;
|
|
50
|
+
principalReserve: PrincipalReserve$Outbound;
|
|
51
|
+
collateralAssetPriceUSD: string;
|
|
52
|
+
borrowAssetPriceUSD: string;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** @internal */
|
|
56
|
+
export const LiquidationCall$outboundSchema: z.ZodType<
|
|
57
|
+
LiquidationCall$Outbound,
|
|
58
|
+
z.ZodTypeDef,
|
|
59
|
+
LiquidationCall
|
|
60
|
+
> = z.object({
|
|
61
|
+
collateralAmount: z.string(),
|
|
62
|
+
collateralReserve: CollateralReserve$outboundSchema,
|
|
63
|
+
principalAmount: z.string(),
|
|
64
|
+
principalReserve: PrincipalReserve$outboundSchema,
|
|
65
|
+
collateralAssetPriceUSD: z.string(),
|
|
66
|
+
borrowAssetPriceUSD: z.string(),
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
72
|
+
*/
|
|
73
|
+
export namespace LiquidationCall$ {
|
|
74
|
+
/** @deprecated use `LiquidationCall$inboundSchema` instead. */
|
|
75
|
+
export const inboundSchema = LiquidationCall$inboundSchema;
|
|
76
|
+
/** @deprecated use `LiquidationCall$outboundSchema` instead. */
|
|
77
|
+
export const outboundSchema = LiquidationCall$outboundSchema;
|
|
78
|
+
/** @deprecated use `LiquidationCall$Outbound` instead. */
|
|
79
|
+
export type Outbound = LiquidationCall$Outbound;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function liquidationCallToJSON(
|
|
83
|
+
liquidationCall: LiquidationCall,
|
|
84
|
+
): string {
|
|
85
|
+
return JSON.stringify(LiquidationCall$outboundSchema.parse(liquidationCall));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function liquidationCallFromJSON(
|
|
89
|
+
jsonString: string,
|
|
90
|
+
): SafeParseResult<LiquidationCall, SDKValidationError> {
|
|
91
|
+
return safeParse(
|
|
92
|
+
jsonString,
|
|
93
|
+
(x) => LiquidationCall$inboundSchema.parse(JSON.parse(x)),
|
|
94
|
+
`Failed to parse 'LiquidationCall' from JSON`,
|
|
95
|
+
);
|
|
96
|
+
}
|
|
@@ -16,6 +16,8 @@ import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
|
|
|
16
16
|
* This model is used to authorize a sender address to perform multicall operations,
|
|
17
17
|
* allowing it to call multiple functions on multiple contracts in a single
|
|
18
18
|
* transaction.
|
|
19
|
+
*
|
|
20
|
+
* Only needs to be done once per an EOA.
|
|
19
21
|
*/
|
|
20
22
|
export type MulticallAuthorizationRequest = {
|
|
21
23
|
/**
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
|
|
10
|
+
export type PrincipalReserve = {
|
|
11
|
+
symbol: string;
|
|
12
|
+
decimals: number;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const PrincipalReserve$inboundSchema: z.ZodType<
|
|
17
|
+
PrincipalReserve,
|
|
18
|
+
z.ZodTypeDef,
|
|
19
|
+
unknown
|
|
20
|
+
> = z.object({
|
|
21
|
+
symbol: z.string(),
|
|
22
|
+
decimals: z.number().int(),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export type PrincipalReserve$Outbound = {
|
|
27
|
+
symbol: string;
|
|
28
|
+
decimals: number;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const PrincipalReserve$outboundSchema: z.ZodType<
|
|
33
|
+
PrincipalReserve$Outbound,
|
|
34
|
+
z.ZodTypeDef,
|
|
35
|
+
PrincipalReserve
|
|
36
|
+
> = z.object({
|
|
37
|
+
symbol: z.string(),
|
|
38
|
+
decimals: z.number().int(),
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* @internal
|
|
43
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
44
|
+
*/
|
|
45
|
+
export namespace PrincipalReserve$ {
|
|
46
|
+
/** @deprecated use `PrincipalReserve$inboundSchema` instead. */
|
|
47
|
+
export const inboundSchema = PrincipalReserve$inboundSchema;
|
|
48
|
+
/** @deprecated use `PrincipalReserve$outboundSchema` instead. */
|
|
49
|
+
export const outboundSchema = PrincipalReserve$outboundSchema;
|
|
50
|
+
/** @deprecated use `PrincipalReserve$Outbound` instead. */
|
|
51
|
+
export type Outbound = PrincipalReserve$Outbound;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function principalReserveToJSON(
|
|
55
|
+
principalReserve: PrincipalReserve,
|
|
56
|
+
): string {
|
|
57
|
+
return JSON.stringify(
|
|
58
|
+
PrincipalReserve$outboundSchema.parse(principalReserve),
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function principalReserveFromJSON(
|
|
63
|
+
jsonString: string,
|
|
64
|
+
): SafeParseResult<PrincipalReserve, SDKValidationError> {
|
|
65
|
+
return safeParse(
|
|
66
|
+
jsonString,
|
|
67
|
+
(x) => PrincipalReserve$inboundSchema.parse(JSON.parse(x)),
|
|
68
|
+
`Failed to parse 'PrincipalReserve' from JSON`,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -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 RedeemUnderlying = {
|
|
17
|
+
amount: string;
|
|
18
|
+
reserve: Reserve;
|
|
19
|
+
assetPriceUSD: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const RedeemUnderlying$inboundSchema: z.ZodType<
|
|
24
|
+
RedeemUnderlying,
|
|
25
|
+
z.ZodTypeDef,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.object({
|
|
28
|
+
amount: z.string(),
|
|
29
|
+
reserve: Reserve$inboundSchema,
|
|
30
|
+
assetPriceUSD: z.string(),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type RedeemUnderlying$Outbound = {
|
|
35
|
+
amount: string;
|
|
36
|
+
reserve: Reserve$Outbound;
|
|
37
|
+
assetPriceUSD: string;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const RedeemUnderlying$outboundSchema: z.ZodType<
|
|
42
|
+
RedeemUnderlying$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
RedeemUnderlying
|
|
45
|
+
> = z.object({
|
|
46
|
+
amount: z.string(),
|
|
47
|
+
reserve: Reserve$outboundSchema,
|
|
48
|
+
assetPriceUSD: z.string(),
|
|
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 RedeemUnderlying$ {
|
|
56
|
+
/** @deprecated use `RedeemUnderlying$inboundSchema` instead. */
|
|
57
|
+
export const inboundSchema = RedeemUnderlying$inboundSchema;
|
|
58
|
+
/** @deprecated use `RedeemUnderlying$outboundSchema` instead. */
|
|
59
|
+
export const outboundSchema = RedeemUnderlying$outboundSchema;
|
|
60
|
+
/** @deprecated use `RedeemUnderlying$Outbound` instead. */
|
|
61
|
+
export type Outbound = RedeemUnderlying$Outbound;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function redeemUnderlyingToJSON(
|
|
65
|
+
redeemUnderlying: RedeemUnderlying,
|
|
66
|
+
): string {
|
|
67
|
+
return JSON.stringify(
|
|
68
|
+
RedeemUnderlying$outboundSchema.parse(redeemUnderlying),
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function redeemUnderlyingFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<RedeemUnderlying, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => RedeemUnderlying$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'RedeemUnderlying' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
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 Repay = {
|
|
17
|
+
amount: string;
|
|
18
|
+
reserve: Reserve;
|
|
19
|
+
assetPriceUSD: string;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const Repay$inboundSchema: z.ZodType<Repay, z.ZodTypeDef, unknown> = z
|
|
24
|
+
.object({
|
|
25
|
+
amount: z.string(),
|
|
26
|
+
reserve: Reserve$inboundSchema,
|
|
27
|
+
assetPriceUSD: z.string(),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export type Repay$Outbound = {
|
|
32
|
+
amount: string;
|
|
33
|
+
reserve: Reserve$Outbound;
|
|
34
|
+
assetPriceUSD: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const Repay$outboundSchema: z.ZodType<
|
|
39
|
+
Repay$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
Repay
|
|
42
|
+
> = z.object({
|
|
43
|
+
amount: z.string(),
|
|
44
|
+
reserve: Reserve$outboundSchema,
|
|
45
|
+
assetPriceUSD: z.string(),
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
51
|
+
*/
|
|
52
|
+
export namespace Repay$ {
|
|
53
|
+
/** @deprecated use `Repay$inboundSchema` instead. */
|
|
54
|
+
export const inboundSchema = Repay$inboundSchema;
|
|
55
|
+
/** @deprecated use `Repay$outboundSchema` instead. */
|
|
56
|
+
export const outboundSchema = Repay$outboundSchema;
|
|
57
|
+
/** @deprecated use `Repay$Outbound` instead. */
|
|
58
|
+
export type Outbound = Repay$Outbound;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function repayToJSON(repay: Repay): string {
|
|
62
|
+
return JSON.stringify(Repay$outboundSchema.parse(repay));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function repayFromJSON(
|
|
66
|
+
jsonString: string,
|
|
67
|
+
): SafeParseResult<Repay, SDKValidationError> {
|
|
68
|
+
return safeParse(
|
|
69
|
+
jsonString,
|
|
70
|
+
(x) => Repay$inboundSchema.parse(JSON.parse(x)),
|
|
71
|
+
`Failed to parse 'Repay' from JSON`,
|
|
72
|
+
);
|
|
73
|
+
}
|