@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
@@ -1,87 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import { encodeJSON } from "../lib/encodings.js";
5
- import * as M from "../lib/matchers.js";
6
- import { compactMap } from "../lib/primitives.js";
7
- import { safeParse } from "../lib/schemas.js";
8
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
9
- import { pathToFunc } from "../lib/url.js";
10
- import * as components from "../models/components/index.js";
11
- import * as errors from "../models/errors/index.js";
12
- import { APIPromise } from "../types/async.js";
13
- /**
14
- * Enable transaction bundling.
15
- *
16
- * @remarks
17
- * Get authorization for bundling transactions.
18
- *
19
- * Currently this is required for every transaction bundle to prevent replay attacks
20
- * and ensure transaction ordering when batching multiple actions into a single
21
- * transaction. The authorization includes a nonce and chain ID to guarantee
22
- * transaction uniqueness and proper network targeting.
23
- */
24
- export function transactionBatchingAuthorization(client, request, options) {
25
- return new APIPromise($do(client, request, options));
26
- }
27
- async function $do(client, request, options) {
28
- const parsed = safeParse(request, (value) => components.MulticallAuthorizationRequest$outboundSchema.parse(value), "Input validation failed");
29
- if (!parsed.ok) {
30
- return [parsed, { status: "invalid" }];
31
- }
32
- const payload = parsed.value;
33
- const body = encodeJSON("body", payload, { explode: true });
34
- const path = pathToFunc("/v0/multicall/authorization")();
35
- const headers = new Headers(compactMap({
36
- "Content-Type": "application/json",
37
- Accept: "application/json",
38
- }));
39
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
40
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
41
- const requestSecurity = resolveGlobalSecurity(securityInput);
42
- const context = {
43
- options: client._options,
44
- baseURL: options?.serverURL ?? client._baseURL ?? "",
45
- operationID: "multicall_authorization",
46
- oAuth2Scopes: [],
47
- resolvedSecurity: requestSecurity,
48
- securitySource: client._options.apiKeyAuth,
49
- retryConfig: options?.retries
50
- || client._options.retryConfig
51
- || { strategy: "none" },
52
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
53
- };
54
- const requestRes = client._createRequest(context, {
55
- security: requestSecurity,
56
- method: "POST",
57
- baseURL: options?.serverURL,
58
- path: path,
59
- headers: headers,
60
- body: body,
61
- userAgent: client._options.userAgent,
62
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
63
- }, options);
64
- if (!requestRes.ok) {
65
- return [requestRes, { status: "invalid" }];
66
- }
67
- const req = requestRes.value;
68
- const doResult = await client._do(req, {
69
- context,
70
- errorCodes: ["422", "4XX", "5XX"],
71
- retryConfig: context.retryConfig,
72
- retryCodes: context.retryCodes,
73
- });
74
- if (!doResult.ok) {
75
- return [doResult, { status: "request-error", request: req }];
76
- }
77
- const response = doResult.value;
78
- const responseFields = {
79
- HttpMeta: { Response: response, Request: req },
80
- };
81
- 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 });
82
- if (!result.ok) {
83
- return [result, { status: "complete", request: req, response }];
84
- }
85
- return [result, { status: "complete", request: req, response }];
86
- }
87
- //# sourceMappingURL=transactionBatchingAuthorization.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactionBatchingAuthorization.js","sourceRoot":"","sources":["../../../src/funcs/transactionBatchingAuthorization.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAS5D,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AAGpD,OAAO,EAAW,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGxD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gCAAgC,CAC9C,MAAyB,EACzB,OAAiD,EACjD,OAAwB;IAexB,OAAO,IAAI,UAAU,CAAC,GAAG,CACvB,MAAM,EACN,OAAO,EACP,OAAO,CACR,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Q,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,88 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import { encodeJSON } from "../lib/encodings.js";
5
- import * as M from "../lib/matchers.js";
6
- import { compactMap } from "../lib/primitives.js";
7
- import { safeParse } from "../lib/schemas.js";
8
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
9
- import { pathToFunc } from "../lib/url.js";
10
- import * as components from "../models/components/index.js";
11
- import * as errors from "../models/errors/index.js";
12
- import { APIPromise } from "../types/async.js";
13
- /**
14
- * Construct Bundled Transaction
15
- *
16
- * @remarks
17
- * Bundle arbitrary transactions together into a single multicall transaction using
18
- * EIP-7702.
19
- *
20
- * This endpoint allows bundling multiple contract calls into a single atomic
21
- * transaction, reducing gas costs and ensuring all operations succeed or fail
22
- * together. The transaction must be authorized using the /authorization endpoint to
23
- * prevent replay attacks.
24
- */
25
- export function transactionBatchingExecute(client, request, options) {
26
- return new APIPromise($do(client, request, options));
27
- }
28
- async function $do(client, request, options) {
29
- const parsed = safeParse(request, (value) => components.MulticallExecuteRequest$outboundSchema.parse(value), "Input validation failed");
30
- if (!parsed.ok) {
31
- return [parsed, { status: "invalid" }];
32
- }
33
- const payload = parsed.value;
34
- const body = encodeJSON("body", payload, { explode: true });
35
- const path = pathToFunc("/v0/multicall/execute")();
36
- const headers = new Headers(compactMap({
37
- "Content-Type": "application/json",
38
- Accept: "application/json",
39
- }));
40
- const secConfig = await extractSecurity(client._options.apiKeyAuth);
41
- const securityInput = secConfig == null ? {} : { apiKeyAuth: secConfig };
42
- const requestSecurity = resolveGlobalSecurity(securityInput);
43
- const context = {
44
- options: client._options,
45
- baseURL: options?.serverURL ?? client._baseURL ?? "",
46
- operationID: "multicall_execute",
47
- oAuth2Scopes: [],
48
- resolvedSecurity: requestSecurity,
49
- securitySource: client._options.apiKeyAuth,
50
- retryConfig: options?.retries
51
- || client._options.retryConfig
52
- || { strategy: "none" },
53
- retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
54
- };
55
- const requestRes = client._createRequest(context, {
56
- security: requestSecurity,
57
- method: "POST",
58
- baseURL: options?.serverURL,
59
- path: path,
60
- headers: headers,
61
- body: body,
62
- userAgent: client._options.userAgent,
63
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
64
- }, options);
65
- if (!requestRes.ok) {
66
- return [requestRes, { status: "invalid" }];
67
- }
68
- const req = requestRes.value;
69
- const doResult = await client._do(req, {
70
- context,
71
- errorCodes: ["422", "4XX", "5XX"],
72
- retryConfig: context.retryConfig,
73
- retryCodes: context.retryCodes,
74
- });
75
- if (!doResult.ok) {
76
- return [doResult, { status: "request-error", request: req }];
77
- }
78
- const response = doResult.value;
79
- const responseFields = {
80
- HttpMeta: { Response: response, Request: req },
81
- };
82
- 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 });
83
- if (!result.ok) {
84
- return [result, { status: "complete", request: req, response }];
85
- }
86
- return [result, { status: "complete", request: req, response }];
87
- }
88
- //# sourceMappingURL=transactionBatchingExecute.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactionBatchingExecute.js","sourceRoot":"","sources":["../../../src/funcs/transactionBatchingExecute.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,KAAK,CAAC,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC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@
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,38 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import { transactionBatchingAaveLoop } from "../../funcs/transactionBatchingAaveLoop.js";
5
- import * as components from "../../models/components/index.js";
6
- import { formatResult } from "../tools.js";
7
- const args = {
8
- request: components.AaveLoopRequest$inboundSchema,
9
- };
10
- export const tool$transactionBatchingAaveLoop = {
11
- name: "transaction-batching-aave-loop",
12
- description: `AAVE leverage long/short
13
-
14
- Execute an Aave looping strategy that involves repeated supply and borrow
15
- operations.
16
-
17
- This endpoint creates a multicall transaction that performs a series of operations:
18
- 1. Approves and supplies initial token
19
- 2. For each loop:
20
- - Borrows another token
21
- - Swaps borrowed token back to supply token
22
- - Supplies the swapped tokens
23
-
24
- The transaction must be authorized using the /authorization endpoint to prevent replay attacks.`,
25
- args,
26
- tool: async (client, args, ctx) => {
27
- const [result, apiCall] = await transactionBatchingAaveLoop(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
28
- if (!result.ok) {
29
- return {
30
- content: [{ type: "text", text: result.error.message }],
31
- isError: true,
32
- };
33
- }
34
- const value = result.value;
35
- return formatResult(value, apiCall);
36
- },
37
- };
38
- //# 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,OAAO,EAAE,2BAA2B,EAAE,MAAM,4CAA4C,CAAC;AACzF,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAC;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,6BAA6B;CAClD,CAAC;AAEF,MAAM,CAAC,MAAM,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,2BAA2B,CACzD,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,YAAY,CAAC,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"}
@@ -1,33 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import { transactionBatchingAuthorization } from "../../funcs/transactionBatchingAuthorization.js";
5
- import * as components from "../../models/components/index.js";
6
- import { formatResult } from "../tools.js";
7
- const args = {
8
- request: components.MulticallAuthorizationRequest$inboundSchema,
9
- };
10
- export const tool$transactionBatchingAuthorization = {
11
- name: "transaction-batching-authorization",
12
- description: `Enable transaction bundling.
13
-
14
- Get authorization for bundling transactions.
15
-
16
- Currently this is required for every transaction bundle to prevent replay attacks
17
- and ensure transaction ordering when batching multiple actions into a single
18
- transaction. The authorization includes a nonce and chain ID to guarantee
19
- transaction uniqueness and proper network targeting.`,
20
- args,
21
- tool: async (client, args, ctx) => {
22
- const [result, apiCall] = await transactionBatchingAuthorization(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
23
- if (!result.ok) {
24
- return {
25
- content: [{ type: "text", text: result.error.message }],
26
- isError: true,
27
- };
28
- }
29
- const value = result.value;
30
- return formatResult(value, apiCall);
31
- },
32
- };
33
- //# sourceMappingURL=transactionBatchingAuthorization.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactionBatchingAuthorization.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/transactionBatchingAuthorization.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,gCAAgC,EAAE,MAAM,iDAAiD,CAAC;AACnG,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAC;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,2CAA2C;CAChE,CAAC;AAEF,MAAM,CAAC,MAAM,qCAAqC,GAE9C;IACF,IAAI,EAAE,oCAAoC;IAC1C,WAAW,EAAE;;;;;;;qDAOsC;IACnD,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,gCAAgC,CAC9D,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,YAAY,CAAC,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.MulticallExecuteRequest, import("zod").ZodTypeDef, unknown>;
5
- };
6
- export declare const tool$transactionBatchingExecute: ToolDefinition<typeof args>;
7
- export {};
8
- //# sourceMappingURL=transactionBatchingExecute.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactionBatchingExecute.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/transactionBatchingExecute.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,+BAA+B,EAAE,cAAc,CAAC,OAAO,IAAI,CA8BvE,CAAC"}
@@ -1,34 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
- import { transactionBatchingExecute } from "../../funcs/transactionBatchingExecute.js";
5
- import * as components from "../../models/components/index.js";
6
- import { formatResult } from "../tools.js";
7
- const args = {
8
- request: components.MulticallExecuteRequest$inboundSchema,
9
- };
10
- export const tool$transactionBatchingExecute = {
11
- name: "transaction-batching-execute",
12
- description: `Construct Bundled Transaction
13
-
14
- Bundle arbitrary transactions together into a single multicall transaction using
15
- EIP-7702.
16
-
17
- This endpoint allows bundling multiple contract calls into a single atomic
18
- transaction, reducing gas costs and ensuring all operations succeed or fail
19
- together. The transaction must be authorized using the /authorization endpoint to
20
- prevent replay attacks.`,
21
- args,
22
- tool: async (client, args, ctx) => {
23
- const [result, apiCall] = await transactionBatchingExecute(client, args.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
24
- if (!result.ok) {
25
- return {
26
- content: [{ type: "text", text: result.error.message }],
27
- isError: true,
28
- };
29
- }
30
- const value = result.value;
31
- return formatResult(value, apiCall);
32
- },
33
- };
34
- //# sourceMappingURL=transactionBatchingExecute.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactionBatchingExecute.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/transactionBatchingExecute.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,KAAK,UAAU,MAAM,kCAAkC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAkB,MAAM,aAAa,CAAC;AAE3D,MAAM,IAAI,GAAG;IACX,OAAO,EAAE,UAAU,CAAC,qCAAqC;CAC1D,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAgC;IAC1E,IAAI,EAAE,8BAA8B;IACpC,WAAW,EAAE;;;;;;;;wBAQS;IACtB,IAAI;IACJ,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAChC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,0BAA0B,CACxD,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,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACtC,CAAC;CACF,CAAC"}
@@ -1,181 +0,0 @@
1
- import * as z from "zod";
2
- import { Result as SafeParseResult } from "../../types/fp.js";
3
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
- import { Chain } from "./chain.js";
5
- import { SignedAuthorization, SignedAuthorization$Outbound } from "./signedauthorization.js";
6
- import { TokenEnum } from "./tokenenum.js";
7
- /**
8
- * Amount of collateral token to supply to Aave
9
- */
10
- export type InitialCollateralAmount = number | string;
11
- /**
12
- * Total loop collateral will be calculated as `multiplier` x `initial_collateral_amount`
13
- */
14
- export type Multiplier = number | string;
15
- /**
16
- * Maximum allowed slippage for token swaps in percentage
17
- */
18
- export type MaxSlippagePercent = number | string;
19
- /**
20
- * Loan To Value percentage of the loop
21
- */
22
- export type LoanToValue = number | string;
23
- /**
24
- * Request model for executing an Aave loop strategy.
25
- */
26
- export type AaveLoopRequest = {
27
- /**
28
- * The chain to use.
29
- */
30
- chain: Chain;
31
- /**
32
- * The address of the transaction sender.
33
- */
34
- sender: string;
35
- signedAuthorization: SignedAuthorization;
36
- /**
37
- * A class representing the token.
38
- *
39
- * @remarks
40
- *
41
- * This class is used to represent the token in the system. Notice individual
42
- * endpoints' documentation where per chain tokens are presented.
43
- */
44
- collateralToken: TokenEnum;
45
- /**
46
- * A class representing the token.
47
- *
48
- * @remarks
49
- *
50
- * This class is used to represent the token in the system. Notice individual
51
- * endpoints' documentation where per chain tokens are presented.
52
- */
53
- borrowToken: TokenEnum;
54
- /**
55
- * Amount of collateral token to supply to Aave
56
- */
57
- initialCollateralAmount: number | string;
58
- /**
59
- * Total loop collateral will be calculated as `multiplier` x `initial_collateral_amount`
60
- */
61
- multiplier: number | string;
62
- /**
63
- * Maximum allowed slippage for token swaps in percentage
64
- */
65
- maxSlippagePercent: number | string;
66
- /**
67
- * Loan To Value percentage of the loop
68
- */
69
- loanToValue: number | string;
70
- };
71
- /** @internal */
72
- export declare const InitialCollateralAmount$inboundSchema: z.ZodType<InitialCollateralAmount, z.ZodTypeDef, unknown>;
73
- /** @internal */
74
- export type InitialCollateralAmount$Outbound = number | string;
75
- /** @internal */
76
- export declare const InitialCollateralAmount$outboundSchema: z.ZodType<InitialCollateralAmount$Outbound, z.ZodTypeDef, InitialCollateralAmount>;
77
- /**
78
- * @internal
79
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
80
- */
81
- export declare namespace InitialCollateralAmount$ {
82
- /** @deprecated use `InitialCollateralAmount$inboundSchema` instead. */
83
- const inboundSchema: z.ZodType<InitialCollateralAmount, z.ZodTypeDef, unknown>;
84
- /** @deprecated use `InitialCollateralAmount$outboundSchema` instead. */
85
- const outboundSchema: z.ZodType<InitialCollateralAmount$Outbound, z.ZodTypeDef, InitialCollateralAmount>;
86
- /** @deprecated use `InitialCollateralAmount$Outbound` instead. */
87
- type Outbound = InitialCollateralAmount$Outbound;
88
- }
89
- export declare function initialCollateralAmountToJSON(initialCollateralAmount: InitialCollateralAmount): string;
90
- export declare function initialCollateralAmountFromJSON(jsonString: string): SafeParseResult<InitialCollateralAmount, SDKValidationError>;
91
- /** @internal */
92
- export declare const Multiplier$inboundSchema: z.ZodType<Multiplier, z.ZodTypeDef, unknown>;
93
- /** @internal */
94
- export type Multiplier$Outbound = number | string;
95
- /** @internal */
96
- export declare const Multiplier$outboundSchema: z.ZodType<Multiplier$Outbound, z.ZodTypeDef, Multiplier>;
97
- /**
98
- * @internal
99
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
100
- */
101
- export declare namespace Multiplier$ {
102
- /** @deprecated use `Multiplier$inboundSchema` instead. */
103
- const inboundSchema: z.ZodType<Multiplier, z.ZodTypeDef, unknown>;
104
- /** @deprecated use `Multiplier$outboundSchema` instead. */
105
- const outboundSchema: z.ZodType<Multiplier$Outbound, z.ZodTypeDef, Multiplier>;
106
- /** @deprecated use `Multiplier$Outbound` instead. */
107
- type Outbound = Multiplier$Outbound;
108
- }
109
- export declare function multiplierToJSON(multiplier: Multiplier): string;
110
- export declare function multiplierFromJSON(jsonString: string): SafeParseResult<Multiplier, SDKValidationError>;
111
- /** @internal */
112
- export declare const MaxSlippagePercent$inboundSchema: z.ZodType<MaxSlippagePercent, z.ZodTypeDef, unknown>;
113
- /** @internal */
114
- export type MaxSlippagePercent$Outbound = number | string;
115
- /** @internal */
116
- export declare const MaxSlippagePercent$outboundSchema: z.ZodType<MaxSlippagePercent$Outbound, z.ZodTypeDef, MaxSlippagePercent>;
117
- /**
118
- * @internal
119
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
120
- */
121
- export declare namespace MaxSlippagePercent$ {
122
- /** @deprecated use `MaxSlippagePercent$inboundSchema` instead. */
123
- const inboundSchema: z.ZodType<MaxSlippagePercent, z.ZodTypeDef, unknown>;
124
- /** @deprecated use `MaxSlippagePercent$outboundSchema` instead. */
125
- const outboundSchema: z.ZodType<MaxSlippagePercent$Outbound, z.ZodTypeDef, MaxSlippagePercent>;
126
- /** @deprecated use `MaxSlippagePercent$Outbound` instead. */
127
- type Outbound = MaxSlippagePercent$Outbound;
128
- }
129
- export declare function maxSlippagePercentToJSON(maxSlippagePercent: MaxSlippagePercent): string;
130
- export declare function maxSlippagePercentFromJSON(jsonString: string): SafeParseResult<MaxSlippagePercent, SDKValidationError>;
131
- /** @internal */
132
- export declare const LoanToValue$inboundSchema: z.ZodType<LoanToValue, z.ZodTypeDef, unknown>;
133
- /** @internal */
134
- export type LoanToValue$Outbound = number | string;
135
- /** @internal */
136
- export declare const LoanToValue$outboundSchema: z.ZodType<LoanToValue$Outbound, z.ZodTypeDef, LoanToValue>;
137
- /**
138
- * @internal
139
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
140
- */
141
- export declare namespace LoanToValue$ {
142
- /** @deprecated use `LoanToValue$inboundSchema` instead. */
143
- const inboundSchema: z.ZodType<LoanToValue, z.ZodTypeDef, unknown>;
144
- /** @deprecated use `LoanToValue$outboundSchema` instead. */
145
- const outboundSchema: z.ZodType<LoanToValue$Outbound, z.ZodTypeDef, LoanToValue>;
146
- /** @deprecated use `LoanToValue$Outbound` instead. */
147
- type Outbound = LoanToValue$Outbound;
148
- }
149
- export declare function loanToValueToJSON(loanToValue: LoanToValue): string;
150
- export declare function loanToValueFromJSON(jsonString: string): SafeParseResult<LoanToValue, SDKValidationError>;
151
- /** @internal */
152
- export declare const AaveLoopRequest$inboundSchema: z.ZodType<AaveLoopRequest, z.ZodTypeDef, unknown>;
153
- /** @internal */
154
- export type AaveLoopRequest$Outbound = {
155
- chain: string;
156
- sender: string;
157
- signed_authorization: SignedAuthorization$Outbound;
158
- collateral_token: string;
159
- borrow_token: string;
160
- initial_collateral_amount: number | string;
161
- multiplier: number | string;
162
- max_slippage_percent: number | string;
163
- loan_to_value: number | string;
164
- };
165
- /** @internal */
166
- export declare const AaveLoopRequest$outboundSchema: z.ZodType<AaveLoopRequest$Outbound, z.ZodTypeDef, AaveLoopRequest>;
167
- /**
168
- * @internal
169
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
170
- */
171
- export declare namespace AaveLoopRequest$ {
172
- /** @deprecated use `AaveLoopRequest$inboundSchema` instead. */
173
- const inboundSchema: z.ZodType<AaveLoopRequest, z.ZodTypeDef, unknown>;
174
- /** @deprecated use `AaveLoopRequest$outboundSchema` instead. */
175
- const outboundSchema: z.ZodType<AaveLoopRequest$Outbound, z.ZodTypeDef, AaveLoopRequest>;
176
- /** @deprecated use `AaveLoopRequest$Outbound` instead. */
177
- type Outbound = AaveLoopRequest$Outbound;
178
- }
179
- export declare function aaveLoopRequestToJSON(aaveLoopRequest: AaveLoopRequest): string;
180
- export declare function aaveLoopRequestFromJSON(jsonString: string): SafeParseResult<AaveLoopRequest, SDKValidationError>;
181
- //# sourceMappingURL=aavelooprequest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"aavelooprequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/aavelooprequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,KAAK,EAA6C,MAAM,YAAY,CAAC;AAC9E,OAAO,EACL,mBAAmB,EAEnB,4BAA4B,EAE7B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL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