@compass-labs/api-sdk 0.3.0 → 0.3.2

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 (201) hide show
  1. package/README.md +8 -0
  2. package/bin/mcp-server.js +1044 -308
  3. package/bin/mcp-server.js.map +25 -9
  4. package/dist/commonjs/funcs/pendleBuyPt.d.ts +17 -0
  5. package/dist/commonjs/funcs/pendleBuyPt.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/pendleBuyPt.js +118 -0
  7. package/dist/commonjs/funcs/pendleBuyPt.js.map +1 -0
  8. package/dist/commonjs/funcs/pendleBuyYt.d.ts +17 -0
  9. package/dist/commonjs/funcs/pendleBuyYt.d.ts.map +1 -0
  10. package/dist/commonjs/funcs/pendleBuyYt.js +118 -0
  11. package/dist/commonjs/funcs/pendleBuyYt.js.map +1 -0
  12. package/dist/commonjs/funcs/pendleSellPt.d.ts +17 -0
  13. package/dist/commonjs/funcs/pendleSellPt.d.ts.map +1 -0
  14. package/dist/commonjs/funcs/pendleSellPt.js +118 -0
  15. package/dist/commonjs/funcs/pendleSellPt.js.map +1 -0
  16. package/dist/commonjs/funcs/pendleSellYt.d.ts +17 -0
  17. package/dist/commonjs/funcs/pendleSellYt.d.ts.map +1 -0
  18. package/dist/commonjs/funcs/pendleSellYt.js +118 -0
  19. package/dist/commonjs/funcs/pendleSellYt.js.map +1 -0
  20. package/dist/commonjs/lib/config.d.ts +2 -2
  21. package/dist/commonjs/lib/config.js +2 -2
  22. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  23. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  24. package/dist/commonjs/mcp-server/server.js +9 -1
  25. package/dist/commonjs/mcp-server/server.js.map +1 -1
  26. package/dist/commonjs/mcp-server/tools/pendleBuyPt.d.ts +8 -0
  27. package/dist/commonjs/mcp-server/tools/pendleBuyPt.d.ts.map +1 -0
  28. package/dist/commonjs/mcp-server/tools/pendleBuyPt.js +64 -0
  29. package/dist/commonjs/mcp-server/tools/pendleBuyPt.js.map +1 -0
  30. package/dist/commonjs/mcp-server/tools/pendleBuyYt.d.ts +8 -0
  31. package/dist/commonjs/mcp-server/tools/pendleBuyYt.d.ts.map +1 -0
  32. package/dist/commonjs/mcp-server/tools/pendleBuyYt.js +64 -0
  33. package/dist/commonjs/mcp-server/tools/pendleBuyYt.js.map +1 -0
  34. package/dist/commonjs/mcp-server/tools/pendleSellPt.d.ts +8 -0
  35. package/dist/commonjs/mcp-server/tools/pendleSellPt.d.ts.map +1 -0
  36. package/dist/commonjs/mcp-server/tools/pendleSellPt.js +64 -0
  37. package/dist/commonjs/mcp-server/tools/pendleSellPt.js.map +1 -0
  38. package/dist/commonjs/mcp-server/tools/pendleSellYt.d.ts +8 -0
  39. package/dist/commonjs/mcp-server/tools/pendleSellYt.d.ts.map +1 -0
  40. package/dist/commonjs/mcp-server/tools/pendleSellYt.js +64 -0
  41. package/dist/commonjs/mcp-server/tools/pendleSellYt.js.map +1 -0
  42. package/dist/commonjs/models/components/index.d.ts +8 -0
  43. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  44. package/dist/commonjs/models/components/index.js +8 -0
  45. package/dist/commonjs/models/components/index.js.map +1 -1
  46. package/dist/commonjs/models/components/multicallactiontype.d.ts +12 -0
  47. package/dist/commonjs/models/components/multicallactiontype.d.ts.map +1 -1
  48. package/dist/commonjs/models/components/multicallactiontype.js +4 -0
  49. package/dist/commonjs/models/components/multicallactiontype.js.map +1 -1
  50. package/dist/commonjs/models/components/pendlebuyptparams.d.ts +61 -0
  51. package/dist/commonjs/models/components/pendlebuyptparams.d.ts.map +1 -0
  52. package/dist/commonjs/models/components/pendlebuyptparams.js +103 -0
  53. package/dist/commonjs/models/components/pendlebuyptparams.js.map +1 -0
  54. package/dist/commonjs/models/components/pendlebuyptrequest.d.ts +72 -0
  55. package/dist/commonjs/models/components/pendlebuyptrequest.d.ts.map +1 -0
  56. package/dist/commonjs/models/components/pendlebuyptrequest.js +108 -0
  57. package/dist/commonjs/models/components/pendlebuyptrequest.js.map +1 -0
  58. package/dist/commonjs/models/components/pendlebuyytparams.d.ts +61 -0
  59. package/dist/commonjs/models/components/pendlebuyytparams.d.ts.map +1 -0
  60. package/dist/commonjs/models/components/pendlebuyytparams.js +103 -0
  61. package/dist/commonjs/models/components/pendlebuyytparams.js.map +1 -0
  62. package/dist/commonjs/models/components/pendlebuyytrequest.d.ts +72 -0
  63. package/dist/commonjs/models/components/pendlebuyytrequest.d.ts.map +1 -0
  64. package/dist/commonjs/models/components/pendlebuyytrequest.js +108 -0
  65. package/dist/commonjs/models/components/pendlebuyytrequest.js.map +1 -0
  66. package/dist/commonjs/models/components/pendlesellptparams.d.ts +61 -0
  67. package/dist/commonjs/models/components/pendlesellptparams.d.ts.map +1 -0
  68. package/dist/commonjs/models/components/pendlesellptparams.js +103 -0
  69. package/dist/commonjs/models/components/pendlesellptparams.js.map +1 -0
  70. package/dist/commonjs/models/components/pendlesellptrequest.d.ts +72 -0
  71. package/dist/commonjs/models/components/pendlesellptrequest.d.ts.map +1 -0
  72. package/dist/commonjs/models/components/pendlesellptrequest.js +108 -0
  73. package/dist/commonjs/models/components/pendlesellptrequest.js.map +1 -0
  74. package/dist/commonjs/models/components/pendlesellytparams.d.ts +61 -0
  75. package/dist/commonjs/models/components/pendlesellytparams.d.ts.map +1 -0
  76. package/dist/commonjs/models/components/pendlesellytparams.js +103 -0
  77. package/dist/commonjs/models/components/pendlesellytparams.js.map +1 -0
  78. package/dist/commonjs/models/components/pendlesellytrequest.d.ts +72 -0
  79. package/dist/commonjs/models/components/pendlesellytrequest.d.ts.map +1 -0
  80. package/dist/commonjs/models/components/pendlesellytrequest.js +108 -0
  81. package/dist/commonjs/models/components/pendlesellytrequest.js.map +1 -0
  82. package/dist/commonjs/models/components/useroperation.d.ts +8 -4
  83. package/dist/commonjs/models/components/useroperation.d.ts.map +1 -1
  84. package/dist/commonjs/models/components/useroperation.js +20 -0
  85. package/dist/commonjs/models/components/useroperation.js.map +1 -1
  86. package/dist/commonjs/sdk/pendle.d.ts +28 -0
  87. package/dist/commonjs/sdk/pendle.d.ts.map +1 -1
  88. package/dist/commonjs/sdk/pendle.js +40 -0
  89. package/dist/commonjs/sdk/pendle.js.map +1 -1
  90. package/dist/esm/funcs/pendleBuyPt.d.ts +17 -0
  91. package/dist/esm/funcs/pendleBuyPt.d.ts.map +1 -0
  92. package/dist/esm/funcs/pendleBuyPt.js +82 -0
  93. package/dist/esm/funcs/pendleBuyPt.js.map +1 -0
  94. package/dist/esm/funcs/pendleBuyYt.d.ts +17 -0
  95. package/dist/esm/funcs/pendleBuyYt.d.ts.map +1 -0
  96. package/dist/esm/funcs/pendleBuyYt.js +82 -0
  97. package/dist/esm/funcs/pendleBuyYt.js.map +1 -0
  98. package/dist/esm/funcs/pendleSellPt.d.ts +17 -0
  99. package/dist/esm/funcs/pendleSellPt.d.ts.map +1 -0
  100. package/dist/esm/funcs/pendleSellPt.js +82 -0
  101. package/dist/esm/funcs/pendleSellPt.js.map +1 -0
  102. package/dist/esm/funcs/pendleSellYt.d.ts +17 -0
  103. package/dist/esm/funcs/pendleSellYt.d.ts.map +1 -0
  104. package/dist/esm/funcs/pendleSellYt.js +82 -0
  105. package/dist/esm/funcs/pendleSellYt.js.map +1 -0
  106. package/dist/esm/lib/config.d.ts +2 -2
  107. package/dist/esm/lib/config.js +2 -2
  108. package/dist/esm/mcp-server/mcp-server.js +1 -1
  109. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  110. package/dist/esm/mcp-server/server.js +9 -1
  111. package/dist/esm/mcp-server/server.js.map +1 -1
  112. package/dist/esm/mcp-server/tools/pendleBuyPt.d.ts +8 -0
  113. package/dist/esm/mcp-server/tools/pendleBuyPt.d.ts.map +1 -0
  114. package/dist/esm/mcp-server/tools/pendleBuyPt.js +28 -0
  115. package/dist/esm/mcp-server/tools/pendleBuyPt.js.map +1 -0
  116. package/dist/esm/mcp-server/tools/pendleBuyYt.d.ts +8 -0
  117. package/dist/esm/mcp-server/tools/pendleBuyYt.d.ts.map +1 -0
  118. package/dist/esm/mcp-server/tools/pendleBuyYt.js +28 -0
  119. package/dist/esm/mcp-server/tools/pendleBuyYt.js.map +1 -0
  120. package/dist/esm/mcp-server/tools/pendleSellPt.d.ts +8 -0
  121. package/dist/esm/mcp-server/tools/pendleSellPt.d.ts.map +1 -0
  122. package/dist/esm/mcp-server/tools/pendleSellPt.js +28 -0
  123. package/dist/esm/mcp-server/tools/pendleSellPt.js.map +1 -0
  124. package/dist/esm/mcp-server/tools/pendleSellYt.d.ts +8 -0
  125. package/dist/esm/mcp-server/tools/pendleSellYt.d.ts.map +1 -0
  126. package/dist/esm/mcp-server/tools/pendleSellYt.js +28 -0
  127. package/dist/esm/mcp-server/tools/pendleSellYt.js.map +1 -0
  128. package/dist/esm/models/components/index.d.ts +8 -0
  129. package/dist/esm/models/components/index.d.ts.map +1 -1
  130. package/dist/esm/models/components/index.js +8 -0
  131. package/dist/esm/models/components/index.js.map +1 -1
  132. package/dist/esm/models/components/multicallactiontype.d.ts +12 -0
  133. package/dist/esm/models/components/multicallactiontype.d.ts.map +1 -1
  134. package/dist/esm/models/components/multicallactiontype.js +4 -0
  135. package/dist/esm/models/components/multicallactiontype.js.map +1 -1
  136. package/dist/esm/models/components/pendlebuyptparams.d.ts +61 -0
  137. package/dist/esm/models/components/pendlebuyptparams.d.ts.map +1 -0
  138. package/dist/esm/models/components/pendlebuyptparams.js +63 -0
  139. package/dist/esm/models/components/pendlebuyptparams.js.map +1 -0
  140. package/dist/esm/models/components/pendlebuyptrequest.d.ts +72 -0
  141. package/dist/esm/models/components/pendlebuyptrequest.d.ts.map +1 -0
  142. package/dist/esm/models/components/pendlebuyptrequest.js +68 -0
  143. package/dist/esm/models/components/pendlebuyptrequest.js.map +1 -0
  144. package/dist/esm/models/components/pendlebuyytparams.d.ts +61 -0
  145. package/dist/esm/models/components/pendlebuyytparams.d.ts.map +1 -0
  146. package/dist/esm/models/components/pendlebuyytparams.js +63 -0
  147. package/dist/esm/models/components/pendlebuyytparams.js.map +1 -0
  148. package/dist/esm/models/components/pendlebuyytrequest.d.ts +72 -0
  149. package/dist/esm/models/components/pendlebuyytrequest.d.ts.map +1 -0
  150. package/dist/esm/models/components/pendlebuyytrequest.js +68 -0
  151. package/dist/esm/models/components/pendlebuyytrequest.js.map +1 -0
  152. package/dist/esm/models/components/pendlesellptparams.d.ts +61 -0
  153. package/dist/esm/models/components/pendlesellptparams.d.ts.map +1 -0
  154. package/dist/esm/models/components/pendlesellptparams.js +63 -0
  155. package/dist/esm/models/components/pendlesellptparams.js.map +1 -0
  156. package/dist/esm/models/components/pendlesellptrequest.d.ts +72 -0
  157. package/dist/esm/models/components/pendlesellptrequest.d.ts.map +1 -0
  158. package/dist/esm/models/components/pendlesellptrequest.js +68 -0
  159. package/dist/esm/models/components/pendlesellptrequest.js.map +1 -0
  160. package/dist/esm/models/components/pendlesellytparams.d.ts +61 -0
  161. package/dist/esm/models/components/pendlesellytparams.d.ts.map +1 -0
  162. package/dist/esm/models/components/pendlesellytparams.js +63 -0
  163. package/dist/esm/models/components/pendlesellytparams.js.map +1 -0
  164. package/dist/esm/models/components/pendlesellytrequest.d.ts +72 -0
  165. package/dist/esm/models/components/pendlesellytrequest.d.ts.map +1 -0
  166. package/dist/esm/models/components/pendlesellytrequest.js +68 -0
  167. package/dist/esm/models/components/pendlesellytrequest.js.map +1 -0
  168. package/dist/esm/models/components/useroperation.d.ts +8 -4
  169. package/dist/esm/models/components/useroperation.d.ts.map +1 -1
  170. package/dist/esm/models/components/useroperation.js +20 -0
  171. package/dist/esm/models/components/useroperation.js.map +1 -1
  172. package/dist/esm/sdk/pendle.d.ts +28 -0
  173. package/dist/esm/sdk/pendle.d.ts.map +1 -1
  174. package/dist/esm/sdk/pendle.js +40 -0
  175. package/dist/esm/sdk/pendle.js.map +1 -1
  176. package/docs/sdks/pendle/README.md +336 -0
  177. package/jsr.json +1 -1
  178. package/package.json +1 -1
  179. package/src/funcs/pendleBuyPt.ts +165 -0
  180. package/src/funcs/pendleBuyYt.ts +165 -0
  181. package/src/funcs/pendleSellPt.ts +165 -0
  182. package/src/funcs/pendleSellYt.ts +165 -0
  183. package/src/lib/config.ts +2 -2
  184. package/src/mcp-server/mcp-server.ts +1 -1
  185. package/src/mcp-server/server.ts +9 -1
  186. package/src/mcp-server/tools/pendleBuyPt.ts +37 -0
  187. package/src/mcp-server/tools/pendleBuyYt.ts +37 -0
  188. package/src/mcp-server/tools/pendleSellPt.ts +37 -0
  189. package/src/mcp-server/tools/pendleSellYt.ts +37 -0
  190. package/src/models/components/index.ts +8 -0
  191. package/src/models/components/multicallactiontype.ts +4 -0
  192. package/src/models/components/pendlebuyptparams.ts +138 -0
  193. package/src/models/components/pendlebuyptrequest.ts +153 -0
  194. package/src/models/components/pendlebuyytparams.ts +138 -0
  195. package/src/models/components/pendlebuyytrequest.ts +153 -0
  196. package/src/models/components/pendlesellptparams.ts +138 -0
  197. package/src/models/components/pendlesellptrequest.ts +153 -0
  198. package/src/models/components/pendlesellytparams.ts +138 -0
  199. package/src/models/components/pendlesellytrequest.ts +153 -0
  200. package/src/models/components/useroperation.ts +56 -0
  201. package/src/sdk/pendle.ts +72 -0
@@ -0,0 +1,138 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * The amount of market's Principal Token (PT) you would like to sell for market's Underlying Token.
13
+ */
14
+ export type PendleSellPtParamsAmount = number | string;
15
+
16
+ export type PendleSellPtParams = {
17
+ /**
18
+ * The address of the market identifying which Principal Token (PT) you would like to sell.
19
+ */
20
+ marketAddress: string;
21
+ /**
22
+ * The amount of market's Principal Token (PT) you would like to sell for market's Underlying Token.
23
+ */
24
+ amount: number | string;
25
+ };
26
+
27
+ /** @internal */
28
+ export const PendleSellPtParamsAmount$inboundSchema: z.ZodType<
29
+ PendleSellPtParamsAmount,
30
+ z.ZodTypeDef,
31
+ unknown
32
+ > = z.union([z.number(), z.string()]);
33
+
34
+ /** @internal */
35
+ export type PendleSellPtParamsAmount$Outbound = number | string;
36
+
37
+ /** @internal */
38
+ export const PendleSellPtParamsAmount$outboundSchema: z.ZodType<
39
+ PendleSellPtParamsAmount$Outbound,
40
+ z.ZodTypeDef,
41
+ PendleSellPtParamsAmount
42
+ > = z.union([z.number(), z.string()]);
43
+
44
+ /**
45
+ * @internal
46
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
47
+ */
48
+ export namespace PendleSellPtParamsAmount$ {
49
+ /** @deprecated use `PendleSellPtParamsAmount$inboundSchema` instead. */
50
+ export const inboundSchema = PendleSellPtParamsAmount$inboundSchema;
51
+ /** @deprecated use `PendleSellPtParamsAmount$outboundSchema` instead. */
52
+ export const outboundSchema = PendleSellPtParamsAmount$outboundSchema;
53
+ /** @deprecated use `PendleSellPtParamsAmount$Outbound` instead. */
54
+ export type Outbound = PendleSellPtParamsAmount$Outbound;
55
+ }
56
+
57
+ export function pendleSellPtParamsAmountToJSON(
58
+ pendleSellPtParamsAmount: PendleSellPtParamsAmount,
59
+ ): string {
60
+ return JSON.stringify(
61
+ PendleSellPtParamsAmount$outboundSchema.parse(pendleSellPtParamsAmount),
62
+ );
63
+ }
64
+
65
+ export function pendleSellPtParamsAmountFromJSON(
66
+ jsonString: string,
67
+ ): SafeParseResult<PendleSellPtParamsAmount, SDKValidationError> {
68
+ return safeParse(
69
+ jsonString,
70
+ (x) => PendleSellPtParamsAmount$inboundSchema.parse(JSON.parse(x)),
71
+ `Failed to parse 'PendleSellPtParamsAmount' from JSON`,
72
+ );
73
+ }
74
+
75
+ /** @internal */
76
+ export const PendleSellPtParams$inboundSchema: z.ZodType<
77
+ PendleSellPtParams,
78
+ z.ZodTypeDef,
79
+ unknown
80
+ > = z.object({
81
+ market_address: z.string(),
82
+ amount: z.union([z.number(), z.string()]),
83
+ }).transform((v) => {
84
+ return remap$(v, {
85
+ "market_address": "marketAddress",
86
+ });
87
+ });
88
+
89
+ /** @internal */
90
+ export type PendleSellPtParams$Outbound = {
91
+ market_address: string;
92
+ amount: number | string;
93
+ };
94
+
95
+ /** @internal */
96
+ export const PendleSellPtParams$outboundSchema: z.ZodType<
97
+ PendleSellPtParams$Outbound,
98
+ z.ZodTypeDef,
99
+ PendleSellPtParams
100
+ > = z.object({
101
+ marketAddress: z.string(),
102
+ amount: z.union([z.number(), z.string()]),
103
+ }).transform((v) => {
104
+ return remap$(v, {
105
+ marketAddress: "market_address",
106
+ });
107
+ });
108
+
109
+ /**
110
+ * @internal
111
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
112
+ */
113
+ export namespace PendleSellPtParams$ {
114
+ /** @deprecated use `PendleSellPtParams$inboundSchema` instead. */
115
+ export const inboundSchema = PendleSellPtParams$inboundSchema;
116
+ /** @deprecated use `PendleSellPtParams$outboundSchema` instead. */
117
+ export const outboundSchema = PendleSellPtParams$outboundSchema;
118
+ /** @deprecated use `PendleSellPtParams$Outbound` instead. */
119
+ export type Outbound = PendleSellPtParams$Outbound;
120
+ }
121
+
122
+ export function pendleSellPtParamsToJSON(
123
+ pendleSellPtParams: PendleSellPtParams,
124
+ ): string {
125
+ return JSON.stringify(
126
+ PendleSellPtParams$outboundSchema.parse(pendleSellPtParams),
127
+ );
128
+ }
129
+
130
+ export function pendleSellPtParamsFromJSON(
131
+ jsonString: string,
132
+ ): SafeParseResult<PendleSellPtParams, SDKValidationError> {
133
+ return safeParse(
134
+ jsonString,
135
+ (x) => PendleSellPtParams$inboundSchema.parse(JSON.parse(x)),
136
+ `Failed to parse 'PendleSellPtParams' from JSON`,
137
+ );
138
+ }
@@ -0,0 +1,153 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
11
+
12
+ /**
13
+ * The amount of market's Principal Token (PT) you would like to sell for market's Underlying Token.
14
+ */
15
+ export type PendleSellPtRequestAmount = number | string;
16
+
17
+ export type PendleSellPtRequest = {
18
+ /**
19
+ * The address of the market identifying which Principal Token (PT) you would like to sell.
20
+ */
21
+ marketAddress: string;
22
+ /**
23
+ * The amount of market's Principal Token (PT) you would like to sell for market's Underlying Token.
24
+ */
25
+ amount: number | string;
26
+ /**
27
+ * The chain to use.
28
+ */
29
+ chain: Chain;
30
+ /**
31
+ * The address of the transaction sender.
32
+ */
33
+ sender: string;
34
+ };
35
+
36
+ /** @internal */
37
+ export const PendleSellPtRequestAmount$inboundSchema: z.ZodType<
38
+ PendleSellPtRequestAmount,
39
+ z.ZodTypeDef,
40
+ unknown
41
+ > = z.union([z.number(), z.string()]);
42
+
43
+ /** @internal */
44
+ export type PendleSellPtRequestAmount$Outbound = number | string;
45
+
46
+ /** @internal */
47
+ export const PendleSellPtRequestAmount$outboundSchema: z.ZodType<
48
+ PendleSellPtRequestAmount$Outbound,
49
+ z.ZodTypeDef,
50
+ PendleSellPtRequestAmount
51
+ > = z.union([z.number(), z.string()]);
52
+
53
+ /**
54
+ * @internal
55
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
56
+ */
57
+ export namespace PendleSellPtRequestAmount$ {
58
+ /** @deprecated use `PendleSellPtRequestAmount$inboundSchema` instead. */
59
+ export const inboundSchema = PendleSellPtRequestAmount$inboundSchema;
60
+ /** @deprecated use `PendleSellPtRequestAmount$outboundSchema` instead. */
61
+ export const outboundSchema = PendleSellPtRequestAmount$outboundSchema;
62
+ /** @deprecated use `PendleSellPtRequestAmount$Outbound` instead. */
63
+ export type Outbound = PendleSellPtRequestAmount$Outbound;
64
+ }
65
+
66
+ export function pendleSellPtRequestAmountToJSON(
67
+ pendleSellPtRequestAmount: PendleSellPtRequestAmount,
68
+ ): string {
69
+ return JSON.stringify(
70
+ PendleSellPtRequestAmount$outboundSchema.parse(pendleSellPtRequestAmount),
71
+ );
72
+ }
73
+
74
+ export function pendleSellPtRequestAmountFromJSON(
75
+ jsonString: string,
76
+ ): SafeParseResult<PendleSellPtRequestAmount, SDKValidationError> {
77
+ return safeParse(
78
+ jsonString,
79
+ (x) => PendleSellPtRequestAmount$inboundSchema.parse(JSON.parse(x)),
80
+ `Failed to parse 'PendleSellPtRequestAmount' from JSON`,
81
+ );
82
+ }
83
+
84
+ /** @internal */
85
+ export const PendleSellPtRequest$inboundSchema: z.ZodType<
86
+ PendleSellPtRequest,
87
+ z.ZodTypeDef,
88
+ unknown
89
+ > = z.object({
90
+ market_address: z.string(),
91
+ amount: z.union([z.number(), z.string()]),
92
+ chain: Chain$inboundSchema,
93
+ sender: z.string(),
94
+ }).transform((v) => {
95
+ return remap$(v, {
96
+ "market_address": "marketAddress",
97
+ });
98
+ });
99
+
100
+ /** @internal */
101
+ export type PendleSellPtRequest$Outbound = {
102
+ market_address: string;
103
+ amount: number | string;
104
+ chain: string;
105
+ sender: string;
106
+ };
107
+
108
+ /** @internal */
109
+ export const PendleSellPtRequest$outboundSchema: z.ZodType<
110
+ PendleSellPtRequest$Outbound,
111
+ z.ZodTypeDef,
112
+ PendleSellPtRequest
113
+ > = z.object({
114
+ marketAddress: z.string(),
115
+ amount: z.union([z.number(), z.string()]),
116
+ chain: Chain$outboundSchema,
117
+ sender: z.string(),
118
+ }).transform((v) => {
119
+ return remap$(v, {
120
+ marketAddress: "market_address",
121
+ });
122
+ });
123
+
124
+ /**
125
+ * @internal
126
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
127
+ */
128
+ export namespace PendleSellPtRequest$ {
129
+ /** @deprecated use `PendleSellPtRequest$inboundSchema` instead. */
130
+ export const inboundSchema = PendleSellPtRequest$inboundSchema;
131
+ /** @deprecated use `PendleSellPtRequest$outboundSchema` instead. */
132
+ export const outboundSchema = PendleSellPtRequest$outboundSchema;
133
+ /** @deprecated use `PendleSellPtRequest$Outbound` instead. */
134
+ export type Outbound = PendleSellPtRequest$Outbound;
135
+ }
136
+
137
+ export function pendleSellPtRequestToJSON(
138
+ pendleSellPtRequest: PendleSellPtRequest,
139
+ ): string {
140
+ return JSON.stringify(
141
+ PendleSellPtRequest$outboundSchema.parse(pendleSellPtRequest),
142
+ );
143
+ }
144
+
145
+ export function pendleSellPtRequestFromJSON(
146
+ jsonString: string,
147
+ ): SafeParseResult<PendleSellPtRequest, SDKValidationError> {
148
+ return safeParse(
149
+ jsonString,
150
+ (x) => PendleSellPtRequest$inboundSchema.parse(JSON.parse(x)),
151
+ `Failed to parse 'PendleSellPtRequest' from JSON`,
152
+ );
153
+ }
@@ -0,0 +1,138 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * The amount of market's Yield Token (YT) you would like to sell for market's Underlying Token.
13
+ */
14
+ export type PendleSellYtParamsAmount = number | string;
15
+
16
+ export type PendleSellYtParams = {
17
+ /**
18
+ * The address of the market identifying which Yield Token (YT) you would like to sell.
19
+ */
20
+ marketAddress: string;
21
+ /**
22
+ * The amount of market's Yield Token (YT) you would like to sell for market's Underlying Token.
23
+ */
24
+ amount: number | string;
25
+ };
26
+
27
+ /** @internal */
28
+ export const PendleSellYtParamsAmount$inboundSchema: z.ZodType<
29
+ PendleSellYtParamsAmount,
30
+ z.ZodTypeDef,
31
+ unknown
32
+ > = z.union([z.number(), z.string()]);
33
+
34
+ /** @internal */
35
+ export type PendleSellYtParamsAmount$Outbound = number | string;
36
+
37
+ /** @internal */
38
+ export const PendleSellYtParamsAmount$outboundSchema: z.ZodType<
39
+ PendleSellYtParamsAmount$Outbound,
40
+ z.ZodTypeDef,
41
+ PendleSellYtParamsAmount
42
+ > = z.union([z.number(), z.string()]);
43
+
44
+ /**
45
+ * @internal
46
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
47
+ */
48
+ export namespace PendleSellYtParamsAmount$ {
49
+ /** @deprecated use `PendleSellYtParamsAmount$inboundSchema` instead. */
50
+ export const inboundSchema = PendleSellYtParamsAmount$inboundSchema;
51
+ /** @deprecated use `PendleSellYtParamsAmount$outboundSchema` instead. */
52
+ export const outboundSchema = PendleSellYtParamsAmount$outboundSchema;
53
+ /** @deprecated use `PendleSellYtParamsAmount$Outbound` instead. */
54
+ export type Outbound = PendleSellYtParamsAmount$Outbound;
55
+ }
56
+
57
+ export function pendleSellYtParamsAmountToJSON(
58
+ pendleSellYtParamsAmount: PendleSellYtParamsAmount,
59
+ ): string {
60
+ return JSON.stringify(
61
+ PendleSellYtParamsAmount$outboundSchema.parse(pendleSellYtParamsAmount),
62
+ );
63
+ }
64
+
65
+ export function pendleSellYtParamsAmountFromJSON(
66
+ jsonString: string,
67
+ ): SafeParseResult<PendleSellYtParamsAmount, SDKValidationError> {
68
+ return safeParse(
69
+ jsonString,
70
+ (x) => PendleSellYtParamsAmount$inboundSchema.parse(JSON.parse(x)),
71
+ `Failed to parse 'PendleSellYtParamsAmount' from JSON`,
72
+ );
73
+ }
74
+
75
+ /** @internal */
76
+ export const PendleSellYtParams$inboundSchema: z.ZodType<
77
+ PendleSellYtParams,
78
+ z.ZodTypeDef,
79
+ unknown
80
+ > = z.object({
81
+ market_address: z.string(),
82
+ amount: z.union([z.number(), z.string()]),
83
+ }).transform((v) => {
84
+ return remap$(v, {
85
+ "market_address": "marketAddress",
86
+ });
87
+ });
88
+
89
+ /** @internal */
90
+ export type PendleSellYtParams$Outbound = {
91
+ market_address: string;
92
+ amount: number | string;
93
+ };
94
+
95
+ /** @internal */
96
+ export const PendleSellYtParams$outboundSchema: z.ZodType<
97
+ PendleSellYtParams$Outbound,
98
+ z.ZodTypeDef,
99
+ PendleSellYtParams
100
+ > = z.object({
101
+ marketAddress: z.string(),
102
+ amount: z.union([z.number(), z.string()]),
103
+ }).transform((v) => {
104
+ return remap$(v, {
105
+ marketAddress: "market_address",
106
+ });
107
+ });
108
+
109
+ /**
110
+ * @internal
111
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
112
+ */
113
+ export namespace PendleSellYtParams$ {
114
+ /** @deprecated use `PendleSellYtParams$inboundSchema` instead. */
115
+ export const inboundSchema = PendleSellYtParams$inboundSchema;
116
+ /** @deprecated use `PendleSellYtParams$outboundSchema` instead. */
117
+ export const outboundSchema = PendleSellYtParams$outboundSchema;
118
+ /** @deprecated use `PendleSellYtParams$Outbound` instead. */
119
+ export type Outbound = PendleSellYtParams$Outbound;
120
+ }
121
+
122
+ export function pendleSellYtParamsToJSON(
123
+ pendleSellYtParams: PendleSellYtParams,
124
+ ): string {
125
+ return JSON.stringify(
126
+ PendleSellYtParams$outboundSchema.parse(pendleSellYtParams),
127
+ );
128
+ }
129
+
130
+ export function pendleSellYtParamsFromJSON(
131
+ jsonString: string,
132
+ ): SafeParseResult<PendleSellYtParams, SDKValidationError> {
133
+ return safeParse(
134
+ jsonString,
135
+ (x) => PendleSellYtParams$inboundSchema.parse(JSON.parse(x)),
136
+ `Failed to parse 'PendleSellYtParams' from JSON`,
137
+ );
138
+ }
@@ -0,0 +1,153 @@
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 { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
11
+
12
+ /**
13
+ * The amount of market's Yield Token (YT) you would like to sell for market's Underlying Token.
14
+ */
15
+ export type PendleSellYtRequestAmount = number | string;
16
+
17
+ export type PendleSellYtRequest = {
18
+ /**
19
+ * The address of the market identifying which Yield Token (YT) you would like to sell.
20
+ */
21
+ marketAddress: string;
22
+ /**
23
+ * The amount of market's Yield Token (YT) you would like to sell for market's Underlying Token.
24
+ */
25
+ amount: number | string;
26
+ /**
27
+ * The chain to use.
28
+ */
29
+ chain: Chain;
30
+ /**
31
+ * The address of the transaction sender.
32
+ */
33
+ sender: string;
34
+ };
35
+
36
+ /** @internal */
37
+ export const PendleSellYtRequestAmount$inboundSchema: z.ZodType<
38
+ PendleSellYtRequestAmount,
39
+ z.ZodTypeDef,
40
+ unknown
41
+ > = z.union([z.number(), z.string()]);
42
+
43
+ /** @internal */
44
+ export type PendleSellYtRequestAmount$Outbound = number | string;
45
+
46
+ /** @internal */
47
+ export const PendleSellYtRequestAmount$outboundSchema: z.ZodType<
48
+ PendleSellYtRequestAmount$Outbound,
49
+ z.ZodTypeDef,
50
+ PendleSellYtRequestAmount
51
+ > = z.union([z.number(), z.string()]);
52
+
53
+ /**
54
+ * @internal
55
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
56
+ */
57
+ export namespace PendleSellYtRequestAmount$ {
58
+ /** @deprecated use `PendleSellYtRequestAmount$inboundSchema` instead. */
59
+ export const inboundSchema = PendleSellYtRequestAmount$inboundSchema;
60
+ /** @deprecated use `PendleSellYtRequestAmount$outboundSchema` instead. */
61
+ export const outboundSchema = PendleSellYtRequestAmount$outboundSchema;
62
+ /** @deprecated use `PendleSellYtRequestAmount$Outbound` instead. */
63
+ export type Outbound = PendleSellYtRequestAmount$Outbound;
64
+ }
65
+
66
+ export function pendleSellYtRequestAmountToJSON(
67
+ pendleSellYtRequestAmount: PendleSellYtRequestAmount,
68
+ ): string {
69
+ return JSON.stringify(
70
+ PendleSellYtRequestAmount$outboundSchema.parse(pendleSellYtRequestAmount),
71
+ );
72
+ }
73
+
74
+ export function pendleSellYtRequestAmountFromJSON(
75
+ jsonString: string,
76
+ ): SafeParseResult<PendleSellYtRequestAmount, SDKValidationError> {
77
+ return safeParse(
78
+ jsonString,
79
+ (x) => PendleSellYtRequestAmount$inboundSchema.parse(JSON.parse(x)),
80
+ `Failed to parse 'PendleSellYtRequestAmount' from JSON`,
81
+ );
82
+ }
83
+
84
+ /** @internal */
85
+ export const PendleSellYtRequest$inboundSchema: z.ZodType<
86
+ PendleSellYtRequest,
87
+ z.ZodTypeDef,
88
+ unknown
89
+ > = z.object({
90
+ market_address: z.string(),
91
+ amount: z.union([z.number(), z.string()]),
92
+ chain: Chain$inboundSchema,
93
+ sender: z.string(),
94
+ }).transform((v) => {
95
+ return remap$(v, {
96
+ "market_address": "marketAddress",
97
+ });
98
+ });
99
+
100
+ /** @internal */
101
+ export type PendleSellYtRequest$Outbound = {
102
+ market_address: string;
103
+ amount: number | string;
104
+ chain: string;
105
+ sender: string;
106
+ };
107
+
108
+ /** @internal */
109
+ export const PendleSellYtRequest$outboundSchema: z.ZodType<
110
+ PendleSellYtRequest$Outbound,
111
+ z.ZodTypeDef,
112
+ PendleSellYtRequest
113
+ > = z.object({
114
+ marketAddress: z.string(),
115
+ amount: z.union([z.number(), z.string()]),
116
+ chain: Chain$outboundSchema,
117
+ sender: z.string(),
118
+ }).transform((v) => {
119
+ return remap$(v, {
120
+ marketAddress: "market_address",
121
+ });
122
+ });
123
+
124
+ /**
125
+ * @internal
126
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
127
+ */
128
+ export namespace PendleSellYtRequest$ {
129
+ /** @deprecated use `PendleSellYtRequest$inboundSchema` instead. */
130
+ export const inboundSchema = PendleSellYtRequest$inboundSchema;
131
+ /** @deprecated use `PendleSellYtRequest$outboundSchema` instead. */
132
+ export const outboundSchema = PendleSellYtRequest$outboundSchema;
133
+ /** @deprecated use `PendleSellYtRequest$Outbound` instead. */
134
+ export type Outbound = PendleSellYtRequest$Outbound;
135
+ }
136
+
137
+ export function pendleSellYtRequestToJSON(
138
+ pendleSellYtRequest: PendleSellYtRequest,
139
+ ): string {
140
+ return JSON.stringify(
141
+ PendleSellYtRequest$outboundSchema.parse(pendleSellYtRequest),
142
+ );
143
+ }
144
+
145
+ export function pendleSellYtRequestFromJSON(
146
+ jsonString: string,
147
+ ): SafeParseResult<PendleSellYtRequest, SDKValidationError> {
148
+ return safeParse(
149
+ jsonString,
150
+ (x) => PendleSellYtRequest$inboundSchema.parse(JSON.parse(x)),
151
+ `Failed to parse 'PendleSellYtRequest' from JSON`,
152
+ );
153
+ }
@@ -114,6 +114,30 @@ import {
114
114
  MulticallActionType$inboundSchema,
115
115
  MulticallActionType$outboundSchema,
116
116
  } from "./multicallactiontype.js";
117
+ import {
118
+ PendleBuyPtParams,
119
+ PendleBuyPtParams$inboundSchema,
120
+ PendleBuyPtParams$Outbound,
121
+ PendleBuyPtParams$outboundSchema,
122
+ } from "./pendlebuyptparams.js";
123
+ import {
124
+ PendleBuyYtParams,
125
+ PendleBuyYtParams$inboundSchema,
126
+ PendleBuyYtParams$Outbound,
127
+ PendleBuyYtParams$outboundSchema,
128
+ } from "./pendlebuyytparams.js";
129
+ import {
130
+ PendleSellPtParams,
131
+ PendleSellPtParams$inboundSchema,
132
+ PendleSellPtParams$Outbound,
133
+ PendleSellPtParams$outboundSchema,
134
+ } from "./pendlesellptparams.js";
135
+ import {
136
+ PendleSellYtParams,
137
+ PendleSellYtParams$inboundSchema,
138
+ PendleSellYtParams$Outbound,
139
+ PendleSellYtParams$outboundSchema,
140
+ } from "./pendlesellytparams.js";
117
141
  import {
118
142
  SkyBuyParams,
119
143
  SkyBuyParams$inboundSchema,
@@ -195,6 +219,10 @@ export type Body =
195
219
  | SkySellParams
196
220
  | SkyDepositParams
197
221
  | SkyWithdrawParams
222
+ | PendleBuyPtParams
223
+ | PendleSellPtParams
224
+ | PendleBuyYtParams
225
+ | PendleSellYtParams
198
226
  | AerodromeSlipstreamWithdrawLiquidityProvisionParams
199
227
  | UniswapWithdrawLiquidityProvisionParams
200
228
  | AaveSupplyParams
@@ -228,6 +256,10 @@ export type UserOperation = {
228
256
  | SkySellParams
229
257
  | SkyDepositParams
230
258
  | SkyWithdrawParams
259
+ | PendleBuyPtParams
260
+ | PendleSellPtParams
261
+ | PendleBuyYtParams
262
+ | PendleSellYtParams
231
263
  | AerodromeSlipstreamWithdrawLiquidityProvisionParams
232
264
  | UniswapWithdrawLiquidityProvisionParams
233
265
  | AaveSupplyParams
@@ -262,6 +294,10 @@ export const Body$inboundSchema: z.ZodType<Body, z.ZodTypeDef, unknown> = z
262
294
  SkySellParams$inboundSchema,
263
295
  SkyDepositParams$inboundSchema,
264
296
  SkyWithdrawParams$inboundSchema,
297
+ PendleBuyPtParams$inboundSchema,
298
+ PendleSellPtParams$inboundSchema,
299
+ PendleBuyYtParams$inboundSchema,
300
+ PendleSellYtParams$inboundSchema,
265
301
  AerodromeSlipstreamWithdrawLiquidityProvisionParams$inboundSchema,
266
302
  UniswapWithdrawLiquidityProvisionParams$inboundSchema,
267
303
  AaveSupplyParams$inboundSchema,
@@ -295,6 +331,10 @@ export type Body$Outbound =
295
331
  | SkySellParams$Outbound
296
332
  | SkyDepositParams$Outbound
297
333
  | SkyWithdrawParams$Outbound
334
+ | PendleBuyPtParams$Outbound
335
+ | PendleSellPtParams$Outbound
336
+ | PendleBuyYtParams$Outbound
337
+ | PendleSellYtParams$Outbound
298
338
  | AerodromeSlipstreamWithdrawLiquidityProvisionParams$Outbound
299
339
  | UniswapWithdrawLiquidityProvisionParams$Outbound
300
340
  | AaveSupplyParams$Outbound
@@ -328,6 +368,10 @@ export const Body$outboundSchema: z.ZodType<Body$Outbound, z.ZodTypeDef, Body> =
328
368
  SkySellParams$outboundSchema,
329
369
  SkyDepositParams$outboundSchema,
330
370
  SkyWithdrawParams$outboundSchema,
371
+ PendleBuyPtParams$outboundSchema,
372
+ PendleSellPtParams$outboundSchema,
373
+ PendleBuyYtParams$outboundSchema,
374
+ PendleSellYtParams$outboundSchema,
331
375
  AerodromeSlipstreamWithdrawLiquidityProvisionParams$outboundSchema,
332
376
  UniswapWithdrawLiquidityProvisionParams$outboundSchema,
333
377
  AaveSupplyParams$outboundSchema,
@@ -394,6 +438,10 @@ export const UserOperation$inboundSchema: z.ZodType<
394
438
  SkySellParams$inboundSchema,
395
439
  SkyDepositParams$inboundSchema,
396
440
  SkyWithdrawParams$inboundSchema,
441
+ PendleBuyPtParams$inboundSchema,
442
+ PendleSellPtParams$inboundSchema,
443
+ PendleBuyYtParams$inboundSchema,
444
+ PendleSellYtParams$inboundSchema,
397
445
  AerodromeSlipstreamWithdrawLiquidityProvisionParams$inboundSchema,
398
446
  UniswapWithdrawLiquidityProvisionParams$inboundSchema,
399
447
  AaveSupplyParams$inboundSchema,
@@ -434,6 +482,10 @@ export type UserOperation$Outbound = {
434
482
  | SkySellParams$Outbound
435
483
  | SkyDepositParams$Outbound
436
484
  | SkyWithdrawParams$Outbound
485
+ | PendleBuyPtParams$Outbound
486
+ | PendleSellPtParams$Outbound
487
+ | PendleBuyYtParams$Outbound
488
+ | PendleSellYtParams$Outbound
437
489
  | AerodromeSlipstreamWithdrawLiquidityProvisionParams$Outbound
438
490
  | UniswapWithdrawLiquidityProvisionParams$Outbound
439
491
  | AaveSupplyParams$Outbound
@@ -473,6 +525,10 @@ export const UserOperation$outboundSchema: z.ZodType<
473
525
  SkySellParams$outboundSchema,
474
526
  SkyDepositParams$outboundSchema,
475
527
  SkyWithdrawParams$outboundSchema,
528
+ PendleBuyPtParams$outboundSchema,
529
+ PendleSellPtParams$outboundSchema,
530
+ PendleBuyYtParams$outboundSchema,
531
+ PendleSellYtParams$outboundSchema,
476
532
  AerodromeSlipstreamWithdrawLiquidityProvisionParams$outboundSchema,
477
533
  UniswapWithdrawLiquidityProvisionParams$outboundSchema,
478
534
  AaveSupplyParams$outboundSchema,