@compass-labs/api-sdk 0.5.16 → 0.5.18
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/bin/mcp-server.js +13 -59
- package/bin/mcp-server.js.map +7 -7
- 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.js +1 -1
- package/dist/commonjs/models/components/allowanceinforesponse.d.ts +2 -8
- package/dist/commonjs/models/components/allowanceinforesponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/allowanceinforesponse.js +2 -3
- package/dist/commonjs/models/components/allowanceinforesponse.js.map +1 -1
- package/dist/commonjs/models/operations/genericallowance.d.ts +16 -158
- package/dist/commonjs/models/operations/genericallowance.d.ts.map +1 -1
- package/dist/commonjs/models/operations/genericallowance.js +14 -59
- package/dist/commonjs/models/operations/genericallowance.js.map +1 -1
- 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.js +1 -1
- package/dist/esm/models/components/allowanceinforesponse.d.ts +2 -8
- package/dist/esm/models/components/allowanceinforesponse.d.ts.map +1 -1
- package/dist/esm/models/components/allowanceinforesponse.js +2 -3
- package/dist/esm/models/components/allowanceinforesponse.js.map +1 -1
- package/dist/esm/models/operations/genericallowance.d.ts +16 -158
- package/dist/esm/models/operations/genericallowance.d.ts.map +1 -1
- package/dist/esm/models/operations/genericallowance.js +11 -58
- package/dist/esm/models/operations/genericallowance.js.map +1 -1
- package/docs/sdks/universal/README.md +6 -2
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/components/allowanceinforesponse.ts +4 -14
- package/src/models/operations/genericallowance.ts +41 -72
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
import { ClosedEnum } from "../../types/enums.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
4
|
+
import * as components from "../components/index.js";
|
|
4
5
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
5
6
|
/**
|
|
6
7
|
* The chain to use.
|
|
@@ -15,68 +16,9 @@ export declare const GenericAllowanceChain: {
|
|
|
15
16
|
*/
|
|
16
17
|
export type GenericAllowanceChain = ClosedEnum<typeof GenericAllowanceChain>;
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* @remarks
|
|
21
|
-
*
|
|
22
|
-
* This class is used to represent the token in the system. Notice individual
|
|
23
|
-
* endpoints' documentation where per chain tokens are presented.
|
|
19
|
+
* The symbol or address of the token for which the allowance is checked..
|
|
24
20
|
*/
|
|
25
|
-
export
|
|
26
|
-
readonly OneINCH: "1INCH";
|
|
27
|
-
readonly Aave: "AAVE";
|
|
28
|
-
readonly Bal: "BAL";
|
|
29
|
-
readonly CbBTC: "cbBTC";
|
|
30
|
-
readonly CbETH: "cbETH";
|
|
31
|
-
readonly Crv: "CRV";
|
|
32
|
-
readonly CrvUSD: "crvUSD";
|
|
33
|
-
readonly Dai: "DAI";
|
|
34
|
-
readonly Ens: "ENS";
|
|
35
|
-
readonly ETHx: "ETHx";
|
|
36
|
-
readonly Frax: "FRAX";
|
|
37
|
-
readonly Fxs: "FXS";
|
|
38
|
-
readonly Gho: "GHO";
|
|
39
|
-
readonly Knc: "KNC";
|
|
40
|
-
readonly Ldo: "LDO";
|
|
41
|
-
readonly Link: "LINK";
|
|
42
|
-
readonly Lusd: "LUSD";
|
|
43
|
-
readonly Mkr: "MKR";
|
|
44
|
-
readonly OsETH: "osETH";
|
|
45
|
-
readonly Pyusd: "PYUSD";
|
|
46
|
-
readonly RETH: "rETH";
|
|
47
|
-
readonly Rpl: "RPL";
|
|
48
|
-
readonly RsETH: "rsETH";
|
|
49
|
-
readonly SDAI: "sDAI";
|
|
50
|
-
readonly Snx: "SNX";
|
|
51
|
-
readonly Stg: "STG";
|
|
52
|
-
readonly SUSDe: "sUSDe";
|
|
53
|
-
readonly TBTC: "tBTC";
|
|
54
|
-
readonly Uni: "UNI";
|
|
55
|
-
readonly Usdc: "USDC";
|
|
56
|
-
readonly USDe: "USDe";
|
|
57
|
-
readonly Usds: "USDS";
|
|
58
|
-
readonly Usdt: "USDT";
|
|
59
|
-
readonly Wbtc: "WBTC";
|
|
60
|
-
readonly WeETH: "weETH";
|
|
61
|
-
readonly Weth: "WETH";
|
|
62
|
-
readonly WstETH: "wstETH";
|
|
63
|
-
readonly Arb: "ARB";
|
|
64
|
-
readonly Eurs: "EURS";
|
|
65
|
-
readonly Mai: "MAI";
|
|
66
|
-
readonly USDCe: "USDCe";
|
|
67
|
-
readonly Aero: "AERO";
|
|
68
|
-
readonly Eur: "EUR";
|
|
69
|
-
readonly Virtual: "VIRTUAL";
|
|
70
|
-
};
|
|
71
|
-
/**
|
|
72
|
-
* A class representing the token.
|
|
73
|
-
*
|
|
74
|
-
* @remarks
|
|
75
|
-
*
|
|
76
|
-
* This class is used to represent the token in the system. Notice individual
|
|
77
|
-
* endpoints' documentation where per chain tokens are presented.
|
|
78
|
-
*/
|
|
79
|
-
export type GenericAllowanceToken = ClosedEnum<typeof GenericAllowanceToken>;
|
|
21
|
+
export type GenericAllowanceToken = components.TokenEnum | string;
|
|
80
22
|
/**
|
|
81
23
|
* The name of the contract to check allowance for.
|
|
82
24
|
*/
|
|
@@ -107,9 +49,9 @@ export type GenericAllowanceRequest = {
|
|
|
107
49
|
*/
|
|
108
50
|
user?: string | undefined;
|
|
109
51
|
/**
|
|
110
|
-
* The symbol of the token for which the allowance is checked..
|
|
52
|
+
* The symbol or address of the token for which the allowance is checked..
|
|
111
53
|
*/
|
|
112
|
-
token
|
|
54
|
+
token: components.TokenEnum | string;
|
|
113
55
|
/**
|
|
114
56
|
* The name of the contract to check allowance for.
|
|
115
57
|
*/
|
|
@@ -138,109 +80,25 @@ export declare namespace GenericAllowanceChain$ {
|
|
|
138
80
|
}>;
|
|
139
81
|
}
|
|
140
82
|
/** @internal */
|
|
141
|
-
export declare const GenericAllowanceToken$inboundSchema: z.
|
|
83
|
+
export declare const GenericAllowanceToken$inboundSchema: z.ZodType<GenericAllowanceToken, z.ZodTypeDef, unknown>;
|
|
84
|
+
/** @internal */
|
|
85
|
+
export type GenericAllowanceToken$Outbound = string | string;
|
|
142
86
|
/** @internal */
|
|
143
|
-
export declare const GenericAllowanceToken$outboundSchema: z.
|
|
87
|
+
export declare const GenericAllowanceToken$outboundSchema: z.ZodType<GenericAllowanceToken$Outbound, z.ZodTypeDef, GenericAllowanceToken>;
|
|
144
88
|
/**
|
|
145
89
|
* @internal
|
|
146
90
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
147
91
|
*/
|
|
148
92
|
export declare namespace GenericAllowanceToken$ {
|
|
149
93
|
/** @deprecated use `GenericAllowanceToken$inboundSchema` instead. */
|
|
150
|
-
const inboundSchema: z.
|
|
151
|
-
readonly OneINCH: "1INCH";
|
|
152
|
-
readonly Aave: "AAVE";
|
|
153
|
-
readonly Bal: "BAL";
|
|
154
|
-
readonly CbBTC: "cbBTC";
|
|
155
|
-
readonly CbETH: "cbETH";
|
|
156
|
-
readonly Crv: "CRV";
|
|
157
|
-
readonly CrvUSD: "crvUSD";
|
|
158
|
-
readonly Dai: "DAI";
|
|
159
|
-
readonly Ens: "ENS";
|
|
160
|
-
readonly ETHx: "ETHx";
|
|
161
|
-
readonly Frax: "FRAX";
|
|
162
|
-
readonly Fxs: "FXS";
|
|
163
|
-
readonly Gho: "GHO";
|
|
164
|
-
readonly Knc: "KNC";
|
|
165
|
-
readonly Ldo: "LDO";
|
|
166
|
-
readonly Link: "LINK";
|
|
167
|
-
readonly Lusd: "LUSD";
|
|
168
|
-
readonly Mkr: "MKR";
|
|
169
|
-
readonly OsETH: "osETH";
|
|
170
|
-
readonly Pyusd: "PYUSD";
|
|
171
|
-
readonly RETH: "rETH";
|
|
172
|
-
readonly Rpl: "RPL";
|
|
173
|
-
readonly RsETH: "rsETH";
|
|
174
|
-
readonly SDAI: "sDAI";
|
|
175
|
-
readonly Snx: "SNX";
|
|
176
|
-
readonly Stg: "STG";
|
|
177
|
-
readonly SUSDe: "sUSDe";
|
|
178
|
-
readonly TBTC: "tBTC";
|
|
179
|
-
readonly Uni: "UNI";
|
|
180
|
-
readonly Usdc: "USDC";
|
|
181
|
-
readonly USDe: "USDe";
|
|
182
|
-
readonly Usds: "USDS";
|
|
183
|
-
readonly Usdt: "USDT";
|
|
184
|
-
readonly Wbtc: "WBTC";
|
|
185
|
-
readonly WeETH: "weETH";
|
|
186
|
-
readonly Weth: "WETH";
|
|
187
|
-
readonly WstETH: "wstETH";
|
|
188
|
-
readonly Arb: "ARB";
|
|
189
|
-
readonly Eurs: "EURS";
|
|
190
|
-
readonly Mai: "MAI";
|
|
191
|
-
readonly USDCe: "USDCe";
|
|
192
|
-
readonly Aero: "AERO";
|
|
193
|
-
readonly Eur: "EUR";
|
|
194
|
-
readonly Virtual: "VIRTUAL";
|
|
195
|
-
}>;
|
|
94
|
+
const inboundSchema: z.ZodType<string, z.ZodTypeDef, unknown>;
|
|
196
95
|
/** @deprecated use `GenericAllowanceToken$outboundSchema` instead. */
|
|
197
|
-
const outboundSchema: z.
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
readonly Bal: "BAL";
|
|
201
|
-
readonly CbBTC: "cbBTC";
|
|
202
|
-
readonly CbETH: "cbETH";
|
|
203
|
-
readonly Crv: "CRV";
|
|
204
|
-
readonly CrvUSD: "crvUSD";
|
|
205
|
-
readonly Dai: "DAI";
|
|
206
|
-
readonly Ens: "ENS";
|
|
207
|
-
readonly ETHx: "ETHx";
|
|
208
|
-
readonly Frax: "FRAX";
|
|
209
|
-
readonly Fxs: "FXS";
|
|
210
|
-
readonly Gho: "GHO";
|
|
211
|
-
readonly Knc: "KNC";
|
|
212
|
-
readonly Ldo: "LDO";
|
|
213
|
-
readonly Link: "LINK";
|
|
214
|
-
readonly Lusd: "LUSD";
|
|
215
|
-
readonly Mkr: "MKR";
|
|
216
|
-
readonly OsETH: "osETH";
|
|
217
|
-
readonly Pyusd: "PYUSD";
|
|
218
|
-
readonly RETH: "rETH";
|
|
219
|
-
readonly Rpl: "RPL";
|
|
220
|
-
readonly RsETH: "rsETH";
|
|
221
|
-
readonly SDAI: "sDAI";
|
|
222
|
-
readonly Snx: "SNX";
|
|
223
|
-
readonly Stg: "STG";
|
|
224
|
-
readonly SUSDe: "sUSDe";
|
|
225
|
-
readonly TBTC: "tBTC";
|
|
226
|
-
readonly Uni: "UNI";
|
|
227
|
-
readonly Usdc: "USDC";
|
|
228
|
-
readonly USDe: "USDe";
|
|
229
|
-
readonly Usds: "USDS";
|
|
230
|
-
readonly Usdt: "USDT";
|
|
231
|
-
readonly Wbtc: "WBTC";
|
|
232
|
-
readonly WeETH: "weETH";
|
|
233
|
-
readonly Weth: "WETH";
|
|
234
|
-
readonly WstETH: "wstETH";
|
|
235
|
-
readonly Arb: "ARB";
|
|
236
|
-
readonly Eurs: "EURS";
|
|
237
|
-
readonly Mai: "MAI";
|
|
238
|
-
readonly USDCe: "USDCe";
|
|
239
|
-
readonly Aero: "AERO";
|
|
240
|
-
readonly Eur: "EUR";
|
|
241
|
-
readonly Virtual: "VIRTUAL";
|
|
242
|
-
}>;
|
|
96
|
+
const outboundSchema: z.ZodType<string, z.ZodTypeDef, string>;
|
|
97
|
+
/** @deprecated use `GenericAllowanceToken$Outbound` instead. */
|
|
98
|
+
type Outbound = GenericAllowanceToken$Outbound;
|
|
243
99
|
}
|
|
100
|
+
export declare function genericAllowanceTokenToJSON(genericAllowanceToken: GenericAllowanceToken): string;
|
|
101
|
+
export declare function genericAllowanceTokenFromJSON(jsonString: string): SafeParseResult<GenericAllowanceToken, SDKValidationError>;
|
|
244
102
|
/** @internal */
|
|
245
103
|
export declare const ContractName$inboundSchema: z.ZodNativeEnum<typeof ContractName>;
|
|
246
104
|
/** @internal */
|
|
@@ -285,7 +143,7 @@ export declare const GenericAllowanceRequest$inboundSchema: z.ZodType<GenericAll
|
|
|
285
143
|
export type GenericAllowanceRequest$Outbound = {
|
|
286
144
|
chain: string;
|
|
287
145
|
user: string;
|
|
288
|
-
token: string;
|
|
146
|
+
token: string | string;
|
|
289
147
|
contract_name: string;
|
|
290
148
|
};
|
|
291
149
|
/** @internal */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genericallowance.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/genericallowance.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;CAIxB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE7E
|
|
1
|
+
{"version":3,"file":"genericallowance.d.ts","sourceRoot":"","sources":["../../../../src/models/operations/genericallowance.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;CAIxB,CAAC;AACX;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,UAA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ChE,MAAM,aAAa,2DAAwC,CAAC;IACnE,wEAAwE;IACjE,MAAM,cAAc,oFAAyC,CAAC;IACrE,kEAAkE;IAClE,KAAY,QAAQ,GAAG,gCAAgC,CAAC;CACzD;AAED,wBAAgB,6BAA6B,CAC3C,uBAAuB,EAAE,uBAAuB,GAC/C,MAAM,CAIR;AAED,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,uBAAuB,EAAE,kBAAkB,CAAC,CAM9D"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import * as components from "../components/index.js";
|
|
7
8
|
/**
|
|
8
9
|
* The chain to use.
|
|
9
10
|
*/
|
|
@@ -12,60 +13,6 @@ export const GenericAllowanceChain = {
|
|
|
12
13
|
EthereumMainnet: "ethereum:mainnet",
|
|
13
14
|
ArbitrumMainnet: "arbitrum:mainnet",
|
|
14
15
|
};
|
|
15
|
-
/**
|
|
16
|
-
* A class representing the token.
|
|
17
|
-
*
|
|
18
|
-
* @remarks
|
|
19
|
-
*
|
|
20
|
-
* This class is used to represent the token in the system. Notice individual
|
|
21
|
-
* endpoints' documentation where per chain tokens are presented.
|
|
22
|
-
*/
|
|
23
|
-
export const GenericAllowanceToken = {
|
|
24
|
-
OneINCH: "1INCH",
|
|
25
|
-
Aave: "AAVE",
|
|
26
|
-
Bal: "BAL",
|
|
27
|
-
CbBTC: "cbBTC",
|
|
28
|
-
CbETH: "cbETH",
|
|
29
|
-
Crv: "CRV",
|
|
30
|
-
CrvUSD: "crvUSD",
|
|
31
|
-
Dai: "DAI",
|
|
32
|
-
Ens: "ENS",
|
|
33
|
-
ETHx: "ETHx",
|
|
34
|
-
Frax: "FRAX",
|
|
35
|
-
Fxs: "FXS",
|
|
36
|
-
Gho: "GHO",
|
|
37
|
-
Knc: "KNC",
|
|
38
|
-
Ldo: "LDO",
|
|
39
|
-
Link: "LINK",
|
|
40
|
-
Lusd: "LUSD",
|
|
41
|
-
Mkr: "MKR",
|
|
42
|
-
OsETH: "osETH",
|
|
43
|
-
Pyusd: "PYUSD",
|
|
44
|
-
RETH: "rETH",
|
|
45
|
-
Rpl: "RPL",
|
|
46
|
-
RsETH: "rsETH",
|
|
47
|
-
SDAI: "sDAI",
|
|
48
|
-
Snx: "SNX",
|
|
49
|
-
Stg: "STG",
|
|
50
|
-
SUSDe: "sUSDe",
|
|
51
|
-
TBTC: "tBTC",
|
|
52
|
-
Uni: "UNI",
|
|
53
|
-
Usdc: "USDC",
|
|
54
|
-
USDe: "USDe",
|
|
55
|
-
Usds: "USDS",
|
|
56
|
-
Usdt: "USDT",
|
|
57
|
-
Wbtc: "WBTC",
|
|
58
|
-
WeETH: "weETH",
|
|
59
|
-
Weth: "WETH",
|
|
60
|
-
WstETH: "wstETH",
|
|
61
|
-
Arb: "ARB",
|
|
62
|
-
Eurs: "EURS",
|
|
63
|
-
Mai: "MAI",
|
|
64
|
-
USDCe: "USDCe",
|
|
65
|
-
Aero: "AERO",
|
|
66
|
-
Eur: "EUR",
|
|
67
|
-
Virtual: "VIRTUAL",
|
|
68
|
-
};
|
|
69
16
|
/**
|
|
70
17
|
* The name of the contract to check allowance for.
|
|
71
18
|
*/
|
|
@@ -98,9 +45,9 @@ export var GenericAllowanceChain$;
|
|
|
98
45
|
GenericAllowanceChain$.outboundSchema = GenericAllowanceChain$outboundSchema;
|
|
99
46
|
})(GenericAllowanceChain$ || (GenericAllowanceChain$ = {}));
|
|
100
47
|
/** @internal */
|
|
101
|
-
export const GenericAllowanceToken$inboundSchema = z.
|
|
48
|
+
export const GenericAllowanceToken$inboundSchema = z.union([components.TokenEnum$inboundSchema, z.string()]);
|
|
102
49
|
/** @internal */
|
|
103
|
-
export const GenericAllowanceToken$outboundSchema =
|
|
50
|
+
export const GenericAllowanceToken$outboundSchema = z.union([components.TokenEnum$outboundSchema, z.string()]);
|
|
104
51
|
/**
|
|
105
52
|
* @internal
|
|
106
53
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
@@ -112,6 +59,12 @@ export var GenericAllowanceToken$;
|
|
|
112
59
|
/** @deprecated use `GenericAllowanceToken$outboundSchema` instead. */
|
|
113
60
|
GenericAllowanceToken$.outboundSchema = GenericAllowanceToken$outboundSchema;
|
|
114
61
|
})(GenericAllowanceToken$ || (GenericAllowanceToken$ = {}));
|
|
62
|
+
export function genericAllowanceTokenToJSON(genericAllowanceToken) {
|
|
63
|
+
return JSON.stringify(GenericAllowanceToken$outboundSchema.parse(genericAllowanceToken));
|
|
64
|
+
}
|
|
65
|
+
export function genericAllowanceTokenFromJSON(jsonString) {
|
|
66
|
+
return safeParse(jsonString, (x) => GenericAllowanceToken$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GenericAllowanceToken' from JSON`);
|
|
67
|
+
}
|
|
115
68
|
/** @internal */
|
|
116
69
|
export const ContractName$inboundSchema = z.nativeEnum(ContractName);
|
|
117
70
|
/** @internal */
|
|
@@ -131,7 +84,7 @@ export var ContractName$;
|
|
|
131
84
|
export const GenericAllowanceRequest$inboundSchema = z.object({
|
|
132
85
|
chain: GenericAllowanceChain$inboundSchema.default("arbitrum:mainnet"),
|
|
133
86
|
user: z.string().default("0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"),
|
|
134
|
-
token:
|
|
87
|
+
token: z.union([components.TokenEnum$inboundSchema, z.string()]),
|
|
135
88
|
contract_name: ContractName$inboundSchema.default("AaveV3Pool"),
|
|
136
89
|
}).transform((v) => {
|
|
137
90
|
return remap$(v, {
|
|
@@ -142,7 +95,7 @@ export const GenericAllowanceRequest$inboundSchema = z.object({
|
|
|
142
95
|
export const GenericAllowanceRequest$outboundSchema = z.object({
|
|
143
96
|
chain: GenericAllowanceChain$outboundSchema.default("arbitrum:mainnet"),
|
|
144
97
|
user: z.string().default("0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"),
|
|
145
|
-
token:
|
|
98
|
+
token: z.union([components.TokenEnum$outboundSchema, z.string()]),
|
|
146
99
|
contractName: ContractName$outboundSchema.default("AaveV3Pool"),
|
|
147
100
|
}).transform((v) => {
|
|
148
101
|
return remap$(v, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"genericallowance.js","sourceRoot":"","sources":["../../../../src/models/operations/genericallowance.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"genericallowance.js","sourceRoot":"","sources":["../../../../src/models/operations/genericallowance.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AACzB,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAGrD;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,WAAW,EAAE,cAAc;IAC3B,eAAe,EAAE,kBAAkB;IACnC,eAAe,EAAE,kBAAkB;CAC3B,CAAC;AAWX;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,UAAU,EAAE,YAAY;IACxB,oBAAoB,EAAE,sBAAsB;IAC5C,yBAAyB,EAAE,2BAA2B;IACtD,6CAA6C,EAC3C,+CAA+C;IACjD,eAAe,EAAE,iBAAiB;IAClC,2BAA2B,EAAE,6BAA6B;IAC1D,MAAM,EAAE,QAAQ;IAChB,mBAAmB,EAAE,qBAAqB;IAC1C,oBAAoB,EAAE,sBAAsB;IAC5C,YAAY,EAAE,cAAc;IA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wBAAwB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC;IACjE,YAAY,EAAE,2BAA2B,CAAC,OAAO,CAAC,YAAY,CAAC;CAChE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,YAAY,EAAE,eAAe;KAC9B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,KAAW,wBAAwB,CAOxC;AAPD,WAAiB,wBAAwB;IACvC,uEAAuE;IAC1D,sCAAa,GAAG,qCAAqC,CAAC;IACnE,wEAAwE;IAC3D,uCAAc,GAAG,sCAAsC,CAAC;AAGvE,CAAC,EAPgB,wBAAwB,KAAxB,wBAAwB,QAOxC;AAED,MAAM,UAAU,6BAA6B,CAC3C,uBAAgD;IAEhD,OAAO,IAAI,CAAC,SAAS,CACnB,sCAAsC,CAAC,KAAK,CAAC,uBAAuB,CAAC,CACtE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,+BAA+B,CAC7C,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,qCAAqC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACjE,qDAAqD,CACtD,CAAC;AACJ,CAAC"}
|
|
@@ -248,7 +248,9 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
248
248
|
});
|
|
249
249
|
|
|
250
250
|
async function run() {
|
|
251
|
-
const result = await compassApiSDK.universal.allowance({
|
|
251
|
+
const result = await compassApiSDK.universal.allowance({
|
|
252
|
+
token: "USDC",
|
|
253
|
+
});
|
|
252
254
|
|
|
253
255
|
console.log(result);
|
|
254
256
|
}
|
|
@@ -271,7 +273,9 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
271
273
|
});
|
|
272
274
|
|
|
273
275
|
async function run() {
|
|
274
|
-
const res = await universalAllowance(compassApiSDK, {
|
|
276
|
+
const res = await universalAllowance(compassApiSDK, {
|
|
277
|
+
token: "USDC",
|
|
278
|
+
});
|
|
275
279
|
if (res.ok) {
|
|
276
280
|
const { value: result } = res;
|
|
277
281
|
console.log(result);
|
package/jsr.json
CHANGED
package/package.json
CHANGED
package/src/lib/config.ts
CHANGED
|
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
61
61
|
export const SDK_METADATA = {
|
|
62
62
|
language: "typescript",
|
|
63
63
|
openapiDocVersion: "0.0.1",
|
|
64
|
-
sdkVersion: "0.5.
|
|
64
|
+
sdkVersion: "0.5.18",
|
|
65
65
|
genVersion: "2.628.0",
|
|
66
66
|
userAgent:
|
|
67
|
-
"speakeasy-sdk/typescript 0.5.
|
|
67
|
+
"speakeasy-sdk/typescript 0.5.18 2.628.0 0.0.1 @compass-labs/api-sdk",
|
|
68
68
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -7,11 +7,6 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
-
import {
|
|
11
|
-
TokenEnum,
|
|
12
|
-
TokenEnum$inboundSchema,
|
|
13
|
-
TokenEnum$outboundSchema,
|
|
14
|
-
} from "./tokenenum.js";
|
|
15
10
|
|
|
16
11
|
/**
|
|
17
12
|
* Response model for token allowance information.
|
|
@@ -26,14 +21,9 @@ export type AllowanceInfoResponse = {
|
|
|
26
21
|
*/
|
|
27
22
|
decimals: number;
|
|
28
23
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
* @remarks
|
|
32
|
-
*
|
|
33
|
-
* This class is used to represent the token in the system. Notice individual
|
|
34
|
-
* endpoints' documentation where per chain tokens are presented.
|
|
24
|
+
* Symbol of the token.
|
|
35
25
|
*/
|
|
36
|
-
tokenSymbol:
|
|
26
|
+
tokenSymbol: string;
|
|
37
27
|
/**
|
|
38
28
|
* Address of the token
|
|
39
29
|
*/
|
|
@@ -52,7 +42,7 @@ export const AllowanceInfoResponse$inboundSchema: z.ZodType<
|
|
|
52
42
|
> = z.object({
|
|
53
43
|
amount: z.string(),
|
|
54
44
|
decimals: z.number().int(),
|
|
55
|
-
token_symbol:
|
|
45
|
+
token_symbol: z.string(),
|
|
56
46
|
token_address: z.string(),
|
|
57
47
|
contract_address: z.string(),
|
|
58
48
|
}).transform((v) => {
|
|
@@ -80,7 +70,7 @@ export const AllowanceInfoResponse$outboundSchema: z.ZodType<
|
|
|
80
70
|
> = z.object({
|
|
81
71
|
amount: z.string(),
|
|
82
72
|
decimals: z.number().int(),
|
|
83
|
-
tokenSymbol:
|
|
73
|
+
tokenSymbol: z.string(),
|
|
84
74
|
tokenAddress: z.string(),
|
|
85
75
|
contractAddress: z.string(),
|
|
86
76
|
}).transform((v) => {
|
|
@@ -7,6 +7,7 @@ import { remap as remap$ } from "../../lib/primitives.js";
|
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { ClosedEnum } from "../../types/enums.js";
|
|
9
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as components from "../components/index.js";
|
|
10
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -23,68 +24,9 @@ export const GenericAllowanceChain = {
|
|
|
23
24
|
export type GenericAllowanceChain = ClosedEnum<typeof GenericAllowanceChain>;
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* @remarks
|
|
29
|
-
*
|
|
30
|
-
* This class is used to represent the token in the system. Notice individual
|
|
31
|
-
* endpoints' documentation where per chain tokens are presented.
|
|
27
|
+
* The symbol or address of the token for which the allowance is checked..
|
|
32
28
|
*/
|
|
33
|
-
export
|
|
34
|
-
OneINCH: "1INCH",
|
|
35
|
-
Aave: "AAVE",
|
|
36
|
-
Bal: "BAL",
|
|
37
|
-
CbBTC: "cbBTC",
|
|
38
|
-
CbETH: "cbETH",
|
|
39
|
-
Crv: "CRV",
|
|
40
|
-
CrvUSD: "crvUSD",
|
|
41
|
-
Dai: "DAI",
|
|
42
|
-
Ens: "ENS",
|
|
43
|
-
ETHx: "ETHx",
|
|
44
|
-
Frax: "FRAX",
|
|
45
|
-
Fxs: "FXS",
|
|
46
|
-
Gho: "GHO",
|
|
47
|
-
Knc: "KNC",
|
|
48
|
-
Ldo: "LDO",
|
|
49
|
-
Link: "LINK",
|
|
50
|
-
Lusd: "LUSD",
|
|
51
|
-
Mkr: "MKR",
|
|
52
|
-
OsETH: "osETH",
|
|
53
|
-
Pyusd: "PYUSD",
|
|
54
|
-
RETH: "rETH",
|
|
55
|
-
Rpl: "RPL",
|
|
56
|
-
RsETH: "rsETH",
|
|
57
|
-
SDAI: "sDAI",
|
|
58
|
-
Snx: "SNX",
|
|
59
|
-
Stg: "STG",
|
|
60
|
-
SUSDe: "sUSDe",
|
|
61
|
-
TBTC: "tBTC",
|
|
62
|
-
Uni: "UNI",
|
|
63
|
-
Usdc: "USDC",
|
|
64
|
-
USDe: "USDe",
|
|
65
|
-
Usds: "USDS",
|
|
66
|
-
Usdt: "USDT",
|
|
67
|
-
Wbtc: "WBTC",
|
|
68
|
-
WeETH: "weETH",
|
|
69
|
-
Weth: "WETH",
|
|
70
|
-
WstETH: "wstETH",
|
|
71
|
-
Arb: "ARB",
|
|
72
|
-
Eurs: "EURS",
|
|
73
|
-
Mai: "MAI",
|
|
74
|
-
USDCe: "USDCe",
|
|
75
|
-
Aero: "AERO",
|
|
76
|
-
Eur: "EUR",
|
|
77
|
-
Virtual: "VIRTUAL",
|
|
78
|
-
} as const;
|
|
79
|
-
/**
|
|
80
|
-
* A class representing the token.
|
|
81
|
-
*
|
|
82
|
-
* @remarks
|
|
83
|
-
*
|
|
84
|
-
* This class is used to represent the token in the system. Notice individual
|
|
85
|
-
* endpoints' documentation where per chain tokens are presented.
|
|
86
|
-
*/
|
|
87
|
-
export type GenericAllowanceToken = ClosedEnum<typeof GenericAllowanceToken>;
|
|
29
|
+
export type GenericAllowanceToken = components.TokenEnum | string;
|
|
88
30
|
|
|
89
31
|
/**
|
|
90
32
|
* The name of the contract to check allowance for.
|
|
@@ -118,9 +60,9 @@ export type GenericAllowanceRequest = {
|
|
|
118
60
|
*/
|
|
119
61
|
user?: string | undefined;
|
|
120
62
|
/**
|
|
121
|
-
* The symbol of the token for which the allowance is checked..
|
|
63
|
+
* The symbol or address of the token for which the allowance is checked..
|
|
122
64
|
*/
|
|
123
|
-
token
|
|
65
|
+
token: components.TokenEnum | string;
|
|
124
66
|
/**
|
|
125
67
|
* The name of the contract to check allowance for.
|
|
126
68
|
*/
|
|
@@ -149,14 +91,21 @@ export namespace GenericAllowanceChain$ {
|
|
|
149
91
|
}
|
|
150
92
|
|
|
151
93
|
/** @internal */
|
|
152
|
-
export const GenericAllowanceToken$inboundSchema: z.
|
|
153
|
-
|
|
154
|
-
|
|
94
|
+
export const GenericAllowanceToken$inboundSchema: z.ZodType<
|
|
95
|
+
GenericAllowanceToken,
|
|
96
|
+
z.ZodTypeDef,
|
|
97
|
+
unknown
|
|
98
|
+
> = z.union([components.TokenEnum$inboundSchema, z.string()]);
|
|
99
|
+
|
|
100
|
+
/** @internal */
|
|
101
|
+
export type GenericAllowanceToken$Outbound = string | string;
|
|
155
102
|
|
|
156
103
|
/** @internal */
|
|
157
|
-
export const GenericAllowanceToken$outboundSchema: z.
|
|
158
|
-
|
|
159
|
-
|
|
104
|
+
export const GenericAllowanceToken$outboundSchema: z.ZodType<
|
|
105
|
+
GenericAllowanceToken$Outbound,
|
|
106
|
+
z.ZodTypeDef,
|
|
107
|
+
GenericAllowanceToken
|
|
108
|
+
> = z.union([components.TokenEnum$outboundSchema, z.string()]);
|
|
160
109
|
|
|
161
110
|
/**
|
|
162
111
|
* @internal
|
|
@@ -167,6 +116,26 @@ export namespace GenericAllowanceToken$ {
|
|
|
167
116
|
export const inboundSchema = GenericAllowanceToken$inboundSchema;
|
|
168
117
|
/** @deprecated use `GenericAllowanceToken$outboundSchema` instead. */
|
|
169
118
|
export const outboundSchema = GenericAllowanceToken$outboundSchema;
|
|
119
|
+
/** @deprecated use `GenericAllowanceToken$Outbound` instead. */
|
|
120
|
+
export type Outbound = GenericAllowanceToken$Outbound;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function genericAllowanceTokenToJSON(
|
|
124
|
+
genericAllowanceToken: GenericAllowanceToken,
|
|
125
|
+
): string {
|
|
126
|
+
return JSON.stringify(
|
|
127
|
+
GenericAllowanceToken$outboundSchema.parse(genericAllowanceToken),
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export function genericAllowanceTokenFromJSON(
|
|
132
|
+
jsonString: string,
|
|
133
|
+
): SafeParseResult<GenericAllowanceToken, SDKValidationError> {
|
|
134
|
+
return safeParse(
|
|
135
|
+
jsonString,
|
|
136
|
+
(x) => GenericAllowanceToken$inboundSchema.parse(JSON.parse(x)),
|
|
137
|
+
`Failed to parse 'GenericAllowanceToken' from JSON`,
|
|
138
|
+
);
|
|
170
139
|
}
|
|
171
140
|
|
|
172
141
|
/** @internal */
|
|
@@ -196,7 +165,7 @@ export const GenericAllowanceRequest$inboundSchema: z.ZodType<
|
|
|
196
165
|
> = z.object({
|
|
197
166
|
chain: GenericAllowanceChain$inboundSchema.default("arbitrum:mainnet"),
|
|
198
167
|
user: z.string().default("0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"),
|
|
199
|
-
token:
|
|
168
|
+
token: z.union([components.TokenEnum$inboundSchema, z.string()]),
|
|
200
169
|
contract_name: ContractName$inboundSchema.default("AaveV3Pool"),
|
|
201
170
|
}).transform((v) => {
|
|
202
171
|
return remap$(v, {
|
|
@@ -208,7 +177,7 @@ export const GenericAllowanceRequest$inboundSchema: z.ZodType<
|
|
|
208
177
|
export type GenericAllowanceRequest$Outbound = {
|
|
209
178
|
chain: string;
|
|
210
179
|
user: string;
|
|
211
|
-
token: string;
|
|
180
|
+
token: string | string;
|
|
212
181
|
contract_name: string;
|
|
213
182
|
};
|
|
214
183
|
|
|
@@ -220,7 +189,7 @@ export const GenericAllowanceRequest$outboundSchema: z.ZodType<
|
|
|
220
189
|
> = z.object({
|
|
221
190
|
chain: GenericAllowanceChain$outboundSchema.default("arbitrum:mainnet"),
|
|
222
191
|
user: z.string().default("0x29F20a192328eF1aD35e1564aBFf4Be9C5ce5f7B"),
|
|
223
|
-
token:
|
|
192
|
+
token: z.union([components.TokenEnum$outboundSchema, z.string()]),
|
|
224
193
|
contractName: ContractName$outboundSchema.default("AaveV3Pool"),
|
|
225
194
|
}).transform((v) => {
|
|
226
195
|
return remap$(v, {
|