@compass-labs/api-sdk 2.1.14 → 2.1.15-rc.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 (140) hide show
  1. package/README.md +20 -18
  2. package/codeSamples_typescript.yaml +8 -2
  3. package/dist/commonjs/funcs/earnEarnBundle.d.ts +33 -0
  4. package/dist/commonjs/funcs/earnEarnBundle.d.ts.map +1 -0
  5. package/dist/commonjs/funcs/earnEarnBundle.js +133 -0
  6. package/dist/commonjs/funcs/earnEarnBundle.js.map +1 -0
  7. package/dist/commonjs/lib/config.d.ts +2 -2
  8. package/dist/commonjs/lib/config.js +2 -2
  9. package/dist/commonjs/models/components/earnmanageparams.d.ts +63 -0
  10. package/dist/commonjs/models/components/earnmanageparams.d.ts.map +1 -0
  11. package/dist/commonjs/models/components/earnmanageparams.js +74 -0
  12. package/dist/commonjs/models/components/earnmanageparams.js.map +1 -0
  13. package/dist/commonjs/models/components/earnmanagerequest.d.ts +25 -13
  14. package/dist/commonjs/models/components/earnmanagerequest.d.ts.map +1 -1
  15. package/dist/commonjs/models/components/earnmanagerequest.js +9 -7
  16. package/dist/commonjs/models/components/earnmanagerequest.js.map +1 -1
  17. package/dist/commonjs/models/components/earnswapparams.d.ts +60 -0
  18. package/dist/commonjs/models/components/earnswapparams.d.ts.map +1 -0
  19. package/dist/commonjs/models/components/earnswapparams.js +73 -0
  20. package/dist/commonjs/models/components/earnswapparams.js.map +1 -0
  21. package/dist/commonjs/models/components/earnswaprequest.d.ts +26 -14
  22. package/dist/commonjs/models/components/earnswaprequest.d.ts.map +1 -1
  23. package/dist/commonjs/models/components/earnswaprequest.js +10 -8
  24. package/dist/commonjs/models/components/earnswaprequest.js.map +1 -1
  25. package/dist/commonjs/models/components/index.d.ts +5 -0
  26. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  27. package/dist/commonjs/models/components/index.js +5 -0
  28. package/dist/commonjs/models/components/index.js.map +1 -1
  29. package/dist/commonjs/models/components/useroperation.d.ts +4 -4
  30. package/dist/commonjs/models/components/useroperation.d.ts.map +1 -1
  31. package/dist/commonjs/models/components/useroperation.js +5 -5
  32. package/dist/commonjs/models/components/useroperation.js.map +1 -1
  33. package/dist/commonjs/models/components/v2bundlerequest.d.ts +43 -0
  34. package/dist/commonjs/models/components/v2bundlerequest.d.ts.map +1 -0
  35. package/dist/commonjs/models/components/v2bundlerequest.js +59 -0
  36. package/dist/commonjs/models/components/v2bundlerequest.js.map +1 -0
  37. package/dist/commonjs/models/components/v2bundleresponse.d.ts +31 -0
  38. package/dist/commonjs/models/components/v2bundleresponse.d.ts.map +1 -0
  39. package/dist/commonjs/models/components/v2bundleresponse.js +61 -0
  40. package/dist/commonjs/models/components/v2bundleresponse.js.map +1 -0
  41. package/dist/commonjs/models/components/v2useroperation.d.ts +23 -0
  42. package/dist/commonjs/models/components/v2useroperation.d.ts.map +1 -0
  43. package/dist/commonjs/models/components/v2useroperation.js +60 -0
  44. package/dist/commonjs/models/components/v2useroperation.js.map +1 -0
  45. package/dist/commonjs/sdk/earn.d.ts +22 -0
  46. package/dist/commonjs/sdk/earn.d.ts.map +1 -1
  47. package/dist/commonjs/sdk/earn.js +25 -0
  48. package/dist/commonjs/sdk/earn.js.map +1 -1
  49. package/dist/esm/funcs/earnEarnBundle.d.ts +33 -0
  50. package/dist/esm/funcs/earnEarnBundle.d.ts.map +1 -0
  51. package/dist/esm/funcs/earnEarnBundle.js +97 -0
  52. package/dist/esm/funcs/earnEarnBundle.js.map +1 -0
  53. package/dist/esm/lib/config.d.ts +2 -2
  54. package/dist/esm/lib/config.js +2 -2
  55. package/dist/esm/models/components/earnmanageparams.d.ts +63 -0
  56. package/dist/esm/models/components/earnmanageparams.d.ts.map +1 -0
  57. package/dist/esm/models/components/earnmanageparams.js +36 -0
  58. package/dist/esm/models/components/earnmanageparams.js.map +1 -0
  59. package/dist/esm/models/components/earnmanagerequest.d.ts +25 -13
  60. package/dist/esm/models/components/earnmanagerequest.d.ts.map +1 -1
  61. package/dist/esm/models/components/earnmanagerequest.js +7 -5
  62. package/dist/esm/models/components/earnmanagerequest.js.map +1 -1
  63. package/dist/esm/models/components/earnswapparams.d.ts +60 -0
  64. package/dist/esm/models/components/earnswapparams.d.ts.map +1 -0
  65. package/dist/esm/models/components/earnswapparams.js +34 -0
  66. package/dist/esm/models/components/earnswapparams.js.map +1 -0
  67. package/dist/esm/models/components/earnswaprequest.d.ts +26 -14
  68. package/dist/esm/models/components/earnswaprequest.d.ts.map +1 -1
  69. package/dist/esm/models/components/earnswaprequest.js +8 -6
  70. package/dist/esm/models/components/earnswaprequest.js.map +1 -1
  71. package/dist/esm/models/components/index.d.ts +5 -0
  72. package/dist/esm/models/components/index.d.ts.map +1 -1
  73. package/dist/esm/models/components/index.js +5 -0
  74. package/dist/esm/models/components/index.js.map +1 -1
  75. package/dist/esm/models/components/useroperation.d.ts +4 -4
  76. package/dist/esm/models/components/useroperation.d.ts.map +1 -1
  77. package/dist/esm/models/components/useroperation.js +3 -3
  78. package/dist/esm/models/components/useroperation.js.map +1 -1
  79. package/dist/esm/models/components/v2bundlerequest.d.ts +43 -0
  80. package/dist/esm/models/components/v2bundlerequest.d.ts.map +1 -0
  81. package/dist/esm/models/components/v2bundlerequest.js +22 -0
  82. package/dist/esm/models/components/v2bundlerequest.js.map +1 -0
  83. package/dist/esm/models/components/v2bundleresponse.d.ts +31 -0
  84. package/dist/esm/models/components/v2bundleresponse.d.ts.map +1 -0
  85. package/dist/esm/models/components/v2bundleresponse.js +24 -0
  86. package/dist/esm/models/components/v2bundleresponse.js.map +1 -0
  87. package/dist/esm/models/components/v2useroperation.d.ts +23 -0
  88. package/dist/esm/models/components/v2useroperation.d.ts.map +1 -0
  89. package/dist/esm/models/components/v2useroperation.js +22 -0
  90. package/dist/esm/models/components/v2useroperation.js.map +1 -0
  91. package/dist/esm/sdk/earn.d.ts +22 -0
  92. package/dist/esm/sdk/earn.d.ts.map +1 -1
  93. package/dist/esm/sdk/earn.js +25 -0
  94. package/dist/esm/sdk/earn.js.map +1 -1
  95. package/docs/models/components/earnmanageparams.md +31 -0
  96. package/docs/models/components/earnmanageparamsaction.md +17 -0
  97. package/docs/models/components/{venue.md → earnmanageparamsvenue.md} +1 -1
  98. package/docs/models/components/earnmanagerequest.md +12 -6
  99. package/docs/models/components/earnmanagerequestvenue.md +25 -0
  100. package/docs/models/components/earnswapparams.md +29 -0
  101. package/docs/models/components/earnswapparamsamountin.md +19 -0
  102. package/docs/models/components/{slippage.md → earnswapparamsslippage.md} +3 -3
  103. package/docs/models/components/earnswaprequest.md +10 -5
  104. package/docs/models/components/earnswaprequestslippage.md +19 -0
  105. package/docs/models/components/useroperation.md +3 -3
  106. package/docs/models/components/{body.md → useroperationbody.md} +1 -1
  107. package/docs/models/components/v2bundlerequest.md +52 -0
  108. package/docs/models/components/v2bundleresponse.md +24 -0
  109. package/docs/models/components/v2useroperation.md +27 -0
  110. package/docs/models/components/v2useroperationbody.md +31 -0
  111. package/docs/sdks/aavev3/README.md +0 -1
  112. package/docs/sdks/aerodromeslipstream/README.md +0 -1
  113. package/docs/sdks/bridge/README.md +0 -1
  114. package/docs/sdks/earn/README.md +150 -11
  115. package/docs/sdks/erc4626vaults/README.md +1 -2
  116. package/docs/sdks/ethena/README.md +0 -1
  117. package/docs/sdks/gassponsorship/README.md +0 -1
  118. package/docs/sdks/morpho/README.md +0 -1
  119. package/docs/sdks/pendle/README.md +0 -1
  120. package/docs/sdks/sky/README.md +0 -1
  121. package/docs/sdks/smartaccount/README.md +0 -1
  122. package/docs/sdks/swap/README.md +0 -1
  123. package/docs/sdks/token/README.md +0 -1
  124. package/docs/sdks/transactionbundler/README.md +0 -1
  125. package/docs/sdks/uniswapv3/README.md +0 -1
  126. package/docs/sdks/universal/README.md +0 -1
  127. package/docs/sdks/wildcat/README.md +0 -1
  128. package/package.json +1 -1
  129. package/src/funcs/earnEarnBundle.ts +184 -0
  130. package/src/lib/config.ts +2 -2
  131. package/src/models/components/earnmanageparams.ts +118 -0
  132. package/src/models/components/earnmanagerequest.ts +38 -18
  133. package/src/models/components/earnswapparams.ts +115 -0
  134. package/src/models/components/earnswaprequest.ts +38 -20
  135. package/src/models/components/index.ts +5 -0
  136. package/src/models/components/useroperation.ts +52 -45
  137. package/src/models/components/v2bundlerequest.ts +72 -0
  138. package/src/models/components/v2bundleresponse.ts +67 -0
  139. package/src/models/components/v2useroperation.ts +67 -0
  140. package/src/sdk/earn.ts +33 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2bundlerequest.d.ts","sourceRoot":"","sources":["../../../../src/models/components/v2bundlerequest.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,KAAK,EAAwB,MAAM,YAAY,CAAC;AACzD,OAAO,EACL,eAAe,EACf,wBAAwB,EAEzB,MAAM,sBAAsB,CAAC;AAE9B;;;;;;;;;;GAUG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IACb;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IAChC;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACtC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACzC,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACvC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,OAAO,CACpD,wBAAwB,EACxB,CAAC,CAAC,UAAU,EACZ,eAAe,CAUf,CAAC;AAEH,wBAAgB,qBAAqB,CACnC,eAAe,EAAE,eAAe,GAC/B,MAAM,CAER"}
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v3";
5
+ import { remap as remap$ } from "../../lib/primitives.js";
6
+ import { Chain$outboundSchema } from "./chain.js";
7
+ import { V2UserOperation$outboundSchema, } from "./v2useroperation.js";
8
+ /** @internal */
9
+ export const V2BundleRequest$outboundSchema = z.object({
10
+ owner: z.string(),
11
+ chain: Chain$outboundSchema,
12
+ actions: z.array(V2UserOperation$outboundSchema),
13
+ gasSponsorship: z.boolean().optional(),
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ gasSponsorship: "gas_sponsorship",
17
+ });
18
+ });
19
+ export function v2BundleRequestToJSON(v2BundleRequest) {
20
+ return JSON.stringify(V2BundleRequest$outboundSchema.parse(v2BundleRequest));
21
+ }
22
+ //# sourceMappingURL=v2bundlerequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2bundlerequest.js","sourceRoot":"","sources":["../../../../src/models/components/v2bundlerequest.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAS,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAGL,8BAA8B,GAC/B,MAAM,sBAAsB,CAAC;AAwC9B,gBAAgB;AAChB,MAAM,CAAC,MAAM,8BAA8B,GAIvC,CAAC,CAAC,MAAM,CAAC;IACX,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,KAAK,EAAE,oBAAoB;IAC3B,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,8BAA8B,CAAC;IAChD,cAAc,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,cAAc,EAAE,iBAAiB;KAClC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,qBAAqB,CACnC,eAAgC;IAEhC,OAAO,IAAI,CAAC,SAAS,CAAC,8BAA8B,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;AAC/E,CAAC"}
@@ -0,0 +1,31 @@
1
+ import * as z from "zod/v3";
2
+ import { Result as SafeParseResult } from "../../types/fp.js";
3
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
+ import { BatchedSafeOperationsResponseOutput } from "./batchedsafeoperationsresponseoutput.js";
5
+ import { UnsignedTransaction } from "./unsignedtransaction.js";
6
+ /**
7
+ * Response model for V2 bundle execution.
8
+ *
9
+ * @remarks
10
+ *
11
+ * Returns either an unsigned transaction (for direct execution) or EIP-712 typed data
12
+ * (for gas-sponsored execution).
13
+ */
14
+ export type V2BundleResponse = {
15
+ /**
16
+ * Unsigned transaction for direct execution by the owner. Present when gas_sponsorship=false.
17
+ */
18
+ transaction?: UnsignedTransaction | null | undefined;
19
+ /**
20
+ * EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true. Owner must sign and submit to /gas_sponsorship/prepare.
21
+ */
22
+ eip712?: BatchedSafeOperationsResponseOutput | null | undefined;
23
+ /**
24
+ * Number of individual transactions bundled in this execution.
25
+ */
26
+ actionsCount: number;
27
+ };
28
+ /** @internal */
29
+ export declare const V2BundleResponse$inboundSchema: z.ZodType<V2BundleResponse, z.ZodTypeDef, unknown>;
30
+ export declare function v2BundleResponseFromJSON(jsonString: string): SafeParseResult<V2BundleResponse, SDKValidationError>;
31
+ //# sourceMappingURL=v2bundleresponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2bundleresponse.d.ts","sourceRoot":"","sources":["../../../../src/models/components/v2bundleresponse.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAG5B,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,mCAAmC,EAEpC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,mBAAmB,EAEpB,MAAM,0BAA0B,CAAC;AAElC;;;;;;;GAOG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,WAAW,CAAC,EAAE,mBAAmB,GAAG,IAAI,GAAG,SAAS,CAAC;IACrD;;OAEG;IACH,MAAM,CAAC,EAAE,mCAAmC,GAAG,IAAI,GAAG,SAAS,CAAC;IAChE;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,OAAO,CACpD,gBAAgB,EAChB,CAAC,CAAC,UAAU,EACZ,OAAO,CAWP,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAMvD"}
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v3";
5
+ import { remap as remap$ } from "../../lib/primitives.js";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { BatchedSafeOperationsResponseOutput$inboundSchema, } from "./batchedsafeoperationsresponseoutput.js";
8
+ import { UnsignedTransaction$inboundSchema, } from "./unsignedtransaction.js";
9
+ /** @internal */
10
+ export const V2BundleResponse$inboundSchema = z.object({
11
+ transaction: z.nullable(UnsignedTransaction$inboundSchema).optional(),
12
+ eip_712: z.nullable(BatchedSafeOperationsResponseOutput$inboundSchema)
13
+ .optional(),
14
+ actions_count: z.number().int(),
15
+ }).transform((v) => {
16
+ return remap$(v, {
17
+ "eip_712": "eip712",
18
+ "actions_count": "actionsCount",
19
+ });
20
+ });
21
+ export function v2BundleResponseFromJSON(jsonString) {
22
+ return safeParse(jsonString, (x) => V2BundleResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'V2BundleResponse' from JSON`);
23
+ }
24
+ //# sourceMappingURL=v2bundleresponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2bundleresponse.js","sourceRoot":"","sources":["../../../../src/models/components/v2bundleresponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGjD,OAAO,EAEL,iDAAiD,GAClD,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAEL,iCAAiC,GAClC,MAAM,0BAA0B,CAAC;AAyBlC,gBAAgB;AAChB,MAAM,CAAC,MAAM,8BAA8B,GAIvC,CAAC,CAAC,MAAM,CAAC;IACX,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,iCAAiC,CAAC,CAAC,QAAQ,EAAE;IACrE,OAAO,EAAE,CAAC,CAAC,QAAQ,CAAC,iDAAiD,CAAC;SACnE,QAAQ,EAAE;IACb,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE;CAChC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,SAAS,EAAE,QAAQ;QACnB,eAAe,EAAE,cAAc;KAChC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,MAAM,UAAU,wBAAwB,CACtC,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,8BAA8B,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC1D,8CAA8C,CAC/C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,23 @@
1
+ import * as z from "zod/v3";
2
+ import { EarnManageParams, EarnManageParams$Outbound } from "./earnmanageparams.js";
3
+ import { EarnSwapParams, EarnSwapParams$Outbound } from "./earnswapparams.js";
4
+ export type V2UserOperationBody = EarnManageParams | EarnSwapParams;
5
+ /**
6
+ * A single operation in a V2 bundle.
7
+ */
8
+ export type V2UserOperation = {
9
+ body: EarnManageParams | EarnSwapParams;
10
+ };
11
+ /** @internal */
12
+ export type V2UserOperationBody$Outbound = EarnManageParams$Outbound | EarnSwapParams$Outbound;
13
+ /** @internal */
14
+ export declare const V2UserOperationBody$outboundSchema: z.ZodType<V2UserOperationBody$Outbound, z.ZodTypeDef, V2UserOperationBody>;
15
+ export declare function v2UserOperationBodyToJSON(v2UserOperationBody: V2UserOperationBody): string;
16
+ /** @internal */
17
+ export type V2UserOperation$Outbound = {
18
+ body: EarnManageParams$Outbound | EarnSwapParams$Outbound;
19
+ };
20
+ /** @internal */
21
+ export declare const V2UserOperation$outboundSchema: z.ZodType<V2UserOperation$Outbound, z.ZodTypeDef, V2UserOperation>;
22
+ export declare function v2UserOperationToJSON(v2UserOperation: V2UserOperation): string;
23
+ //# sourceMappingURL=v2useroperation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2useroperation.d.ts","sourceRoot":"","sources":["../../../../src/models/components/v2useroperation.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EAE1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,cAAc,EACd,uBAAuB,EAExB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,GAAG,cAAc,CAAC;AAEpE;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,gBAAgB,GAAG,cAAc,CAAC;CACzC,CAAC;AAEF,gBAAgB;AAChB,MAAM,MAAM,4BAA4B,GACpC,yBAAyB,GACzB,uBAAuB,CAAC;AAE5B,gBAAgB;AAChB,eAAO,MAAM,kCAAkC,EAAE,CAAC,CAAC,OAAO,CACxD,4BAA4B,EAC5B,CAAC,CAAC,UAAU,EACZ,mBAAmB,CACwD,CAAC;AAE9E,wBAAgB,yBAAyB,CACvC,mBAAmB,EAAE,mBAAmB,GACvC,MAAM,CAIR;AAED,gBAAgB;AAChB,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,yBAAyB,GAAG,uBAAuB,CAAC;CAC3D,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,8BAA8B,EAAE,CAAC,CAAC,OAAO,CACpD,wBAAwB,EACxB,CAAC,CAAC,UAAU,EACZ,eAAe,CAMf,CAAC;AAEH,wBAAgB,qBAAqB,CACnC,eAAe,EAAE,eAAe,GAC/B,MAAM,CAER"}
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v3";
5
+ import { EarnManageParams$outboundSchema, } from "./earnmanageparams.js";
6
+ import { EarnSwapParams$outboundSchema, } from "./earnswapparams.js";
7
+ /** @internal */
8
+ export const V2UserOperationBody$outboundSchema = z.union([EarnManageParams$outboundSchema, EarnSwapParams$outboundSchema]);
9
+ export function v2UserOperationBodyToJSON(v2UserOperationBody) {
10
+ return JSON.stringify(V2UserOperationBody$outboundSchema.parse(v2UserOperationBody));
11
+ }
12
+ /** @internal */
13
+ export const V2UserOperation$outboundSchema = z.object({
14
+ body: z.union([
15
+ EarnManageParams$outboundSchema,
16
+ EarnSwapParams$outboundSchema,
17
+ ]),
18
+ });
19
+ export function v2UserOperationToJSON(v2UserOperation) {
20
+ return JSON.stringify(V2UserOperation$outboundSchema.parse(v2UserOperation));
21
+ }
22
+ //# sourceMappingURL=v2useroperation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v2useroperation.js","sourceRoot":"","sources":["../../../../src/models/components/v2useroperation.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAGL,+BAA+B,GAChC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAGL,6BAA6B,GAC9B,MAAM,qBAAqB,CAAC;AAgB7B,gBAAgB;AAChB,MAAM,CAAC,MAAM,kCAAkC,GAI3C,CAAC,CAAC,KAAK,CAAC,CAAC,+BAA+B,EAAE,6BAA6B,CAAC,CAAC,CAAC;AAE9E,MAAM,UAAU,yBAAyB,CACvC,mBAAwC;IAExC,OAAO,IAAI,CAAC,SAAS,CACnB,kCAAkC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAC9D,CAAC;AACJ,CAAC;AAOD,gBAAgB;AAChB,MAAM,CAAC,MAAM,8BAA8B,GAIvC,CAAC,CAAC,MAAM,CAAC;IACX,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC;QACZ,+BAA+B;QAC/B,6BAA6B;KAC9B,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,UAAU,qBAAqB,CACnC,eAAgC;IAEhC,OAAO,IAAI,CAAC,SAAS,CAAC,8BAA8B,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC,CAAC;AAC/E,CAAC"}
@@ -89,5 +89,27 @@ export declare class Earn extends ClientSDK {
89
89
  * Swap tokens within an Earn Account.
90
90
  */
91
91
  earnSwap(request: components.EarnSwapRequest, options?: RequestOptions): Promise<components.EarnSwapResponse>;
92
+ /**
93
+ * Bundle multiple actions into a single transaction
94
+ *
95
+ * @remarks
96
+ * Bundle multiple earn actions into a single atomic Safe transaction.
97
+ *
98
+ * This endpoint allows combining multiple actions (swaps, vault deposits/withdrawals,
99
+ * Aave deposits/withdrawals) into a single atomic transaction executed via the
100
+ * owner's Safe smart account (Earn Account).
101
+ *
102
+ * **Example Use Case:** Swap USDC to AUSD, then deposit AUSD into a vault - all in one transaction.
103
+ *
104
+ * Actions are executed in the order they are provided. Each action type has its own parameters:
105
+ *
106
+ * - **V2_SWAP**: Swap between tokens using 1inch aggregator
107
+ * - **V2_MANAGE**: Manage positions - deposit/withdraw to ERC-4626 vaults or Aave lending pool
108
+ *
109
+ * The bundled transaction can be gas-sponsored by setting `gas_sponsorship=true`.
110
+ * This returns EIP-712 typed data that the owner must sign and submit to
111
+ * `/gas_sponsorship/prepare` for execution by a gas sponsor.
112
+ */
113
+ earnBundle(request: components.V2BundleRequest, options?: RequestOptions): Promise<components.V2BundleResponse>;
92
114
  }
93
115
  //# sourceMappingURL=earn.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"earn.d.ts","sourceRoot":"","sources":["../../../src/sdk/earn.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,IAAK,SAAQ,SAAS;IACjC;;;;;OAKG;IACG,aAAa,CACjB,OAAO,EAAE,UAAU,CAAC,sBAAsB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQ5C;;;;;OAKG;IACG,uBAAuB,CAC3B,OAAO,EAAE,UAAU,CAAC,gCAAgC,EACpD,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC;IAQ3C;;;;;OAKG;IACG,UAAU,CACd,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAQzC;;;;;OAKG;IACG,kBAAkB,CACtB,OAAO,EAAE,UAAU,CAAC,2BAA2B,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQ5C;;;;;;;;;;;;;;;OAeG;IACG,iBAAiB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AAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAQzC;;;;;OAKG;IACG,kBAAkB,CACtB,OAAO,EAAE,UAAU,CAAC,2BAA2B,EAC/C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQ5C;;;;;;;;;;;;;;;OAeG;IACG,iBAAiB,CACrB,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC;IAQ5C;;;;;;;;;;;;OAYG;IACG,YAAY,CAChB,OAAO,EAAE,UAAU,CAAC,mBAAmB,EACvC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,oBAAoB,CAAC;IAQ3C;;;;;;;;;;;;;;;;;;;OAmBG;IACG,UAAU,CACd,OAAO,EAAE,UAAU,CAAC,iBAAiB,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,kBAAkB,CAAC;IAQzC;;;;;OAKG;IACG,QAAQ,CACZ,OAAO,EAAE,UAAU,CAAC,eAAe,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC;IAQvC;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,UAAU,CACd,OAAO,EAAE,UAAU,CAAC,eAAe,EACnC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,gBAAgB,CAAC;CAOxC"}
@@ -2,6 +2,7 @@
2
2
  * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
3
  */
4
4
  import { earnEarnAaveTokenRates } from "../funcs/earnEarnAaveTokenRates.js";
5
+ import { earnEarnBundle } from "../funcs/earnEarnBundle.js";
5
6
  import { earnEarnCreateAccount } from "../funcs/earnEarnCreateAccount.js";
6
7
  import { earnEarnManage } from "../funcs/earnEarnManage.js";
7
8
  import { earnEarnPositions } from "../funcs/earnEarnPositions.js";
@@ -115,5 +116,29 @@ export class Earn extends ClientSDK {
115
116
  async earnSwap(request, options) {
116
117
  return unwrapAsync(earnEarnSwap(this, request, options));
117
118
  }
119
+ /**
120
+ * Bundle multiple actions into a single transaction
121
+ *
122
+ * @remarks
123
+ * Bundle multiple earn actions into a single atomic Safe transaction.
124
+ *
125
+ * This endpoint allows combining multiple actions (swaps, vault deposits/withdrawals,
126
+ * Aave deposits/withdrawals) into a single atomic transaction executed via the
127
+ * owner's Safe smart account (Earn Account).
128
+ *
129
+ * **Example Use Case:** Swap USDC to AUSD, then deposit AUSD into a vault - all in one transaction.
130
+ *
131
+ * Actions are executed in the order they are provided. Each action type has its own parameters:
132
+ *
133
+ * - **V2_SWAP**: Swap between tokens using 1inch aggregator
134
+ * - **V2_MANAGE**: Manage positions - deposit/withdraw to ERC-4626 vaults or Aave lending pool
135
+ *
136
+ * The bundled transaction can be gas-sponsored by setting `gas_sponsorship=true`.
137
+ * This returns EIP-712 typed data that the owner must sign and submit to
138
+ * `/gas_sponsorship/prepare` for execution by a gas sponsor.
139
+ */
140
+ async earnBundle(request, options) {
141
+ return unwrapAsync(earnEarnBundle(this, request, options));
142
+ }
118
143
  }
119
144
  //# sourceMappingURL=earn.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"earn.js","sourceRoot":"","sources":["../../../src/sdk/earn.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AACtF,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAA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,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,31 @@
1
+ # EarnManageParams
2
+
3
+ Parameters for earn manage operations (deposit/withdraw to vault/Aave).
4
+
5
+ Used by multicall/bundle endpoint to specify manage actions. EarnManageRequest
6
+ inherits from this class.
7
+
8
+ ## Example Usage
9
+
10
+ ```typescript
11
+ import { EarnManageParams } from "@compass-labs/api-sdk/models/components";
12
+
13
+ let value: EarnManageParams = {
14
+ actionType: "V2_MANAGE",
15
+ venue: {
16
+ type: "VAULT",
17
+ vaultAddress: "<value>",
18
+ },
19
+ action: "WITHDRAW",
20
+ amount: 3994.36,
21
+ };
22
+ ```
23
+
24
+ ## Fields
25
+
26
+ | Field | Type | Required | Description | Example |
27
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
28
+ | `actionType` | *"V2_MANAGE"* | :heavy_check_mark: | Action type identifier for manage operations. | V2_MANAGE |
29
+ | `venue` | *components.EarnManageParamsVenue* | :heavy_check_mark: | The earn venue. | |
30
+ | `action` | [components.EarnManageParamsAction](../../models/components/earnmanageparamsaction.md) | :heavy_check_mark: | Whether you are depositing into or withdrawing from the given Earn `venue`. | |
31
+ | `amount` | *any* | :heavy_check_mark: | Amount of the underlying asset to act on (deposit or withdraw). For VAULT, this is the vault's underlying token; for AAVE, this is the Aave reserve asset. Provide as a decimal in token units (not wei); must be > 0. | |
@@ -0,0 +1,17 @@
1
+ # EarnManageParamsAction
2
+
3
+ Whether you are depositing into or withdrawing from the given Earn `venue`.
4
+
5
+ ## Example Usage
6
+
7
+ ```typescript
8
+ import { EarnManageParamsAction } from "@compass-labs/api-sdk/models/components";
9
+
10
+ let value: EarnManageParamsAction = "WITHDRAW";
11
+ ```
12
+
13
+ ## Values
14
+
15
+ ```typescript
16
+ "DEPOSIT" | "WITHDRAW"
17
+ ```
@@ -1,4 +1,4 @@
1
- # Venue
1
+ # EarnManageParamsVenue
2
2
 
3
3
  The earn venue.
4
4
 
@@ -1,19 +1,24 @@
1
1
  # EarnManageRequest
2
2
 
3
+ Request model for the unified manage endpoint.
4
+
5
+ Inherits from EarnManageParams and adds context fields (owner, chain, etc).
6
+
3
7
  ## Example Usage
4
8
 
5
9
  ```typescript
6
10
  import { EarnManageRequest } from "@compass-labs/api-sdk/models/components";
7
11
 
8
12
  let value: EarnManageRequest = {
9
- owner: "0xe5310C39a8A8f16E6126ee6B1006bf6eD58B3A49",
10
- chain: "base",
11
13
  venue: {
12
14
  type: "VAULT",
13
15
  vaultAddress: "0x7BfA7C4f149E7415b73bdeDfe609237e29CBF34A",
14
16
  },
15
- action: "WITHDRAW",
17
+ action: "DEPOSIT",
16
18
  amount: "0.01",
19
+ owner: "0xe5310C39a8A8f16E6126ee6B1006bf6eD58B3A49",
20
+ chain: "base",
21
+ gasSponsorship: false,
17
22
  };
18
23
  ```
19
24
 
@@ -21,10 +26,11 @@ let value: EarnManageRequest = {
21
26
 
22
27
  | Field | Type | Required | Description | Example |
23
28
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
29
+ | `actionType` | *"V2_MANAGE"* | :heavy_minus_sign: | Action type identifier for manage operations. | V2_MANAGE |
30
+ | `venue` | *components.EarnManageRequestVenue* | :heavy_check_mark: | The earn venue. | |
31
+ | `action` | [components.EarnManageRequestAction](../../models/components/earnmanagerequestaction.md) | :heavy_check_mark: | Whether you are depositing into or withdrawing from the given Earn `venue`. | |
32
+ | `amount` | *any* | :heavy_check_mark: | Amount of the underlying asset to act on (deposit or withdraw). For VAULT, this is the vault's underlying token; for AAVE, this is the Aave reserve asset. Provide as a decimal in token units (not wei); must be > 0. | |
24
33
  | `owner` | *string* | :heavy_check_mark: | The primary wallet address that owns and controls the Earn Account. | |
25
34
  | `chain` | [components.Chain](../../models/components/chain.md) | :heavy_check_mark: | The chain to use. | |
26
- | `venue` | *components.Venue* | :heavy_check_mark: | The earn venue. | |
27
- | `action` | [components.EarnManageRequestAction](../../models/components/earnmanagerequestaction.md) | :heavy_check_mark: | Whether you are depositing into or withdrawing from the given Earn `venue`. | |
28
- | `amount` | *any* | :heavy_check_mark: | Amount of the underlying asset to act on (deposit or withdraw). For VAULT, this is the vault’s underlying token; for AAVE, this is the Aave reserve asset. Provide as a decimal in token units (not wei); must be > 0. | |
29
35
  | `gasSponsorship` | *boolean* | :heavy_minus_sign: | Optionally request gas sponsorship. If set to `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`). | false |
30
36
  | `fee` | [components.Fee](../../models/components/fee.md) | :heavy_minus_sign: | Optional fee configuration. If provided, a fee will be applied to the transaction amount and sent to the specified recipient address. The fee can be specified as a percentage of the transaction amount or as a fixed token amount. | |
@@ -0,0 +1,25 @@
1
+ # EarnManageRequestVenue
2
+
3
+ The earn venue.
4
+
5
+
6
+ ## Supported Types
7
+
8
+ ### `components.AaveVenue`
9
+
10
+ ```typescript
11
+ const value: components.AaveVenue = {
12
+ type: "AAVE",
13
+ token: "<value>",
14
+ };
15
+ ```
16
+
17
+ ### `components.VaultVenue`
18
+
19
+ ```typescript
20
+ const value: components.VaultVenue = {
21
+ type: "VAULT",
22
+ vaultAddress: "<value>",
23
+ };
24
+ ```
25
+
@@ -0,0 +1,29 @@
1
+ # EarnSwapParams
2
+
3
+ Parameters for swap operations (without context like owner/chain).
4
+
5
+ Used by multicall/bundle endpoint to specify swap actions.
6
+
7
+ ## Example Usage
8
+
9
+ ```typescript
10
+ import { EarnSwapParams } from "@compass-labs/api-sdk/models/components";
11
+
12
+ let value: EarnSwapParams = {
13
+ actionType: "V2_SWAP",
14
+ tokenIn: "<value>",
15
+ tokenOut: "<value>",
16
+ amountIn: 1543.87,
17
+ slippage: "0.5",
18
+ };
19
+ ```
20
+
21
+ ## Fields
22
+
23
+ | Field | Type | Required | Description | Example |
24
+ | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
25
+ | `actionType` | *"V2_SWAP"* | :heavy_check_mark: | Action type identifier for swap operations. | V2_SWAP |
26
+ | `tokenIn` | *string* | :heavy_check_mark: | Token to sell (input). Provide a token symbol from a limited set (e.g., 'USDC') or any token address. | |
27
+ | `tokenOut` | *string* | :heavy_check_mark: | Token to buy (output). Provide a token symbol from a limited set (e.g., 'USDT') or any token address. | |
28
+ | `amountIn` | *components.EarnSwapParamsAmountIn* | :heavy_check_mark: | Human-readable amount of `token_in` to swap (token units, not wei). | |
29
+ | `slippage` | *components.EarnSwapParamsSlippage* | :heavy_minus_sign: | Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). | 0.5 |
@@ -0,0 +1,19 @@
1
+ # EarnSwapParamsAmountIn
2
+
3
+ Human-readable amount of `token_in` to swap (token units, not wei).
4
+
5
+
6
+ ## Supported Types
7
+
8
+ ### `number`
9
+
10
+ ```typescript
11
+ const value: number = 1284.03;
12
+ ```
13
+
14
+ ### `string`
15
+
16
+ ```typescript
17
+ const value: string = "<value>";
18
+ ```
19
+
@@ -1,4 +1,4 @@
1
- # Slippage
1
+ # EarnSwapParamsSlippage
2
2
 
3
3
  Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%).
4
4
 
@@ -8,12 +8,12 @@ Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%).
8
8
  ### `number`
9
9
 
10
10
  ```typescript
11
- const value: number = 1284.03;
11
+ const value: number = 0.5;
12
12
  ```
13
13
 
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "<value>";
17
+ const value: string = "0.5";
18
18
  ```
19
19
 
@@ -1,17 +1,21 @@
1
1
  # EarnSwapRequest
2
2
 
3
+ Request model for swap endpoint.
4
+
5
+ Inherits swap params and adds context fields (owner, chain, gas_sponsorship).
6
+
3
7
  ## Example Usage
4
8
 
5
9
  ```typescript
6
10
  import { EarnSwapRequest } from "@compass-labs/api-sdk/models/components";
7
11
 
8
12
  let value: EarnSwapRequest = {
9
- owner: "0xC1be8f91480648De355a45f3E2562811b4e2D3FF",
10
- chain: "base",
11
13
  tokenIn: "USDC",
12
14
  tokenOut: "USDT",
13
15
  amountIn: "0.01",
14
16
  slippage: "0.5",
17
+ owner: "0xC1be8f91480648De355a45f3E2562811b4e2D3FF",
18
+ chain: "base",
15
19
  gasSponsorship: false,
16
20
  };
17
21
  ```
@@ -20,10 +24,11 @@ let value: EarnSwapRequest = {
20
24
 
21
25
  | Field | Type | Required | Description | Example |
22
26
  | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
23
- | `owner` | *string* | :heavy_check_mark: | The owner's wallet address. | |
24
- | `chain` | [components.Chain](../../models/components/chain.md) | :heavy_check_mark: | The chain to use. | |
27
+ | `actionType` | *"V2_SWAP"* | :heavy_minus_sign: | Action type identifier for swap operations. | V2_SWAP |
25
28
  | `tokenIn` | *string* | :heavy_check_mark: | Token to sell (input). Provide a token symbol from a limited set (e.g., 'USDC') or any token address. | |
26
29
  | `tokenOut` | *string* | :heavy_check_mark: | Token to buy (output). Provide a token symbol from a limited set (e.g., 'USDT') or any token address. | |
27
30
  | `amountIn` | *components.EarnSwapRequestAmountIn* | :heavy_check_mark: | Human-readable amount of `token_in` to swap (token units, not wei). | |
28
- | `slippage` | *components.Slippage* | :heavy_check_mark: | Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). | |
31
+ | `slippage` | *components.EarnSwapRequestSlippage* | :heavy_minus_sign: | Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). | 0.5 |
32
+ | `owner` | *string* | :heavy_check_mark: | The owner's wallet address. | |
33
+ | `chain` | [components.Chain](../../models/components/chain.md) | :heavy_check_mark: | The chain to use. | |
29
34
  | `gasSponsorship` | *boolean* | :heavy_minus_sign: | Optionally request gas sponsorship. If `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`). | false |
@@ -0,0 +1,19 @@
1
+ # EarnSwapRequestSlippage
2
+
3
+ Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%).
4
+
5
+
6
+ ## Supported Types
7
+
8
+ ### `number`
9
+
10
+ ```typescript
11
+ const value: number = 0.5;
12
+ ```
13
+
14
+ ### `string`
15
+
16
+ ```typescript
17
+ const value: string = "0.5";
18
+ ```
19
+
@@ -16,6 +16,6 @@ let value: UserOperation = {
16
16
 
17
17
  ## Fields
18
18
 
19
- | Field | Type | Required | Description |
20
- | ------------------ | ------------------ | ------------------ | ------------------ |
21
- | `body` | *components.Body* | :heavy_check_mark: | N/A |
19
+ | Field | Type | Required | Description |
20
+ | ------------------------------ | ------------------------------ | ------------------------------ | ------------------------------ |
21
+ | `body` | *components.UserOperationBody* | :heavy_check_mark: | N/A |
@@ -1,4 +1,4 @@
1
- # Body
1
+ # UserOperationBody
2
2
 
3
3
 
4
4
  ## Supported Types