@compass-labs/api-sdk 0.0.39 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/README.md +5 -0
  2. package/bin/mcp-server.js +3301 -3055
  3. package/bin/mcp-server.js.map +49 -35
  4. package/dist/commonjs/funcs/smartAccountAccountBatchedUserOperations.d.ts +17 -0
  5. package/dist/commonjs/funcs/smartAccountAccountBatchedUserOperations.d.ts.map +1 -0
  6. package/dist/commonjs/funcs/smartAccountAccountBatchedUserOperations.js +116 -0
  7. package/dist/commonjs/funcs/smartAccountAccountBatchedUserOperations.js.map +1 -0
  8. package/dist/commonjs/lib/config.d.ts +3 -3
  9. package/dist/commonjs/lib/config.js +3 -3
  10. package/dist/commonjs/lib/config.js.map +1 -1
  11. package/dist/commonjs/mcp-server/cli/start/impl.js +2 -2
  12. package/dist/commonjs/mcp-server/cli/start/impl.js.map +1 -1
  13. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  14. package/dist/commonjs/mcp-server/mcp-server.js.map +1 -1
  15. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  16. package/dist/commonjs/mcp-server/server.js +3 -1
  17. package/dist/commonjs/mcp-server/server.js.map +1 -1
  18. package/dist/commonjs/mcp-server/tools/aaveV3AvgRate.d.ts +1 -1
  19. package/dist/commonjs/mcp-server/tools/aaveV3Borrow.d.ts +1 -1
  20. package/dist/commonjs/mcp-server/tools/aaveV3HistoricalTransactions.d.ts +1 -1
  21. package/dist/commonjs/mcp-server/tools/aaveV3LiquidityChange.d.ts +1 -1
  22. package/dist/commonjs/mcp-server/tools/aaveV3Rate.d.ts +1 -1
  23. package/dist/commonjs/mcp-server/tools/aaveV3Repay.d.ts +1 -1
  24. package/dist/commonjs/mcp-server/tools/aaveV3ReserveOverview.d.ts +1 -1
  25. package/dist/commonjs/mcp-server/tools/aaveV3StdRate.d.ts +1 -1
  26. package/dist/commonjs/mcp-server/tools/aaveV3Supply.d.ts +1 -1
  27. package/dist/commonjs/mcp-server/tools/aaveV3TokenPrice.d.ts +1 -1
  28. package/dist/commonjs/mcp-server/tools/aaveV3UserPositionPerToken.d.ts +1 -1
  29. package/dist/commonjs/mcp-server/tools/aaveV3UserPositionSummary.d.ts +1 -1
  30. package/dist/commonjs/mcp-server/tools/aaveV3Withdraw.d.ts +1 -1
  31. package/dist/commonjs/mcp-server/tools/aerodromeSlipstreamSlipstreamLiquidityProvisionIncrease.d.ts +1 -1
  32. package/dist/commonjs/mcp-server/tools/aerodromeSlipstreamSlipstreamLiquidityProvisionMint.d.ts +1 -1
  33. package/dist/commonjs/mcp-server/tools/aerodromeSlipstreamSlipstreamLiquidityProvisionPositions.d.ts +1 -1
  34. package/dist/commonjs/mcp-server/tools/aerodromeSlipstreamSlipstreamLiquidityProvisionWithdraw.d.ts +1 -1
  35. package/dist/commonjs/mcp-server/tools/aerodromeSlipstreamSlipstreamPoolPrice.d.ts +1 -1
  36. package/dist/commonjs/mcp-server/tools/aerodromeSlipstreamSlipstreamSwapBuyExactly.d.ts +1 -1
  37. package/dist/commonjs/mcp-server/tools/aerodromeSlipstreamSlipstreamSwapSellExactly.d.ts +1 -1
  38. package/dist/commonjs/mcp-server/tools/morphoAllowance.d.ts +1 -1
  39. package/dist/commonjs/mcp-server/tools/morphoBorrow.d.ts +1 -1
  40. package/dist/commonjs/mcp-server/tools/morphoDeposit.d.ts +1 -1
  41. package/dist/commonjs/mcp-server/tools/morphoMarket.d.ts +1 -1
  42. package/dist/commonjs/mcp-server/tools/morphoMarketPosition.d.ts +1 -1
  43. package/dist/commonjs/mcp-server/tools/morphoMarkets.d.ts +1 -1
  44. package/dist/commonjs/mcp-server/tools/morphoRepay.d.ts +1 -1
  45. package/dist/commonjs/mcp-server/tools/morphoSupplyCollateral.d.ts +1 -1
  46. package/dist/commonjs/mcp-server/tools/morphoUserPosition.d.ts +1 -1
  47. package/dist/commonjs/mcp-server/tools/morphoVault.d.ts +1 -1
  48. package/dist/commonjs/mcp-server/tools/morphoVaultPosition.d.ts +1 -1
  49. package/dist/commonjs/mcp-server/tools/morphoVaults.d.ts +1 -1
  50. package/dist/commonjs/mcp-server/tools/morphoWithdraw.d.ts +1 -1
  51. package/dist/commonjs/mcp-server/tools/morphoWithdrawCollateral.d.ts +1 -1
  52. package/dist/commonjs/mcp-server/tools/skyBuy.d.ts +1 -1
  53. package/dist/commonjs/mcp-server/tools/skyDeposit.d.ts +1 -1
  54. package/dist/commonjs/mcp-server/tools/skyPosition.d.ts +1 -1
  55. package/dist/commonjs/mcp-server/tools/skySell.d.ts +1 -1
  56. package/dist/commonjs/mcp-server/tools/skyWithdraw.d.ts +1 -1
  57. package/dist/commonjs/mcp-server/tools/smartAccountAccountBatchedUserOperations.d.ts +8 -0
  58. package/dist/commonjs/mcp-server/tools/smartAccountAccountBatchedUserOperations.d.ts.map +1 -0
  59. package/dist/commonjs/mcp-server/tools/smartAccountAccountBatchedUserOperations.js +64 -0
  60. package/dist/commonjs/mcp-server/tools/smartAccountAccountBatchedUserOperations.js.map +1 -0
  61. package/dist/commonjs/mcp-server/tools/tokenAddress.d.ts +1 -1
  62. package/dist/commonjs/mcp-server/tools/tokenBalance.d.ts +1 -1
  63. package/dist/commonjs/mcp-server/tools/tokenPrice.d.ts +1 -1
  64. package/dist/commonjs/mcp-server/tools/tokenTransfer.d.ts +1 -1
  65. package/dist/commonjs/mcp-server/tools/transactionBatchingAaveLoop.d.ts +1 -1
  66. package/dist/commonjs/mcp-server/tools/transactionBatchingAuthorization.d.ts +1 -1
  67. package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.d.ts +1 -1
  68. package/dist/commonjs/mcp-server/tools/uniswapV3LiquidityProvisionInRange.d.ts +1 -1
  69. package/dist/commonjs/mcp-server/tools/uniswapV3LiquidityProvisionIncrease.d.ts +1 -1
  70. package/dist/commonjs/mcp-server/tools/uniswapV3LiquidityProvisionMint.d.ts +1 -1
  71. package/dist/commonjs/mcp-server/tools/uniswapV3LiquidityProvisionPositions.d.ts +1 -1
  72. package/dist/commonjs/mcp-server/tools/uniswapV3LiquidityProvisionWithdraw.d.ts +1 -1
  73. package/dist/commonjs/mcp-server/tools/uniswapV3PoolPrice.d.ts +1 -1
  74. package/dist/commonjs/mcp-server/tools/uniswapV3QuoteBuyExactly.d.ts +1 -1
  75. package/dist/commonjs/mcp-server/tools/uniswapV3QuoteSellExactly.d.ts +1 -1
  76. package/dist/commonjs/mcp-server/tools/uniswapV3SwapBuyExactly.d.ts +1 -1
  77. package/dist/commonjs/mcp-server/tools/uniswapV3SwapSellExactly.d.ts +1 -1
  78. package/dist/commonjs/mcp-server/tools/universalAllowance.d.ts +1 -1
  79. package/dist/commonjs/mcp-server/tools/universalAllowanceSet.d.ts +1 -1
  80. package/dist/commonjs/mcp-server/tools/universalEns.d.ts +1 -1
  81. package/dist/commonjs/mcp-server/tools/universalPortfolio.d.ts +1 -1
  82. package/dist/commonjs/mcp-server/tools/universalSupportedTokens.d.ts +1 -1
  83. package/dist/commonjs/mcp-server/tools/universalUnwrapWeth.d.ts +1 -1
  84. package/dist/commonjs/mcp-server/tools/universalVisualizePortfolio.d.ts +1 -1
  85. package/dist/commonjs/mcp-server/tools/universalWrapEth.d.ts +1 -1
  86. package/dist/commonjs/models/components/batcheduseroperation.d.ts +42 -0
  87. package/dist/commonjs/models/components/batcheduseroperation.d.ts.map +1 -0
  88. package/dist/commonjs/models/components/batcheduseroperation.js +82 -0
  89. package/dist/commonjs/models/components/batcheduseroperation.js.map +1 -0
  90. package/dist/commonjs/models/components/batcheduseroperationsrequest.d.ts +46 -0
  91. package/dist/commonjs/models/components/batcheduseroperationsrequest.d.ts.map +1 -0
  92. package/dist/commonjs/models/components/batcheduseroperationsrequest.js +82 -0
  93. package/dist/commonjs/models/components/batcheduseroperationsrequest.js.map +1 -0
  94. package/dist/commonjs/models/components/batcheduseroperationsresponse.d.ts +33 -0
  95. package/dist/commonjs/models/components/batcheduseroperationsresponse.d.ts.map +1 -0
  96. package/dist/commonjs/models/components/batcheduseroperationsresponse.js +70 -0
  97. package/dist/commonjs/models/components/batcheduseroperationsresponse.js.map +1 -0
  98. package/dist/commonjs/models/components/index.d.ts +4 -1
  99. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  100. package/dist/commonjs/models/components/index.js +4 -1
  101. package/dist/commonjs/models/components/index.js.map +1 -1
  102. package/dist/commonjs/models/components/multicallexecuterequest.d.ts +3 -3
  103. package/dist/commonjs/models/components/multicallexecuterequest.d.ts.map +1 -1
  104. package/dist/commonjs/models/components/multicallexecuterequest.js +3 -3
  105. package/dist/commonjs/models/components/multicallexecuterequest.js.map +1 -1
  106. package/dist/commonjs/models/components/{multicallaction.d.ts → useroperation.d.ts} +14 -14
  107. package/dist/commonjs/models/components/useroperation.d.ts.map +1 -0
  108. package/dist/commonjs/models/components/{multicallaction.js → useroperation.js} +17 -17
  109. package/dist/commonjs/models/components/useroperation.js.map +1 -0
  110. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  111. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  112. package/dist/commonjs/sdk/sdk.js +4 -0
  113. package/dist/commonjs/sdk/sdk.js.map +1 -1
  114. package/dist/commonjs/sdk/smartaccount.d.ts +12 -0
  115. package/dist/commonjs/sdk/smartaccount.d.ts.map +1 -0
  116. package/dist/commonjs/sdk/smartaccount.js +22 -0
  117. package/dist/commonjs/sdk/smartaccount.js.map +1 -0
  118. package/dist/esm/funcs/smartAccountAccountBatchedUserOperations.d.ts +17 -0
  119. package/dist/esm/funcs/smartAccountAccountBatchedUserOperations.d.ts.map +1 -0
  120. package/dist/esm/funcs/smartAccountAccountBatchedUserOperations.js +80 -0
  121. package/dist/esm/funcs/smartAccountAccountBatchedUserOperations.js.map +1 -0
  122. package/dist/esm/lib/config.d.ts +3 -3
  123. package/dist/esm/lib/config.js +3 -3
  124. package/dist/esm/lib/config.js.map +1 -1
  125. package/dist/esm/mcp-server/cli/start/impl.js +2 -2
  126. package/dist/esm/mcp-server/cli/start/impl.js.map +1 -1
  127. package/dist/esm/mcp-server/mcp-server.js +1 -1
  128. package/dist/esm/mcp-server/mcp-server.js.map +1 -1
  129. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  130. package/dist/esm/mcp-server/server.js +3 -1
  131. package/dist/esm/mcp-server/server.js.map +1 -1
  132. package/dist/esm/mcp-server/tools/smartAccountAccountBatchedUserOperations.d.ts +8 -0
  133. package/dist/esm/mcp-server/tools/smartAccountAccountBatchedUserOperations.d.ts.map +1 -0
  134. package/dist/esm/mcp-server/tools/smartAccountAccountBatchedUserOperations.js +28 -0
  135. package/dist/esm/mcp-server/tools/smartAccountAccountBatchedUserOperations.js.map +1 -0
  136. package/dist/esm/models/components/batcheduseroperation.d.ts +42 -0
  137. package/dist/esm/models/components/batcheduseroperation.d.ts.map +1 -0
  138. package/dist/esm/models/components/batcheduseroperation.js +44 -0
  139. package/dist/esm/models/components/batcheduseroperation.js.map +1 -0
  140. package/dist/esm/models/components/batcheduseroperationsrequest.d.ts +46 -0
  141. package/dist/esm/models/components/batcheduseroperationsrequest.d.ts.map +1 -0
  142. package/dist/esm/models/components/batcheduseroperationsrequest.js +44 -0
  143. package/dist/esm/models/components/batcheduseroperationsrequest.js.map +1 -0
  144. package/dist/esm/models/components/batcheduseroperationsresponse.d.ts +33 -0
  145. package/dist/esm/models/components/batcheduseroperationsresponse.d.ts.map +1 -0
  146. package/dist/esm/models/components/batcheduseroperationsresponse.js +32 -0
  147. package/dist/esm/models/components/batcheduseroperationsresponse.js.map +1 -0
  148. package/dist/esm/models/components/index.d.ts +4 -1
  149. package/dist/esm/models/components/index.d.ts.map +1 -1
  150. package/dist/esm/models/components/index.js +4 -1
  151. package/dist/esm/models/components/index.js.map +1 -1
  152. package/dist/esm/models/components/multicallexecuterequest.d.ts +3 -3
  153. package/dist/esm/models/components/multicallexecuterequest.d.ts.map +1 -1
  154. package/dist/esm/models/components/multicallexecuterequest.js +3 -3
  155. package/dist/esm/models/components/multicallexecuterequest.js.map +1 -1
  156. package/dist/esm/models/components/{multicallaction.d.ts → useroperation.d.ts} +14 -14
  157. package/dist/esm/models/components/useroperation.d.ts.map +1 -0
  158. package/dist/esm/models/components/{multicallaction.js → useroperation.js} +14 -14
  159. package/dist/esm/models/components/useroperation.js.map +1 -0
  160. package/dist/esm/sdk/sdk.d.ts +3 -0
  161. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  162. package/dist/esm/sdk/sdk.js +4 -0
  163. package/dist/esm/sdk/sdk.js.map +1 -1
  164. package/dist/esm/sdk/smartaccount.d.ts +12 -0
  165. package/dist/esm/sdk/smartaccount.d.ts.map +1 -0
  166. package/dist/esm/sdk/smartaccount.js +18 -0
  167. package/dist/esm/sdk/smartaccount.js.map +1 -0
  168. package/docs/sdks/smartaccount/README.md +105 -0
  169. package/jsr.json +1 -1
  170. package/package.json +1 -1
  171. package/src/funcs/smartAccountAccountBatchedUserOperations.ts +164 -0
  172. package/src/lib/config.ts +3 -3
  173. package/src/mcp-server/cli/start/impl.ts +2 -2
  174. package/src/mcp-server/mcp-server.ts +1 -1
  175. package/src/mcp-server/server.ts +3 -1
  176. package/src/mcp-server/tools/smartAccountAccountBatchedUserOperations.ts +39 -0
  177. package/src/models/components/batcheduseroperation.ts +92 -0
  178. package/src/models/components/batcheduseroperationsrequest.ts +106 -0
  179. package/src/models/components/batcheduseroperationsresponse.ts +77 -0
  180. package/src/models/components/index.ts +4 -1
  181. package/src/models/components/multicallexecuterequest.ts +10 -10
  182. package/src/models/components/{multicallaction.ts → useroperation.ts} +20 -22
  183. package/src/sdk/sdk.ts +6 -0
  184. package/src/sdk/smartaccount.ts +27 -0
  185. package/dist/commonjs/models/components/multicallaction.d.ts.map +0 -1
  186. package/dist/commonjs/models/components/multicallaction.js.map +0 -1
  187. package/dist/esm/models/components/multicallaction.d.ts.map +0 -1
  188. package/dist/esm/models/components/multicallaction.js.map +0 -1
@@ -0,0 +1,164 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { CompassApiSDKCore } from "../core.js";
6
+ import { encodeJSON } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import * as components from "../models/components/index.js";
14
+ import { APIError } from "../models/errors/apierror.js";
15
+ import {
16
+ ConnectionError,
17
+ InvalidRequestError,
18
+ RequestAbortedError,
19
+ RequestTimeoutError,
20
+ UnexpectedClientError,
21
+ } from "../models/errors/httpclienterrors.js";
22
+ import * as errors from "../models/errors/index.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import { APICall, APIPromise } from "../types/async.js";
25
+ import { Result } from "../types/fp.js";
26
+
27
+ /**
28
+ * Get Smart Account Batched User Operations
29
+ *
30
+ * @remarks
31
+ * Generate a list of user operations for smart account batching.
32
+ */
33
+ export function smartAccountAccountBatchedUserOperations(
34
+ client: CompassApiSDKCore,
35
+ request: components.BatchedUserOperationsRequest,
36
+ options?: RequestOptions,
37
+ ): APIPromise<
38
+ Result<
39
+ components.BatchedUserOperationsResponse,
40
+ | errors.HTTPValidationError
41
+ | APIError
42
+ | SDKValidationError
43
+ | UnexpectedClientError
44
+ | InvalidRequestError
45
+ | RequestAbortedError
46
+ | RequestTimeoutError
47
+ | ConnectionError
48
+ >
49
+ > {
50
+ return new APIPromise($do(
51
+ client,
52
+ request,
53
+ options,
54
+ ));
55
+ }
56
+
57
+ async function $do(
58
+ client: CompassApiSDKCore,
59
+ request: components.BatchedUserOperationsRequest,
60
+ options?: RequestOptions,
61
+ ): Promise<
62
+ [
63
+ Result<
64
+ components.BatchedUserOperationsResponse,
65
+ | errors.HTTPValidationError
66
+ | APIError
67
+ | SDKValidationError
68
+ | UnexpectedClientError
69
+ | InvalidRequestError
70
+ | RequestAbortedError
71
+ | RequestTimeoutError
72
+ | ConnectionError
73
+ >,
74
+ APICall,
75
+ ]
76
+ > {
77
+ const parsed = safeParse(
78
+ request,
79
+ (value) =>
80
+ components.BatchedUserOperationsRequest$outboundSchema.parse(value),
81
+ "Input validation failed",
82
+ );
83
+ if (!parsed.ok) {
84
+ return [parsed, { status: "invalid" }];
85
+ }
86
+ const payload = parsed.value;
87
+ const body = encodeJSON("body", payload, { explode: true });
88
+
89
+ const path = pathToFunc("/v0/smart_account/batched_user_operations")();
90
+
91
+ const headers = new Headers(compactMap({
92
+ "Content-Type": "application/json",
93
+ Accept: "application/json",
94
+ }));
95
+
96
+ const secConfig = await extractSecurity(client._options.apiKeyAuth);
97
+ const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
98
+ const requestSecurity = resolveGlobalSecurity(securityInput);
99
+
100
+ const context = {
101
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
102
+ operationID: "smart_account_batched_user_operations",
103
+ oAuth2Scopes: [],
104
+
105
+ resolvedSecurity: requestSecurity,
106
+
107
+ securitySource: client._options.apiKeyAuth,
108
+ retryConfig: options?.retries
109
+ || client._options.retryConfig
110
+ || { strategy: "none" },
111
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
112
+ };
113
+
114
+ const requestRes = client._createRequest(context, {
115
+ security: requestSecurity,
116
+ method: "POST",
117
+ baseURL: options?.serverURL,
118
+ path: path,
119
+ headers: headers,
120
+ body: body,
121
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
122
+ }, options);
123
+ if (!requestRes.ok) {
124
+ return [requestRes, { status: "invalid" }];
125
+ }
126
+ const req = requestRes.value;
127
+
128
+ const doResult = await client._do(req, {
129
+ context,
130
+ errorCodes: ["422", "4XX", "5XX"],
131
+ retryConfig: context.retryConfig,
132
+ retryCodes: context.retryCodes,
133
+ });
134
+ if (!doResult.ok) {
135
+ return [doResult, { status: "request-error", request: req }];
136
+ }
137
+ const response = doResult.value;
138
+
139
+ const responseFields = {
140
+ HttpMeta: { Response: response, Request: req },
141
+ };
142
+
143
+ const [result] = await M.match<
144
+ components.BatchedUserOperationsResponse,
145
+ | errors.HTTPValidationError
146
+ | APIError
147
+ | SDKValidationError
148
+ | UnexpectedClientError
149
+ | InvalidRequestError
150
+ | RequestAbortedError
151
+ | RequestTimeoutError
152
+ | ConnectionError
153
+ >(
154
+ M.json(200, components.BatchedUserOperationsResponse$inboundSchema),
155
+ M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
156
+ M.fail("4XX"),
157
+ M.fail("5XX"),
158
+ )(response, { extraFields: responseFields });
159
+ if (!result.ok) {
160
+ return [result, { status: "complete", request: req, response }];
161
+ }
162
+
163
+ return [result, { status: "complete", request: req, response }];
164
+ }
package/src/lib/config.ts CHANGED
@@ -57,8 +57,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
57
57
  export const SDK_METADATA = {
58
58
  language: "typescript",
59
59
  openapiDocVersion: "0.0.1",
60
- sdkVersion: "0.0.39",
61
- genVersion: "2.604.4",
60
+ sdkVersion: "0.1.0",
61
+ genVersion: "2.605.0",
62
62
  userAgent:
63
- "speakeasy-sdk/typescript 0.0.39 2.604.4 0.0.1 @compass-labs/api-sdk",
63
+ "speakeasy-sdk/typescript 0.1.0 2.605.0 0.0.1 @compass-labs/api-sdk",
64
64
  } as const;
@@ -50,7 +50,7 @@ async function startStdio(flags: StartCommandFlags) {
50
50
  logger,
51
51
  allowedTools: flags.tool,
52
52
  scopes: flags.scope,
53
- ...{ apiKeyAuth: flags["api-key-auth"] },
53
+ ...{ apiKeyAuth: flags["api-key-auth"] ?? "" },
54
54
  serverURL: flags["server-url"],
55
55
  serverIdx: flags["server-index"],
56
56
  });
@@ -71,7 +71,7 @@ async function startSSE(flags: StartCommandFlags) {
71
71
  logger,
72
72
  allowedTools: flags.tool,
73
73
  scopes: flags.scope,
74
- ...{ apiKeyAuth: flags["api-key-auth"] },
74
+ ...{ apiKeyAuth: flags["api-key-auth"] ?? "" },
75
75
  serverURL: flags["server-url"],
76
76
  serverIdx: flags["server-index"],
77
77
  });
@@ -19,7 +19,7 @@ const routes = buildRouteMap({
19
19
  export const app = buildApplication(routes, {
20
20
  name: "mcp",
21
21
  versionInfo: {
22
- currentVersion: "0.0.39",
22
+ currentVersion: "0.1.0",
23
23
  },
24
24
  });
25
25
 
@@ -52,6 +52,7 @@ import { tool$skyDeposit } from "./tools/skyDeposit.js";
52
52
  import { tool$skyPosition } from "./tools/skyPosition.js";
53
53
  import { tool$skySell } from "./tools/skySell.js";
54
54
  import { tool$skyWithdraw } from "./tools/skyWithdraw.js";
55
+ import { tool$smartAccountAccountBatchedUserOperations } from "./tools/smartAccountAccountBatchedUserOperations.js";
55
56
  import { tool$tokenAddress } from "./tools/tokenAddress.js";
56
57
  import { tool$tokenBalance } from "./tools/tokenBalance.js";
57
58
  import { tool$tokenPrice } from "./tools/tokenPrice.js";
@@ -88,7 +89,7 @@ export function createMCPServer(deps: {
88
89
  }) {
89
90
  const server = new McpServer({
90
91
  name: "CompassApiSDK",
91
- version: "0.0.39",
92
+ version: "0.1.0",
92
93
  });
93
94
 
94
95
  const client = new CompassApiSDKCore({
@@ -182,6 +183,7 @@ export function createMCPServer(deps: {
182
183
  tool(tool$transactionBatchingAuthorization);
183
184
  tool(tool$transactionBatchingExecute);
184
185
  tool(tool$transactionBatchingAaveLoop);
186
+ tool(tool$smartAccountAccountBatchedUserOperations);
185
187
 
186
188
  return server;
187
189
  }
@@ -0,0 +1,39 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { smartAccountAccountBatchedUserOperations } from "../../funcs/smartAccountAccountBatchedUserOperations.js";
6
+ import * as components from "../../models/components/index.js";
7
+ import { formatResult, ToolDefinition } from "../tools.js";
8
+
9
+ const args = {
10
+ request: components.BatchedUserOperationsRequest$inboundSchema,
11
+ };
12
+
13
+ export const tool$smartAccountAccountBatchedUserOperations: ToolDefinition<
14
+ typeof args
15
+ > = {
16
+ name: "smart-account-account-batched-user-operations",
17
+ description: `Get Smart Account Batched User Operations
18
+
19
+ Generate a list of user operations for smart account batching.`,
20
+ args,
21
+ tool: async (client, args, ctx) => {
22
+ const [result, apiCall] = await smartAccountAccountBatchedUserOperations(
23
+ client,
24
+ args.request,
25
+ { fetchOptions: { signal: ctx.signal } },
26
+ ).$inspect();
27
+
28
+ if (!result.ok) {
29
+ return {
30
+ content: [{ type: "text", text: result.error.message }],
31
+ isError: true,
32
+ };
33
+ }
34
+
35
+ const value = result.value;
36
+
37
+ return formatResult(value, apiCall);
38
+ },
39
+ };
@@ -0,0 +1,92 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type BatchedUserOperation = {
12
+ /**
13
+ * The target contract address for the operation
14
+ */
15
+ to: string;
16
+ /**
17
+ * The calldata for the operation
18
+ */
19
+ callData: string;
20
+ /**
21
+ * The ETH value to send with the operation
22
+ */
23
+ value: number;
24
+ };
25
+
26
+ /** @internal */
27
+ export const BatchedUserOperation$inboundSchema: z.ZodType<
28
+ BatchedUserOperation,
29
+ z.ZodTypeDef,
30
+ unknown
31
+ > = z.object({
32
+ to: z.string(),
33
+ call_data: z.string(),
34
+ value: z.number().int(),
35
+ }).transform((v) => {
36
+ return remap$(v, {
37
+ "call_data": "callData",
38
+ });
39
+ });
40
+
41
+ /** @internal */
42
+ export type BatchedUserOperation$Outbound = {
43
+ to: string;
44
+ call_data: string;
45
+ value: number;
46
+ };
47
+
48
+ /** @internal */
49
+ export const BatchedUserOperation$outboundSchema: z.ZodType<
50
+ BatchedUserOperation$Outbound,
51
+ z.ZodTypeDef,
52
+ BatchedUserOperation
53
+ > = z.object({
54
+ to: z.string(),
55
+ callData: z.string(),
56
+ value: z.number().int(),
57
+ }).transform((v) => {
58
+ return remap$(v, {
59
+ callData: "call_data",
60
+ });
61
+ });
62
+
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 namespace BatchedUserOperation$ {
68
+ /** @deprecated use `BatchedUserOperation$inboundSchema` instead. */
69
+ export const inboundSchema = BatchedUserOperation$inboundSchema;
70
+ /** @deprecated use `BatchedUserOperation$outboundSchema` instead. */
71
+ export const outboundSchema = BatchedUserOperation$outboundSchema;
72
+ /** @deprecated use `BatchedUserOperation$Outbound` instead. */
73
+ export type Outbound = BatchedUserOperation$Outbound;
74
+ }
75
+
76
+ export function batchedUserOperationToJSON(
77
+ batchedUserOperation: BatchedUserOperation,
78
+ ): string {
79
+ return JSON.stringify(
80
+ BatchedUserOperation$outboundSchema.parse(batchedUserOperation),
81
+ );
82
+ }
83
+
84
+ export function batchedUserOperationFromJSON(
85
+ jsonString: string,
86
+ ): SafeParseResult<BatchedUserOperation, SDKValidationError> {
87
+ return safeParse(
88
+ jsonString,
89
+ (x) => BatchedUserOperation$inboundSchema.parse(JSON.parse(x)),
90
+ `Failed to parse 'BatchedUserOperation' from JSON`,
91
+ );
92
+ }
@@ -0,0 +1,106 @@
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 {
8
+ collectExtraKeys as collectExtraKeys$,
9
+ safeParse,
10
+ } from "../../lib/schemas.js";
11
+ import { Result as SafeParseResult } from "../../types/fp.js";
12
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
13
+ import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
14
+ import {
15
+ UserOperation,
16
+ UserOperation$inboundSchema,
17
+ UserOperation$Outbound,
18
+ UserOperation$outboundSchema,
19
+ } from "./useroperation.js";
20
+
21
+ /**
22
+ * Request model for batching user operations.
23
+ */
24
+ export type BatchedUserOperationsRequest = {
25
+ /**
26
+ * The chain to use.
27
+ */
28
+ chain: Chain;
29
+ /**
30
+ * List of possible user operations
31
+ */
32
+ operations: Array<UserOperation>;
33
+ additionalProperties?: { [k: string]: any };
34
+ };
35
+
36
+ /** @internal */
37
+ export const BatchedUserOperationsRequest$inboundSchema: z.ZodType<
38
+ BatchedUserOperationsRequest,
39
+ z.ZodTypeDef,
40
+ unknown
41
+ > = collectExtraKeys$(
42
+ z.object({
43
+ chain: Chain$inboundSchema,
44
+ operations: z.array(UserOperation$inboundSchema),
45
+ }).catchall(z.any()),
46
+ "additionalProperties",
47
+ true,
48
+ );
49
+
50
+ /** @internal */
51
+ export type BatchedUserOperationsRequest$Outbound = {
52
+ chain: string;
53
+ operations: Array<UserOperation$Outbound>;
54
+ [additionalProperties: string]: unknown;
55
+ };
56
+
57
+ /** @internal */
58
+ export const BatchedUserOperationsRequest$outboundSchema: z.ZodType<
59
+ BatchedUserOperationsRequest$Outbound,
60
+ z.ZodTypeDef,
61
+ BatchedUserOperationsRequest
62
+ > = z.object({
63
+ chain: Chain$outboundSchema,
64
+ operations: z.array(UserOperation$outboundSchema),
65
+ additionalProperties: z.record(z.any()),
66
+ }).transform((v) => {
67
+ return {
68
+ ...v.additionalProperties,
69
+ ...remap$(v, {
70
+ additionalProperties: null,
71
+ }),
72
+ };
73
+ });
74
+
75
+ /**
76
+ * @internal
77
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
78
+ */
79
+ export namespace BatchedUserOperationsRequest$ {
80
+ /** @deprecated use `BatchedUserOperationsRequest$inboundSchema` instead. */
81
+ export const inboundSchema = BatchedUserOperationsRequest$inboundSchema;
82
+ /** @deprecated use `BatchedUserOperationsRequest$outboundSchema` instead. */
83
+ export const outboundSchema = BatchedUserOperationsRequest$outboundSchema;
84
+ /** @deprecated use `BatchedUserOperationsRequest$Outbound` instead. */
85
+ export type Outbound = BatchedUserOperationsRequest$Outbound;
86
+ }
87
+
88
+ export function batchedUserOperationsRequestToJSON(
89
+ batchedUserOperationsRequest: BatchedUserOperationsRequest,
90
+ ): string {
91
+ return JSON.stringify(
92
+ BatchedUserOperationsRequest$outboundSchema.parse(
93
+ batchedUserOperationsRequest,
94
+ ),
95
+ );
96
+ }
97
+
98
+ export function batchedUserOperationsRequestFromJSON(
99
+ jsonString: string,
100
+ ): SafeParseResult<BatchedUserOperationsRequest, SDKValidationError> {
101
+ return safeParse(
102
+ jsonString,
103
+ (x) => BatchedUserOperationsRequest$inboundSchema.parse(JSON.parse(x)),
104
+ `Failed to parse 'BatchedUserOperationsRequest' from JSON`,
105
+ );
106
+ }
@@ -0,0 +1,77 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+ import {
10
+ BatchedUserOperation,
11
+ BatchedUserOperation$inboundSchema,
12
+ BatchedUserOperation$Outbound,
13
+ BatchedUserOperation$outboundSchema,
14
+ } from "./batcheduseroperation.js";
15
+
16
+ export type BatchedUserOperationsResponse = {
17
+ /**
18
+ * List of user operations to be batched and executed by the smart account.
19
+ */
20
+ operations: Array<BatchedUserOperation>;
21
+ };
22
+
23
+ /** @internal */
24
+ export const BatchedUserOperationsResponse$inboundSchema: z.ZodType<
25
+ BatchedUserOperationsResponse,
26
+ z.ZodTypeDef,
27
+ unknown
28
+ > = z.object({
29
+ operations: z.array(BatchedUserOperation$inboundSchema),
30
+ });
31
+
32
+ /** @internal */
33
+ export type BatchedUserOperationsResponse$Outbound = {
34
+ operations: Array<BatchedUserOperation$Outbound>;
35
+ };
36
+
37
+ /** @internal */
38
+ export const BatchedUserOperationsResponse$outboundSchema: z.ZodType<
39
+ BatchedUserOperationsResponse$Outbound,
40
+ z.ZodTypeDef,
41
+ BatchedUserOperationsResponse
42
+ > = z.object({
43
+ operations: z.array(BatchedUserOperation$outboundSchema),
44
+ });
45
+
46
+ /**
47
+ * @internal
48
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
49
+ */
50
+ export namespace BatchedUserOperationsResponse$ {
51
+ /** @deprecated use `BatchedUserOperationsResponse$inboundSchema` instead. */
52
+ export const inboundSchema = BatchedUserOperationsResponse$inboundSchema;
53
+ /** @deprecated use `BatchedUserOperationsResponse$outboundSchema` instead. */
54
+ export const outboundSchema = BatchedUserOperationsResponse$outboundSchema;
55
+ /** @deprecated use `BatchedUserOperationsResponse$Outbound` instead. */
56
+ export type Outbound = BatchedUserOperationsResponse$Outbound;
57
+ }
58
+
59
+ export function batchedUserOperationsResponseToJSON(
60
+ batchedUserOperationsResponse: BatchedUserOperationsResponse,
61
+ ): string {
62
+ return JSON.stringify(
63
+ BatchedUserOperationsResponse$outboundSchema.parse(
64
+ batchedUserOperationsResponse,
65
+ ),
66
+ );
67
+ }
68
+
69
+ export function batchedUserOperationsResponseFromJSON(
70
+ jsonString: string,
71
+ ): SafeParseResult<BatchedUserOperationsResponse, SDKValidationError> {
72
+ return safeParse(
73
+ jsonString,
74
+ (x) => BatchedUserOperationsResponse$inboundSchema.parse(JSON.parse(x)),
75
+ `Failed to parse 'BatchedUserOperationsResponse' from JSON`,
76
+ );
77
+ }
@@ -34,6 +34,9 @@ export * from "./aerodromeslipstreamsellexactlyrequest.js";
34
34
  export * from "./aerodromeslipstreamwithdrawliquidityprovisionparams.js";
35
35
  export * from "./aerodromeslipstreamwithdrawliquidityprovisionrequest.js";
36
36
  export * from "./allowanceinforesponse.js";
37
+ export * from "./batcheduseroperation.js";
38
+ export * from "./batcheduseroperationsrequest.js";
39
+ export * from "./batcheduseroperationsresponse.js";
37
40
  export * from "./borrow.js";
38
41
  export * from "./chain.js";
39
42
  export * from "./chaininfo.js";
@@ -87,7 +90,6 @@ export * from "./morphowithdrawcollateralparams.js";
87
90
  export * from "./morphowithdrawcollateralrequest.js";
88
91
  export * from "./morphowithdrawparams.js";
89
92
  export * from "./morphowithdrawrequest.js";
90
- export * from "./multicallaction.js";
91
93
  export * from "./multicallactiontype.js";
92
94
  export * from "./multicallauthorizationrequest.js";
93
95
  export * from "./multicallauthorizationresponse.js";
@@ -138,6 +140,7 @@ export * from "./unsignedtransaction.js";
138
140
  export * from "./unwrapwethparams.js";
139
141
  export * from "./unwrapwethrequest.js";
140
142
  export * from "./usageascollateral.js";
143
+ export * from "./useroperation.js";
141
144
  export * from "./userstate.js";
142
145
  export * from "./validationerror.js";
143
146
  export * from "./vault.js";
@@ -8,18 +8,18 @@ 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
10
  import { Chain, Chain$inboundSchema, Chain$outboundSchema } from "./chain.js";
11
- import {
12
- MulticallAction,
13
- MulticallAction$inboundSchema,
14
- MulticallAction$Outbound,
15
- MulticallAction$outboundSchema,
16
- } from "./multicallaction.js";
17
11
  import {
18
12
  SignedAuthorization,
19
13
  SignedAuthorization$inboundSchema,
20
14
  SignedAuthorization$Outbound,
21
15
  SignedAuthorization$outboundSchema,
22
16
  } from "./signedauthorization.js";
17
+ import {
18
+ UserOperation,
19
+ UserOperation$inboundSchema,
20
+ UserOperation$Outbound,
21
+ UserOperation$outboundSchema,
22
+ } from "./useroperation.js";
23
23
 
24
24
  /**
25
25
  * Request model for executing a multicall.
@@ -37,7 +37,7 @@ export type MulticallExecuteRequest = {
37
37
  /**
38
38
  * List of possible actions for multicall
39
39
  */
40
- actions: Array<MulticallAction>;
40
+ actions: Array<UserOperation>;
41
41
  };
42
42
 
43
43
  /** @internal */
@@ -49,7 +49,7 @@ export const MulticallExecuteRequest$inboundSchema: z.ZodType<
49
49
  chain: Chain$inboundSchema,
50
50
  sender: z.string(),
51
51
  signed_authorization: SignedAuthorization$inboundSchema,
52
- actions: z.array(MulticallAction$inboundSchema),
52
+ actions: z.array(UserOperation$inboundSchema),
53
53
  }).transform((v) => {
54
54
  return remap$(v, {
55
55
  "signed_authorization": "signedAuthorization",
@@ -61,7 +61,7 @@ export type MulticallExecuteRequest$Outbound = {
61
61
  chain: string;
62
62
  sender: string;
63
63
  signed_authorization: SignedAuthorization$Outbound;
64
- actions: Array<MulticallAction$Outbound>;
64
+ actions: Array<UserOperation$Outbound>;
65
65
  };
66
66
 
67
67
  /** @internal */
@@ -73,7 +73,7 @@ export const MulticallExecuteRequest$outboundSchema: z.ZodType<
73
73
  chain: Chain$outboundSchema,
74
74
  sender: z.string(),
75
75
  signedAuthorization: SignedAuthorization$outboundSchema,
76
- actions: z.array(MulticallAction$outboundSchema),
76
+ actions: z.array(UserOperation$outboundSchema),
77
77
  }).transform((v) => {
78
78
  return remap$(v, {
79
79
  signedAuthorization: "signed_authorization",