@compass-labs/api-sdk 1.0.6 → 1.0.8
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 +2 -2
- package/bin/mcp-server.js +36 -74
- package/bin/mcp-server.js.map +14 -15
- package/dist/commonjs/funcs/ethenaEthenaVault.d.ts +7 -0
- package/dist/commonjs/funcs/ethenaEthenaVault.d.ts.map +1 -1
- package/dist/commonjs/funcs/ethenaEthenaVault.js +7 -0
- package/dist/commonjs/funcs/ethenaEthenaVault.js.map +1 -1
- package/dist/commonjs/funcs/tokenTokenTransfer.d.ts +1 -1
- package/dist/commonjs/funcs/tokenTokenTransfer.js +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/mcp-server/tools/ethenaEthenaVault.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/ethenaEthenaVault.js +7 -1
- package/dist/commonjs/mcp-server/tools/ethenaEthenaVault.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/tokenTokenTransfer.js +1 -1
- package/dist/commonjs/models/components/index.d.ts +0 -1
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +0 -1
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/tokentransferparams.d.ts +31 -31
- package/dist/commonjs/models/components/tokentransferparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/tokentransferparams.js +28 -28
- package/dist/commonjs/models/components/tokentransferparams.js.map +1 -1
- package/dist/commonjs/models/components/tokentransferrequest.d.ts +31 -31
- package/dist/commonjs/models/components/tokentransferrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/tokentransferrequest.js +28 -28
- package/dist/commonjs/models/components/tokentransferrequest.js.map +1 -1
- package/dist/commonjs/models/components/useroperation.d.ts +0 -9
- package/dist/commonjs/models/components/useroperation.d.ts.map +1 -1
- package/dist/commonjs/models/components/useroperation.js +0 -5
- package/dist/commonjs/models/components/useroperation.js.map +1 -1
- package/dist/commonjs/sdk/ethena.d.ts +7 -0
- package/dist/commonjs/sdk/ethena.d.ts.map +1 -1
- package/dist/commonjs/sdk/ethena.js +7 -0
- package/dist/commonjs/sdk/ethena.js.map +1 -1
- package/dist/commonjs/sdk/token.d.ts +1 -1
- package/dist/commonjs/sdk/token.js +1 -1
- package/dist/esm/funcs/ethenaEthenaVault.d.ts +7 -0
- package/dist/esm/funcs/ethenaEthenaVault.d.ts.map +1 -1
- package/dist/esm/funcs/ethenaEthenaVault.js +7 -0
- package/dist/esm/funcs/ethenaEthenaVault.js.map +1 -1
- package/dist/esm/funcs/tokenTokenTransfer.d.ts +1 -1
- package/dist/esm/funcs/tokenTokenTransfer.js +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/mcp-server/tools/ethenaEthenaVault.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/ethenaEthenaVault.js +7 -1
- package/dist/esm/mcp-server/tools/ethenaEthenaVault.js.map +1 -1
- package/dist/esm/mcp-server/tools/tokenTokenTransfer.js +1 -1
- package/dist/esm/models/components/index.d.ts +0 -1
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +0 -1
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/tokentransferparams.d.ts +31 -31
- package/dist/esm/models/components/tokentransferparams.d.ts.map +1 -1
- package/dist/esm/models/components/tokentransferparams.js +25 -25
- package/dist/esm/models/components/tokentransferparams.js.map +1 -1
- package/dist/esm/models/components/tokentransferrequest.d.ts +31 -31
- package/dist/esm/models/components/tokentransferrequest.d.ts.map +1 -1
- package/dist/esm/models/components/tokentransferrequest.js +25 -25
- package/dist/esm/models/components/tokentransferrequest.js.map +1 -1
- package/dist/esm/models/components/useroperation.d.ts +0 -9
- package/dist/esm/models/components/useroperation.d.ts.map +1 -1
- package/dist/esm/models/components/useroperation.js +0 -5
- package/dist/esm/models/components/useroperation.js.map +1 -1
- package/dist/esm/sdk/ethena.d.ts +7 -0
- package/dist/esm/sdk/ethena.d.ts.map +1 -1
- package/dist/esm/sdk/ethena.js +7 -0
- package/dist/esm/sdk/ethena.js.map +1 -1
- package/dist/esm/sdk/token.d.ts +1 -1
- package/dist/esm/sdk/token.js +1 -1
- package/docs/sdks/ethena/README.md +5 -1
- package/docs/sdks/token/README.md +5 -5
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/ethenaEthenaVault.ts +7 -0
- package/src/funcs/tokenTokenTransfer.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/ethenaEthenaVault.ts +7 -1
- package/src/mcp-server/tools/tokenTokenTransfer.ts +1 -1
- package/src/models/components/index.ts +0 -1
- package/src/models/components/tokentransferparams.ts +59 -59
- package/src/models/components/tokentransferrequest.ts +59 -59
- package/src/models/components/useroperation.ts +0 -34
- package/src/sdk/ethena.ts +7 -0
- package/src/sdk/token.ts +1 -1
- package/dist/commonjs/models/components/tokentransfererc20params.d.ts +0 -77
- package/dist/commonjs/models/components/tokentransfererc20params.d.ts.map +0 -1
- package/dist/commonjs/models/components/tokentransfererc20params.js +0 -108
- package/dist/commonjs/models/components/tokentransfererc20params.js.map +0 -1
- package/dist/esm/models/components/tokentransfererc20params.d.ts +0 -77
- package/dist/esm/models/components/tokentransfererc20params.d.ts.map +0 -1
- package/dist/esm/models/components/tokentransfererc20params.js +0 -68
- package/dist/esm/models/components/tokentransfererc20params.js.map +0 -1
- package/src/models/components/tokentransfererc20params.ts +0 -168
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
} from "./tokenenum.js";
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* The symbol or address of the token to transfer.
|
|
18
18
|
*/
|
|
19
|
-
export type
|
|
19
|
+
export type TokenTransferParamsToken = TokenEnum | string;
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Amount of token to transfer
|
|
23
23
|
*/
|
|
24
|
-
export type
|
|
24
|
+
export type TokenTransferParamsAmount = number | string;
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Parameters model for transferring ETH or ERC20 tokens.
|
|
@@ -29,112 +29,112 @@ export type TokenTransferParamsToken = TokenEnum | string;
|
|
|
29
29
|
export type TokenTransferParams = {
|
|
30
30
|
actionType?: "TOKEN_TRANSFER" | undefined;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* The recipient of the tokens.
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
to: string;
|
|
35
35
|
/**
|
|
36
|
-
* The symbol of the token to transfer
|
|
36
|
+
* The symbol or address of the token to transfer.
|
|
37
37
|
*/
|
|
38
38
|
token: TokenEnum | string;
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* Amount of token to transfer
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
amount: number | string;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
45
|
/** @internal */
|
|
46
|
-
export const
|
|
47
|
-
|
|
46
|
+
export const TokenTransferParamsToken$inboundSchema: z.ZodType<
|
|
47
|
+
TokenTransferParamsToken,
|
|
48
48
|
z.ZodTypeDef,
|
|
49
49
|
unknown
|
|
50
|
-
> = z.union([
|
|
50
|
+
> = z.union([TokenEnum$inboundSchema, z.string()]);
|
|
51
51
|
|
|
52
52
|
/** @internal */
|
|
53
|
-
export type
|
|
53
|
+
export type TokenTransferParamsToken$Outbound = string | string;
|
|
54
54
|
|
|
55
55
|
/** @internal */
|
|
56
|
-
export const
|
|
57
|
-
|
|
56
|
+
export const TokenTransferParamsToken$outboundSchema: z.ZodType<
|
|
57
|
+
TokenTransferParamsToken$Outbound,
|
|
58
58
|
z.ZodTypeDef,
|
|
59
|
-
|
|
60
|
-
> = z.union([
|
|
59
|
+
TokenTransferParamsToken
|
|
60
|
+
> = z.union([TokenEnum$outboundSchema, z.string()]);
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* @internal
|
|
64
64
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
65
65
|
*/
|
|
66
|
-
export namespace
|
|
67
|
-
/** @deprecated use `
|
|
68
|
-
export const inboundSchema =
|
|
69
|
-
/** @deprecated use `
|
|
70
|
-
export const outboundSchema =
|
|
71
|
-
/** @deprecated use `
|
|
72
|
-
export type Outbound =
|
|
66
|
+
export namespace TokenTransferParamsToken$ {
|
|
67
|
+
/** @deprecated use `TokenTransferParamsToken$inboundSchema` instead. */
|
|
68
|
+
export const inboundSchema = TokenTransferParamsToken$inboundSchema;
|
|
69
|
+
/** @deprecated use `TokenTransferParamsToken$outboundSchema` instead. */
|
|
70
|
+
export const outboundSchema = TokenTransferParamsToken$outboundSchema;
|
|
71
|
+
/** @deprecated use `TokenTransferParamsToken$Outbound` instead. */
|
|
72
|
+
export type Outbound = TokenTransferParamsToken$Outbound;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
|
-
export function
|
|
76
|
-
|
|
75
|
+
export function tokenTransferParamsTokenToJSON(
|
|
76
|
+
tokenTransferParamsToken: TokenTransferParamsToken,
|
|
77
77
|
): string {
|
|
78
78
|
return JSON.stringify(
|
|
79
|
-
|
|
79
|
+
TokenTransferParamsToken$outboundSchema.parse(tokenTransferParamsToken),
|
|
80
80
|
);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
-
export function
|
|
83
|
+
export function tokenTransferParamsTokenFromJSON(
|
|
84
84
|
jsonString: string,
|
|
85
|
-
): SafeParseResult<
|
|
85
|
+
): SafeParseResult<TokenTransferParamsToken, SDKValidationError> {
|
|
86
86
|
return safeParse(
|
|
87
87
|
jsonString,
|
|
88
|
-
(x) =>
|
|
89
|
-
`Failed to parse '
|
|
88
|
+
(x) => TokenTransferParamsToken$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
+
`Failed to parse 'TokenTransferParamsToken' from JSON`,
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
/** @internal */
|
|
94
|
-
export const
|
|
95
|
-
|
|
94
|
+
export const TokenTransferParamsAmount$inboundSchema: z.ZodType<
|
|
95
|
+
TokenTransferParamsAmount,
|
|
96
96
|
z.ZodTypeDef,
|
|
97
97
|
unknown
|
|
98
|
-
> = z.union([
|
|
98
|
+
> = z.union([z.number(), z.string()]);
|
|
99
99
|
|
|
100
100
|
/** @internal */
|
|
101
|
-
export type
|
|
101
|
+
export type TokenTransferParamsAmount$Outbound = number | string;
|
|
102
102
|
|
|
103
103
|
/** @internal */
|
|
104
|
-
export const
|
|
105
|
-
|
|
104
|
+
export const TokenTransferParamsAmount$outboundSchema: z.ZodType<
|
|
105
|
+
TokenTransferParamsAmount$Outbound,
|
|
106
106
|
z.ZodTypeDef,
|
|
107
|
-
|
|
108
|
-
> = z.union([
|
|
107
|
+
TokenTransferParamsAmount
|
|
108
|
+
> = z.union([z.number(), z.string()]);
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
111
|
* @internal
|
|
112
112
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
113
113
|
*/
|
|
114
|
-
export namespace
|
|
115
|
-
/** @deprecated use `
|
|
116
|
-
export const inboundSchema =
|
|
117
|
-
/** @deprecated use `
|
|
118
|
-
export const outboundSchema =
|
|
119
|
-
/** @deprecated use `
|
|
120
|
-
export type Outbound =
|
|
114
|
+
export namespace TokenTransferParamsAmount$ {
|
|
115
|
+
/** @deprecated use `TokenTransferParamsAmount$inboundSchema` instead. */
|
|
116
|
+
export const inboundSchema = TokenTransferParamsAmount$inboundSchema;
|
|
117
|
+
/** @deprecated use `TokenTransferParamsAmount$outboundSchema` instead. */
|
|
118
|
+
export const outboundSchema = TokenTransferParamsAmount$outboundSchema;
|
|
119
|
+
/** @deprecated use `TokenTransferParamsAmount$Outbound` instead. */
|
|
120
|
+
export type Outbound = TokenTransferParamsAmount$Outbound;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
export function
|
|
124
|
-
|
|
123
|
+
export function tokenTransferParamsAmountToJSON(
|
|
124
|
+
tokenTransferParamsAmount: TokenTransferParamsAmount,
|
|
125
125
|
): string {
|
|
126
126
|
return JSON.stringify(
|
|
127
|
-
|
|
127
|
+
TokenTransferParamsAmount$outboundSchema.parse(tokenTransferParamsAmount),
|
|
128
128
|
);
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
export function
|
|
131
|
+
export function tokenTransferParamsAmountFromJSON(
|
|
132
132
|
jsonString: string,
|
|
133
|
-
): SafeParseResult<
|
|
133
|
+
): SafeParseResult<TokenTransferParamsAmount, SDKValidationError> {
|
|
134
134
|
return safeParse(
|
|
135
135
|
jsonString,
|
|
136
|
-
(x) =>
|
|
137
|
-
`Failed to parse '
|
|
136
|
+
(x) => TokenTransferParamsAmount$inboundSchema.parse(JSON.parse(x)),
|
|
137
|
+
`Failed to parse 'TokenTransferParamsAmount' from JSON`,
|
|
138
138
|
);
|
|
139
139
|
}
|
|
140
140
|
|
|
@@ -145,9 +145,9 @@ export const TokenTransferParams$inboundSchema: z.ZodType<
|
|
|
145
145
|
unknown
|
|
146
146
|
> = z.object({
|
|
147
147
|
action_type: z.literal("TOKEN_TRANSFER").default("TOKEN_TRANSFER"),
|
|
148
|
-
amount: z.union([z.number(), z.string()]),
|
|
149
|
-
token: z.union([TokenEnum$inboundSchema, z.string()]),
|
|
150
148
|
to: z.string(),
|
|
149
|
+
token: z.union([TokenEnum$inboundSchema, z.string()]),
|
|
150
|
+
amount: z.union([z.number(), z.string()]),
|
|
151
151
|
}).transform((v) => {
|
|
152
152
|
return remap$(v, {
|
|
153
153
|
"action_type": "actionType",
|
|
@@ -157,9 +157,9 @@ export const TokenTransferParams$inboundSchema: z.ZodType<
|
|
|
157
157
|
/** @internal */
|
|
158
158
|
export type TokenTransferParams$Outbound = {
|
|
159
159
|
action_type: "TOKEN_TRANSFER";
|
|
160
|
-
amount: number | string;
|
|
161
|
-
token: string | string;
|
|
162
160
|
to: string;
|
|
161
|
+
token: string | string;
|
|
162
|
+
amount: number | string;
|
|
163
163
|
};
|
|
164
164
|
|
|
165
165
|
/** @internal */
|
|
@@ -169,9 +169,9 @@ export const TokenTransferParams$outboundSchema: z.ZodType<
|
|
|
169
169
|
TokenTransferParams
|
|
170
170
|
> = z.object({
|
|
171
171
|
actionType: z.literal("TOKEN_TRANSFER").default("TOKEN_TRANSFER" as const),
|
|
172
|
-
amount: z.union([z.number(), z.string()]),
|
|
173
|
-
token: z.union([TokenEnum$outboundSchema, z.string()]),
|
|
174
172
|
to: z.string(),
|
|
173
|
+
token: z.union([TokenEnum$outboundSchema, z.string()]),
|
|
174
|
+
amount: z.union([z.number(), z.string()]),
|
|
175
175
|
}).transform((v) => {
|
|
176
176
|
return remap$(v, {
|
|
177
177
|
actionType: "action_type",
|
|
@@ -15,14 +15,14 @@ import {
|
|
|
15
15
|
} from "./tokenenum.js";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* The symbol or address of the token to transfer.
|
|
19
19
|
*/
|
|
20
|
-
export type
|
|
20
|
+
export type TokenTransferRequestToken = TokenEnum | string;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Amount of token to transfer
|
|
24
24
|
*/
|
|
25
|
-
export type
|
|
25
|
+
export type TokenTransferRequestAmount = number | string;
|
|
26
26
|
|
|
27
27
|
export const TokenTransferRequestChain = {
|
|
28
28
|
Arbitrum: "arbitrum",
|
|
@@ -39,17 +39,17 @@ export type TokenTransferRequestChain = ClosedEnum<
|
|
|
39
39
|
export type TokenTransferRequest = {
|
|
40
40
|
actionType?: "TOKEN_TRANSFER" | undefined;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* The recipient of the tokens.
|
|
43
43
|
*/
|
|
44
|
-
|
|
44
|
+
to: string;
|
|
45
45
|
/**
|
|
46
|
-
* The symbol of the token to transfer
|
|
46
|
+
* The symbol or address of the token to transfer.
|
|
47
47
|
*/
|
|
48
48
|
token: TokenEnum | string;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* Amount of token to transfer
|
|
51
51
|
*/
|
|
52
|
-
|
|
52
|
+
amount: number | string;
|
|
53
53
|
chain: TokenTransferRequestChain;
|
|
54
54
|
/**
|
|
55
55
|
* The address of the transaction sender.
|
|
@@ -58,98 +58,98 @@ export type TokenTransferRequest = {
|
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
/** @internal */
|
|
61
|
-
export const
|
|
62
|
-
|
|
61
|
+
export const TokenTransferRequestToken$inboundSchema: z.ZodType<
|
|
62
|
+
TokenTransferRequestToken,
|
|
63
63
|
z.ZodTypeDef,
|
|
64
64
|
unknown
|
|
65
|
-
> = z.union([
|
|
65
|
+
> = z.union([TokenEnum$inboundSchema, z.string()]);
|
|
66
66
|
|
|
67
67
|
/** @internal */
|
|
68
|
-
export type
|
|
68
|
+
export type TokenTransferRequestToken$Outbound = string | string;
|
|
69
69
|
|
|
70
70
|
/** @internal */
|
|
71
|
-
export const
|
|
72
|
-
|
|
71
|
+
export const TokenTransferRequestToken$outboundSchema: z.ZodType<
|
|
72
|
+
TokenTransferRequestToken$Outbound,
|
|
73
73
|
z.ZodTypeDef,
|
|
74
|
-
|
|
75
|
-
> = z.union([
|
|
74
|
+
TokenTransferRequestToken
|
|
75
|
+
> = z.union([TokenEnum$outboundSchema, z.string()]);
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
78
|
* @internal
|
|
79
79
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
80
80
|
*/
|
|
81
|
-
export namespace
|
|
82
|
-
/** @deprecated use `
|
|
83
|
-
export const inboundSchema =
|
|
84
|
-
/** @deprecated use `
|
|
85
|
-
export const outboundSchema =
|
|
86
|
-
/** @deprecated use `
|
|
87
|
-
export type Outbound =
|
|
81
|
+
export namespace TokenTransferRequestToken$ {
|
|
82
|
+
/** @deprecated use `TokenTransferRequestToken$inboundSchema` instead. */
|
|
83
|
+
export const inboundSchema = TokenTransferRequestToken$inboundSchema;
|
|
84
|
+
/** @deprecated use `TokenTransferRequestToken$outboundSchema` instead. */
|
|
85
|
+
export const outboundSchema = TokenTransferRequestToken$outboundSchema;
|
|
86
|
+
/** @deprecated use `TokenTransferRequestToken$Outbound` instead. */
|
|
87
|
+
export type Outbound = TokenTransferRequestToken$Outbound;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
export function
|
|
91
|
-
|
|
90
|
+
export function tokenTransferRequestTokenToJSON(
|
|
91
|
+
tokenTransferRequestToken: TokenTransferRequestToken,
|
|
92
92
|
): string {
|
|
93
93
|
return JSON.stringify(
|
|
94
|
-
|
|
94
|
+
TokenTransferRequestToken$outboundSchema.parse(tokenTransferRequestToken),
|
|
95
95
|
);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
export function
|
|
98
|
+
export function tokenTransferRequestTokenFromJSON(
|
|
99
99
|
jsonString: string,
|
|
100
|
-
): SafeParseResult<
|
|
100
|
+
): SafeParseResult<TokenTransferRequestToken, SDKValidationError> {
|
|
101
101
|
return safeParse(
|
|
102
102
|
jsonString,
|
|
103
|
-
(x) =>
|
|
104
|
-
`Failed to parse '
|
|
103
|
+
(x) => TokenTransferRequestToken$inboundSchema.parse(JSON.parse(x)),
|
|
104
|
+
`Failed to parse 'TokenTransferRequestToken' from JSON`,
|
|
105
105
|
);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
/** @internal */
|
|
109
|
-
export const
|
|
110
|
-
|
|
109
|
+
export const TokenTransferRequestAmount$inboundSchema: z.ZodType<
|
|
110
|
+
TokenTransferRequestAmount,
|
|
111
111
|
z.ZodTypeDef,
|
|
112
112
|
unknown
|
|
113
|
-
> = z.union([
|
|
113
|
+
> = z.union([z.number(), z.string()]);
|
|
114
114
|
|
|
115
115
|
/** @internal */
|
|
116
|
-
export type
|
|
116
|
+
export type TokenTransferRequestAmount$Outbound = number | string;
|
|
117
117
|
|
|
118
118
|
/** @internal */
|
|
119
|
-
export const
|
|
120
|
-
|
|
119
|
+
export const TokenTransferRequestAmount$outboundSchema: z.ZodType<
|
|
120
|
+
TokenTransferRequestAmount$Outbound,
|
|
121
121
|
z.ZodTypeDef,
|
|
122
|
-
|
|
123
|
-
> = z.union([
|
|
122
|
+
TokenTransferRequestAmount
|
|
123
|
+
> = z.union([z.number(), z.string()]);
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* @internal
|
|
127
127
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
128
128
|
*/
|
|
129
|
-
export namespace
|
|
130
|
-
/** @deprecated use `
|
|
131
|
-
export const inboundSchema =
|
|
132
|
-
/** @deprecated use `
|
|
133
|
-
export const outboundSchema =
|
|
134
|
-
/** @deprecated use `
|
|
135
|
-
export type Outbound =
|
|
129
|
+
export namespace TokenTransferRequestAmount$ {
|
|
130
|
+
/** @deprecated use `TokenTransferRequestAmount$inboundSchema` instead. */
|
|
131
|
+
export const inboundSchema = TokenTransferRequestAmount$inboundSchema;
|
|
132
|
+
/** @deprecated use `TokenTransferRequestAmount$outboundSchema` instead. */
|
|
133
|
+
export const outboundSchema = TokenTransferRequestAmount$outboundSchema;
|
|
134
|
+
/** @deprecated use `TokenTransferRequestAmount$Outbound` instead. */
|
|
135
|
+
export type Outbound = TokenTransferRequestAmount$Outbound;
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
export function
|
|
139
|
-
|
|
138
|
+
export function tokenTransferRequestAmountToJSON(
|
|
139
|
+
tokenTransferRequestAmount: TokenTransferRequestAmount,
|
|
140
140
|
): string {
|
|
141
141
|
return JSON.stringify(
|
|
142
|
-
|
|
142
|
+
TokenTransferRequestAmount$outboundSchema.parse(tokenTransferRequestAmount),
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
export function
|
|
146
|
+
export function tokenTransferRequestAmountFromJSON(
|
|
147
147
|
jsonString: string,
|
|
148
|
-
): SafeParseResult<
|
|
148
|
+
): SafeParseResult<TokenTransferRequestAmount, SDKValidationError> {
|
|
149
149
|
return safeParse(
|
|
150
150
|
jsonString,
|
|
151
|
-
(x) =>
|
|
152
|
-
`Failed to parse '
|
|
151
|
+
(x) => TokenTransferRequestAmount$inboundSchema.parse(JSON.parse(x)),
|
|
152
|
+
`Failed to parse 'TokenTransferRequestAmount' from JSON`,
|
|
153
153
|
);
|
|
154
154
|
}
|
|
155
155
|
|
|
@@ -181,9 +181,9 @@ export const TokenTransferRequest$inboundSchema: z.ZodType<
|
|
|
181
181
|
unknown
|
|
182
182
|
> = z.object({
|
|
183
183
|
action_type: z.literal("TOKEN_TRANSFER").default("TOKEN_TRANSFER"),
|
|
184
|
-
amount: z.union([z.number(), z.string()]),
|
|
185
|
-
token: z.union([TokenEnum$inboundSchema, z.string()]),
|
|
186
184
|
to: z.string(),
|
|
185
|
+
token: z.union([TokenEnum$inboundSchema, z.string()]),
|
|
186
|
+
amount: z.union([z.number(), z.string()]),
|
|
187
187
|
chain: TokenTransferRequestChain$inboundSchema,
|
|
188
188
|
sender: z.string(),
|
|
189
189
|
}).transform((v) => {
|
|
@@ -195,9 +195,9 @@ export const TokenTransferRequest$inboundSchema: z.ZodType<
|
|
|
195
195
|
/** @internal */
|
|
196
196
|
export type TokenTransferRequest$Outbound = {
|
|
197
197
|
action_type: "TOKEN_TRANSFER";
|
|
198
|
-
amount: number | string;
|
|
199
|
-
token: string | string;
|
|
200
198
|
to: string;
|
|
199
|
+
token: string | string;
|
|
200
|
+
amount: number | string;
|
|
201
201
|
chain: string;
|
|
202
202
|
sender: string;
|
|
203
203
|
};
|
|
@@ -209,9 +209,9 @@ export const TokenTransferRequest$outboundSchema: z.ZodType<
|
|
|
209
209
|
TokenTransferRequest
|
|
210
210
|
> = z.object({
|
|
211
211
|
actionType: z.literal("TOKEN_TRANSFER").default("TOKEN_TRANSFER" as const),
|
|
212
|
-
amount: z.union([z.number(), z.string()]),
|
|
213
|
-
token: z.union([TokenEnum$outboundSchema, z.string()]),
|
|
214
212
|
to: z.string(),
|
|
213
|
+
token: z.union([TokenEnum$outboundSchema, z.string()]),
|
|
214
|
+
amount: z.union([z.number(), z.string()]),
|
|
215
215
|
chain: TokenTransferRequestChain$outboundSchema,
|
|
216
216
|
sender: z.string(),
|
|
217
217
|
}).transform((v) => {
|
|
@@ -174,12 +174,6 @@ import {
|
|
|
174
174
|
SkyWithdrawParams$Outbound,
|
|
175
175
|
SkyWithdrawParams$outboundSchema,
|
|
176
176
|
} from "./skywithdrawparams.js";
|
|
177
|
-
import {
|
|
178
|
-
TokenTransferErc20Params,
|
|
179
|
-
TokenTransferErc20Params$inboundSchema,
|
|
180
|
-
TokenTransferErc20Params$Outbound,
|
|
181
|
-
TokenTransferErc20Params$outboundSchema,
|
|
182
|
-
} from "./tokentransfererc20params.js";
|
|
183
177
|
import {
|
|
184
178
|
TokenTransferParams,
|
|
185
179
|
TokenTransferParams$inboundSchema,
|
|
@@ -271,7 +265,6 @@ export type Body =
|
|
|
271
265
|
| (AaveWithdrawParams & { actionType: "AAVE_WITHDRAW" })
|
|
272
266
|
| (SetAllowanceParams & { actionType: "SET_ALLOWANCE" })
|
|
273
267
|
| (TokenTransferParams & { actionType: "TOKEN_TRANSFER" })
|
|
274
|
-
| (TokenTransferErc20Params & { actionType: "TOKEN_TRANSFER_ERC20" })
|
|
275
268
|
| (AaveSupplyParams & { actionType: "AAVE_SUPPLY" })
|
|
276
269
|
| (AerodromeSlipstreamWithdrawLiquidityProvisionParams & {
|
|
277
270
|
actionType: "AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION";
|
|
@@ -331,7 +324,6 @@ export type UserOperation = {
|
|
|
331
324
|
| (AaveWithdrawParams & { actionType: "AAVE_WITHDRAW" })
|
|
332
325
|
| (SetAllowanceParams & { actionType: "SET_ALLOWANCE" })
|
|
333
326
|
| (TokenTransferParams & { actionType: "TOKEN_TRANSFER" })
|
|
334
|
-
| (TokenTransferErc20Params & { actionType: "TOKEN_TRANSFER_ERC20" })
|
|
335
327
|
| (AaveSupplyParams & { actionType: "AAVE_SUPPLY" })
|
|
336
328
|
| (AerodromeSlipstreamWithdrawLiquidityProvisionParams & {
|
|
337
329
|
actionType: "AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION";
|
|
@@ -452,11 +444,6 @@ export const Body$inboundSchema: z.ZodType<Body, z.ZodTypeDef, unknown> = z
|
|
|
452
444
|
actionType: v.action_type,
|
|
453
445
|
})),
|
|
454
446
|
),
|
|
455
|
-
TokenTransferErc20Params$inboundSchema.and(
|
|
456
|
-
z.object({ action_type: z.literal("TOKEN_TRANSFER_ERC20") }).transform((
|
|
457
|
-
v,
|
|
458
|
-
) => ({ actionType: v.action_type })),
|
|
459
|
-
),
|
|
460
447
|
AaveSupplyParams$inboundSchema.and(
|
|
461
448
|
z.object({ action_type: z.literal("AAVE_SUPPLY") }).transform((v) => ({
|
|
462
449
|
actionType: v.action_type,
|
|
@@ -599,9 +586,6 @@ export type Body$Outbound =
|
|
|
599
586
|
| (AaveWithdrawParams$Outbound & { action_type: "AAVE_WITHDRAW" })
|
|
600
587
|
| (SetAllowanceParams$Outbound & { action_type: "SET_ALLOWANCE" })
|
|
601
588
|
| (TokenTransferParams$Outbound & { action_type: "TOKEN_TRANSFER" })
|
|
602
|
-
| (TokenTransferErc20Params$Outbound & {
|
|
603
|
-
action_type: "TOKEN_TRANSFER_ERC20";
|
|
604
|
-
})
|
|
605
589
|
| (AaveSupplyParams$Outbound & { action_type: "AAVE_SUPPLY" })
|
|
606
590
|
| (AerodromeSlipstreamWithdrawLiquidityProvisionParams$Outbound & {
|
|
607
591
|
action_type: "AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION";
|
|
@@ -721,11 +705,6 @@ export const Body$outboundSchema: z.ZodType<Body$Outbound, z.ZodTypeDef, Body> =
|
|
|
721
705
|
action_type: v.actionType,
|
|
722
706
|
})),
|
|
723
707
|
),
|
|
724
|
-
TokenTransferErc20Params$outboundSchema.and(
|
|
725
|
-
z.object({ actionType: z.literal("TOKEN_TRANSFER_ERC20") }).transform((
|
|
726
|
-
v,
|
|
727
|
-
) => ({ action_type: v.actionType })),
|
|
728
|
-
),
|
|
729
708
|
AaveSupplyParams$outboundSchema.and(
|
|
730
709
|
z.object({ actionType: z.literal("AAVE_SUPPLY") }).transform((v) => ({
|
|
731
710
|
action_type: v.actionType,
|
|
@@ -952,11 +931,6 @@ export const UserOperation$inboundSchema: z.ZodType<
|
|
|
952
931
|
actionType: v.action_type,
|
|
953
932
|
})),
|
|
954
933
|
),
|
|
955
|
-
TokenTransferErc20Params$inboundSchema.and(
|
|
956
|
-
z.object({ action_type: z.literal("TOKEN_TRANSFER_ERC20") }).transform((
|
|
957
|
-
v,
|
|
958
|
-
) => ({ actionType: v.action_type })),
|
|
959
|
-
),
|
|
960
934
|
AaveSupplyParams$inboundSchema.and(
|
|
961
935
|
z.object({ action_type: z.literal("AAVE_SUPPLY") }).transform((v) => ({
|
|
962
936
|
actionType: v.action_type,
|
|
@@ -1103,9 +1077,6 @@ export type UserOperation$Outbound = {
|
|
|
1103
1077
|
| (AaveWithdrawParams$Outbound & { action_type: "AAVE_WITHDRAW" })
|
|
1104
1078
|
| (SetAllowanceParams$Outbound & { action_type: "SET_ALLOWANCE" })
|
|
1105
1079
|
| (TokenTransferParams$Outbound & { action_type: "TOKEN_TRANSFER" })
|
|
1106
|
-
| (TokenTransferErc20Params$Outbound & {
|
|
1107
|
-
action_type: "TOKEN_TRANSFER_ERC20";
|
|
1108
|
-
})
|
|
1109
1080
|
| (AaveSupplyParams$Outbound & { action_type: "AAVE_SUPPLY" })
|
|
1110
1081
|
| (AerodromeSlipstreamWithdrawLiquidityProvisionParams$Outbound & {
|
|
1111
1082
|
action_type: "AERODROME_SLIPSTREAM_WITHDRAW_LIQUIDITY_PROVISION";
|
|
@@ -1232,11 +1203,6 @@ export const UserOperation$outboundSchema: z.ZodType<
|
|
|
1232
1203
|
action_type: v.actionType,
|
|
1233
1204
|
})),
|
|
1234
1205
|
),
|
|
1235
|
-
TokenTransferErc20Params$outboundSchema.and(
|
|
1236
|
-
z.object({ actionType: z.literal("TOKEN_TRANSFER_ERC20") }).transform((
|
|
1237
|
-
v,
|
|
1238
|
-
) => ({ action_type: v.actionType })),
|
|
1239
|
-
),
|
|
1240
1206
|
AaveSupplyParams$outboundSchema.and(
|
|
1241
1207
|
z.object({ actionType: z.literal("AAVE_SUPPLY") }).transform((v) => ({
|
|
1242
1208
|
action_type: v.actionType,
|
package/src/sdk/ethena.ts
CHANGED
|
@@ -14,6 +14,13 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
14
14
|
export class Ethena extends ClientSDK {
|
|
15
15
|
/**
|
|
16
16
|
* Get Vault & User Position
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Get data & user Position for the Ethena vault on Ethereum.
|
|
20
|
+
*
|
|
21
|
+
* Vault address: 0x9d39a5de30e57443bff2a8307a4256c8797a3497
|
|
22
|
+
*
|
|
23
|
+
* The user position is only included in the response if 'user_address' parameter is included in the request.
|
|
17
24
|
*/
|
|
18
25
|
async ethenaVault(
|
|
19
26
|
request: operations.V1EthenaVaultRequest,
|
package/src/sdk/token.ts
CHANGED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import * as z from "zod";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
4
|
-
import { TokenEnum } from "./tokenenum.js";
|
|
5
|
-
/**
|
|
6
|
-
* Amount of token to transfer
|
|
7
|
-
*/
|
|
8
|
-
export type TokenTransferErc20ParamsAmount = number | string;
|
|
9
|
-
/**
|
|
10
|
-
* Parameters model for transferring ERC20 tokens.
|
|
11
|
-
*/
|
|
12
|
-
export type TokenTransferErc20Params = {
|
|
13
|
-
actionType?: "TOKEN_TRANSFER_ERC20" | undefined;
|
|
14
|
-
/**
|
|
15
|
-
* Amount of token to transfer
|
|
16
|
-
*/
|
|
17
|
-
amount: number | string;
|
|
18
|
-
/**
|
|
19
|
-
* A class representing the token.
|
|
20
|
-
*
|
|
21
|
-
* @remarks
|
|
22
|
-
*
|
|
23
|
-
* This class is used to represent the token in the system. Notice individual
|
|
24
|
-
* endpoints' documentation where per chain tokens are presented.
|
|
25
|
-
*/
|
|
26
|
-
token: TokenEnum;
|
|
27
|
-
/**
|
|
28
|
-
* The recipient of the tokens.
|
|
29
|
-
*/
|
|
30
|
-
to: string;
|
|
31
|
-
};
|
|
32
|
-
/** @internal */
|
|
33
|
-
export declare const TokenTransferErc20ParamsAmount$inboundSchema: z.ZodType<TokenTransferErc20ParamsAmount, z.ZodTypeDef, unknown>;
|
|
34
|
-
/** @internal */
|
|
35
|
-
export type TokenTransferErc20ParamsAmount$Outbound = number | string;
|
|
36
|
-
/** @internal */
|
|
37
|
-
export declare const TokenTransferErc20ParamsAmount$outboundSchema: z.ZodType<TokenTransferErc20ParamsAmount$Outbound, z.ZodTypeDef, TokenTransferErc20ParamsAmount>;
|
|
38
|
-
/**
|
|
39
|
-
* @internal
|
|
40
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
41
|
-
*/
|
|
42
|
-
export declare namespace TokenTransferErc20ParamsAmount$ {
|
|
43
|
-
/** @deprecated use `TokenTransferErc20ParamsAmount$inboundSchema` instead. */
|
|
44
|
-
const inboundSchema: z.ZodType<TokenTransferErc20ParamsAmount, z.ZodTypeDef, unknown>;
|
|
45
|
-
/** @deprecated use `TokenTransferErc20ParamsAmount$outboundSchema` instead. */
|
|
46
|
-
const outboundSchema: z.ZodType<TokenTransferErc20ParamsAmount$Outbound, z.ZodTypeDef, TokenTransferErc20ParamsAmount>;
|
|
47
|
-
/** @deprecated use `TokenTransferErc20ParamsAmount$Outbound` instead. */
|
|
48
|
-
type Outbound = TokenTransferErc20ParamsAmount$Outbound;
|
|
49
|
-
}
|
|
50
|
-
export declare function tokenTransferErc20ParamsAmountToJSON(tokenTransferErc20ParamsAmount: TokenTransferErc20ParamsAmount): string;
|
|
51
|
-
export declare function tokenTransferErc20ParamsAmountFromJSON(jsonString: string): SafeParseResult<TokenTransferErc20ParamsAmount, SDKValidationError>;
|
|
52
|
-
/** @internal */
|
|
53
|
-
export declare const TokenTransferErc20Params$inboundSchema: z.ZodType<TokenTransferErc20Params, z.ZodTypeDef, unknown>;
|
|
54
|
-
/** @internal */
|
|
55
|
-
export type TokenTransferErc20Params$Outbound = {
|
|
56
|
-
action_type: "TOKEN_TRANSFER_ERC20";
|
|
57
|
-
amount: number | string;
|
|
58
|
-
token: string;
|
|
59
|
-
to: string;
|
|
60
|
-
};
|
|
61
|
-
/** @internal */
|
|
62
|
-
export declare const TokenTransferErc20Params$outboundSchema: z.ZodType<TokenTransferErc20Params$Outbound, z.ZodTypeDef, TokenTransferErc20Params>;
|
|
63
|
-
/**
|
|
64
|
-
* @internal
|
|
65
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
66
|
-
*/
|
|
67
|
-
export declare namespace TokenTransferErc20Params$ {
|
|
68
|
-
/** @deprecated use `TokenTransferErc20Params$inboundSchema` instead. */
|
|
69
|
-
const inboundSchema: z.ZodType<TokenTransferErc20Params, z.ZodTypeDef, unknown>;
|
|
70
|
-
/** @deprecated use `TokenTransferErc20Params$outboundSchema` instead. */
|
|
71
|
-
const outboundSchema: z.ZodType<TokenTransferErc20Params$Outbound, z.ZodTypeDef, TokenTransferErc20Params>;
|
|
72
|
-
/** @deprecated use `TokenTransferErc20Params$Outbound` instead. */
|
|
73
|
-
type Outbound = TokenTransferErc20Params$Outbound;
|
|
74
|
-
}
|
|
75
|
-
export declare function tokenTransferErc20ParamsToJSON(tokenTransferErc20Params: TokenTransferErc20Params): string;
|
|
76
|
-
export declare function tokenTransferErc20ParamsFromJSON(jsonString: string): SafeParseResult<TokenTransferErc20Params, SDKValidationError>;
|
|
77
|
-
//# sourceMappingURL=tokentransfererc20params.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tokentransfererc20params.d.ts","sourceRoot":"","sources":["../../../../src/models/components/tokentransfererc20params.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,SAAS,EAGV,MAAM,gBAAgB,CAAC;AAExB;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,MAAM,GAAG,MAAM,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC,UAAU,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;IAChD;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;;;;;OAOG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4CAA4C,EAAE,CAAC,CAAC,OAAO,CAClE,8BAA8B,EAC9B,CAAC,CAAC,UAAU,EACZ,OAAO,CAC4B,CAAC;AAEtC,gBAAgB;AAChB,MAAM,MAAM,uCAAuC,GAAG,MAAM,GAAG,MAAM,CAAC;AAEtE,gBAAgB;AAChB,eAAO,MAAM,6CAA6C,EAAE,CAAC,CAAC,OAAO,CACnE,uCAAuC,EACvC,CAAC,CAAC,UAAU,EACZ,8BAA8B,CACK,CAAC;AAEtC;;;GAGG;AACH,yBAAiB,+BAA+B,CAAC;IAC/C,8EAA8E;IACvE,MAAM,aAAa,kEAA+C,CAAC;IAC1E,+EAA+E;IACxE,MAAM,cAAc,kGAAgD,CAAC;IAC5E,yEAAyE;IACzE,KAAY,QAAQ,GAAG,uCAAuC,CAAC;CAChE;AAED,wBAAgB,oCAAoC,CAClD,8BAA8B,EAAE,8BAA8B,GAC7D,MAAM,CAMR;AAED,wBAAgB,sCAAsC,CACpD,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,8BAA8B,EAAE,kBAAkB,CAAC,CAMrE;AAED,gBAAgB;AAChB,eAAO,MAAM,sCAAsC,EAAE,CAAC,CAAC,OAAO,CAC5D,wBAAwB,EACxB,CAAC,CAAC,UAAU,EACZ,OAAO,CAYP,CAAC;AAEH,gBAAgB;AAChB,MAAM,MAAM,iCAAiC,GAAG;IAC9C,WAAW,EAAE,sBAAsB,CAAC;IACpC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uCAAuC,EAAE,CAAC,CAAC,OAAO,CAC7D,iCAAiC,EACjC,CAAC,CAAC,UAAU,EACZ,wBAAwB,CAYxB,CAAC;AAEH;;;GAGG;AACH,yBAAiB,yBAAyB,CAAC;IACzC,wEAAwE;IACjE,MAAM,aAAa,4DAAyC,CAAC;IACpE,yEAAyE;IAClE,MAAM,cAAc,sFAA0C,CAAC;IACtE,mEAAmE;IACnE,KAAY,QAAQ,GAAG,iCAAiC,CAAC;CAC1D;AAED,wBAAgB,8BAA8B,CAC5C,wBAAwB,EAAE,wBAAwB,GACjD,MAAM,CAIR;AAED,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,wBAAwB,EAAE,kBAAkB,CAAC,CAM/D"}
|