@compass-labs/api-sdk 0.5.2 → 0.5.4

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 (111) hide show
  1. package/README.md +2 -0
  2. package/bin/mcp-server.js +448 -261
  3. package/bin/mcp-server.js.map +14 -10
  4. package/dist/commonjs/funcs/pendleRedeemYield.d.ts +17 -0
  5. package/dist/commonjs/funcs/pendleRedeemYield.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/pendleRedeemYield.js +118 -0
  7. package/dist/commonjs/funcs/pendleRedeemYield.js.map +1 -0
  8. package/dist/commonjs/index.d.ts +2 -0
  9. package/dist/commonjs/index.d.ts.map +1 -1
  10. package/dist/commonjs/index.js +3 -1
  11. package/dist/commonjs/index.js.map +1 -1
  12. package/dist/commonjs/lib/config.d.ts +3 -3
  13. package/dist/commonjs/lib/config.js +3 -3
  14. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  15. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  16. package/dist/commonjs/mcp-server/server.js +3 -1
  17. package/dist/commonjs/mcp-server/server.js.map +1 -1
  18. package/dist/commonjs/mcp-server/tools/pendleRedeemYield.d.ts +8 -0
  19. package/dist/commonjs/mcp-server/tools/pendleRedeemYield.d.ts.map +1 -0
  20. package/dist/commonjs/mcp-server/tools/pendleRedeemYield.js +64 -0
  21. package/dist/commonjs/mcp-server/tools/pendleRedeemYield.js.map +1 -0
  22. package/dist/commonjs/models/components/index.d.ts +2 -0
  23. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  24. package/dist/commonjs/models/components/index.js +2 -0
  25. package/dist/commonjs/models/components/index.js.map +1 -1
  26. package/dist/commonjs/models/components/pendleredeemyieldparams.d.ts +34 -0
  27. package/dist/commonjs/models/components/pendleredeemyieldparams.d.ts.map +1 -0
  28. package/dist/commonjs/models/components/pendleredeemyieldparams.js +82 -0
  29. package/dist/commonjs/models/components/pendleredeemyieldparams.js.map +1 -0
  30. package/dist/commonjs/models/components/pendleredeemyieldrequest.d.ts +45 -0
  31. package/dist/commonjs/models/components/pendleredeemyieldrequest.d.ts.map +1 -0
  32. package/dist/commonjs/models/components/pendleredeemyieldrequest.js +87 -0
  33. package/dist/commonjs/models/components/pendleredeemyieldrequest.js.map +1 -0
  34. package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionparams.d.ts +2 -2
  35. package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionparams.d.ts.map +1 -1
  36. package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionparams.js +2 -2
  37. package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionparams.js.map +1 -1
  38. package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionrequest.d.ts +2 -2
  39. package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionrequest.d.ts.map +1 -1
  40. package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionrequest.js +2 -2
  41. package/dist/commonjs/models/components/uniswapincreaseliquidityprovisionrequest.js.map +1 -1
  42. package/dist/commonjs/models/components/useroperation.d.ts +35 -188
  43. package/dist/commonjs/models/components/useroperation.d.ts.map +1 -1
  44. package/dist/commonjs/models/components/useroperation.js +39 -24
  45. package/dist/commonjs/models/components/useroperation.js.map +1 -1
  46. package/dist/commonjs/sdk/pendle.d.ts +7 -0
  47. package/dist/commonjs/sdk/pendle.d.ts.map +1 -1
  48. package/dist/commonjs/sdk/pendle.js +10 -0
  49. package/dist/commonjs/sdk/pendle.js.map +1 -1
  50. package/dist/esm/funcs/pendleRedeemYield.d.ts +17 -0
  51. package/dist/esm/funcs/pendleRedeemYield.d.ts.map +1 -0
  52. package/dist/esm/funcs/pendleRedeemYield.js +82 -0
  53. package/dist/esm/funcs/pendleRedeemYield.js.map +1 -0
  54. package/dist/esm/index.d.ts +2 -0
  55. package/dist/esm/index.d.ts.map +1 -1
  56. package/dist/esm/index.js +1 -0
  57. package/dist/esm/index.js.map +1 -1
  58. package/dist/esm/lib/config.d.ts +3 -3
  59. package/dist/esm/lib/config.js +3 -3
  60. package/dist/esm/mcp-server/mcp-server.js +1 -1
  61. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  62. package/dist/esm/mcp-server/server.js +3 -1
  63. package/dist/esm/mcp-server/server.js.map +1 -1
  64. package/dist/esm/mcp-server/tools/pendleRedeemYield.d.ts +8 -0
  65. package/dist/esm/mcp-server/tools/pendleRedeemYield.d.ts.map +1 -0
  66. package/dist/esm/mcp-server/tools/pendleRedeemYield.js +28 -0
  67. package/dist/esm/mcp-server/tools/pendleRedeemYield.js.map +1 -0
  68. package/dist/esm/models/components/index.d.ts +2 -0
  69. package/dist/esm/models/components/index.d.ts.map +1 -1
  70. package/dist/esm/models/components/index.js +2 -0
  71. package/dist/esm/models/components/index.js.map +1 -1
  72. package/dist/esm/models/components/pendleredeemyieldparams.d.ts +34 -0
  73. package/dist/esm/models/components/pendleredeemyieldparams.d.ts.map +1 -0
  74. package/dist/esm/models/components/pendleredeemyieldparams.js +44 -0
  75. package/dist/esm/models/components/pendleredeemyieldparams.js.map +1 -0
  76. package/dist/esm/models/components/pendleredeemyieldrequest.d.ts +45 -0
  77. package/dist/esm/models/components/pendleredeemyieldrequest.d.ts.map +1 -0
  78. package/dist/esm/models/components/pendleredeemyieldrequest.js +49 -0
  79. package/dist/esm/models/components/pendleredeemyieldrequest.js.map +1 -0
  80. package/dist/esm/models/components/uniswapincreaseliquidityprovisionparams.d.ts +2 -2
  81. package/dist/esm/models/components/uniswapincreaseliquidityprovisionparams.d.ts.map +1 -1
  82. package/dist/esm/models/components/uniswapincreaseliquidityprovisionparams.js +2 -2
  83. package/dist/esm/models/components/uniswapincreaseliquidityprovisionparams.js.map +1 -1
  84. package/dist/esm/models/components/uniswapincreaseliquidityprovisionrequest.d.ts +2 -2
  85. package/dist/esm/models/components/uniswapincreaseliquidityprovisionrequest.d.ts.map +1 -1
  86. package/dist/esm/models/components/uniswapincreaseliquidityprovisionrequest.js +2 -2
  87. package/dist/esm/models/components/uniswapincreaseliquidityprovisionrequest.js.map +1 -1
  88. package/dist/esm/models/components/useroperation.d.ts +35 -188
  89. package/dist/esm/models/components/useroperation.d.ts.map +1 -1
  90. package/dist/esm/models/components/useroperation.js +39 -24
  91. package/dist/esm/models/components/useroperation.js.map +1 -1
  92. package/dist/esm/sdk/pendle.d.ts +7 -0
  93. package/dist/esm/sdk/pendle.d.ts.map +1 -1
  94. package/dist/esm/sdk/pendle.js +10 -0
  95. package/dist/esm/sdk/pendle.js.map +1 -1
  96. package/docs/sdks/pendle/README.md +82 -0
  97. package/jsr.json +1 -1
  98. package/package.json +1 -1
  99. package/src/funcs/pendleRedeemYield.ts +165 -0
  100. package/src/index.ts +2 -0
  101. package/src/lib/config.ts +3 -3
  102. package/src/mcp-server/mcp-server.ts +1 -1
  103. package/src/mcp-server/server.ts +3 -1
  104. package/src/mcp-server/tools/pendleRedeemYield.ts +37 -0
  105. package/src/models/components/index.ts +2 -0
  106. package/src/models/components/pendleredeemyieldparams.ts +86 -0
  107. package/src/models/components/pendleredeemyieldrequest.ts +101 -0
  108. package/src/models/components/uniswapincreaseliquidityprovisionparams.ts +6 -6
  109. package/src/models/components/uniswapincreaseliquidityprovisionrequest.ts +6 -6
  110. package/src/models/components/useroperation.ts +104 -54
  111. package/src/sdk/pendle.ts +18 -0
@@ -0,0 +1,86 @@
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
+ export type PendleRedeemYieldParams = {
12
+ actionType?: "PENDLE_REDEEM_YIELD" | undefined;
13
+ /**
14
+ * The address of the market identifying which Yield Token (YT) you would like to claim yield from.
15
+ */
16
+ marketAddress: string;
17
+ };
18
+
19
+ /** @internal */
20
+ export const PendleRedeemYieldParams$inboundSchema: z.ZodType<
21
+ PendleRedeemYieldParams,
22
+ z.ZodTypeDef,
23
+ unknown
24
+ > = z.object({
25
+ action_type: z.literal("PENDLE_REDEEM_YIELD").default("PENDLE_REDEEM_YIELD"),
26
+ market_address: z.string(),
27
+ }).transform((v) => {
28
+ return remap$(v, {
29
+ "action_type": "actionType",
30
+ "market_address": "marketAddress",
31
+ });
32
+ });
33
+
34
+ /** @internal */
35
+ export type PendleRedeemYieldParams$Outbound = {
36
+ action_type: "PENDLE_REDEEM_YIELD";
37
+ market_address: string;
38
+ };
39
+
40
+ /** @internal */
41
+ export const PendleRedeemYieldParams$outboundSchema: z.ZodType<
42
+ PendleRedeemYieldParams$Outbound,
43
+ z.ZodTypeDef,
44
+ PendleRedeemYieldParams
45
+ > = z.object({
46
+ actionType: z.literal("PENDLE_REDEEM_YIELD").default(
47
+ "PENDLE_REDEEM_YIELD" as const,
48
+ ),
49
+ marketAddress: z.string(),
50
+ }).transform((v) => {
51
+ return remap$(v, {
52
+ actionType: "action_type",
53
+ marketAddress: "market_address",
54
+ });
55
+ });
56
+
57
+ /**
58
+ * @internal
59
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
60
+ */
61
+ export namespace PendleRedeemYieldParams$ {
62
+ /** @deprecated use `PendleRedeemYieldParams$inboundSchema` instead. */
63
+ export const inboundSchema = PendleRedeemYieldParams$inboundSchema;
64
+ /** @deprecated use `PendleRedeemYieldParams$outboundSchema` instead. */
65
+ export const outboundSchema = PendleRedeemYieldParams$outboundSchema;
66
+ /** @deprecated use `PendleRedeemYieldParams$Outbound` instead. */
67
+ export type Outbound = PendleRedeemYieldParams$Outbound;
68
+ }
69
+
70
+ export function pendleRedeemYieldParamsToJSON(
71
+ pendleRedeemYieldParams: PendleRedeemYieldParams,
72
+ ): string {
73
+ return JSON.stringify(
74
+ PendleRedeemYieldParams$outboundSchema.parse(pendleRedeemYieldParams),
75
+ );
76
+ }
77
+
78
+ export function pendleRedeemYieldParamsFromJSON(
79
+ jsonString: string,
80
+ ): SafeParseResult<PendleRedeemYieldParams, SDKValidationError> {
81
+ return safeParse(
82
+ jsonString,
83
+ (x) => PendleRedeemYieldParams$inboundSchema.parse(JSON.parse(x)),
84
+ `Failed to parse 'PendleRedeemYieldParams' from JSON`,
85
+ );
86
+ }
@@ -0,0 +1,101 @@
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
+ export type PendleRedeemYieldRequest = {
13
+ actionType?: "PENDLE_REDEEM_YIELD" | undefined;
14
+ /**
15
+ * The address of the market identifying which Yield Token (YT) you would like to claim yield from.
16
+ */
17
+ marketAddress: string;
18
+ /**
19
+ * The chain to use.
20
+ */
21
+ chain: Chain;
22
+ /**
23
+ * The address of the transaction sender.
24
+ */
25
+ sender: string;
26
+ };
27
+
28
+ /** @internal */
29
+ export const PendleRedeemYieldRequest$inboundSchema: z.ZodType<
30
+ PendleRedeemYieldRequest,
31
+ z.ZodTypeDef,
32
+ unknown
33
+ > = z.object({
34
+ action_type: z.literal("PENDLE_REDEEM_YIELD").default("PENDLE_REDEEM_YIELD"),
35
+ market_address: z.string(),
36
+ chain: Chain$inboundSchema,
37
+ sender: z.string(),
38
+ }).transform((v) => {
39
+ return remap$(v, {
40
+ "action_type": "actionType",
41
+ "market_address": "marketAddress",
42
+ });
43
+ });
44
+
45
+ /** @internal */
46
+ export type PendleRedeemYieldRequest$Outbound = {
47
+ action_type: "PENDLE_REDEEM_YIELD";
48
+ market_address: string;
49
+ chain: string;
50
+ sender: string;
51
+ };
52
+
53
+ /** @internal */
54
+ export const PendleRedeemYieldRequest$outboundSchema: z.ZodType<
55
+ PendleRedeemYieldRequest$Outbound,
56
+ z.ZodTypeDef,
57
+ PendleRedeemYieldRequest
58
+ > = z.object({
59
+ actionType: z.literal("PENDLE_REDEEM_YIELD").default(
60
+ "PENDLE_REDEEM_YIELD" as const,
61
+ ),
62
+ marketAddress: z.string(),
63
+ chain: Chain$outboundSchema,
64
+ sender: z.string(),
65
+ }).transform((v) => {
66
+ return remap$(v, {
67
+ actionType: "action_type",
68
+ marketAddress: "market_address",
69
+ });
70
+ });
71
+
72
+ /**
73
+ * @internal
74
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
75
+ */
76
+ export namespace PendleRedeemYieldRequest$ {
77
+ /** @deprecated use `PendleRedeemYieldRequest$inboundSchema` instead. */
78
+ export const inboundSchema = PendleRedeemYieldRequest$inboundSchema;
79
+ /** @deprecated use `PendleRedeemYieldRequest$outboundSchema` instead. */
80
+ export const outboundSchema = PendleRedeemYieldRequest$outboundSchema;
81
+ /** @deprecated use `PendleRedeemYieldRequest$Outbound` instead. */
82
+ export type Outbound = PendleRedeemYieldRequest$Outbound;
83
+ }
84
+
85
+ export function pendleRedeemYieldRequestToJSON(
86
+ pendleRedeemYieldRequest: PendleRedeemYieldRequest,
87
+ ): string {
88
+ return JSON.stringify(
89
+ PendleRedeemYieldRequest$outboundSchema.parse(pendleRedeemYieldRequest),
90
+ );
91
+ }
92
+
93
+ export function pendleRedeemYieldRequestFromJSON(
94
+ jsonString: string,
95
+ ): SafeParseResult<PendleRedeemYieldRequest, SDKValidationError> {
96
+ return safeParse(
97
+ jsonString,
98
+ (x) => PendleRedeemYieldRequest$inboundSchema.parse(JSON.parse(x)),
99
+ `Failed to parse 'PendleRedeemYieldRequest' from JSON`,
100
+ );
101
+ }
@@ -33,7 +33,7 @@ export type UniswapIncreaseLiquidityProvisionParamsAmount0Min = number | string;
33
33
  export type UniswapIncreaseLiquidityProvisionParamsAmount1Min = number | string;
34
34
 
35
35
  export type UniswapIncreaseLiquidityProvisionParams = {
36
- actionType?: "UNISWAP_INCREASE_LIQUIDITY_PROVISION" | undefined;
36
+ actionType?: "UNISWAP_ADD_LIQUIDITY" | undefined;
37
37
  /**
38
38
  * Token ID of the NFT representing the liquidity provisioned position.
39
39
  */
@@ -318,8 +318,8 @@ export const UniswapIncreaseLiquidityProvisionParams$inboundSchema: z.ZodType<
318
318
  z.ZodTypeDef,
319
319
  unknown
320
320
  > = z.object({
321
- action_type: z.literal("UNISWAP_INCREASE_LIQUIDITY_PROVISION").default(
322
- "UNISWAP_INCREASE_LIQUIDITY_PROVISION",
321
+ action_type: z.literal("UNISWAP_ADD_LIQUIDITY").default(
322
+ "UNISWAP_ADD_LIQUIDITY",
323
323
  ),
324
324
  token_id: z.number().int(),
325
325
  amount0_desired: z.union([z.number(), z.string()]),
@@ -339,7 +339,7 @@ export const UniswapIncreaseLiquidityProvisionParams$inboundSchema: z.ZodType<
339
339
 
340
340
  /** @internal */
341
341
  export type UniswapIncreaseLiquidityProvisionParams$Outbound = {
342
- action_type: "UNISWAP_INCREASE_LIQUIDITY_PROVISION";
342
+ action_type: "UNISWAP_ADD_LIQUIDITY";
343
343
  token_id: number;
344
344
  amount0_desired: number | string;
345
345
  amount1_desired: number | string;
@@ -353,8 +353,8 @@ export const UniswapIncreaseLiquidityProvisionParams$outboundSchema: z.ZodType<
353
353
  z.ZodTypeDef,
354
354
  UniswapIncreaseLiquidityProvisionParams
355
355
  > = z.object({
356
- actionType: z.literal("UNISWAP_INCREASE_LIQUIDITY_PROVISION").default(
357
- "UNISWAP_INCREASE_LIQUIDITY_PROVISION" as const,
356
+ actionType: z.literal("UNISWAP_ADD_LIQUIDITY").default(
357
+ "UNISWAP_ADD_LIQUIDITY" as const,
358
358
  ),
359
359
  tokenId: z.number().int(),
360
360
  amount0Desired: z.union([z.number(), z.string()]),
@@ -41,7 +41,7 @@ export type UniswapIncreaseLiquidityProvisionRequestAmount1Min =
41
41
  * Request model for increasing liquidity provision in Uniswap V3.
42
42
  */
43
43
  export type UniswapIncreaseLiquidityProvisionRequest = {
44
- actionType?: "UNISWAP_INCREASE_LIQUIDITY_PROVISION" | undefined;
44
+ actionType?: "UNISWAP_ADD_LIQUIDITY" | undefined;
45
45
  /**
46
46
  * Token ID of the NFT representing the liquidity provisioned position.
47
47
  */
@@ -332,8 +332,8 @@ export const UniswapIncreaseLiquidityProvisionRequest$inboundSchema: z.ZodType<
332
332
  z.ZodTypeDef,
333
333
  unknown
334
334
  > = z.object({
335
- action_type: z.literal("UNISWAP_INCREASE_LIQUIDITY_PROVISION").default(
336
- "UNISWAP_INCREASE_LIQUIDITY_PROVISION",
335
+ action_type: z.literal("UNISWAP_ADD_LIQUIDITY").default(
336
+ "UNISWAP_ADD_LIQUIDITY",
337
337
  ),
338
338
  token_id: z.number().int(),
339
339
  amount0_desired: z.union([z.number(), z.string()]),
@@ -355,7 +355,7 @@ export const UniswapIncreaseLiquidityProvisionRequest$inboundSchema: z.ZodType<
355
355
 
356
356
  /** @internal */
357
357
  export type UniswapIncreaseLiquidityProvisionRequest$Outbound = {
358
- action_type: "UNISWAP_INCREASE_LIQUIDITY_PROVISION";
358
+ action_type: "UNISWAP_ADD_LIQUIDITY";
359
359
  token_id: number;
360
360
  amount0_desired: number | string;
361
361
  amount1_desired: number | string;
@@ -371,8 +371,8 @@ export const UniswapIncreaseLiquidityProvisionRequest$outboundSchema: z.ZodType<
371
371
  z.ZodTypeDef,
372
372
  UniswapIncreaseLiquidityProvisionRequest
373
373
  > = z.object({
374
- actionType: z.literal("UNISWAP_INCREASE_LIQUIDITY_PROVISION").default(
375
- "UNISWAP_INCREASE_LIQUIDITY_PROVISION" as const,
374
+ actionType: z.literal("UNISWAP_ADD_LIQUIDITY").default(
375
+ "UNISWAP_ADD_LIQUIDITY" as const,
376
376
  ),
377
377
  tokenId: z.number().int(),
378
378
  amount0Desired: z.union([z.number(), z.string()]),