@compass-labs/api-sdk 0.5.11 → 0.5.13

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 (141) hide show
  1. package/README.md +0 -9
  2. package/bin/mcp-server.js +251 -742
  3. package/bin/mcp-server.js.map +9 -19
  4. package/dist/commonjs/lib/config.d.ts +2 -2
  5. package/dist/commonjs/lib/config.js +2 -2
  6. package/dist/commonjs/mcp-server/mcp-server.js +1 -1
  7. package/dist/commonjs/mcp-server/server.d.ts.map +1 -1
  8. package/dist/commonjs/mcp-server/server.js +1 -7
  9. package/dist/commonjs/mcp-server/server.js.map +1 -1
  10. package/dist/commonjs/models/components/index.d.ts +0 -4
  11. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  12. package/dist/commonjs/models/components/index.js +0 -4
  13. package/dist/commonjs/models/components/index.js.map +1 -1
  14. package/dist/commonjs/models/operations/tokenprice.js +4 -4
  15. package/dist/commonjs/sdk/sdk.d.ts +0 -3
  16. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  17. package/dist/commonjs/sdk/sdk.js +0 -4
  18. package/dist/commonjs/sdk/sdk.js.map +1 -1
  19. package/dist/esm/lib/config.d.ts +2 -2
  20. package/dist/esm/lib/config.js +2 -2
  21. package/dist/esm/mcp-server/mcp-server.js +1 -1
  22. package/dist/esm/mcp-server/server.d.ts.map +1 -1
  23. package/dist/esm/mcp-server/server.js +1 -7
  24. package/dist/esm/mcp-server/server.js.map +1 -1
  25. package/dist/esm/models/components/index.d.ts +0 -4
  26. package/dist/esm/models/components/index.d.ts.map +1 -1
  27. package/dist/esm/models/components/index.js +0 -4
  28. package/dist/esm/models/components/index.js.map +1 -1
  29. package/dist/esm/models/operations/tokenprice.js +4 -4
  30. package/dist/esm/sdk/sdk.d.ts +0 -3
  31. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  32. package/dist/esm/sdk/sdk.js +0 -4
  33. package/dist/esm/sdk/sdk.js.map +1 -1
  34. package/jsr.json +1 -1
  35. package/package.json +1 -1
  36. package/src/lib/config.ts +2 -2
  37. package/src/mcp-server/mcp-server.ts +1 -1
  38. package/src/mcp-server/server.ts +1 -7
  39. package/src/models/components/index.ts +0 -4
  40. package/src/models/operations/tokenprice.ts +4 -4
  41. package/src/sdk/sdk.ts +0 -8
  42. package/dist/commonjs/funcs/transactionBatchingAaveLoop.d.ts +0 -28
  43. package/dist/commonjs/funcs/transactionBatchingAaveLoop.d.ts.map +0 -1
  44. package/dist/commonjs/funcs/transactionBatchingAaveLoop.js +0 -128
  45. package/dist/commonjs/funcs/transactionBatchingAaveLoop.js.map +0 -1
  46. package/dist/commonjs/funcs/transactionBatchingAuthorization.d.ts +0 -23
  47. package/dist/commonjs/funcs/transactionBatchingAuthorization.d.ts.map +0 -1
  48. package/dist/commonjs/funcs/transactionBatchingAuthorization.js +0 -123
  49. package/dist/commonjs/funcs/transactionBatchingAuthorization.js.map +0 -1
  50. package/dist/commonjs/funcs/transactionBatchingExecute.d.ts +0 -24
  51. package/dist/commonjs/funcs/transactionBatchingExecute.d.ts.map +0 -1
  52. package/dist/commonjs/funcs/transactionBatchingExecute.js +0 -124
  53. package/dist/commonjs/funcs/transactionBatchingExecute.js.map +0 -1
  54. package/dist/commonjs/mcp-server/tools/transactionBatchingAaveLoop.d.ts +0 -8
  55. package/dist/commonjs/mcp-server/tools/transactionBatchingAaveLoop.d.ts.map +0 -1
  56. package/dist/commonjs/mcp-server/tools/transactionBatchingAaveLoop.js +0 -74
  57. package/dist/commonjs/mcp-server/tools/transactionBatchingAaveLoop.js.map +0 -1
  58. package/dist/commonjs/mcp-server/tools/transactionBatchingAuthorization.d.ts +0 -8
  59. package/dist/commonjs/mcp-server/tools/transactionBatchingAuthorization.d.ts.map +0 -1
  60. package/dist/commonjs/mcp-server/tools/transactionBatchingAuthorization.js +0 -69
  61. package/dist/commonjs/mcp-server/tools/transactionBatchingAuthorization.js.map +0 -1
  62. package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.d.ts +0 -8
  63. package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.d.ts.map +0 -1
  64. package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.js +0 -70
  65. package/dist/commonjs/mcp-server/tools/transactionBatchingExecute.js.map +0 -1
  66. package/dist/commonjs/models/components/aavelooprequest.d.ts +0 -181
  67. package/dist/commonjs/models/components/aavelooprequest.d.ts.map +0 -1
  68. package/dist/commonjs/models/components/aavelooprequest.js +0 -199
  69. package/dist/commonjs/models/components/aavelooprequest.js.map +0 -1
  70. package/dist/commonjs/models/components/multicallauthorizationrequest.d.ts +0 -49
  71. package/dist/commonjs/models/components/multicallauthorizationrequest.d.ts.map +0 -1
  72. package/dist/commonjs/models/components/multicallauthorizationrequest.js +0 -72
  73. package/dist/commonjs/models/components/multicallauthorizationrequest.js.map +0 -1
  74. package/dist/commonjs/models/components/multicallauthorizationresponse.d.ts +0 -45
  75. package/dist/commonjs/models/components/multicallauthorizationresponse.d.ts.map +0 -1
  76. package/dist/commonjs/models/components/multicallauthorizationresponse.js +0 -73
  77. package/dist/commonjs/models/components/multicallauthorizationresponse.js.map +0 -1
  78. package/dist/commonjs/models/components/multicallexecuterequest.d.ts +0 -50
  79. package/dist/commonjs/models/components/multicallexecuterequest.d.ts.map +0 -1
  80. package/dist/commonjs/models/components/multicallexecuterequest.js +0 -87
  81. package/dist/commonjs/models/components/multicallexecuterequest.js.map +0 -1
  82. package/dist/commonjs/sdk/transactionbatching.d.ts +0 -47
  83. package/dist/commonjs/sdk/transactionbatching.d.ts.map +0 -1
  84. package/dist/commonjs/sdk/transactionbatching.js +0 -63
  85. package/dist/commonjs/sdk/transactionbatching.js.map +0 -1
  86. package/dist/esm/funcs/transactionBatchingAaveLoop.d.ts +0 -28
  87. package/dist/esm/funcs/transactionBatchingAaveLoop.d.ts.map +0 -1
  88. package/dist/esm/funcs/transactionBatchingAaveLoop.js +0 -92
  89. package/dist/esm/funcs/transactionBatchingAaveLoop.js.map +0 -1
  90. package/dist/esm/funcs/transactionBatchingAuthorization.d.ts +0 -23
  91. package/dist/esm/funcs/transactionBatchingAuthorization.d.ts.map +0 -1
  92. package/dist/esm/funcs/transactionBatchingAuthorization.js +0 -87
  93. package/dist/esm/funcs/transactionBatchingAuthorization.js.map +0 -1
  94. package/dist/esm/funcs/transactionBatchingExecute.d.ts +0 -24
  95. package/dist/esm/funcs/transactionBatchingExecute.d.ts.map +0 -1
  96. package/dist/esm/funcs/transactionBatchingExecute.js +0 -88
  97. package/dist/esm/funcs/transactionBatchingExecute.js.map +0 -1
  98. package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.d.ts +0 -8
  99. package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.d.ts.map +0 -1
  100. package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.js +0 -38
  101. package/dist/esm/mcp-server/tools/transactionBatchingAaveLoop.js.map +0 -1
  102. package/dist/esm/mcp-server/tools/transactionBatchingAuthorization.d.ts +0 -8
  103. package/dist/esm/mcp-server/tools/transactionBatchingAuthorization.d.ts.map +0 -1
  104. package/dist/esm/mcp-server/tools/transactionBatchingAuthorization.js +0 -33
  105. package/dist/esm/mcp-server/tools/transactionBatchingAuthorization.js.map +0 -1
  106. package/dist/esm/mcp-server/tools/transactionBatchingExecute.d.ts +0 -8
  107. package/dist/esm/mcp-server/tools/transactionBatchingExecute.d.ts.map +0 -1
  108. package/dist/esm/mcp-server/tools/transactionBatchingExecute.js +0 -34
  109. package/dist/esm/mcp-server/tools/transactionBatchingExecute.js.map +0 -1
  110. package/dist/esm/models/components/aavelooprequest.d.ts +0 -181
  111. package/dist/esm/models/components/aavelooprequest.d.ts.map +0 -1
  112. package/dist/esm/models/components/aavelooprequest.js +0 -153
  113. package/dist/esm/models/components/aavelooprequest.js.map +0 -1
  114. package/dist/esm/models/components/multicallauthorizationrequest.d.ts +0 -49
  115. package/dist/esm/models/components/multicallauthorizationrequest.d.ts.map +0 -1
  116. package/dist/esm/models/components/multicallauthorizationrequest.js +0 -34
  117. package/dist/esm/models/components/multicallauthorizationrequest.js.map +0 -1
  118. package/dist/esm/models/components/multicallauthorizationresponse.d.ts +0 -45
  119. package/dist/esm/models/components/multicallauthorizationresponse.d.ts.map +0 -1
  120. package/dist/esm/models/components/multicallauthorizationresponse.js +0 -35
  121. package/dist/esm/models/components/multicallauthorizationresponse.js.map +0 -1
  122. package/dist/esm/models/components/multicallexecuterequest.d.ts +0 -50
  123. package/dist/esm/models/components/multicallexecuterequest.d.ts.map +0 -1
  124. package/dist/esm/models/components/multicallexecuterequest.js +0 -49
  125. package/dist/esm/models/components/multicallexecuterequest.js.map +0 -1
  126. package/dist/esm/sdk/transactionbatching.d.ts +0 -47
  127. package/dist/esm/sdk/transactionbatching.d.ts.map +0 -1
  128. package/dist/esm/sdk/transactionbatching.js +0 -59
  129. package/dist/esm/sdk/transactionbatching.js.map +0 -1
  130. package/docs/sdks/transactionbatching/README.md +0 -318
  131. package/src/funcs/transactionBatchingAaveLoop.ts +0 -179
  132. package/src/funcs/transactionBatchingAuthorization.ts +0 -175
  133. package/src/funcs/transactionBatchingExecute.ts +0 -175
  134. package/src/mcp-server/tools/transactionBatchingAaveLoop.ts +0 -47
  135. package/src/mcp-server/tools/transactionBatchingAuthorization.ts +0 -44
  136. package/src/mcp-server/tools/transactionBatchingExecute.ts +0 -43
  137. package/src/models/components/aavelooprequest.ts +0 -368
  138. package/src/models/components/multicallauthorizationrequest.ts +0 -90
  139. package/src/models/components/multicallauthorizationresponse.ts +0 -88
  140. package/src/models/components/multicallexecuterequest.ts +0 -112
  141. package/src/sdk/transactionbatching.ts +0 -84
@@ -144,8 +144,8 @@ export const TokenPriceRequest$inboundSchema: z.ZodType<
144
144
  z.ZodTypeDef,
145
145
  unknown
146
146
  > = z.object({
147
- chain: TokenPriceChain$inboundSchema.default("arbitrum:mainnet"),
148
- token: TokenPriceToken$inboundSchema.default("WBTC"),
147
+ chain: TokenPriceChain$inboundSchema.default("ethereum:mainnet"),
148
+ token: TokenPriceToken$inboundSchema.default("AAVE"),
149
149
  });
150
150
 
151
151
  /** @internal */
@@ -160,8 +160,8 @@ export const TokenPriceRequest$outboundSchema: z.ZodType<
160
160
  z.ZodTypeDef,
161
161
  TokenPriceRequest
162
162
  > = z.object({
163
- chain: TokenPriceChain$outboundSchema.default("arbitrum:mainnet"),
164
- token: TokenPriceToken$outboundSchema.default("WBTC"),
163
+ chain: TokenPriceChain$outboundSchema.default("ethereum:mainnet"),
164
+ token: TokenPriceToken$outboundSchema.default("AAVE"),
165
165
  });
166
166
 
167
167
  /**
package/src/sdk/sdk.ts CHANGED
@@ -10,7 +10,6 @@ import { Pendle } from "./pendle.js";
10
10
  import { Sky } from "./sky.js";
11
11
  import { SmartAccount } from "./smartaccount.js";
12
12
  import { Token } from "./token.js";
13
- import { TransactionBatching } from "./transactionbatching.js";
14
13
  import { UniswapV3 } from "./uniswapv3.js";
15
14
  import { Universal } from "./universal.js";
16
15
 
@@ -57,13 +56,6 @@ export class CompassApiSDK extends ClientSDK {
57
56
  return (this._pendle ??= new Pendle(this._options));
58
57
  }
59
58
 
60
- private _transactionBatching?: TransactionBatching;
61
- get transactionBatching(): TransactionBatching {
62
- return (this._transactionBatching ??= new TransactionBatching(
63
- this._options,
64
- ));
65
- }
66
-
67
59
  private _smartAccount?: SmartAccount;
68
60
  get smartAccount(): SmartAccount {
69
61
  return (this._smartAccount ??= new SmartAccount(this._options));
@@ -1,28 +0,0 @@
1
- import { CompassApiSDKCore } from "../core.js";
2
- import { RequestOptions } from "../lib/sdks.js";
3
- import * as components from "../models/components/index.js";
4
- import { CompassAPISDKError } from "../models/errors/compassapisdkerror.js";
5
- import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
6
- import * as errors from "../models/errors/index.js";
7
- import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
8
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
9
- import { APIPromise } from "../types/async.js";
10
- import { Result } from "../types/fp.js";
11
- /**
12
- * AAVE leverage long/short
13
- *
14
- * @remarks
15
- * Execute an Aave looping strategy that involves repeated supply and borrow
16
- * operations.
17
- *
18
- * This endpoint creates a multicall transaction that performs a series of operations:
19
- * 1. Approves and supplies initial token
20
- * 2. For each loop:
21
- * - Borrows another token
22
- * - Swaps borrowed token back to supply token
23
- * - Supplies the swapped tokens
24
- *
25
- * The transaction must be authorized using the /authorization endpoint to prevent replay attacks.
26
- */
27
- export declare function transactionBatchingAaveLoop(client: CompassApiSDKCore, request: components.AaveLoopRequest, options?: RequestOptions): APIPromise<Result<components.UnsignedMulticallTransaction, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
28
- //# sourceMappingURL=transactionBatchingAaveLoop.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactionBatchingAaveLoop.d.ts","sourceRoot":"","sources":["../../../src/funcs/transactionBatchingAaveLoop.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,eAAe,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,4BAA4B,EACrC,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -1,128 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.transactionBatchingAaveLoop = transactionBatchingAaveLoop;
40
- const encodings_js_1 = require("../lib/encodings.js");
41
- const M = __importStar(require("../lib/matchers.js"));
42
- const primitives_js_1 = require("../lib/primitives.js");
43
- const schemas_js_1 = require("../lib/schemas.js");
44
- const security_js_1 = require("../lib/security.js");
45
- const url_js_1 = require("../lib/url.js");
46
- const components = __importStar(require("../models/components/index.js"));
47
- const errors = __importStar(require("../models/errors/index.js"));
48
- const async_js_1 = require("../types/async.js");
49
- /**
50
- * AAVE leverage long/short
51
- *
52
- * @remarks
53
- * Execute an Aave looping strategy that involves repeated supply and borrow
54
- * operations.
55
- *
56
- * This endpoint creates a multicall transaction that performs a series of operations:
57
- * 1. Approves and supplies initial token
58
- * 2. For each loop:
59
- * - Borrows another token
60
- * - Swaps borrowed token back to supply token
61
- * - Supplies the swapped tokens
62
- *
63
- * The transaction must be authorized using the /authorization endpoint to prevent replay attacks.
64
- */
65
- function transactionBatchingAaveLoop(client, request, options) {
66
- return new async_js_1.APIPromise($do(client, request, options));
67
- }
68
- async function $do(client, request, options) {
69
- const parsed = (0, schemas_js_1.safeParse)(request, (value) => components.AaveLoopRequest$outboundSchema.parse(value), "Input validation failed");
70
- if (!parsed.ok) {
71
- return [parsed, { status: "invalid" }];
72
- }
73
- const payload = parsed.value;
74
- const body = (0, encodings_js_1.encodeJSON)("body", payload, { explode: true });
75
- const path = (0, url_js_1.pathToFunc)("/v0/multicall/aave/loop")();
76
- const headers = new Headers((0, primitives_js_1.compactMap)({
77
- "Content-Type": "application/json",
78
- Accept: "application/json",
79
- }));
80
- const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKeyAuth);
81
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
82
- const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
83
- const context = {
84
- options: client._options,
85
- baseURL: options?.serverURL ?? client._baseURL ?? "",
86
- operationID: "multicall_aave_loop",
87
- oAuth2Scopes: [],
88
- resolvedSecurity: requestSecurity,
89
- securitySource: client._options.apiKeyAuth,
90
- retryConfig: options?.retries
91
- || client._options.retryConfig
92
- || { strategy: "none" },
93
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
94
- };
95
- const requestRes = client._createRequest(context, {
96
- security: requestSecurity,
97
- method: "POST",
98
- baseURL: options?.serverURL,
99
- path: path,
100
- headers: headers,
101
- body: body,
102
- userAgent: client._options.userAgent,
103
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
104
- }, options);
105
- if (!requestRes.ok) {
106
- return [requestRes, { status: "invalid" }];
107
- }
108
- const req = requestRes.value;
109
- const doResult = await client._do(req, {
110
- context,
111
- errorCodes: ["422", "4XX", "5XX"],
112
- retryConfig: context.retryConfig,
113
- retryCodes: context.retryCodes,
114
- });
115
- if (!doResult.ok) {
116
- return [doResult, { status: "request-error", request: req }];
117
- }
118
- const response = doResult.value;
119
- const responseFields = {
120
- HttpMeta: { Response: response, Request: req },
121
- };
122
- const [result] = await M.match(M.json(200, components.UnsignedMulticallTransaction$inboundSchema), M.jsonErr(422, errors.HTTPValidationError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
123
- if (!result.ok) {
124
- return [result, { status: "complete", request: req, response }];
125
- }
126
- return [result, { status: "complete", request: req, response }];
127
- }
128
- //# sourceMappingURL=transactionBatchingAaveLoop.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactionBatchingAaveLoop.js","sourceRoot":"","sources":["../../../src/funcs/transactionBatchingAaveLoop.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCH,kEAuBC;AA7DD,sDAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAS5D,kEAAoD;AAGpD,gDAAwD;AAGxD;;;;;;;;;;;;;;;GAeG;AACH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AAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,OAAO,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,cAAc,GAAG;QACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAY5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,0CAA0C,CAAC,EAClE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,iCAAiC,CAAC,EACxD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -1,23 +0,0 @@
1
- import { CompassApiSDKCore } from "../core.js";
2
- import { RequestOptions } from "../lib/sdks.js";
3
- import * as components from "../models/components/index.js";
4
- import { CompassAPISDKError } from "../models/errors/compassapisdkerror.js";
5
- import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
6
- import * as errors from "../models/errors/index.js";
7
- import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
8
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
9
- import { APIPromise } from "../types/async.js";
10
- import { Result } from "../types/fp.js";
11
- /**
12
- * Enable transaction bundling.
13
- *
14
- * @remarks
15
- * Get authorization for bundling transactions.
16
- *
17
- * Currently this is required for every transaction bundle to prevent replay attacks
18
- * and ensure transaction ordering when batching multiple actions into a single
19
- * transaction. The authorization includes a nonce and chain ID to guarantee
20
- * transaction uniqueness and proper network targeting.
21
- */
22
- export declare function transactionBatchingAuthorization(client: CompassApiSDKCore, request: components.MulticallAuthorizationRequest, options?: RequestOptions): APIPromise<Result<components.MulticallAuthorizationResponse, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
23
- //# sourceMappingURL=transactionBatchingAuthorization.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactionBatchingAuthorization.d.ts","sourceRoot":"","sources":["../../../src/funcs/transactionBatchingAuthorization.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;GAUG;AACH,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,6BAA6B,EACjD,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,8BAA8B,EACvC,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -1,123 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.transactionBatchingAuthorization = transactionBatchingAuthorization;
40
- const encodings_js_1 = require("../lib/encodings.js");
41
- const M = __importStar(require("../lib/matchers.js"));
42
- const primitives_js_1 = require("../lib/primitives.js");
43
- const schemas_js_1 = require("../lib/schemas.js");
44
- const security_js_1 = require("../lib/security.js");
45
- const url_js_1 = require("../lib/url.js");
46
- const components = __importStar(require("../models/components/index.js"));
47
- const errors = __importStar(require("../models/errors/index.js"));
48
- const async_js_1 = require("../types/async.js");
49
- /**
50
- * Enable transaction bundling.
51
- *
52
- * @remarks
53
- * Get authorization for bundling transactions.
54
- *
55
- * Currently this is required for every transaction bundle to prevent replay attacks
56
- * and ensure transaction ordering when batching multiple actions into a single
57
- * transaction. The authorization includes a nonce and chain ID to guarantee
58
- * transaction uniqueness and proper network targeting.
59
- */
60
- function transactionBatchingAuthorization(client, request, options) {
61
- return new async_js_1.APIPromise($do(client, request, options));
62
- }
63
- async function $do(client, request, options) {
64
- const parsed = (0, schemas_js_1.safeParse)(request, (value) => components.MulticallAuthorizationRequest$outboundSchema.parse(value), "Input validation failed");
65
- if (!parsed.ok) {
66
- return [parsed, { status: "invalid" }];
67
- }
68
- const payload = parsed.value;
69
- const body = (0, encodings_js_1.encodeJSON)("body", payload, { explode: true });
70
- const path = (0, url_js_1.pathToFunc)("/v0/multicall/authorization")();
71
- const headers = new Headers((0, primitives_js_1.compactMap)({
72
- "Content-Type": "application/json",
73
- Accept: "application/json",
74
- }));
75
- const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKeyAuth);
76
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
77
- const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
78
- const context = {
79
- options: client._options,
80
- baseURL: options?.serverURL ?? client._baseURL ?? "",
81
- operationID: "multicall_authorization",
82
- oAuth2Scopes: [],
83
- resolvedSecurity: requestSecurity,
84
- securitySource: client._options.apiKeyAuth,
85
- retryConfig: options?.retries
86
- || client._options.retryConfig
87
- || { strategy: "none" },
88
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
89
- };
90
- const requestRes = client._createRequest(context, {
91
- security: requestSecurity,
92
- method: "POST",
93
- baseURL: options?.serverURL,
94
- path: path,
95
- headers: headers,
96
- body: body,
97
- userAgent: client._options.userAgent,
98
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
99
- }, options);
100
- if (!requestRes.ok) {
101
- return [requestRes, { status: "invalid" }];
102
- }
103
- const req = requestRes.value;
104
- const doResult = await client._do(req, {
105
- context,
106
- errorCodes: ["422", "4XX", "5XX"],
107
- retryConfig: context.retryConfig,
108
- retryCodes: context.retryCodes,
109
- });
110
- if (!doResult.ok) {
111
- return [doResult, { status: "request-error", request: req }];
112
- }
113
- const response = doResult.value;
114
- const responseFields = {
115
- HttpMeta: { Response: response, Request: req },
116
- };
117
- const [result] = await M.match(M.json(200, components.MulticallAuthorizationResponse$inboundSchema), M.jsonErr(422, errors.HTTPValidationError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
118
- if (!result.ok) {
119
- return [result, { status: "complete", request: req, response }];
120
- }
121
- return [result, { status: "complete", request: req, response }];
122
- }
123
- //# sourceMappingURL=transactionBatchingAuthorization.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactionBatchingAuthorization.js","sourceRoot":"","sources":["../../../src/funcs/transactionBatchingAuthorization.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCH,4EAuBC;AAxDD,sDAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAS5D,kEAAoD;AAGpD,gDAAwD;AAGxD;;;;;;;;;;GAUG;AACH,SAAgB,gCAAgC,CAC9C,MAAyB,EACzB,OAAiD,EACjD,OAAwB;IAexB,OAAO,IAAI,qBAAU,CA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,eAAe,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;IAC/D,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,cAAc,GAAG;QACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAY5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,4CAA4C,CAAC,EACpE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,iCAAiC,CAAC,EACxD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -1,24 +0,0 @@
1
- import { CompassApiSDKCore } from "../core.js";
2
- import { RequestOptions } from "../lib/sdks.js";
3
- import * as components from "../models/components/index.js";
4
- import { CompassAPISDKError } from "../models/errors/compassapisdkerror.js";
5
- import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
6
- import * as errors from "../models/errors/index.js";
7
- import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
8
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
9
- import { APIPromise } from "../types/async.js";
10
- import { Result } from "../types/fp.js";
11
- /**
12
- * Construct Bundled Transaction
13
- *
14
- * @remarks
15
- * Bundle arbitrary transactions together into a single multicall transaction using
16
- * EIP-7702.
17
- *
18
- * This endpoint allows bundling multiple contract calls into a single atomic
19
- * transaction, reducing gas costs and ensuring all operations succeed or fail
20
- * together. The transaction must be authorized using the /authorization endpoint to
21
- * prevent replay attacks.
22
- */
23
- export declare function transactionBatchingExecute(client: CompassApiSDKCore, request: components.MulticallExecuteRequest, options?: RequestOptions): APIPromise<Result<components.UnsignedMulticallTransaction, errors.HTTPValidationError | CompassAPISDKError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
24
- //# sourceMappingURL=transactionBatchingExecute.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactionBatchingExecute.d.ts","sourceRoot":"","sources":["../../../src/funcs/transactionBatchingExecute.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAK/C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,iBAAiB,EACzB,OAAO,EAAE,UAAU,CAAC,uBAAuB,EAC3C,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CACX,MAAM,CACJ,UAAU,CAAC,4BAA4B,EACrC,MAAM,CAAC,mBAAmB,GAC1B,kBAAkB,GAClB,uBAAuB,GACvB,eAAe,GACf,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,qBAAqB,GACrB,kBAAkB,CACrB,CACF,CAMA"}
@@ -1,124 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.transactionBatchingExecute = transactionBatchingExecute;
40
- const encodings_js_1 = require("../lib/encodings.js");
41
- const M = __importStar(require("../lib/matchers.js"));
42
- const primitives_js_1 = require("../lib/primitives.js");
43
- const schemas_js_1 = require("../lib/schemas.js");
44
- const security_js_1 = require("../lib/security.js");
45
- const url_js_1 = require("../lib/url.js");
46
- const components = __importStar(require("../models/components/index.js"));
47
- const errors = __importStar(require("../models/errors/index.js"));
48
- const async_js_1 = require("../types/async.js");
49
- /**
50
- * Construct Bundled Transaction
51
- *
52
- * @remarks
53
- * Bundle arbitrary transactions together into a single multicall transaction using
54
- * EIP-7702.
55
- *
56
- * This endpoint allows bundling multiple contract calls into a single atomic
57
- * transaction, reducing gas costs and ensuring all operations succeed or fail
58
- * together. The transaction must be authorized using the /authorization endpoint to
59
- * prevent replay attacks.
60
- */
61
- function transactionBatchingExecute(client, request, options) {
62
- return new async_js_1.APIPromise($do(client, request, options));
63
- }
64
- async function $do(client, request, options) {
65
- const parsed = (0, schemas_js_1.safeParse)(request, (value) => components.MulticallExecuteRequest$outboundSchema.parse(value), "Input validation failed");
66
- if (!parsed.ok) {
67
- return [parsed, { status: "invalid" }];
68
- }
69
- const payload = parsed.value;
70
- const body = (0, encodings_js_1.encodeJSON)("body", payload, { explode: true });
71
- const path = (0, url_js_1.pathToFunc)("/v0/multicall/execute")();
72
- const headers = new Headers((0, primitives_js_1.compactMap)({
73
- "Content-Type": "application/json",
74
- Accept: "application/json",
75
- }));
76
- const secConfig = await (0, security_js_1.extractSecurity)(client._options.apiKeyAuth);
77
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
78
- const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
79
- const context = {
80
- options: client._options,
81
- baseURL: options?.serverURL ?? client._baseURL ?? "",
82
- operationID: "multicall_execute",
83
- oAuth2Scopes: [],
84
- resolvedSecurity: requestSecurity,
85
- securitySource: client._options.apiKeyAuth,
86
- retryConfig: options?.retries
87
- || client._options.retryConfig
88
- || { strategy: "none" },
89
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
90
- };
91
- const requestRes = client._createRequest(context, {
92
- security: requestSecurity,
93
- method: "POST",
94
- baseURL: options?.serverURL,
95
- path: path,
96
- headers: headers,
97
- body: body,
98
- userAgent: client._options.userAgent,
99
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
100
- }, options);
101
- if (!requestRes.ok) {
102
- return [requestRes, { status: "invalid" }];
103
- }
104
- const req = requestRes.value;
105
- const doResult = await client._do(req, {
106
- context,
107
- errorCodes: ["422", "4XX", "5XX"],
108
- retryConfig: context.retryConfig,
109
- retryCodes: context.retryCodes,
110
- });
111
- if (!doResult.ok) {
112
- return [doResult, { status: "request-error", request: req }];
113
- }
114
- const response = doResult.value;
115
- const responseFields = {
116
- HttpMeta: { Response: response, Request: req },
117
- };
118
- const [result] = await M.match(M.json(200, components.UnsignedMulticallTransaction$inboundSchema), M.jsonErr(422, errors.HTTPValidationError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
119
- if (!result.ok) {
120
- return [result, { status: "complete", request: req, response }];
121
- }
122
- return [result, { status: "complete", request: req, response }];
123
- }
124
- //# sourceMappingURL=transactionBatchingExecute.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactionBatchingExecute.js","sourceRoot":"","sources":["../../../src/funcs/transactionBatchingExecute.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCH,gEAuBC;AAzDD,sDAAiD;AACjD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAS5D,kEAAoD;AAGpD,gDAAwD;AAGxD;;;;;;;;;;;GAWG;AACH,SAAgB,0BAA0B,CACxC,MAAyB,EACzB,OAA2C,EAC3C,OAAwB;IAexB,OAAO,IAAI,qBAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,CAAC,CAAC;AACL,CAAC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MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,cAAc,GAAG;QACrB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;KAC/C,CAAC;IAEF,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,KAAK,CAY5B,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,0CAA0C,CAAC,EAClE,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,iCAAiC,CAAC,EACxD,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,EACb,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CACd,CAAC,QAAQ,EAAE,GAAG,EAAE,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,OAAO,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,CAAC;AAClE,CAAC"}
@@ -1,8 +0,0 @@
1
- import * as components from "../../models/components/index.js";
2
- import { ToolDefinition } from "../tools.js";
3
- declare const args: {
4
- request: import("zod").ZodType<components.AaveLoopRequest, import("zod").ZodTypeDef, unknown>;
5
- };
6
- export declare const tool$transactionBatchingAaveLoop: ToolDefinition<typeof args>;
7
- export {};
8
- //# sourceMappingURL=transactionBatchingAaveLoop.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactionBatchingAaveLoop.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/transactionBatchingAaveLoop.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAE3D,QAAA,MAAM,IAAI;;CAET,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,cAAc,CAAC,OAAO,IAAI,CAkCxE,CAAC"}
@@ -1,74 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || (function () {
22
- var ownKeys = function(o) {
23
- ownKeys = Object.getOwnPropertyNames || function (o) {
24
- var ar = [];
25
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
26
- return ar;
27
- };
28
- return ownKeys(o);
29
- };
30
- return function (mod) {
31
- if (mod && mod.__esModule) return mod;
32
- var result = {};
33
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
34
- __setModuleDefault(result, mod);
35
- return result;
36
- };
37
- })();
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.tool$transactionBatchingAaveLoop = void 0;
40
- const transactionBatchingAaveLoop_js_1 = require("../../funcs/transactionBatchingAaveLoop.js");
41
- const components = __importStar(require("../../models/components/index.js"));
42
- const tools_js_1 = require("../tools.js");
43
- const args = {
44
- request: components.AaveLoopRequest$inboundSchema,
45
- };
46
- exports.tool$transactionBatchingAaveLoop = {
47
- name: "transaction-batching-aave-loop",
48
- description: `AAVE leverage long/short
49
-
50
- Execute an Aave looping strategy that involves repeated supply and borrow
51
- operations.
52
-
53
- This endpoint creates a multicall transaction that performs a series of operations:
54
- 1. Approves and supplies initial token
55
- 2. For each loop:
56
- - Borrows another token
57
- - Swaps borrowed token back to supply token
58
- - Supplies the swapped tokens
59
-
60
- The transaction must be authorized using the /authorization endpoint to prevent replay attacks.`,
61
- args,
62
- tool: async (client, args, ctx) => {
63
- const [result, apiCall] = await (0, transactionBatchingAaveLoop_js_1.transactionBatchingAaveLoop)(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
64
- if (!result.ok) {
65
- return {
66
- content: [{ type: "text", text: result.error.message }],
67
- isError: true,
68
- };
69
- }
70
- const value = result.value;
71
- return (0, tools_js_1.formatResult)(value, apiCall);
72
- },
73
- };
74
- //# sourceMappingURL=transactionBatchingAaveLoop.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactionBatchingAaveLoop.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/transactionBatchingAaveLoop.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,+FAAyF;AACzF,6EAA+D;AAC/D,0CAA2D;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,6BAA6B;CAClD,CAAC;AAEW,QAAA,gCAAgC,GAAgC;IAC3E,IAAI,EAAE,gCAAgC;IACtC,WAAW,EAAE;;;;;;;;;;;;gGAYiF;IAC9F,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,IAAA,4DAA2B,EACzD,MAAM,EACN,IAAI,CAAC,OAAO,EACZ,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,EAAE,CACzC,CAAC,QAAQ,EAAE,CAAC;QAEb,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;gBACvD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAE3B,OAAO,IAAA,uBAAY,EAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF,CAAC"}
@@ -1,8 +0,0 @@
1
- import * as components from "../../models/components/index.js";
2
- import { ToolDefinition } from "../tools.js";
3
- declare const args: {
4
- request: import("zod").ZodType<components.MulticallAuthorizationRequest, import("zod").ZodTypeDef, unknown>;
5
- };
6
- export declare const tool$transactionBatchingAuthorization: ToolDefinition<typeof args>;
7
- export {};
8
- //# sourceMappingURL=transactionBatchingAuthorization.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactionBatchingAuthorization.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/transactionBatchingAuthorization.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAgB,cAAc,EAAE,MAAM,aAAa,CAAC;AAE3D,QAAA,MAAM,IAAI;;CAET,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,cAAc,CAChE,OAAO,IAAI,CA8BZ,CAAC"}