@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.
Files changed (237) hide show
  1. package/README.md +2 -0
  2. package/bin/mcp-server.js +898 -447
  3. package/bin/mcp-server.js.map +29 -13
  4. package/dist/commonjs/funcs/aaveV3HistoricalTransactions.d.ts +23 -0
  5. package/dist/commonjs/funcs/aaveV3HistoricalTransactions.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/aaveV3HistoricalTransactions.js +128 -0
  7. package/dist/commonjs/funcs/aaveV3HistoricalTransactions.js.map +1 -0
  8. package/dist/commonjs/lib/config.d.ts +2 -2
  9. package/dist/commonjs/lib/config.js +2 -2
  10. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  11. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  12. package/dist/commonjs/mcp-server/server.js +3 -1
  13. package/dist/commonjs/mcp-server/server.js.map +1 -1
  14. package/dist/commonjs/mcp-server/tools/aaveV3HistoricalTransactions.d.ts +8 -0
  15. package/dist/commonjs/mcp-server/tools/aaveV3HistoricalTransactions.d.ts.map +1 -0
  16. package/dist/commonjs/mcp-server/tools/aaveV3HistoricalTransactions.js +69 -0
  17. package/dist/commonjs/mcp-server/tools/aaveV3HistoricalTransactions.js.map +1 -0
  18. package/dist/commonjs/models/components/aavehistoricaltransactionbase.d.ts +57 -0
  19. package/dist/commonjs/models/components/aavehistoricaltransactionbase.d.ts.map +1 -0
  20. package/dist/commonjs/models/components/aavehistoricaltransactionbase.js +97 -0
  21. package/dist/commonjs/models/components/aavehistoricaltransactionbase.js.map +1 -0
  22. package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.d.ts +39 -0
  23. package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.d.ts.map +1 -0
  24. package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.js +76 -0
  25. package/dist/commonjs/models/components/aavehistoricaltransactionsresponse.js.map +1 -0
  26. package/dist/commonjs/models/components/action.d.ts +43 -0
  27. package/dist/commonjs/models/components/action.d.ts.map +1 -0
  28. package/dist/commonjs/models/components/action.js +66 -0
  29. package/dist/commonjs/models/components/action.js.map +1 -0
  30. package/dist/commonjs/models/components/borrow.d.ts +42 -0
  31. package/dist/commonjs/models/components/borrow.d.ts.map +1 -0
  32. package/dist/commonjs/models/components/borrow.js +83 -0
  33. package/dist/commonjs/models/components/borrow.js.map +1 -0
  34. package/dist/commonjs/models/components/collateralreserve.d.ts +31 -0
  35. package/dist/commonjs/models/components/collateralreserve.d.ts.map +1 -0
  36. package/dist/commonjs/models/components/collateralreserve.js +71 -0
  37. package/dist/commonjs/models/components/collateralreserve.js.map +1 -0
  38. package/dist/commonjs/models/components/index.d.ts +13 -0
  39. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  40. package/dist/commonjs/models/components/index.js +13 -0
  41. package/dist/commonjs/models/components/index.js.map +1 -1
  42. package/dist/commonjs/models/components/liquidationcall.d.ts +41 -0
  43. package/dist/commonjs/models/components/liquidationcall.d.ts.map +1 -0
  44. package/dist/commonjs/models/components/liquidationcall.js +81 -0
  45. package/dist/commonjs/models/components/liquidationcall.js.map +1 -0
  46. package/dist/commonjs/models/components/multicallauthorizationrequest.d.ts +2 -0
  47. package/dist/commonjs/models/components/multicallauthorizationrequest.d.ts.map +1 -1
  48. package/dist/commonjs/models/components/multicallauthorizationrequest.js.map +1 -1
  49. package/dist/commonjs/models/components/principalreserve.d.ts +31 -0
  50. package/dist/commonjs/models/components/principalreserve.d.ts.map +1 -0
  51. package/dist/commonjs/models/components/principalreserve.js +71 -0
  52. package/dist/commonjs/models/components/principalreserve.js.map +1 -0
  53. package/dist/commonjs/models/components/redeemunderlying.d.ts +34 -0
  54. package/dist/commonjs/models/components/redeemunderlying.d.ts.map +1 -0
  55. package/dist/commonjs/models/components/redeemunderlying.js +74 -0
  56. package/dist/commonjs/models/components/redeemunderlying.js.map +1 -0
  57. package/dist/commonjs/models/components/repay.d.ts +34 -0
  58. package/dist/commonjs/models/components/repay.d.ts.map +1 -0
  59. package/dist/commonjs/models/components/repay.js +75 -0
  60. package/dist/commonjs/models/components/repay.js.map +1 -0
  61. package/dist/commonjs/models/components/reserve.d.ts +31 -0
  62. package/dist/commonjs/models/components/reserve.d.ts.map +1 -0
  63. package/dist/commonjs/models/components/reserve.js +71 -0
  64. package/dist/commonjs/models/components/reserve.js.map +1 -0
  65. package/dist/commonjs/models/components/supply.d.ts +34 -0
  66. package/dist/commonjs/models/components/supply.d.ts.map +1 -0
  67. package/dist/commonjs/models/components/supply.js +75 -0
  68. package/dist/commonjs/models/components/supply.js.map +1 -0
  69. package/dist/commonjs/models/components/swapborrowrate.d.ts +38 -0
  70. package/dist/commonjs/models/components/swapborrowrate.d.ts.map +1 -0
  71. package/dist/commonjs/models/components/swapborrowrate.js +78 -0
  72. package/dist/commonjs/models/components/swapborrowrate.js.map +1 -0
  73. package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts +3 -27
  74. package/dist/commonjs/models/components/uniswapbuyexactlyparams.d.ts.map +1 -1
  75. package/dist/commonjs/models/components/uniswapbuyexactlyparams.js +5 -28
  76. package/dist/commonjs/models/components/uniswapbuyexactlyparams.js.map +1 -1
  77. package/dist/commonjs/models/components/uniswapbuyexactlyrequest.d.ts +3 -27
  78. package/dist/commonjs/models/components/uniswapbuyexactlyrequest.d.ts.map +1 -1
  79. package/dist/commonjs/models/components/uniswapbuyexactlyrequest.js +5 -28
  80. package/dist/commonjs/models/components/uniswapbuyexactlyrequest.js.map +1 -1
  81. package/dist/commonjs/models/components/uniswapsellexactlyparams.d.ts +18 -42
  82. package/dist/commonjs/models/components/uniswapsellexactlyparams.d.ts.map +1 -1
  83. package/dist/commonjs/models/components/uniswapsellexactlyparams.js +22 -47
  84. package/dist/commonjs/models/components/uniswapsellexactlyparams.js.map +1 -1
  85. package/dist/commonjs/models/components/uniswapsellexactlyrequest.d.ts +18 -42
  86. package/dist/commonjs/models/components/uniswapsellexactlyrequest.d.ts.map +1 -1
  87. package/dist/commonjs/models/components/uniswapsellexactlyrequest.js +22 -47
  88. package/dist/commonjs/models/components/uniswapsellexactlyrequest.js.map +1 -1
  89. package/dist/commonjs/models/components/usageascollateral.d.ts +34 -0
  90. package/dist/commonjs/models/components/usageascollateral.d.ts.map +1 -0
  91. package/dist/commonjs/models/components/usageascollateral.js +74 -0
  92. package/dist/commonjs/models/components/usageascollateral.js.map +1 -0
  93. package/dist/commonjs/models/operations/aavehistoricaltransactions.d.ts +73 -0
  94. package/dist/commonjs/models/operations/aavehistoricaltransactions.d.ts.map +1 -0
  95. package/dist/commonjs/models/operations/aavehistoricaltransactions.js +107 -0
  96. package/dist/commonjs/models/operations/aavehistoricaltransactions.js.map +1 -0
  97. package/dist/commonjs/models/operations/index.d.ts +1 -0
  98. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  99. package/dist/commonjs/models/operations/index.js +1 -0
  100. package/dist/commonjs/models/operations/index.js.map +1 -1
  101. package/dist/commonjs/sdk/aavev3.d.ts +12 -0
  102. package/dist/commonjs/sdk/aavev3.d.ts.map +1 -1
  103. package/dist/commonjs/sdk/aavev3.js +15 -0
  104. package/dist/commonjs/sdk/aavev3.js.map +1 -1
  105. package/dist/esm/funcs/aaveV3HistoricalTransactions.d.ts +23 -0
  106. package/dist/esm/funcs/aaveV3HistoricalTransactions.d.ts.map +1 -0
  107. package/dist/esm/funcs/aaveV3HistoricalTransactions.js +92 -0
  108. package/dist/esm/funcs/aaveV3HistoricalTransactions.js.map +1 -0
  109. package/dist/esm/lib/config.d.ts +2 -2
  110. package/dist/esm/lib/config.js +2 -2
  111. package/dist/esm/mcp-server/mcp-server.js +1 -1
  112. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  113. package/dist/esm/mcp-server/server.js +3 -1
  114. package/dist/esm/mcp-server/server.js.map +1 -1
  115. package/dist/esm/mcp-server/tools/aaveV3HistoricalTransactions.d.ts +8 -0
  116. package/dist/esm/mcp-server/tools/aaveV3HistoricalTransactions.d.ts.map +1 -0
  117. package/dist/esm/mcp-server/tools/aaveV3HistoricalTransactions.js +33 -0
  118. package/dist/esm/mcp-server/tools/aaveV3HistoricalTransactions.js.map +1 -0
  119. package/dist/esm/models/components/aavehistoricaltransactionbase.d.ts +57 -0
  120. package/dist/esm/models/components/aavehistoricaltransactionbase.d.ts.map +1 -0
  121. package/dist/esm/models/components/aavehistoricaltransactionbase.js +59 -0
  122. package/dist/esm/models/components/aavehistoricaltransactionbase.js.map +1 -0
  123. package/dist/esm/models/components/aavehistoricaltransactionsresponse.d.ts +39 -0
  124. package/dist/esm/models/components/aavehistoricaltransactionsresponse.d.ts.map +1 -0
  125. package/dist/esm/models/components/aavehistoricaltransactionsresponse.js +38 -0
  126. package/dist/esm/models/components/aavehistoricaltransactionsresponse.js.map +1 -0
  127. package/dist/esm/models/components/action.d.ts +43 -0
  128. package/dist/esm/models/components/action.d.ts.map +1 -0
  129. package/dist/esm/models/components/action.js +30 -0
  130. package/dist/esm/models/components/action.js.map +1 -0
  131. package/dist/esm/models/components/borrow.d.ts +42 -0
  132. package/dist/esm/models/components/borrow.d.ts.map +1 -0
  133. package/dist/esm/models/components/borrow.js +45 -0
  134. package/dist/esm/models/components/borrow.js.map +1 -0
  135. package/dist/esm/models/components/collateralreserve.d.ts +31 -0
  136. package/dist/esm/models/components/collateralreserve.d.ts.map +1 -0
  137. package/dist/esm/models/components/collateralreserve.js +33 -0
  138. package/dist/esm/models/components/collateralreserve.js.map +1 -0
  139. package/dist/esm/models/components/index.d.ts +13 -0
  140. package/dist/esm/models/components/index.d.ts.map +1 -1
  141. package/dist/esm/models/components/index.js +13 -0
  142. package/dist/esm/models/components/index.js.map +1 -1
  143. package/dist/esm/models/components/liquidationcall.d.ts +41 -0
  144. package/dist/esm/models/components/liquidationcall.d.ts.map +1 -0
  145. package/dist/esm/models/components/liquidationcall.js +43 -0
  146. package/dist/esm/models/components/liquidationcall.js.map +1 -0
  147. package/dist/esm/models/components/multicallauthorizationrequest.d.ts +2 -0
  148. package/dist/esm/models/components/multicallauthorizationrequest.d.ts.map +1 -1
  149. package/dist/esm/models/components/multicallauthorizationrequest.js.map +1 -1
  150. package/dist/esm/models/components/principalreserve.d.ts +31 -0
  151. package/dist/esm/models/components/principalreserve.d.ts.map +1 -0
  152. package/dist/esm/models/components/principalreserve.js +33 -0
  153. package/dist/esm/models/components/principalreserve.js.map +1 -0
  154. package/dist/esm/models/components/redeemunderlying.d.ts +34 -0
  155. package/dist/esm/models/components/redeemunderlying.d.ts.map +1 -0
  156. package/dist/esm/models/components/redeemunderlying.js +36 -0
  157. package/dist/esm/models/components/redeemunderlying.js.map +1 -0
  158. package/dist/esm/models/components/repay.d.ts +34 -0
  159. package/dist/esm/models/components/repay.d.ts.map +1 -0
  160. package/dist/esm/models/components/repay.js +37 -0
  161. package/dist/esm/models/components/repay.js.map +1 -0
  162. package/dist/esm/models/components/reserve.d.ts +31 -0
  163. package/dist/esm/models/components/reserve.d.ts.map +1 -0
  164. package/dist/esm/models/components/reserve.js +33 -0
  165. package/dist/esm/models/components/reserve.js.map +1 -0
  166. package/dist/esm/models/components/supply.d.ts +34 -0
  167. package/dist/esm/models/components/supply.d.ts.map +1 -0
  168. package/dist/esm/models/components/supply.js +37 -0
  169. package/dist/esm/models/components/supply.js.map +1 -0
  170. package/dist/esm/models/components/swapborrowrate.d.ts +38 -0
  171. package/dist/esm/models/components/swapborrowrate.d.ts.map +1 -0
  172. package/dist/esm/models/components/swapborrowrate.js +40 -0
  173. package/dist/esm/models/components/swapborrowrate.js.map +1 -0
  174. package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts +3 -27
  175. package/dist/esm/models/components/uniswapbuyexactlyparams.d.ts.map +1 -1
  176. package/dist/esm/models/components/uniswapbuyexactlyparams.js +4 -25
  177. package/dist/esm/models/components/uniswapbuyexactlyparams.js.map +1 -1
  178. package/dist/esm/models/components/uniswapbuyexactlyrequest.d.ts +3 -27
  179. package/dist/esm/models/components/uniswapbuyexactlyrequest.d.ts.map +1 -1
  180. package/dist/esm/models/components/uniswapbuyexactlyrequest.js +4 -25
  181. package/dist/esm/models/components/uniswapbuyexactlyrequest.js.map +1 -1
  182. package/dist/esm/models/components/uniswapsellexactlyparams.d.ts +18 -42
  183. package/dist/esm/models/components/uniswapsellexactlyparams.d.ts.map +1 -1
  184. package/dist/esm/models/components/uniswapsellexactlyparams.js +19 -42
  185. package/dist/esm/models/components/uniswapsellexactlyparams.js.map +1 -1
  186. package/dist/esm/models/components/uniswapsellexactlyrequest.d.ts +18 -42
  187. package/dist/esm/models/components/uniswapsellexactlyrequest.d.ts.map +1 -1
  188. package/dist/esm/models/components/uniswapsellexactlyrequest.js +19 -42
  189. package/dist/esm/models/components/uniswapsellexactlyrequest.js.map +1 -1
  190. package/dist/esm/models/components/usageascollateral.d.ts +34 -0
  191. package/dist/esm/models/components/usageascollateral.d.ts.map +1 -0
  192. package/dist/esm/models/components/usageascollateral.js +36 -0
  193. package/dist/esm/models/components/usageascollateral.js.map +1 -0
  194. package/dist/esm/models/operations/aavehistoricaltransactions.d.ts +73 -0
  195. package/dist/esm/models/operations/aavehistoricaltransactions.d.ts.map +1 -0
  196. package/dist/esm/models/operations/aavehistoricaltransactions.js +69 -0
  197. package/dist/esm/models/operations/aavehistoricaltransactions.js.map +1 -0
  198. package/dist/esm/models/operations/index.d.ts +1 -0
  199. package/dist/esm/models/operations/index.d.ts.map +1 -1
  200. package/dist/esm/models/operations/index.js +1 -0
  201. package/dist/esm/models/operations/index.js.map +1 -1
  202. package/dist/esm/sdk/aavev3.d.ts +12 -0
  203. package/dist/esm/sdk/aavev3.d.ts.map +1 -1
  204. package/dist/esm/sdk/aavev3.js +15 -0
  205. package/dist/esm/sdk/aavev3.js.map +1 -1
  206. package/docs/sdks/aavev3/README.md +85 -0
  207. package/docs/sdks/transactionbatching/README.md +2 -2
  208. package/docs/sdks/uniswapv3/README.md +6 -6
  209. package/jsr.json +1 -1
  210. package/package.json +1 -1
  211. package/src/funcs/aaveV3HistoricalTransactions.ts +177 -0
  212. package/src/lib/config.ts +2 -2
  213. package/src/mcp-server/mcp-server.ts +1 -1
  214. package/src/mcp-server/server.ts +3 -1
  215. package/src/mcp-server/tools/aaveV3HistoricalTransactions.ts +42 -0
  216. package/src/models/components/aavehistoricaltransactionbase.ts +155 -0
  217. package/src/models/components/aavehistoricaltransactionsresponse.ts +91 -0
  218. package/src/models/components/action.ts +36 -0
  219. package/src/models/components/borrow.ts +89 -0
  220. package/src/models/components/collateralreserve.ts +70 -0
  221. package/src/models/components/index.ts +13 -0
  222. package/src/models/components/liquidationcall.ts +96 -0
  223. package/src/models/components/multicallauthorizationrequest.ts +2 -0
  224. package/src/models/components/principalreserve.ts +70 -0
  225. package/src/models/components/redeemunderlying.ts +80 -0
  226. package/src/models/components/repay.ts +73 -0
  227. package/src/models/components/reserve.ts +63 -0
  228. package/src/models/components/supply.ts +73 -0
  229. package/src/models/components/swapborrowrate.ts +84 -0
  230. package/src/models/components/uniswapbuyexactlyparams.ts +7 -66
  231. package/src/models/components/uniswapbuyexactlyrequest.ts +7 -71
  232. package/src/models/components/uniswapsellexactlyparams.ts +33 -99
  233. package/src/models/components/uniswapsellexactlyrequest.ts +33 -103
  234. package/src/models/components/usageascollateral.ts +80 -0
  235. package/src/models/operations/aavehistoricaltransactions.ts +136 -0
  236. package/src/models/operations/index.ts +1 -0
  237. 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
+ }