@compass-labs/api-sdk 2.2.9 → 2.2.10
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/CLAUDE.md +37 -0
- package/codeSamples_typescript.yaml +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/components/earnmanageparams.d.ts +11 -2
- package/dist/commonjs/models/components/earnmanageparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/earnmanageparams.js +8 -2
- package/dist/commonjs/models/components/earnmanageparams.js.map +1 -1
- package/dist/commonjs/models/components/earnmanagerequest.d.ts +11 -2
- package/dist/commonjs/models/components/earnmanagerequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/earnmanagerequest.js +8 -2
- package/dist/commonjs/models/components/earnmanagerequest.js.map +1 -1
- package/dist/commonjs/models/components/earntransfertoeoaparams.d.ts +12 -3
- package/dist/commonjs/models/components/earntransfertoeoaparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/earntransfertoeoaparams.js +8 -2
- package/dist/commonjs/models/components/earntransfertoeoaparams.js.map +1 -1
- package/dist/commonjs/models/components/v2bundlerequest.d.ts +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/components/earnmanageparams.d.ts +11 -2
- package/dist/esm/models/components/earnmanageparams.d.ts.map +1 -1
- package/dist/esm/models/components/earnmanageparams.js +6 -1
- package/dist/esm/models/components/earnmanageparams.js.map +1 -1
- package/dist/esm/models/components/earnmanagerequest.d.ts +11 -2
- package/dist/esm/models/components/earnmanagerequest.d.ts.map +1 -1
- package/dist/esm/models/components/earnmanagerequest.js +6 -1
- package/dist/esm/models/components/earnmanagerequest.js.map +1 -1
- package/dist/esm/models/components/earntransfertoeoaparams.d.ts +12 -3
- package/dist/esm/models/components/earntransfertoeoaparams.d.ts.map +1 -1
- package/dist/esm/models/components/earntransfertoeoaparams.js +6 -1
- package/dist/esm/models/components/earntransfertoeoaparams.js.map +1 -1
- package/dist/esm/models/components/v2bundlerequest.d.ts +1 -1
- package/docs/models/components/earnmanageparams.md +1 -1
- package/docs/models/components/earnmanageparamsamount.md +19 -0
- package/docs/models/components/earnmanagerequest.md +1 -1
- package/docs/models/components/earnmanagerequestamount.md +19 -0
- package/docs/models/components/earntransfertoeoaparams.md +5 -5
- package/docs/models/components/earntransfertoeoaparamsamount.md +19 -0
- package/docs/models/components/v2bundlerequest.md +3 -3
- package/docs/sdks/earn/README.md +2 -2
- package/examples/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
- package/examples/node_modules/@esbuild/linux-x64/package.json +1 -1
- package/examples/node_modules/@types/node/README.md +1 -1
- package/examples/node_modules/@types/node/package.json +2 -2
- package/examples/node_modules/@types/node/stream/web.d.ts +1 -1
- package/examples/node_modules/@types/node/web-globals/fetch.d.ts +9 -0
- package/examples/node_modules/esbuild/bin/esbuild +0 -0
- package/examples/node_modules/esbuild/lib/main.js +8 -8
- package/examples/node_modules/esbuild/package.json +27 -27
- package/examples/node_modules/get-tsconfig/dist/index.cjs +7 -7
- package/examples/node_modules/get-tsconfig/dist/index.mjs +7 -7
- package/examples/node_modules/get-tsconfig/package.json +1 -1
- package/examples/package-lock.json +115 -115
- package/package.json +3 -3
- package/src/lib/config.ts +2 -2
- package/src/models/components/earnmanageparams.ts +26 -3
- package/src/models/components/earnmanagerequest.ts +26 -3
- package/src/models/components/earntransfertoeoaparams.ts +29 -4
- package/src/models/components/v2bundlerequest.ts +1 -1
package/src/lib/config.ts
CHANGED
|
@@ -62,7 +62,7 @@ export const SDK_METADATA = {
|
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "0.0.1",
|
|
64
64
|
sdkVersion: "2.0.0",
|
|
65
|
-
genVersion: "2.
|
|
65
|
+
genVersion: "2.809.2",
|
|
66
66
|
userAgent:
|
|
67
|
-
"speakeasy-sdk/typescript 2.0.0 2.
|
|
67
|
+
"speakeasy-sdk/typescript 2.0.0 2.809.2 0.0.1 @compass-labs/api-sdk",
|
|
68
68
|
} as const;
|
|
@@ -38,6 +38,11 @@ export const EarnManageParamsAction = {
|
|
|
38
38
|
*/
|
|
39
39
|
export type EarnManageParamsAction = ClosedEnum<typeof EarnManageParamsAction>;
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* Amount of the underlying asset to act on (deposit or withdraw). For VAULT, this is the vault's underlying token; for AAVE, this is the Aave reserve asset; for PENDLE_PT, this is the amount of `token` to spend (DEPOSIT) or PT to sell (WITHDRAW). Provide as a decimal in token units (not wei); must be > 0.
|
|
43
|
+
*/
|
|
44
|
+
export type EarnManageParamsAmount = number | string;
|
|
45
|
+
|
|
41
46
|
/**
|
|
42
47
|
* Parameters for earn manage operations (deposit/withdraw to vault/Aave/Pendle PT).
|
|
43
48
|
*
|
|
@@ -62,7 +67,7 @@ export type EarnManageParams = {
|
|
|
62
67
|
/**
|
|
63
68
|
* Amount of the underlying asset to act on (deposit or withdraw). For VAULT, this is the vault's underlying token; for AAVE, this is the Aave reserve asset; for PENDLE_PT, this is the amount of `token` to spend (DEPOSIT) or PT to sell (WITHDRAW). Provide as a decimal in token units (not wei); must be > 0.
|
|
64
69
|
*/
|
|
65
|
-
amount
|
|
70
|
+
amount: number | string;
|
|
66
71
|
};
|
|
67
72
|
|
|
68
73
|
/** @internal */
|
|
@@ -95,12 +100,30 @@ export const EarnManageParamsAction$outboundSchema: z.ZodNativeEnum<
|
|
|
95
100
|
typeof EarnManageParamsAction
|
|
96
101
|
> = z.nativeEnum(EarnManageParamsAction);
|
|
97
102
|
|
|
103
|
+
/** @internal */
|
|
104
|
+
export type EarnManageParamsAmount$Outbound = number | string;
|
|
105
|
+
|
|
106
|
+
/** @internal */
|
|
107
|
+
export const EarnManageParamsAmount$outboundSchema: z.ZodType<
|
|
108
|
+
EarnManageParamsAmount$Outbound,
|
|
109
|
+
z.ZodTypeDef,
|
|
110
|
+
EarnManageParamsAmount
|
|
111
|
+
> = z.union([z.number(), z.string()]);
|
|
112
|
+
|
|
113
|
+
export function earnManageParamsAmountToJSON(
|
|
114
|
+
earnManageParamsAmount: EarnManageParamsAmount,
|
|
115
|
+
): string {
|
|
116
|
+
return JSON.stringify(
|
|
117
|
+
EarnManageParamsAmount$outboundSchema.parse(earnManageParamsAmount),
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
98
121
|
/** @internal */
|
|
99
122
|
export type EarnManageParams$Outbound = {
|
|
100
123
|
action_type: "V2_MANAGE";
|
|
101
124
|
venue: AaveVenue$Outbound | PendlePTVenue$Outbound | VaultVenue$Outbound;
|
|
102
125
|
action: string;
|
|
103
|
-
amount
|
|
126
|
+
amount: number | string;
|
|
104
127
|
};
|
|
105
128
|
|
|
106
129
|
/** @internal */
|
|
@@ -116,7 +139,7 @@ export const EarnManageParams$outboundSchema: z.ZodType<
|
|
|
116
139
|
VaultVenue$outboundSchema,
|
|
117
140
|
]),
|
|
118
141
|
action: EarnManageParamsAction$outboundSchema,
|
|
119
|
-
amount: z.
|
|
142
|
+
amount: z.union([z.number(), z.string()]),
|
|
120
143
|
}).transform((v) => {
|
|
121
144
|
return remap$(v, {
|
|
122
145
|
actionType: "action_type",
|
|
@@ -42,6 +42,11 @@ export type EarnManageRequestAction = ClosedEnum<
|
|
|
42
42
|
typeof EarnManageRequestAction
|
|
43
43
|
>;
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Amount of the underlying asset to act on (deposit or withdraw). For VAULT, this is the vault's underlying token; for AAVE, this is the Aave reserve asset; for PENDLE_PT, this is the amount of `token` to spend (DEPOSIT) or PT to sell (WITHDRAW). Provide as a decimal in token units (not wei); must be > 0.
|
|
47
|
+
*/
|
|
48
|
+
export type EarnManageRequestAmount = number | string;
|
|
49
|
+
|
|
45
50
|
/**
|
|
46
51
|
* Request model for the unified manage endpoint.
|
|
47
52
|
*
|
|
@@ -65,7 +70,7 @@ export type EarnManageRequest = {
|
|
|
65
70
|
/**
|
|
66
71
|
* Amount of the underlying asset to act on (deposit or withdraw). For VAULT, this is the vault's underlying token; for AAVE, this is the Aave reserve asset; for PENDLE_PT, this is the amount of `token` to spend (DEPOSIT) or PT to sell (WITHDRAW). Provide as a decimal in token units (not wei); must be > 0.
|
|
67
72
|
*/
|
|
68
|
-
amount
|
|
73
|
+
amount: number | string;
|
|
69
74
|
/**
|
|
70
75
|
* The primary wallet address that owns and controls the Earn Account.
|
|
71
76
|
*/
|
|
@@ -114,12 +119,30 @@ export const EarnManageRequestAction$outboundSchema: z.ZodNativeEnum<
|
|
|
114
119
|
typeof EarnManageRequestAction
|
|
115
120
|
> = z.nativeEnum(EarnManageRequestAction);
|
|
116
121
|
|
|
122
|
+
/** @internal */
|
|
123
|
+
export type EarnManageRequestAmount$Outbound = number | string;
|
|
124
|
+
|
|
125
|
+
/** @internal */
|
|
126
|
+
export const EarnManageRequestAmount$outboundSchema: z.ZodType<
|
|
127
|
+
EarnManageRequestAmount$Outbound,
|
|
128
|
+
z.ZodTypeDef,
|
|
129
|
+
EarnManageRequestAmount
|
|
130
|
+
> = z.union([z.number(), z.string()]);
|
|
131
|
+
|
|
132
|
+
export function earnManageRequestAmountToJSON(
|
|
133
|
+
earnManageRequestAmount: EarnManageRequestAmount,
|
|
134
|
+
): string {
|
|
135
|
+
return JSON.stringify(
|
|
136
|
+
EarnManageRequestAmount$outboundSchema.parse(earnManageRequestAmount),
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
117
140
|
/** @internal */
|
|
118
141
|
export type EarnManageRequest$Outbound = {
|
|
119
142
|
action_type?: "V2_MANAGE" | undefined;
|
|
120
143
|
venue: AaveVenue$Outbound | PendlePTVenue$Outbound | VaultVenue$Outbound;
|
|
121
144
|
action: string;
|
|
122
|
-
amount
|
|
145
|
+
amount: number | string;
|
|
123
146
|
owner: string;
|
|
124
147
|
chain: string;
|
|
125
148
|
gas_sponsorship?: boolean | undefined;
|
|
@@ -139,7 +162,7 @@ export const EarnManageRequest$outboundSchema: z.ZodType<
|
|
|
139
162
|
VaultVenue$outboundSchema,
|
|
140
163
|
]),
|
|
141
164
|
action: EarnManageRequestAction$outboundSchema,
|
|
142
|
-
amount: z.
|
|
165
|
+
amount: z.union([z.number(), z.string()]),
|
|
143
166
|
owner: z.string(),
|
|
144
167
|
chain: Chain$outboundSchema,
|
|
145
168
|
gasSponsorship: z.boolean().optional(),
|
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* The amount of tokens to transfer (in token units, not wei).
|
|
10
|
+
*/
|
|
11
|
+
export type EarnTransferToEOAParamsAmount = number | string;
|
|
12
|
+
|
|
8
13
|
/**
|
|
9
14
|
* Parameters for transferring tokens from Earn Account to EOA (withdrawal).
|
|
10
15
|
*
|
|
@@ -26,16 +31,36 @@ export type EarnTransferToEOAParams = {
|
|
|
26
31
|
*/
|
|
27
32
|
token: string;
|
|
28
33
|
/**
|
|
29
|
-
* The amount of tokens to transfer (in token units, not wei)
|
|
34
|
+
* The amount of tokens to transfer (in token units, not wei).
|
|
30
35
|
*/
|
|
31
|
-
amount
|
|
36
|
+
amount: number | string;
|
|
32
37
|
};
|
|
33
38
|
|
|
39
|
+
/** @internal */
|
|
40
|
+
export type EarnTransferToEOAParamsAmount$Outbound = number | string;
|
|
41
|
+
|
|
42
|
+
/** @internal */
|
|
43
|
+
export const EarnTransferToEOAParamsAmount$outboundSchema: z.ZodType<
|
|
44
|
+
EarnTransferToEOAParamsAmount$Outbound,
|
|
45
|
+
z.ZodTypeDef,
|
|
46
|
+
EarnTransferToEOAParamsAmount
|
|
47
|
+
> = z.union([z.number(), z.string()]);
|
|
48
|
+
|
|
49
|
+
export function earnTransferToEOAParamsAmountToJSON(
|
|
50
|
+
earnTransferToEOAParamsAmount: EarnTransferToEOAParamsAmount,
|
|
51
|
+
): string {
|
|
52
|
+
return JSON.stringify(
|
|
53
|
+
EarnTransferToEOAParamsAmount$outboundSchema.parse(
|
|
54
|
+
earnTransferToEOAParamsAmount,
|
|
55
|
+
),
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
34
59
|
/** @internal */
|
|
35
60
|
export type EarnTransferToEOAParams$Outbound = {
|
|
36
61
|
action_type: "V2_TRANSFER_TO_EOA";
|
|
37
62
|
token: string;
|
|
38
|
-
amount
|
|
63
|
+
amount: number | string;
|
|
39
64
|
};
|
|
40
65
|
|
|
41
66
|
/** @internal */
|
|
@@ -46,7 +71,7 @@ export const EarnTransferToEOAParams$outboundSchema: z.ZodType<
|
|
|
46
71
|
> = z.object({
|
|
47
72
|
actionType: z.literal("V2_TRANSFER_TO_EOA"),
|
|
48
73
|
token: z.string(),
|
|
49
|
-
amount: z.
|
|
74
|
+
amount: z.union([z.number(), z.string()]),
|
|
50
75
|
}).transform((v) => {
|
|
51
76
|
return remap$(v, {
|
|
52
77
|
actionType: "action_type",
|
|
@@ -50,7 +50,7 @@ import {
|
|
|
50
50
|
* a V2_TRANSFER_TO_EOA action to your bundle. No signature is required since
|
|
51
51
|
* the Safe already owns the tokens.
|
|
52
52
|
*
|
|
53
|
-
*
|
|
53
|
+
* Specify the exact token amount to transfer.
|
|
54
54
|
*/
|
|
55
55
|
export type V2BundleRequest = {
|
|
56
56
|
/**
|