@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.
- package/README.md +8 -0
- package/bin/mcp-server.js +1044 -308
- package/bin/mcp-server.js.map +25 -9
- package/dist/commonjs/funcs/pendleBuyPt.d.ts +17 -0
- package/dist/commonjs/funcs/pendleBuyPt.d.ts.map +1 -0
- package/dist/commonjs/funcs/pendleBuyPt.js +118 -0
- package/dist/commonjs/funcs/pendleBuyPt.js.map +1 -0
- package/dist/commonjs/funcs/pendleBuyYt.d.ts +17 -0
- package/dist/commonjs/funcs/pendleBuyYt.d.ts.map +1 -0
- package/dist/commonjs/funcs/pendleBuyYt.js +118 -0
- package/dist/commonjs/funcs/pendleBuyYt.js.map +1 -0
- package/dist/commonjs/funcs/pendleSellPt.d.ts +17 -0
- package/dist/commonjs/funcs/pendleSellPt.d.ts.map +1 -0
- package/dist/commonjs/funcs/pendleSellPt.js +118 -0
- package/dist/commonjs/funcs/pendleSellPt.js.map +1 -0
- package/dist/commonjs/funcs/pendleSellYt.d.ts +17 -0
- package/dist/commonjs/funcs/pendleSellYt.d.ts.map +1 -0
- package/dist/commonjs/funcs/pendleSellYt.js +118 -0
- package/dist/commonjs/funcs/pendleSellYt.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +9 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/pendleBuyPt.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/pendleBuyPt.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/pendleBuyPt.js +64 -0
- package/dist/commonjs/mcp-server/tools/pendleBuyPt.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/pendleBuyYt.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/pendleBuyYt.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/pendleBuyYt.js +64 -0
- package/dist/commonjs/mcp-server/tools/pendleBuyYt.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/pendleSellPt.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/pendleSellPt.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/pendleSellPt.js +64 -0
- package/dist/commonjs/mcp-server/tools/pendleSellPt.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/pendleSellYt.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/pendleSellYt.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/pendleSellYt.js +64 -0
- package/dist/commonjs/mcp-server/tools/pendleSellYt.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +8 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +8 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/multicallactiontype.d.ts +12 -0
- package/dist/commonjs/models/components/multicallactiontype.d.ts.map +1 -1
- package/dist/commonjs/models/components/multicallactiontype.js +4 -0
- package/dist/commonjs/models/components/multicallactiontype.js.map +1 -1
- package/dist/commonjs/models/components/pendlebuyptparams.d.ts +61 -0
- package/dist/commonjs/models/components/pendlebuyptparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/pendlebuyptparams.js +103 -0
- package/dist/commonjs/models/components/pendlebuyptparams.js.map +1 -0
- package/dist/commonjs/models/components/pendlebuyptrequest.d.ts +72 -0
- package/dist/commonjs/models/components/pendlebuyptrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/pendlebuyptrequest.js +108 -0
- package/dist/commonjs/models/components/pendlebuyptrequest.js.map +1 -0
- package/dist/commonjs/models/components/pendlebuyytparams.d.ts +61 -0
- package/dist/commonjs/models/components/pendlebuyytparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/pendlebuyytparams.js +103 -0
- package/dist/commonjs/models/components/pendlebuyytparams.js.map +1 -0
- package/dist/commonjs/models/components/pendlebuyytrequest.d.ts +72 -0
- package/dist/commonjs/models/components/pendlebuyytrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/pendlebuyytrequest.js +108 -0
- package/dist/commonjs/models/components/pendlebuyytrequest.js.map +1 -0
- package/dist/commonjs/models/components/pendlesellptparams.d.ts +61 -0
- package/dist/commonjs/models/components/pendlesellptparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/pendlesellptparams.js +103 -0
- package/dist/commonjs/models/components/pendlesellptparams.js.map +1 -0
- package/dist/commonjs/models/components/pendlesellptrequest.d.ts +72 -0
- package/dist/commonjs/models/components/pendlesellptrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/pendlesellptrequest.js +108 -0
- package/dist/commonjs/models/components/pendlesellptrequest.js.map +1 -0
- package/dist/commonjs/models/components/pendlesellytparams.d.ts +61 -0
- package/dist/commonjs/models/components/pendlesellytparams.d.ts.map +1 -0
- package/dist/commonjs/models/components/pendlesellytparams.js +103 -0
- package/dist/commonjs/models/components/pendlesellytparams.js.map +1 -0
- package/dist/commonjs/models/components/pendlesellytrequest.d.ts +72 -0
- package/dist/commonjs/models/components/pendlesellytrequest.d.ts.map +1 -0
- package/dist/commonjs/models/components/pendlesellytrequest.js +108 -0
- package/dist/commonjs/models/components/pendlesellytrequest.js.map +1 -0
- package/dist/commonjs/models/components/useroperation.d.ts +8 -4
- package/dist/commonjs/models/components/useroperation.d.ts.map +1 -1
- package/dist/commonjs/models/components/useroperation.js +20 -0
- package/dist/commonjs/models/components/useroperation.js.map +1 -1
- package/dist/commonjs/sdk/pendle.d.ts +28 -0
- package/dist/commonjs/sdk/pendle.d.ts.map +1 -1
- package/dist/commonjs/sdk/pendle.js +40 -0
- package/dist/commonjs/sdk/pendle.js.map +1 -1
- package/dist/esm/funcs/pendleBuyPt.d.ts +17 -0
- package/dist/esm/funcs/pendleBuyPt.d.ts.map +1 -0
- package/dist/esm/funcs/pendleBuyPt.js +82 -0
- package/dist/esm/funcs/pendleBuyPt.js.map +1 -0
- package/dist/esm/funcs/pendleBuyYt.d.ts +17 -0
- package/dist/esm/funcs/pendleBuyYt.d.ts.map +1 -0
- package/dist/esm/funcs/pendleBuyYt.js +82 -0
- package/dist/esm/funcs/pendleBuyYt.js.map +1 -0
- package/dist/esm/funcs/pendleSellPt.d.ts +17 -0
- package/dist/esm/funcs/pendleSellPt.d.ts.map +1 -0
- package/dist/esm/funcs/pendleSellPt.js +82 -0
- package/dist/esm/funcs/pendleSellPt.js.map +1 -0
- package/dist/esm/funcs/pendleSellYt.d.ts +17 -0
- package/dist/esm/funcs/pendleSellYt.d.ts.map +1 -0
- package/dist/esm/funcs/pendleSellYt.js +82 -0
- package/dist/esm/funcs/pendleSellYt.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +9 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/pendleBuyPt.d.ts +8 -0
- package/dist/esm/mcp-server/tools/pendleBuyPt.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/pendleBuyPt.js +28 -0
- package/dist/esm/mcp-server/tools/pendleBuyPt.js.map +1 -0
- package/dist/esm/mcp-server/tools/pendleBuyYt.d.ts +8 -0
- package/dist/esm/mcp-server/tools/pendleBuyYt.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/pendleBuyYt.js +28 -0
- package/dist/esm/mcp-server/tools/pendleBuyYt.js.map +1 -0
- package/dist/esm/mcp-server/tools/pendleSellPt.d.ts +8 -0
- package/dist/esm/mcp-server/tools/pendleSellPt.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/pendleSellPt.js +28 -0
- package/dist/esm/mcp-server/tools/pendleSellPt.js.map +1 -0
- package/dist/esm/mcp-server/tools/pendleSellYt.d.ts +8 -0
- package/dist/esm/mcp-server/tools/pendleSellYt.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/pendleSellYt.js +28 -0
- package/dist/esm/mcp-server/tools/pendleSellYt.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +8 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +8 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/multicallactiontype.d.ts +12 -0
- package/dist/esm/models/components/multicallactiontype.d.ts.map +1 -1
- package/dist/esm/models/components/multicallactiontype.js +4 -0
- package/dist/esm/models/components/multicallactiontype.js.map +1 -1
- package/dist/esm/models/components/pendlebuyptparams.d.ts +61 -0
- package/dist/esm/models/components/pendlebuyptparams.d.ts.map +1 -0
- package/dist/esm/models/components/pendlebuyptparams.js +63 -0
- package/dist/esm/models/components/pendlebuyptparams.js.map +1 -0
- package/dist/esm/models/components/pendlebuyptrequest.d.ts +72 -0
- package/dist/esm/models/components/pendlebuyptrequest.d.ts.map +1 -0
- package/dist/esm/models/components/pendlebuyptrequest.js +68 -0
- package/dist/esm/models/components/pendlebuyptrequest.js.map +1 -0
- package/dist/esm/models/components/pendlebuyytparams.d.ts +61 -0
- package/dist/esm/models/components/pendlebuyytparams.d.ts.map +1 -0
- package/dist/esm/models/components/pendlebuyytparams.js +63 -0
- package/dist/esm/models/components/pendlebuyytparams.js.map +1 -0
- package/dist/esm/models/components/pendlebuyytrequest.d.ts +72 -0
- package/dist/esm/models/components/pendlebuyytrequest.d.ts.map +1 -0
- package/dist/esm/models/components/pendlebuyytrequest.js +68 -0
- package/dist/esm/models/components/pendlebuyytrequest.js.map +1 -0
- package/dist/esm/models/components/pendlesellptparams.d.ts +61 -0
- package/dist/esm/models/components/pendlesellptparams.d.ts.map +1 -0
- package/dist/esm/models/components/pendlesellptparams.js +63 -0
- package/dist/esm/models/components/pendlesellptparams.js.map +1 -0
- package/dist/esm/models/components/pendlesellptrequest.d.ts +72 -0
- package/dist/esm/models/components/pendlesellptrequest.d.ts.map +1 -0
- package/dist/esm/models/components/pendlesellptrequest.js +68 -0
- package/dist/esm/models/components/pendlesellptrequest.js.map +1 -0
- package/dist/esm/models/components/pendlesellytparams.d.ts +61 -0
- package/dist/esm/models/components/pendlesellytparams.d.ts.map +1 -0
- package/dist/esm/models/components/pendlesellytparams.js +63 -0
- package/dist/esm/models/components/pendlesellytparams.js.map +1 -0
- package/dist/esm/models/components/pendlesellytrequest.d.ts +72 -0
- package/dist/esm/models/components/pendlesellytrequest.d.ts.map +1 -0
- package/dist/esm/models/components/pendlesellytrequest.js +68 -0
- package/dist/esm/models/components/pendlesellytrequest.js.map +1 -0
- package/dist/esm/models/components/useroperation.d.ts +8 -4
- package/dist/esm/models/components/useroperation.d.ts.map +1 -1
- package/dist/esm/models/components/useroperation.js +20 -0
- package/dist/esm/models/components/useroperation.js.map +1 -1
- package/dist/esm/sdk/pendle.d.ts +28 -0
- package/dist/esm/sdk/pendle.d.ts.map +1 -1
- package/dist/esm/sdk/pendle.js +40 -0
- package/dist/esm/sdk/pendle.js.map +1 -1
- package/docs/sdks/pendle/README.md +336 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/pendleBuyPt.ts +165 -0
- package/src/funcs/pendleBuyYt.ts +165 -0
- package/src/funcs/pendleSellPt.ts +165 -0
- package/src/funcs/pendleSellYt.ts +165 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +9 -1
- package/src/mcp-server/tools/pendleBuyPt.ts +37 -0
- package/src/mcp-server/tools/pendleBuyYt.ts +37 -0
- package/src/mcp-server/tools/pendleSellPt.ts +37 -0
- package/src/mcp-server/tools/pendleSellYt.ts +37 -0
- package/src/models/components/index.ts +8 -0
- package/src/models/components/multicallactiontype.ts +4 -0
- package/src/models/components/pendlebuyptparams.ts +138 -0
- package/src/models/components/pendlebuyptrequest.ts +153 -0
- package/src/models/components/pendlebuyytparams.ts +138 -0
- package/src/models/components/pendlebuyytrequest.ts +153 -0
- package/src/models/components/pendlesellptparams.ts +138 -0
- package/src/models/components/pendlesellptrequest.ts +153 -0
- package/src/models/components/pendlesellytparams.ts +138 -0
- package/src/models/components/pendlesellytrequest.ts +153 -0
- package/src/models/components/useroperation.ts +56 -0
- package/src/sdk/pendle.ts +72 -0
|
@@ -98,11 +98,19 @@ export * from "./multicallauthorizationrequest.js";
|
|
|
98
98
|
export * from "./multicallauthorizationresponse.js";
|
|
99
99
|
export * from "./multicallexecuterequest.js";
|
|
100
100
|
export * from "./openposition.js";
|
|
101
|
+
export * from "./pendlebuyptparams.js";
|
|
102
|
+
export * from "./pendlebuyptrequest.js";
|
|
103
|
+
export * from "./pendlebuyytparams.js";
|
|
104
|
+
export * from "./pendlebuyytrequest.js";
|
|
101
105
|
export * from "./pendlegetmarketresponse.js";
|
|
102
106
|
export * from "./pendlegetuserpositionresponse.js";
|
|
103
107
|
export * from "./pendlelistmarketsresponse.js";
|
|
104
108
|
export * from "./pendlelistuserpositionsresponse.js";
|
|
105
109
|
export * from "./pendlemarket.js";
|
|
110
|
+
export * from "./pendlesellptparams.js";
|
|
111
|
+
export * from "./pendlesellptrequest.js";
|
|
112
|
+
export * from "./pendlesellytparams.js";
|
|
113
|
+
export * from "./pendlesellytrequest.js";
|
|
106
114
|
export * from "./portfolio.js";
|
|
107
115
|
export * from "./position.js";
|
|
108
116
|
export * from "./redeemunderlying.js";
|
|
@@ -25,6 +25,10 @@ export const MulticallActionType = {
|
|
|
25
25
|
MorphoSupplyCollateral: "MORPHO_SUPPLY_COLLATERAL",
|
|
26
26
|
MorphoWithdraw: "MORPHO_WITHDRAW",
|
|
27
27
|
MorphoWithdrawCollateral: "MORPHO_WITHDRAW_COLLATERAL",
|
|
28
|
+
PendleBuyPt: "PENDLE_BUY_PT",
|
|
29
|
+
PendleBuyYt: "PENDLE_BUY_YT",
|
|
30
|
+
PendleSellPt: "PENDLE_SELL_PT",
|
|
31
|
+
PendleSellYt: "PENDLE_SELL_YT",
|
|
28
32
|
SkyBuy: "SKY_BUY",
|
|
29
33
|
SkyDeposit: "SKY_DEPOSIT",
|
|
30
34
|
SkySell: "SKY_SELL",
|
|
@@ -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 Underlying Token you would like to sell for market's Principal Token (PT).
|
|
13
|
+
*/
|
|
14
|
+
export type PendleBuyPtParamsAmount = number | string;
|
|
15
|
+
|
|
16
|
+
export type PendleBuyPtParams = {
|
|
17
|
+
/**
|
|
18
|
+
* The address of the market identifying which Principal Token (PT) you would like to buy.
|
|
19
|
+
*/
|
|
20
|
+
marketAddress: string;
|
|
21
|
+
/**
|
|
22
|
+
* The amount of market's Underlying Token you would like to sell for market's Principal Token (PT).
|
|
23
|
+
*/
|
|
24
|
+
amount: number | string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const PendleBuyPtParamsAmount$inboundSchema: z.ZodType<
|
|
29
|
+
PendleBuyPtParamsAmount,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.union([z.number(), z.string()]);
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type PendleBuyPtParamsAmount$Outbound = number | string;
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const PendleBuyPtParamsAmount$outboundSchema: z.ZodType<
|
|
39
|
+
PendleBuyPtParamsAmount$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
PendleBuyPtParamsAmount
|
|
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 PendleBuyPtParamsAmount$ {
|
|
49
|
+
/** @deprecated use `PendleBuyPtParamsAmount$inboundSchema` instead. */
|
|
50
|
+
export const inboundSchema = PendleBuyPtParamsAmount$inboundSchema;
|
|
51
|
+
/** @deprecated use `PendleBuyPtParamsAmount$outboundSchema` instead. */
|
|
52
|
+
export const outboundSchema = PendleBuyPtParamsAmount$outboundSchema;
|
|
53
|
+
/** @deprecated use `PendleBuyPtParamsAmount$Outbound` instead. */
|
|
54
|
+
export type Outbound = PendleBuyPtParamsAmount$Outbound;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function pendleBuyPtParamsAmountToJSON(
|
|
58
|
+
pendleBuyPtParamsAmount: PendleBuyPtParamsAmount,
|
|
59
|
+
): string {
|
|
60
|
+
return JSON.stringify(
|
|
61
|
+
PendleBuyPtParamsAmount$outboundSchema.parse(pendleBuyPtParamsAmount),
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function pendleBuyPtParamsAmountFromJSON(
|
|
66
|
+
jsonString: string,
|
|
67
|
+
): SafeParseResult<PendleBuyPtParamsAmount, SDKValidationError> {
|
|
68
|
+
return safeParse(
|
|
69
|
+
jsonString,
|
|
70
|
+
(x) => PendleBuyPtParamsAmount$inboundSchema.parse(JSON.parse(x)),
|
|
71
|
+
`Failed to parse 'PendleBuyPtParamsAmount' from JSON`,
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const PendleBuyPtParams$inboundSchema: z.ZodType<
|
|
77
|
+
PendleBuyPtParams,
|
|
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 PendleBuyPtParams$Outbound = {
|
|
91
|
+
market_address: string;
|
|
92
|
+
amount: number | string;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/** @internal */
|
|
96
|
+
export const PendleBuyPtParams$outboundSchema: z.ZodType<
|
|
97
|
+
PendleBuyPtParams$Outbound,
|
|
98
|
+
z.ZodTypeDef,
|
|
99
|
+
PendleBuyPtParams
|
|
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 PendleBuyPtParams$ {
|
|
114
|
+
/** @deprecated use `PendleBuyPtParams$inboundSchema` instead. */
|
|
115
|
+
export const inboundSchema = PendleBuyPtParams$inboundSchema;
|
|
116
|
+
/** @deprecated use `PendleBuyPtParams$outboundSchema` instead. */
|
|
117
|
+
export const outboundSchema = PendleBuyPtParams$outboundSchema;
|
|
118
|
+
/** @deprecated use `PendleBuyPtParams$Outbound` instead. */
|
|
119
|
+
export type Outbound = PendleBuyPtParams$Outbound;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function pendleBuyPtParamsToJSON(
|
|
123
|
+
pendleBuyPtParams: PendleBuyPtParams,
|
|
124
|
+
): string {
|
|
125
|
+
return JSON.stringify(
|
|
126
|
+
PendleBuyPtParams$outboundSchema.parse(pendleBuyPtParams),
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function pendleBuyPtParamsFromJSON(
|
|
131
|
+
jsonString: string,
|
|
132
|
+
): SafeParseResult<PendleBuyPtParams, SDKValidationError> {
|
|
133
|
+
return safeParse(
|
|
134
|
+
jsonString,
|
|
135
|
+
(x) => PendleBuyPtParams$inboundSchema.parse(JSON.parse(x)),
|
|
136
|
+
`Failed to parse 'PendleBuyPtParams' 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 Underlying Token you would like to sell for market's Principal Token (PT).
|
|
14
|
+
*/
|
|
15
|
+
export type PendleBuyPtRequestAmount = number | string;
|
|
16
|
+
|
|
17
|
+
export type PendleBuyPtRequest = {
|
|
18
|
+
/**
|
|
19
|
+
* The address of the market identifying which Principal Token (PT) you would like to buy.
|
|
20
|
+
*/
|
|
21
|
+
marketAddress: string;
|
|
22
|
+
/**
|
|
23
|
+
* The amount of market's Underlying Token you would like to sell for market's Principal Token (PT).
|
|
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 PendleBuyPtRequestAmount$inboundSchema: z.ZodType<
|
|
38
|
+
PendleBuyPtRequestAmount,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
unknown
|
|
41
|
+
> = z.union([z.number(), z.string()]);
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export type PendleBuyPtRequestAmount$Outbound = number | string;
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const PendleBuyPtRequestAmount$outboundSchema: z.ZodType<
|
|
48
|
+
PendleBuyPtRequestAmount$Outbound,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
PendleBuyPtRequestAmount
|
|
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 PendleBuyPtRequestAmount$ {
|
|
58
|
+
/** @deprecated use `PendleBuyPtRequestAmount$inboundSchema` instead. */
|
|
59
|
+
export const inboundSchema = PendleBuyPtRequestAmount$inboundSchema;
|
|
60
|
+
/** @deprecated use `PendleBuyPtRequestAmount$outboundSchema` instead. */
|
|
61
|
+
export const outboundSchema = PendleBuyPtRequestAmount$outboundSchema;
|
|
62
|
+
/** @deprecated use `PendleBuyPtRequestAmount$Outbound` instead. */
|
|
63
|
+
export type Outbound = PendleBuyPtRequestAmount$Outbound;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function pendleBuyPtRequestAmountToJSON(
|
|
67
|
+
pendleBuyPtRequestAmount: PendleBuyPtRequestAmount,
|
|
68
|
+
): string {
|
|
69
|
+
return JSON.stringify(
|
|
70
|
+
PendleBuyPtRequestAmount$outboundSchema.parse(pendleBuyPtRequestAmount),
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function pendleBuyPtRequestAmountFromJSON(
|
|
75
|
+
jsonString: string,
|
|
76
|
+
): SafeParseResult<PendleBuyPtRequestAmount, SDKValidationError> {
|
|
77
|
+
return safeParse(
|
|
78
|
+
jsonString,
|
|
79
|
+
(x) => PendleBuyPtRequestAmount$inboundSchema.parse(JSON.parse(x)),
|
|
80
|
+
`Failed to parse 'PendleBuyPtRequestAmount' from JSON`,
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const PendleBuyPtRequest$inboundSchema: z.ZodType<
|
|
86
|
+
PendleBuyPtRequest,
|
|
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 PendleBuyPtRequest$Outbound = {
|
|
102
|
+
market_address: string;
|
|
103
|
+
amount: number | string;
|
|
104
|
+
chain: string;
|
|
105
|
+
sender: string;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
export const PendleBuyPtRequest$outboundSchema: z.ZodType<
|
|
110
|
+
PendleBuyPtRequest$Outbound,
|
|
111
|
+
z.ZodTypeDef,
|
|
112
|
+
PendleBuyPtRequest
|
|
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 PendleBuyPtRequest$ {
|
|
129
|
+
/** @deprecated use `PendleBuyPtRequest$inboundSchema` instead. */
|
|
130
|
+
export const inboundSchema = PendleBuyPtRequest$inboundSchema;
|
|
131
|
+
/** @deprecated use `PendleBuyPtRequest$outboundSchema` instead. */
|
|
132
|
+
export const outboundSchema = PendleBuyPtRequest$outboundSchema;
|
|
133
|
+
/** @deprecated use `PendleBuyPtRequest$Outbound` instead. */
|
|
134
|
+
export type Outbound = PendleBuyPtRequest$Outbound;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function pendleBuyPtRequestToJSON(
|
|
138
|
+
pendleBuyPtRequest: PendleBuyPtRequest,
|
|
139
|
+
): string {
|
|
140
|
+
return JSON.stringify(
|
|
141
|
+
PendleBuyPtRequest$outboundSchema.parse(pendleBuyPtRequest),
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function pendleBuyPtRequestFromJSON(
|
|
146
|
+
jsonString: string,
|
|
147
|
+
): SafeParseResult<PendleBuyPtRequest, SDKValidationError> {
|
|
148
|
+
return safeParse(
|
|
149
|
+
jsonString,
|
|
150
|
+
(x) => PendleBuyPtRequest$inboundSchema.parse(JSON.parse(x)),
|
|
151
|
+
`Failed to parse 'PendleBuyPtRequest' 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 Underlying Token you would like to sell for market's Yield Token (YT).
|
|
13
|
+
*/
|
|
14
|
+
export type PendleBuyYtParamsAmount = number | string;
|
|
15
|
+
|
|
16
|
+
export type PendleBuyYtParams = {
|
|
17
|
+
/**
|
|
18
|
+
* The address of the market identifying which Yield Token (YT) you would like to buy.
|
|
19
|
+
*/
|
|
20
|
+
marketAddress: string;
|
|
21
|
+
/**
|
|
22
|
+
* The amount of market's Underlying Token you would like to sell for market's Yield Token (YT).
|
|
23
|
+
*/
|
|
24
|
+
amount: number | string;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const PendleBuyYtParamsAmount$inboundSchema: z.ZodType<
|
|
29
|
+
PendleBuyYtParamsAmount,
|
|
30
|
+
z.ZodTypeDef,
|
|
31
|
+
unknown
|
|
32
|
+
> = z.union([z.number(), z.string()]);
|
|
33
|
+
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type PendleBuyYtParamsAmount$Outbound = number | string;
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const PendleBuyYtParamsAmount$outboundSchema: z.ZodType<
|
|
39
|
+
PendleBuyYtParamsAmount$Outbound,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
PendleBuyYtParamsAmount
|
|
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 PendleBuyYtParamsAmount$ {
|
|
49
|
+
/** @deprecated use `PendleBuyYtParamsAmount$inboundSchema` instead. */
|
|
50
|
+
export const inboundSchema = PendleBuyYtParamsAmount$inboundSchema;
|
|
51
|
+
/** @deprecated use `PendleBuyYtParamsAmount$outboundSchema` instead. */
|
|
52
|
+
export const outboundSchema = PendleBuyYtParamsAmount$outboundSchema;
|
|
53
|
+
/** @deprecated use `PendleBuyYtParamsAmount$Outbound` instead. */
|
|
54
|
+
export type Outbound = PendleBuyYtParamsAmount$Outbound;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function pendleBuyYtParamsAmountToJSON(
|
|
58
|
+
pendleBuyYtParamsAmount: PendleBuyYtParamsAmount,
|
|
59
|
+
): string {
|
|
60
|
+
return JSON.stringify(
|
|
61
|
+
PendleBuyYtParamsAmount$outboundSchema.parse(pendleBuyYtParamsAmount),
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function pendleBuyYtParamsAmountFromJSON(
|
|
66
|
+
jsonString: string,
|
|
67
|
+
): SafeParseResult<PendleBuyYtParamsAmount, SDKValidationError> {
|
|
68
|
+
return safeParse(
|
|
69
|
+
jsonString,
|
|
70
|
+
(x) => PendleBuyYtParamsAmount$inboundSchema.parse(JSON.parse(x)),
|
|
71
|
+
`Failed to parse 'PendleBuyYtParamsAmount' from JSON`,
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** @internal */
|
|
76
|
+
export const PendleBuyYtParams$inboundSchema: z.ZodType<
|
|
77
|
+
PendleBuyYtParams,
|
|
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 PendleBuyYtParams$Outbound = {
|
|
91
|
+
market_address: string;
|
|
92
|
+
amount: number | string;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/** @internal */
|
|
96
|
+
export const PendleBuyYtParams$outboundSchema: z.ZodType<
|
|
97
|
+
PendleBuyYtParams$Outbound,
|
|
98
|
+
z.ZodTypeDef,
|
|
99
|
+
PendleBuyYtParams
|
|
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 PendleBuyYtParams$ {
|
|
114
|
+
/** @deprecated use `PendleBuyYtParams$inboundSchema` instead. */
|
|
115
|
+
export const inboundSchema = PendleBuyYtParams$inboundSchema;
|
|
116
|
+
/** @deprecated use `PendleBuyYtParams$outboundSchema` instead. */
|
|
117
|
+
export const outboundSchema = PendleBuyYtParams$outboundSchema;
|
|
118
|
+
/** @deprecated use `PendleBuyYtParams$Outbound` instead. */
|
|
119
|
+
export type Outbound = PendleBuyYtParams$Outbound;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function pendleBuyYtParamsToJSON(
|
|
123
|
+
pendleBuyYtParams: PendleBuyYtParams,
|
|
124
|
+
): string {
|
|
125
|
+
return JSON.stringify(
|
|
126
|
+
PendleBuyYtParams$outboundSchema.parse(pendleBuyYtParams),
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export function pendleBuyYtParamsFromJSON(
|
|
131
|
+
jsonString: string,
|
|
132
|
+
): SafeParseResult<PendleBuyYtParams, SDKValidationError> {
|
|
133
|
+
return safeParse(
|
|
134
|
+
jsonString,
|
|
135
|
+
(x) => PendleBuyYtParams$inboundSchema.parse(JSON.parse(x)),
|
|
136
|
+
`Failed to parse 'PendleBuyYtParams' 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 Underlying Token you would like to sell for market's Yield Token (YT).
|
|
14
|
+
*/
|
|
15
|
+
export type PendleBuyYtRequestAmount = number | string;
|
|
16
|
+
|
|
17
|
+
export type PendleBuyYtRequest = {
|
|
18
|
+
/**
|
|
19
|
+
* The address of the market identifying which Yield Token (YT) you would like to buy.
|
|
20
|
+
*/
|
|
21
|
+
marketAddress: string;
|
|
22
|
+
/**
|
|
23
|
+
* The amount of market's Underlying Token you would like to sell for market's Yield Token (YT).
|
|
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 PendleBuyYtRequestAmount$inboundSchema: z.ZodType<
|
|
38
|
+
PendleBuyYtRequestAmount,
|
|
39
|
+
z.ZodTypeDef,
|
|
40
|
+
unknown
|
|
41
|
+
> = z.union([z.number(), z.string()]);
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export type PendleBuyYtRequestAmount$Outbound = number | string;
|
|
45
|
+
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const PendleBuyYtRequestAmount$outboundSchema: z.ZodType<
|
|
48
|
+
PendleBuyYtRequestAmount$Outbound,
|
|
49
|
+
z.ZodTypeDef,
|
|
50
|
+
PendleBuyYtRequestAmount
|
|
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 PendleBuyYtRequestAmount$ {
|
|
58
|
+
/** @deprecated use `PendleBuyYtRequestAmount$inboundSchema` instead. */
|
|
59
|
+
export const inboundSchema = PendleBuyYtRequestAmount$inboundSchema;
|
|
60
|
+
/** @deprecated use `PendleBuyYtRequestAmount$outboundSchema` instead. */
|
|
61
|
+
export const outboundSchema = PendleBuyYtRequestAmount$outboundSchema;
|
|
62
|
+
/** @deprecated use `PendleBuyYtRequestAmount$Outbound` instead. */
|
|
63
|
+
export type Outbound = PendleBuyYtRequestAmount$Outbound;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function pendleBuyYtRequestAmountToJSON(
|
|
67
|
+
pendleBuyYtRequestAmount: PendleBuyYtRequestAmount,
|
|
68
|
+
): string {
|
|
69
|
+
return JSON.stringify(
|
|
70
|
+
PendleBuyYtRequestAmount$outboundSchema.parse(pendleBuyYtRequestAmount),
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function pendleBuyYtRequestAmountFromJSON(
|
|
75
|
+
jsonString: string,
|
|
76
|
+
): SafeParseResult<PendleBuyYtRequestAmount, SDKValidationError> {
|
|
77
|
+
return safeParse(
|
|
78
|
+
jsonString,
|
|
79
|
+
(x) => PendleBuyYtRequestAmount$inboundSchema.parse(JSON.parse(x)),
|
|
80
|
+
`Failed to parse 'PendleBuyYtRequestAmount' from JSON`,
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** @internal */
|
|
85
|
+
export const PendleBuyYtRequest$inboundSchema: z.ZodType<
|
|
86
|
+
PendleBuyYtRequest,
|
|
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 PendleBuyYtRequest$Outbound = {
|
|
102
|
+
market_address: string;
|
|
103
|
+
amount: number | string;
|
|
104
|
+
chain: string;
|
|
105
|
+
sender: string;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
export const PendleBuyYtRequest$outboundSchema: z.ZodType<
|
|
110
|
+
PendleBuyYtRequest$Outbound,
|
|
111
|
+
z.ZodTypeDef,
|
|
112
|
+
PendleBuyYtRequest
|
|
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 PendleBuyYtRequest$ {
|
|
129
|
+
/** @deprecated use `PendleBuyYtRequest$inboundSchema` instead. */
|
|
130
|
+
export const inboundSchema = PendleBuyYtRequest$inboundSchema;
|
|
131
|
+
/** @deprecated use `PendleBuyYtRequest$outboundSchema` instead. */
|
|
132
|
+
export const outboundSchema = PendleBuyYtRequest$outboundSchema;
|
|
133
|
+
/** @deprecated use `PendleBuyYtRequest$Outbound` instead. */
|
|
134
|
+
export type Outbound = PendleBuyYtRequest$Outbound;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function pendleBuyYtRequestToJSON(
|
|
138
|
+
pendleBuyYtRequest: PendleBuyYtRequest,
|
|
139
|
+
): string {
|
|
140
|
+
return JSON.stringify(
|
|
141
|
+
PendleBuyYtRequest$outboundSchema.parse(pendleBuyYtRequest),
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function pendleBuyYtRequestFromJSON(
|
|
146
|
+
jsonString: string,
|
|
147
|
+
): SafeParseResult<PendleBuyYtRequest, SDKValidationError> {
|
|
148
|
+
return safeParse(
|
|
149
|
+
jsonString,
|
|
150
|
+
(x) => PendleBuyYtRequest$inboundSchema.parse(JSON.parse(x)),
|
|
151
|
+
`Failed to parse 'PendleBuyYtRequest' from JSON`,
|
|
152
|
+
);
|
|
153
|
+
}
|