@compass-labs/api-sdk 2.2.3 → 2.2.4

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 (117) hide show
  1. package/codeSamples_typescript.yaml +1 -1
  2. package/dist/commonjs/lib/config.d.ts +2 -2
  3. package/dist/commonjs/lib/config.js +2 -2
  4. package/dist/commonjs/models/components/earntransferfromeoaparams.d.ts +64 -0
  5. package/dist/commonjs/models/components/earntransferfromeoaparams.d.ts.map +1 -0
  6. package/dist/commonjs/models/components/earntransferfromeoaparams.js +68 -0
  7. package/dist/commonjs/models/components/earntransferfromeoaparams.js.map +1 -0
  8. package/dist/commonjs/models/components/earntransferrequest.d.ts +1 -1
  9. package/dist/commonjs/models/components/earntransfertoeoaparams.d.ts +36 -0
  10. package/dist/commonjs/models/components/earntransfertoeoaparams.d.ts.map +1 -0
  11. package/dist/commonjs/models/components/earntransfertoeoaparams.js +56 -0
  12. package/dist/commonjs/models/components/earntransfertoeoaparams.js.map +1 -0
  13. package/dist/commonjs/models/components/index.d.ts +2 -0
  14. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  15. package/dist/commonjs/models/components/index.js +2 -0
  16. package/dist/commonjs/models/components/index.js.map +1 -1
  17. package/dist/commonjs/models/components/v2bundlerequest.d.ts +41 -0
  18. package/dist/commonjs/models/components/v2bundlerequest.d.ts.map +1 -1
  19. package/dist/commonjs/models/components/v2bundlerequest.js.map +1 -1
  20. package/dist/commonjs/models/components/v2useroperation.d.ts +6 -4
  21. package/dist/commonjs/models/components/v2useroperation.d.ts.map +1 -1
  22. package/dist/commonjs/models/components/v2useroperation.js +10 -1
  23. package/dist/commonjs/models/components/v2useroperation.js.map +1 -1
  24. package/dist/esm/lib/config.d.ts +2 -2
  25. package/dist/esm/lib/config.js +2 -2
  26. package/dist/esm/models/components/earntransferfromeoaparams.d.ts +64 -0
  27. package/dist/esm/models/components/earntransferfromeoaparams.d.ts.map +1 -0
  28. package/dist/esm/models/components/earntransferfromeoaparams.js +30 -0
  29. package/dist/esm/models/components/earntransferfromeoaparams.js.map +1 -0
  30. package/dist/esm/models/components/earntransferrequest.d.ts +1 -1
  31. package/dist/esm/models/components/earntransfertoeoaparams.d.ts +36 -0
  32. package/dist/esm/models/components/earntransfertoeoaparams.d.ts.map +1 -0
  33. package/dist/esm/models/components/earntransfertoeoaparams.js +19 -0
  34. package/dist/esm/models/components/earntransfertoeoaparams.js.map +1 -0
  35. package/dist/esm/models/components/index.d.ts +2 -0
  36. package/dist/esm/models/components/index.d.ts.map +1 -1
  37. package/dist/esm/models/components/index.js +2 -0
  38. package/dist/esm/models/components/index.js.map +1 -1
  39. package/dist/esm/models/components/v2bundlerequest.d.ts +41 -0
  40. package/dist/esm/models/components/v2bundlerequest.d.ts.map +1 -1
  41. package/dist/esm/models/components/v2bundlerequest.js.map +1 -1
  42. package/dist/esm/models/components/v2useroperation.d.ts +6 -4
  43. package/dist/esm/models/components/v2useroperation.d.ts.map +1 -1
  44. package/dist/esm/models/components/v2useroperation.js +10 -1
  45. package/dist/esm/models/components/v2useroperation.js.map +1 -1
  46. package/docs/models/components/aaveborrowrequestamount.md +1 -1
  47. package/docs/models/components/aaverepayrequestamount.md +1 -1
  48. package/docs/models/components/aavesupplyrequestamount.md +1 -1
  49. package/docs/models/components/aavewithdrawrequestamount.md +1 -1
  50. package/docs/models/components/aerodromeslipstreambuyexactlyrequestamountinmaximum.md +1 -1
  51. package/docs/models/components/aerodromeslipstreambuyexactlyrequestamountout.md +1 -1
  52. package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionrequestamount0desired.md +1 -1
  53. package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionrequestamount0min.md +1 -1
  54. package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionrequestamount1desired.md +1 -1
  55. package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionrequestamount1min.md +1 -1
  56. package/docs/models/components/aerodromeslipstreammintliquidityprovisionrequestamount0desired.md +1 -1
  57. package/docs/models/components/aerodromeslipstreammintliquidityprovisionrequestamount0min.md +1 -1
  58. package/docs/models/components/aerodromeslipstreammintliquidityprovisionrequestamount1desired.md +1 -1
  59. package/docs/models/components/aerodromeslipstreammintliquidityprovisionrequestamount1min.md +1 -1
  60. package/docs/models/components/aerodromeslipstreamsellexactlyparamsamountoutminimum.md +1 -1
  61. package/docs/models/components/aerodromeslipstreamsellexactlyrequestamountin.md +1 -1
  62. package/docs/models/components/aerodromeslipstreamsellexactlyrequestamountoutminimum.md +1 -1
  63. package/docs/models/components/aerodromeslipstreamwithdrawliquidityprovisionrequestpercentageforwithdrawal.md +1 -1
  64. package/docs/models/components/depositforburnrequestamount.md +1 -1
  65. package/docs/models/components/earnswapparamsslippage.md +1 -1
  66. package/docs/models/components/earnswaprequestamountin.md +1 -1
  67. package/docs/models/components/earnswaprequestslippage.md +1 -1
  68. package/docs/models/components/earntransferfromeoaparams.md +39 -0
  69. package/docs/models/components/earntransferfromeoaparamsamount.md +19 -0
  70. package/docs/models/components/earntransferrequest.md +9 -9
  71. package/docs/models/components/earntransferrequestamount.md +1 -1
  72. package/docs/models/components/earntransfertoeoaparams.md +29 -0
  73. package/docs/models/components/ethenadepositrequestamount.md +1 -1
  74. package/docs/models/components/initialcollateralamount.md +1 -1
  75. package/docs/models/components/loantovalue.md +1 -1
  76. package/docs/models/components/maxslippagepercent.md +1 -1
  77. package/docs/models/components/morphoborrowrequestamount.md +1 -1
  78. package/docs/models/components/morphodepositrequestamount.md +1 -1
  79. package/docs/models/components/morphosupplycollateralrequestamount.md +1 -1
  80. package/docs/models/components/morphowithdrawcollateralrequestamount.md +1 -1
  81. package/docs/models/components/multiplier.md +1 -1
  82. package/docs/models/components/odosswaprequestamountin.md +1 -1
  83. package/docs/models/components/pendlemanageliquidityrequestamountin.md +1 -1
  84. package/docs/models/components/pendletradeptrequestamountin.md +1 -1
  85. package/docs/models/components/pendletradeytrequestamountin.md +1 -1
  86. package/docs/models/components/setallowancerequestamount.md +1 -1
  87. package/docs/models/components/skybuyrequestamount.md +1 -1
  88. package/docs/models/components/skydepositrequestamount.md +1 -1
  89. package/docs/models/components/skysellrequestamount.md +1 -1
  90. package/docs/models/components/tokentransferrequestamount.md +1 -1
  91. package/docs/models/components/uniswapbuyexactlyrequestamountout.md +1 -1
  92. package/docs/models/components/uniswapincreaseliquidityprovisionrequestamount0desired.md +1 -1
  93. package/docs/models/components/uniswapincreaseliquidityprovisionrequestamount0min.md +1 -1
  94. package/docs/models/components/uniswapincreaseliquidityprovisionrequestamount1desired.md +1 -1
  95. package/docs/models/components/uniswapincreaseliquidityprovisionrequestamount1min.md +1 -1
  96. package/docs/models/components/uniswapmintliquidityprovisionrequestamount0desired.md +1 -1
  97. package/docs/models/components/uniswapmintliquidityprovisionrequestamount0min.md +1 -1
  98. package/docs/models/components/uniswapmintliquidityprovisionrequestamount1desired.md +1 -1
  99. package/docs/models/components/uniswapmintliquidityprovisionrequestamount1min.md +1 -1
  100. package/docs/models/components/uniswapsellexactlyrequestamountin.md +1 -1
  101. package/docs/models/components/uniswapwithdrawliquidityprovisionrequestpercentageforwithdrawal.md +1 -1
  102. package/docs/models/components/unwrapwethrequestamount.md +1 -1
  103. package/docs/models/components/v2bundlerequest.md +54 -6
  104. package/docs/models/components/v2useroperationbody.md +23 -0
  105. package/docs/models/components/vaultdepositrequestamount.md +1 -1
  106. package/docs/models/components/wrapethrequestamount.md +1 -1
  107. package/docs/models/operations/amountin.md +1 -1
  108. package/docs/models/operations/amountout.md +1 -1
  109. package/docs/sdks/earn/README.md +20 -0
  110. package/package.json +1 -1
  111. package/src/lib/config.ts +2 -2
  112. package/src/models/components/earntransferfromeoaparams.ts +112 -0
  113. package/src/models/components/earntransferrequest.ts +1 -1
  114. package/src/models/components/earntransfertoeoaparams.ts +62 -0
  115. package/src/models/components/index.ts +2 -0
  116. package/src/models/components/v2bundlerequest.ts +41 -0
  117. package/src/models/components/v2useroperation.ts +36 -5
@@ -16,12 +16,12 @@ let value: EarnTransferRequest = {
16
16
 
17
17
  ## Fields
18
18
 
19
- | Field | Type | Required | Description | Example |
20
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
21
- | `owner` | *string* | :heavy_check_mark: | The owner's wallet address. | 0x01E62835dd7F52173546A325294762143eE4a882 |
22
- | `chain` | [components.Chain](../../models/components/chain.md) | :heavy_check_mark: | The chain to use. | |
23
- | `token` | *string* | :heavy_check_mark: | The token you would like to transfer. | USDC |
24
- | `amount` | *components.EarnTransferRequestAmount* | :heavy_check_mark: | The amount of 'token' to transfer. | 0.01 |
25
- | `action` | [components.EarnTransferRequestAction](../../models/components/earntransferrequestaction.md) | :heavy_check_mark: | Whether you are depositing to or withdrawing from your earn account. | DEPOSIT |
26
- | `gasSponsorship` | *boolean* | :heavy_minus_sign: | Optionally request gas sponsorship. If set to `true`, EIP-712 signature data will be returned that must be signed by the `owner` and submitted to the `/gas_sponsorship/prepare` endpoint. | false |
27
- | `spender` | *string* | :heavy_minus_sign: | The address of the wallet which will send the transaction. This only needs to be set when `action` is 'DEPOSIT' and `gas_sponsorship` is `true`. | |
19
+ | Field | Type | Required | Description | Example |
20
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
+ | `owner` | *string* | :heavy_check_mark: | The owner's wallet address. | 0x01E62835dd7F52173546A325294762143eE4a882 |
22
+ | `chain` | [components.Chain](../../models/components/chain.md) | :heavy_check_mark: | The chain to use. | |
23
+ | `token` | *string* | :heavy_check_mark: | The token you would like to transfer. | USDC |
24
+ | `amount` | *components.EarnTransferRequestAmount* | :heavy_check_mark: | The amount of 'token' to transfer. | 0.01 |
25
+ | `action` | [components.EarnTransferRequestAction](../../models/components/earntransferrequestaction.md) | :heavy_check_mark: | Whether you are depositing to or withdrawing from your earn account. | DEPOSIT |
26
+ | `gasSponsorship` | *boolean* | :heavy_minus_sign: | Optionally request gas sponsorship. If set to `true`, EIP-712 signature data will be returned that must be signed by the `owner` and submitted to the `/gas_sponsorship/prepare` endpoint. | false |
27
+ | `spender` | *string* | :heavy_minus_sign: | The address that will call Permit2's permitTransferFrom to execute the transfer. When `action` is 'DEPOSIT' and `gas_sponsorship` is `true`: - If provided, the signature will authorize this address (typically a gas sponsor) to pull tokens. - If not provided, defaults to the Earn Account (Safe) address, allowing the transfer to be included in a bundle transaction where the Safe pulls the tokens itself. | |
@@ -8,7 +8,7 @@ The amount of 'token' to transfer.
8
8
  ### `number`
9
9
 
10
10
  ```typescript
11
- const value: number = 0.01;
11
+ const value: number = 1284.03;
12
12
  ```
13
13
 
14
14
  ### `string`
@@ -0,0 +1,29 @@
1
+ # EarnTransferToEOAParams
2
+
3
+ Parameters for transferring tokens from Earn Account to EOA (withdrawal).
4
+
5
+ Used by multicall/bundle endpoint to send tokens from the Earn Account (Safe) back
6
+ to the owner's EOA as part of an atomic bundle transaction.
7
+
8
+ No signature is required for this action since the Safe already owns the tokens and
9
+ is executing the transfer as part of its own transaction.
10
+
11
+ ## Example Usage
12
+
13
+ ```typescript
14
+ import { EarnTransferToEOAParams } from "@compass-labs/api-sdk/models/components";
15
+
16
+ let value: EarnTransferToEOAParams = {
17
+ actionType: "V2_TRANSFER_TO_EOA",
18
+ token: "<value>",
19
+ amount: 692.89,
20
+ };
21
+ ```
22
+
23
+ ## Fields
24
+
25
+ | Field | Type | Required | Description | Example |
26
+ | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
27
+ | `actionType` | *"V2_TRANSFER_TO_EOA"* | :heavy_check_mark: | Action type identifier for Earn-Account-to-EOA transfer operations. | V2_TRANSFER_TO_EOA |
28
+ | `token` | *string* | :heavy_check_mark: | The token to transfer from Earn Account to EOA. | |
29
+ | `amount` | *any* | :heavy_check_mark: | The amount of tokens to transfer (in token units, not wei), or 'ALL' to transfer the entire balance. | |
@@ -14,6 +14,6 @@ const value: number = 0.4;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "0.4";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -8,7 +8,7 @@ Amount of collateral token to supply to Aave
8
8
  ### `number`
9
9
 
10
10
  ```typescript
11
- const value: number = 1000;
11
+ const value: number = 1284.03;
12
12
  ```
13
13
 
14
14
  ### `string`
@@ -8,7 +8,7 @@ Loan To Value percentage of the loop
8
8
  ### `number`
9
9
 
10
10
  ```typescript
11
- const value: number = 60;
11
+ const value: number = 1284.03;
12
12
  ```
13
13
 
14
14
  ### `string`
@@ -8,7 +8,7 @@ Maximum allowed slippage for token swaps in percentage
8
8
  ### `number`
9
9
 
10
10
  ```typescript
11
- const value: number = 0.5;
11
+ const value: number = 1284.03;
12
12
  ```
13
13
 
14
14
  ### `string`
@@ -14,6 +14,6 @@ const value: number = 0.00005;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "0.00005";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -14,6 +14,6 @@ const value: number = 0.5;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "0.5";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -14,6 +14,6 @@ const value: number = 0.5;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "0.5";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -14,6 +14,6 @@ const value: number = 0.5;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "0.5";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -8,7 +8,7 @@ Leverage multiplier. Total loop collateral will be calculated as `multiplier` x
8
8
  ### `number`
9
9
 
10
10
  ```typescript
11
- const value: number = 2.5;
11
+ const value: number = 1284.03;
12
12
  ```
13
13
 
14
14
  ### `string`
@@ -14,6 +14,6 @@ const value: number = 0.0001;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "0.0001";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -14,6 +14,6 @@ const value: number = 0.0001;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "0.0001";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -14,6 +14,6 @@ const value: number = 0.0001;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "0.0001";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -14,6 +14,6 @@ const value: number = 0.0001;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "0.0001";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -8,7 +8,7 @@ The amount to set the allowance to.
8
8
  ### `number`
9
9
 
10
10
  ```typescript
11
- const value: number = 0.1;
11
+ const value: number = 1284.03;
12
12
  ```
13
13
 
14
14
  ### `string`
@@ -14,6 +14,6 @@ const value: number = 0.5;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "0.5";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -14,6 +14,6 @@ const value: number = 0.2;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "0.2";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -14,6 +14,6 @@ const value: number = 0.2;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "0.2";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -14,6 +14,6 @@ const value: number = 0.1;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "0.1";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -14,6 +14,6 @@ const value: number = 0.1;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "0.1";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -8,7 +8,7 @@ The desired amount of the first token to deposit
8
8
  ### `number`
9
9
 
10
10
  ```typescript
11
- const value: number = 0.3;
11
+ const value: number = 1284.03;
12
12
  ```
13
13
 
14
14
  ### `string`
@@ -8,7 +8,7 @@ The minimum amount of the first token to deposit
8
8
  ### `number`
9
9
 
10
10
  ```typescript
11
- const value: number = 0;
11
+ const value: number = 1284.03;
12
12
  ```
13
13
 
14
14
  ### `string`
@@ -8,7 +8,7 @@ The desired amount of the second token to deposit
8
8
  ### `number`
9
9
 
10
10
  ```typescript
11
- const value: number = 0;
11
+ const value: number = 1284.03;
12
12
  ```
13
13
 
14
14
  ### `string`
@@ -8,7 +8,7 @@ The minimum amount of the second token to deposit
8
8
  ### `number`
9
9
 
10
10
  ```typescript
11
- const value: number = 0;
11
+ const value: number = 1284.03;
12
12
  ```
13
13
 
14
14
  ### `string`
@@ -8,7 +8,7 @@ The desired amount of the first token to deposit
8
8
  ### `number`
9
9
 
10
10
  ```typescript
11
- const value: number = 0.05;
11
+ const value: number = 1284.03;
12
12
  ```
13
13
 
14
14
  ### `string`
@@ -8,7 +8,7 @@ The minimum amount of the first token to deposit
8
8
  ### `number`
9
9
 
10
10
  ```typescript
11
- const value: number = 0;
11
+ const value: number = 1284.03;
12
12
  ```
13
13
 
14
14
  ### `string`
@@ -8,7 +8,7 @@ The desired amount of the second token to deposit
8
8
  ### `number`
9
9
 
10
10
  ```typescript
11
- const value: number = 0;
11
+ const value: number = 1284.03;
12
12
  ```
13
13
 
14
14
  ### `string`
@@ -8,7 +8,7 @@ The minimum amount of the second token to deposit
8
8
  ### `number`
9
9
 
10
10
  ```typescript
11
- const value: number = 0;
11
+ const value: number = 1284.03;
12
12
  ```
13
13
 
14
14
  ### `string`
@@ -14,6 +14,6 @@ const value: number = 0.1;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "0.1";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -14,6 +14,6 @@ const value: number = 1;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "1";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -8,7 +8,7 @@ The amount of WETH to unwrap.
8
8
  ### `number`
9
9
 
10
10
  ```typescript
11
- const value: number = 0.00004;
11
+ const value: number = 1284.03;
12
12
  ```
13
13
 
14
14
  ### `string`
@@ -1,5 +1,43 @@
1
1
  # V2BundleRequest
2
2
 
3
+ Request to execute multiple earn actions in a single atomic transaction.
4
+
5
+ ## Supported Action Types
6
+
7
+ - **V2_TRANSFER_FROM_EOA**: Transfer tokens from the owner's EOA to the Earn Account
8
+ using Permit2. Requires a signed Permit2 message.
9
+ - **V2_TRANSFER_TO_EOA**: Transfer tokens from the Earn Account back to the owner's EOA.
10
+ No signature required (Safe owns the tokens).
11
+ - **V2_SWAP**: Swap tokens within the Earn Account using 1inch aggregator.
12
+ - **V2_MANAGE**: Deposit or withdraw from DeFi venues (Aave, Morpho, Vaults, etc.)
13
+
14
+ ## Using V2_TRANSFER_FROM_EOA (Deposit to Earn Account)
15
+
16
+ To include a transfer from EOA in your bundle, follow these steps:
17
+
18
+ 1. **One-time setup**: Approve Permit2 to spend the token by calling
19
+ `POST /v2/gas_sponsorship/approve_transfer` and executing the returned transaction.
20
+
21
+ 2. **Get Permit2 signature**: Call `POST /v2/earn/transfer` with:
22
+ - `action`: "DEPOSIT"
23
+ - `gas_sponsorship`: true
24
+ - `spender`: omit this field (defaults to Safe address for bundle use)
25
+
26
+ This returns EIP-712 typed data. Sign it with the owner's wallet.
27
+
28
+ 3. **Include in bundle**: Add a V2_TRANSFER_FROM_EOA action with the signature
29
+ and nonce/deadline from the typed data.
30
+
31
+ The bundle will atomically: pull tokens from EOA → execute subsequent actions.
32
+
33
+ ## Using V2_TRANSFER_TO_EOA (Withdraw to EOA)
34
+
35
+ To transfer tokens from the Earn Account back to the owner's EOA, simply add
36
+ a V2_TRANSFER_TO_EOA action to your bundle. No signature is required since
37
+ the Safe already owns the tokens.
38
+
39
+ Use `amount: "ALL"` to transfer the entire token balance.
40
+
3
41
  ## Example Usage
4
42
 
5
43
  ```typescript
@@ -9,6 +47,16 @@ let value: V2BundleRequest = {
9
47
  owner: "0x01E62835dd7F52173546A325294762143eE4a882",
10
48
  chain: "ethereum",
11
49
  actions: [
50
+ {
51
+ body: {
52
+ actionType: "V2_TRANSFER_FROM_EOA",
53
+ token: "USDC",
54
+ amount: "100",
55
+ permit2Signature: "0x...",
56
+ permit2Nonce: 1706000000,
57
+ permit2Deadline: 1706001800,
58
+ },
59
+ },
12
60
  {
13
61
  body: {
14
62
  actionType: "V2_SWAP",
@@ -36,9 +84,9 @@ let value: V2BundleRequest = {
36
84
 
37
85
  ## Fields
38
86
 
39
- | Field | Type | Required | Description | Example |
40
- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
41
- | `owner` | *string* | :heavy_check_mark: | The owner's wallet address that controls the Earn Account. | 0x01E62835dd7F52173546A325294762143eE4a882 |
42
- | `chain` | [components.Chain](../../models/components/chain.md) | :heavy_check_mark: | The chain to use. | |
43
- | `actions` | [components.V2UserOperation](../../models/components/v2useroperation.md)[] | :heavy_check_mark: | List of actions to bundle. Actions are executed in order. | [<br/>{<br/>"body": {<br/>"action_type": "V2_SWAP",<br/>"amount_in": "100",<br/>"slippage": "0.5",<br/>"token_in": "USDC",<br/>"token_out": "AUSD"<br/>}<br/>},<br/>{<br/>"body": {<br/>"action": "DEPOSIT",<br/>"action_type": "V2_MANAGE",<br/>"amount": "ALL",<br/>"venue": {<br/>"type": "VAULT",<br/>"vault_address": "0x1B4cd53a1A8e5F50aB6320EF34E5fB4D3df7B6f6"<br/>}<br/>}<br/>}<br/>] |
44
- | `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 typed data for gas sponsorship. The owner must sign this data and submit to /gas_sponsorship/prepare. | false |
87
+ | Field | Type | Required | Description | Example |
88
+ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
89
+ | `owner` | *string* | :heavy_check_mark: | The owner's wallet address that controls the Earn Account. | 0x01E62835dd7F52173546A325294762143eE4a882 |
90
+ | `chain` | [components.Chain](../../models/components/chain.md) | :heavy_check_mark: | The chain to use. | |
91
+ | `actions` | [components.V2UserOperation](../../models/components/v2useroperation.md)[] | :heavy_check_mark: | List of actions to bundle. Actions are executed in order. | [<br/>{<br/>"body": {<br/>"action_type": "V2_TRANSFER_FROM_EOA",<br/>"amount": "100",<br/>"permit2_deadline": 1706001800,<br/>"permit2_nonce": 1706000000,<br/>"permit2_signature": "0x...",<br/>"token": "USDC"<br/>}<br/>},<br/>{<br/>"body": {<br/>"action_type": "V2_SWAP",<br/>"amount_in": "100",<br/>"slippage": "0.5",<br/>"token_in": "USDC",<br/>"token_out": "AUSD"<br/>}<br/>},<br/>{<br/>"body": {<br/>"action": "DEPOSIT",<br/>"action_type": "V2_MANAGE",<br/>"amount": "ALL",<br/>"venue": {<br/>"type": "VAULT",<br/>"vault_address": "0x1B4cd53a1A8e5F50aB6320EF34E5fB4D3df7B6f6"<br/>}<br/>}<br/>}<br/>] |
92
+ | `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 typed data for gas sponsorship. The owner must sign this data and submit to /gas_sponsorship/prepare. | false |
@@ -29,3 +29,26 @@ const value: components.EarnSwapParams = {
29
29
  };
30
30
  ```
31
31
 
32
+ ### `components.EarnTransferFromEOAParams`
33
+
34
+ ```typescript
35
+ const value: components.EarnTransferFromEOAParams = {
36
+ actionType: "V2_TRANSFER_FROM_EOA",
37
+ token: "<value>",
38
+ amount: 4305.68,
39
+ permit2Signature: "<value>",
40
+ permit2Nonce: 649287,
41
+ permit2Deadline: 645376,
42
+ };
43
+ ```
44
+
45
+ ### `components.EarnTransferToEOAParams`
46
+
47
+ ```typescript
48
+ const value: components.EarnTransferToEOAParams = {
49
+ actionType: "V2_TRANSFER_TO_EOA",
50
+ token: "<value>",
51
+ amount: 692.89,
52
+ };
53
+ ```
54
+
@@ -14,6 +14,6 @@ const value: number = 0.5;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "0.5";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -8,7 +8,7 @@ The amount of ETH to wrap.
8
8
  ### `number`
9
9
 
10
10
  ```typescript
11
- const value: number = 0.000001;
11
+ const value: number = 1284.03;
12
12
  ```
13
13
 
14
14
  ### `string`
@@ -14,6 +14,6 @@ const value: number = 1;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "1";
17
+ const value: string = "<value>";
18
18
  ```
19
19
 
@@ -14,6 +14,6 @@ const value: number = 1;
14
14
  ### `string`
15
15
 
16
16
  ```typescript
17
- const value: string = "1";
17
+ const value: string = "<value>";
18
18
  ```
19
19