@compass-labs/api-sdk 2.1.26-rc.9 → 2.1.27-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.
- package/codeSamples_typescript.yaml +6 -6
- package/dist/commonjs/funcs/earnEarnManage.d.ts +4 -1
- package/dist/commonjs/funcs/earnEarnManage.d.ts.map +1 -1
- package/dist/commonjs/funcs/earnEarnManage.js +4 -1
- package/dist/commonjs/funcs/earnEarnManage.js.map +1 -1
- package/dist/commonjs/funcs/earnEarnPositions.js +1 -1
- package/dist/commonjs/funcs/earnEarnPositions.js.map +1 -1
- package/dist/commonjs/models/components/fee.d.ts +6 -5
- package/dist/commonjs/models/components/fee.d.ts.map +1 -1
- package/dist/commonjs/models/components/fee.js +2 -1
- package/dist/commonjs/models/components/fee.js.map +1 -1
- package/dist/commonjs/models/operations/v2earnpositions.d.ts +3 -3
- package/dist/commonjs/models/operations/v2earnpositions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/v2earnpositions.js +1 -6
- package/dist/commonjs/models/operations/v2earnpositions.js.map +1 -1
- package/dist/commonjs/sdk/earn.d.ts +4 -1
- package/dist/commonjs/sdk/earn.d.ts.map +1 -1
- package/dist/commonjs/sdk/earn.js +4 -1
- package/dist/commonjs/sdk/earn.js.map +1 -1
- package/dist/esm/funcs/earnEarnManage.d.ts +4 -1
- package/dist/esm/funcs/earnEarnManage.d.ts.map +1 -1
- package/dist/esm/funcs/earnEarnManage.js +4 -1
- package/dist/esm/funcs/earnEarnManage.js.map +1 -1
- package/dist/esm/funcs/earnEarnPositions.js +1 -1
- package/dist/esm/funcs/earnEarnPositions.js.map +1 -1
- package/dist/esm/models/components/fee.d.ts +6 -5
- package/dist/esm/models/components/fee.d.ts.map +1 -1
- package/dist/esm/models/components/fee.js +2 -1
- package/dist/esm/models/components/fee.js.map +1 -1
- package/dist/esm/models/operations/v2earnpositions.d.ts +3 -3
- package/dist/esm/models/operations/v2earnpositions.d.ts.map +1 -1
- package/dist/esm/models/operations/v2earnpositions.js +1 -6
- package/dist/esm/models/operations/v2earnpositions.js.map +1 -1
- package/dist/esm/sdk/earn.d.ts +4 -1
- package/dist/esm/sdk/earn.d.ts.map +1 -1
- package/dist/esm/sdk/earn.js +4 -1
- package/dist/esm/sdk/earn.js.map +1 -1
- package/docs/models/components/aavelooprequest.md +15 -15
- package/docs/models/components/aaverepayrequest.md +5 -5
- package/docs/models/components/aaverepayrequestamount.md +2 -2
- package/docs/models/components/aaverepayrequestchain.md +1 -1
- package/docs/models/components/aavesetuseremoderequest.md +3 -3
- package/docs/models/components/aavesetuseremoderequestchain.md +1 -1
- package/docs/models/components/aavesupplyrequest.md +4 -4
- package/docs/models/components/aavesupplyrequestamount.md +2 -2
- package/docs/models/components/aavesupplyrequestchain.md +1 -1
- package/docs/models/components/aavewithdrawrequest.md +5 -5
- package/docs/models/components/aavewithdrawrequestamount.md +2 -2
- package/docs/models/components/aavewithdrawrequestchain.md +1 -1
- package/docs/models/components/aerodromeslipstreambuyexactlyrequest.md +7 -7
- package/docs/models/components/aerodromeslipstreambuyexactlyrequestamountinmaximum.md +2 -2
- package/docs/models/components/aerodromeslipstreambuyexactlyrequestamountout.md +2 -2
- package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionrequest.md +7 -7
- package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionrequestamount0desired.md +2 -2
- package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionrequestamount0min.md +2 -2
- package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionrequestamount1desired.md +2 -2
- package/docs/models/components/aerodromeslipstreamincreaseliquidityprovisionrequestamount1min.md +2 -2
- package/docs/models/components/aerodromeslipstreammintliquidityprovisionrequest.md +12 -12
- package/docs/models/components/aerodromeslipstreammintliquidityprovisionrequestamount0desired.md +2 -2
- package/docs/models/components/aerodromeslipstreammintliquidityprovisionrequestamount0min.md +2 -2
- package/docs/models/components/aerodromeslipstreammintliquidityprovisionrequestamount1desired.md +2 -2
- package/docs/models/components/aerodromeslipstreammintliquidityprovisionrequestamount1min.md +2 -2
- package/docs/models/components/aerodromeslipstreamsellexactlyrequest.md +6 -6
- package/docs/models/components/aerodromeslipstreamsellexactlyrequestamountin.md +2 -2
- package/docs/models/components/aerodromeslipstreamwithdrawliquidityprovisionrequest.md +4 -4
- package/docs/models/components/aerodromeslipstreamwithdrawliquidityprovisionrequestpercentageforwithdrawal.md +2 -2
- package/docs/models/components/approvetransferrequest.md +2 -2
- package/docs/models/components/approvetransferresponse.md +7 -2
- package/docs/models/components/batchedsafeoperationsresponseinput.md +22 -9
- package/docs/models/components/batchedsafeoperationsresponseoutput.md +2 -7
- package/docs/models/components/batcheduseroperationsrequest.md +2 -2
- package/docs/models/components/createaccountrequest.md +5 -5
- package/docs/models/components/createaccountrequestchain.md +1 -1
- package/docs/models/components/denomination.md +2 -2
- package/docs/models/components/depositforburnrequest.md +4 -4
- package/docs/models/components/depositforburnrequestamount.md +2 -2
- package/docs/models/components/depositforburnresponse.md +2 -7
- package/docs/models/components/destinationchain.md +1 -1
- package/docs/models/components/earnmanageparams.md +2 -2
- package/docs/models/components/earnmanageparamsvenue.md +1 -1
- package/docs/models/components/earnmanagerequest.md +4 -4
- package/docs/models/components/earnmanagerequestvenue.md +1 -1
- package/docs/models/components/earnswaprequest.md +5 -5
- package/docs/models/components/earnswaprequestamountin.md +2 -2
- package/docs/models/components/earnswapresponse.md +2 -7
- package/docs/models/components/earntransferrequest.md +5 -5
- package/docs/models/components/earntransferrequestaction.md +1 -1
- package/docs/models/components/earntransferrequestamount.md +2 -2
- package/docs/models/components/earntransferresponse.md +2 -7
- package/docs/models/components/earntransferresponseeip712.md +6 -11
- package/docs/models/components/ethenadepositrequest.md +3 -3
- package/docs/models/components/ethenadepositrequestamount.md +2 -2
- package/docs/models/components/ethenarequesttowithdrawrequest.md +2 -2
- package/docs/models/components/ethenaunstakerequest.md +2 -2
- package/docs/models/components/fee.md +5 -5
- package/docs/models/components/feeamount.md +1 -1
- package/docs/models/components/initialcollateralamount.md +2 -2
- package/docs/models/components/loantovalue.md +2 -2
- package/docs/models/components/maxslippagepercent.md +2 -2
- package/docs/models/components/mintpreparerequest.md +5 -5
- package/docs/models/components/morphoborrowrequest.md +4 -4
- package/docs/models/components/morphoborrowrequestamount.md +2 -2
- package/docs/models/components/morphoborrowrequestchain.md +1 -1
- package/docs/models/components/morphodepositrequest.md +4 -4
- package/docs/models/components/morphodepositrequestamount.md +2 -2
- package/docs/models/components/morphodepositrequestchain.md +1 -1
- package/docs/models/components/morphorepayrequest.md +3 -3
- package/docs/models/components/morphosupplycollateralrequest.md +4 -4
- package/docs/models/components/morphosupplycollateralrequestamount.md +2 -2
- package/docs/models/components/morphosupplycollateralrequestchain.md +1 -1
- package/docs/models/components/morphowithdrawcollateralrequest.md +4 -4
- package/docs/models/components/morphowithdrawcollateralrequestamount.md +2 -2
- package/docs/models/components/morphowithdrawrequest.md +3 -3
- package/docs/models/components/morphowithdrawrequestchain.md +1 -1
- package/docs/models/components/multicallauthorizationrequest.md +4 -4
- package/docs/models/components/multicallauthorizationrequestchain.md +1 -1
- package/docs/models/components/multicallexecuterequest.md +7 -7
- package/docs/models/components/multiplier.md +2 -2
- package/docs/models/components/odosswaprequest.md +6 -6
- package/docs/models/components/odosswaprequestamountin.md +2 -2
- package/docs/models/components/pendlemanageliquidityrequest.md +7 -7
- package/docs/models/components/pendlemanageliquidityrequestamountin.md +2 -2
- package/docs/models/components/pendlemanageliquidityrequestchain.md +1 -1
- package/docs/models/components/pendleredeemyieldrequest.md +3 -3
- package/docs/models/components/pendletradeptrequest.md +7 -7
- package/docs/models/components/pendletradeptrequestaction.md +1 -1
- package/docs/models/components/pendletradeptrequestamountin.md +2 -2
- package/docs/models/components/pendletradeytrequest.md +7 -7
- package/docs/models/components/pendletradeytrequestaction.md +1 -1
- package/docs/models/components/pendletradeytrequestamountin.md +2 -2
- package/docs/models/components/permit2typeddatainput.md +10 -34
- package/docs/models/components/permit2typeddataoutput.md +4 -4
- package/docs/models/components/permittransferfrommessage.md +1 -1
- package/docs/models/components/permittypeddataresponseinput.md +50 -11
- package/docs/models/components/permittypeddataresponseoutput.md +7 -2
- package/docs/models/components/setallowancerequest.md +5 -5
- package/docs/models/components/setallowancerequestamount.md +2 -2
- package/docs/models/components/setallowancerequestcontractenum.md +1 -1
- package/docs/models/components/setallowancerequestcontractunion.md +1 -1
- package/docs/models/components/signedauthorization.md +6 -6
- package/docs/models/components/skybuyrequest.md +4 -4
- package/docs/models/components/skybuyrequestamount.md +2 -2
- package/docs/models/components/skydepositrequest.md +2 -2
- package/docs/models/components/skydepositrequestamount.md +2 -2
- package/docs/models/components/skysellrequest.md +4 -4
- package/docs/models/components/skysellrequestamount.md +2 -2
- package/docs/models/components/skysellrequesttokenout.md +1 -1
- package/docs/models/components/skywithdrawrequest.md +1 -1
- package/docs/models/components/sponsorgasrequest.md +7 -7
- package/docs/models/components/sponsorgasrequesteip712.md +76 -48
- package/docs/models/components/tokentransferrequest.md +5 -5
- package/docs/models/components/tokentransferrequestamount.md +2 -2
- package/docs/models/components/tokentransferrequestchain.md +1 -1
- package/docs/models/components/uniswapbuyexactlyrequest.md +6 -6
- package/docs/models/components/uniswapbuyexactlyrequestamountout.md +2 -2
- package/docs/models/components/uniswapbuyexactlyrequestchain.md +1 -1
- package/docs/models/components/uniswapincreaseliquidityprovisionrequest.md +7 -7
- package/docs/models/components/uniswapincreaseliquidityprovisionrequestamount0desired.md +2 -2
- package/docs/models/components/uniswapincreaseliquidityprovisionrequestamount0min.md +2 -2
- package/docs/models/components/uniswapincreaseliquidityprovisionrequestamount1desired.md +2 -2
- package/docs/models/components/uniswapincreaseliquidityprovisionrequestamount1min.md +2 -2
- package/docs/models/components/uniswapincreaseliquidityprovisionrequestchain.md +1 -1
- package/docs/models/components/uniswapmintliquidityprovisionrequest.md +11 -11
- package/docs/models/components/uniswapmintliquidityprovisionrequestamount0desired.md +2 -2
- package/docs/models/components/uniswapmintliquidityprovisionrequestamount0min.md +2 -2
- package/docs/models/components/uniswapmintliquidityprovisionrequestamount1desired.md +2 -2
- package/docs/models/components/uniswapmintliquidityprovisionrequestamount1min.md +2 -2
- package/docs/models/components/uniswapsellexactlyrequest.md +6 -6
- package/docs/models/components/uniswapsellexactlyrequestamountin.md +2 -2
- package/docs/models/components/uniswapsellexactlyrequestchain.md +1 -1
- package/docs/models/components/uniswapwithdrawliquidityprovisionrequest.md +4 -4
- package/docs/models/components/uniswapwithdrawliquidityprovisionrequestchain.md +1 -1
- package/docs/models/components/uniswapwithdrawliquidityprovisionrequestpercentageforwithdrawal.md +2 -2
- package/docs/models/components/unwrapwethrequest.md +3 -3
- package/docs/models/components/unwrapwethrequestamount.md +2 -2
- package/docs/models/components/unwrapwethrequestchain.md +1 -1
- package/docs/models/components/v2bundlerequest.md +7 -7
- package/docs/models/components/v2useroperation.md +2 -2
- package/docs/models/components/v2useroperationbody.md +2 -2
- package/docs/models/components/vaultdepositrequest.md +4 -4
- package/docs/models/components/vaultdepositrequestamount.md +2 -2
- package/docs/models/components/vaultvenue.md +1 -1
- package/docs/models/components/vaultwithdrawrequest.md +3 -3
- package/docs/models/components/vaultwithdrawrequestchain.md +1 -1
- package/docs/models/components/wrapethrequest.md +3 -3
- package/docs/models/components/wrapethrequestamount.md +2 -2
- package/docs/models/components/wrapethrequestchain.md +1 -1
- package/docs/models/operations/v2earnpositionsrequest.md +2 -2
- package/docs/sdks/earn/README.md +18 -15
- package/package.json +1 -1
- package/src/funcs/earnEarnManage.ts +4 -1
- package/src/funcs/earnEarnPositions.ts +1 -1
- package/src/models/components/fee.ts +6 -5
- package/src/models/operations/v2earnpositions.ts +4 -9
- package/src/sdk/earn.ts +4 -1
|
@@ -18,8 +18,8 @@ let value: UniswapWithdrawLiquidityProvisionRequest = {
|
|
|
18
18
|
| Field | Type | Required | Description | Example |
|
|
19
19
|
| ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
|
|
20
20
|
| `actionType` | *"UNISWAP_WITHDRAW_LIQUIDITY_PROVISION"* | :heavy_minus_sign: | N/A | UNISWAP_WITHDRAW_LIQUIDITY_PROVISION |
|
|
21
|
-
| `tokenId` | *number* | :heavy_check_mark: | Token ID of the NFT representing the liquidity provisioned position. |
|
|
22
|
-
| `percentageForWithdrawal` | *components.UniswapWithdrawLiquidityProvisionRequestPercentageForWithdrawal* | :heavy_check_mark: | How much liquidity to take out in percentage. |
|
|
23
|
-
| `chain` | [components.UniswapWithdrawLiquidityProvisionRequestChain](../../models/components/uniswapwithdrawliquidityprovisionrequestchain.md) | :heavy_check_mark: | N/A |
|
|
24
|
-
| `sender` | *string* | :heavy_check_mark: | The address of the transaction sender. |
|
|
21
|
+
| `tokenId` | *number* | :heavy_check_mark: | Token ID of the NFT representing the liquidity provisioned position. | 3432182 |
|
|
22
|
+
| `percentageForWithdrawal` | *components.UniswapWithdrawLiquidityProvisionRequestPercentageForWithdrawal* | :heavy_check_mark: | How much liquidity to take out in percentage. | 1 |
|
|
23
|
+
| `chain` | [components.UniswapWithdrawLiquidityProvisionRequestChain](../../models/components/uniswapwithdrawliquidityprovisionrequestchain.md) | :heavy_check_mark: | N/A | base |
|
|
24
|
+
| `sender` | *string* | :heavy_check_mark: | The address of the transaction sender. | 0x41096de529D54718a5600185F8C4460979ed75C9 |
|
|
25
25
|
| `estimateGas` | *boolean* | :heavy_minus_sign: | Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed. | true |
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
```typescript
|
|
6
6
|
import { UniswapWithdrawLiquidityProvisionRequestChain } from "@compass-labs/api-sdk/models/components";
|
|
7
7
|
|
|
8
|
-
let value: UniswapWithdrawLiquidityProvisionRequestChain = "
|
|
8
|
+
let value: UniswapWithdrawLiquidityProvisionRequestChain = "base";
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Values
|
package/docs/models/components/uniswapwithdrawliquidityprovisionrequestpercentageforwithdrawal.md
CHANGED
|
@@ -8,12 +8,12 @@ How much liquidity to take out in percentage.
|
|
|
8
8
|
### `number`
|
|
9
9
|
|
|
10
10
|
```typescript
|
|
11
|
-
const value: number =
|
|
11
|
+
const value: number = 1;
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
### `string`
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
const value: string = "
|
|
17
|
+
const value: string = "1";
|
|
18
18
|
```
|
|
19
19
|
|
|
@@ -19,7 +19,7 @@ let value: UnwrapWethRequest = {
|
|
|
19
19
|
| Field | Type | Required | Description | Example |
|
|
20
20
|
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
21
21
|
| `actionType` | *"UNWRAP_WETH"* | :heavy_minus_sign: | N/A | UNWRAP_WETH |
|
|
22
|
-
| `amount` | *components.UnwrapWethRequestAmount* | :heavy_check_mark: | The amount of WETH to unwrap. |
|
|
23
|
-
| `chain` | [components.UnwrapWethRequestChain](../../models/components/unwrapwethrequestchain.md) | :heavy_check_mark: | N/A |
|
|
24
|
-
| `sender` | *string* | :heavy_check_mark: | The address of the transaction sender. |
|
|
22
|
+
| `amount` | *components.UnwrapWethRequestAmount* | :heavy_check_mark: | The amount of WETH to unwrap. | 0.00004 |
|
|
23
|
+
| `chain` | [components.UnwrapWethRequestChain](../../models/components/unwrapwethrequestchain.md) | :heavy_check_mark: | N/A | base |
|
|
24
|
+
| `sender` | *string* | :heavy_check_mark: | The address of the transaction sender. | 0x0E9E8986823aF26F6b18702C31AfF6a10C1e9E7A |
|
|
25
25
|
| `estimateGas` | *boolean* | :heavy_minus_sign: | Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed. | true |
|
|
@@ -8,12 +8,12 @@ The amount of WETH to unwrap.
|
|
|
8
8
|
### `number`
|
|
9
9
|
|
|
10
10
|
```typescript
|
|
11
|
-
const value: number =
|
|
11
|
+
const value: number = 0.00004;
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
### `string`
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
const value: string = "
|
|
17
|
+
const value: string = "0.00004";
|
|
18
18
|
```
|
|
19
19
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import { V2BundleRequest } from "@compass-labs/api-sdk/models/components";
|
|
7
7
|
|
|
8
8
|
let value: V2BundleRequest = {
|
|
9
|
-
owner: "
|
|
9
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
10
10
|
chain: "ethereum",
|
|
11
11
|
actions: [
|
|
12
12
|
{
|
|
@@ -36,9 +36,9 @@ let value: V2BundleRequest = {
|
|
|
36
36
|
|
|
37
37
|
## Fields
|
|
38
38
|
|
|
39
|
-
| Field
|
|
40
|
-
|
|
|
41
|
-
| `owner`
|
|
42
|
-
| `chain`
|
|
43
|
-
| `actions`
|
|
44
|
-
| `gasSponsorship`
|
|
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 |
|
|
@@ -12,10 +12,10 @@ let value: V2UserOperation = {
|
|
|
12
12
|
actionType: "V2_MANAGE",
|
|
13
13
|
venue: {
|
|
14
14
|
type: "VAULT",
|
|
15
|
-
vaultAddress: "
|
|
15
|
+
vaultAddress: "0x7BfA7C4f149E7415b73bdeDfe609237e29CBF34A",
|
|
16
16
|
},
|
|
17
17
|
action: "WITHDRAW",
|
|
18
|
-
amount:
|
|
18
|
+
amount: "314.39",
|
|
19
19
|
},
|
|
20
20
|
};
|
|
21
21
|
```
|
|
@@ -10,10 +10,10 @@ const value: components.EarnManageParams = {
|
|
|
10
10
|
actionType: "V2_MANAGE",
|
|
11
11
|
venue: {
|
|
12
12
|
type: "VAULT",
|
|
13
|
-
vaultAddress: "
|
|
13
|
+
vaultAddress: "0x7BfA7C4f149E7415b73bdeDfe609237e29CBF34A",
|
|
14
14
|
},
|
|
15
15
|
action: "WITHDRAW",
|
|
16
|
-
amount:
|
|
16
|
+
amount: "229.41",
|
|
17
17
|
};
|
|
18
18
|
```
|
|
19
19
|
|
|
@@ -18,9 +18,9 @@ let value: VaultDepositRequest = {
|
|
|
18
18
|
| Field | Type | Required | Description | Example |
|
|
19
19
|
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
20
20
|
| `actionType` | *"VAULT_DEPOSIT"* | :heavy_minus_sign: | N/A | VAULT_DEPOSIT |
|
|
21
|
-
| `vaultAddress` | *string* | :heavy_check_mark: | The vault address you are depositing to. |
|
|
22
|
-
| `amount` | *components.VaultDepositRequestAmount* | :heavy_check_mark: | The amount of tokens to deposit into the vault. |
|
|
21
|
+
| `vaultAddress` | *string* | :heavy_check_mark: | The vault address you are depositing to. | 0xfdB431E661372fA1146efB70bf120ECDed944a78 |
|
|
22
|
+
| `amount` | *components.VaultDepositRequestAmount* | :heavy_check_mark: | The amount of tokens to deposit into the vault. | 0.5 |
|
|
23
23
|
| `receiver` | *string* | :heavy_minus_sign: | The address which will receive the shares from the vault representing their proportional ownership of the vault's assets. Defaults to the sender. | |
|
|
24
|
-
| `chain` | [components.VaultDepositRequestChain](../../models/components/vaultdepositrequestchain.md) | :heavy_check_mark: | N/A |
|
|
25
|
-
| `sender` | *string* | :heavy_check_mark: | The address of the transaction sender. |
|
|
24
|
+
| `chain` | [components.VaultDepositRequestChain](../../models/components/vaultdepositrequestchain.md) | :heavy_check_mark: | N/A | base |
|
|
25
|
+
| `sender` | *string* | :heavy_check_mark: | The address of the transaction sender. | 0x38EBf6c7D836f476cEE7DD093Ca43Bbc08e4Cc91 |
|
|
26
26
|
| `estimateGas` | *boolean* | :heavy_minus_sign: | Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed. | true |
|
|
@@ -8,12 +8,12 @@ The amount of tokens to deposit into the vault.
|
|
|
8
8
|
### `number`
|
|
9
9
|
|
|
10
10
|
```typescript
|
|
11
|
-
const value: number =
|
|
11
|
+
const value: number = 0.5;
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
### `string`
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
const value: string = "
|
|
17
|
+
const value: string = "0.5";
|
|
18
18
|
```
|
|
19
19
|
|
|
@@ -18,9 +18,9 @@ let value: VaultWithdrawRequest = {
|
|
|
18
18
|
| Field | Type | Required | Description | Example |
|
|
19
19
|
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
20
20
|
| `actionType` | *"VAULT_WITHDRAW"* | :heavy_minus_sign: | N/A | VAULT_WITHDRAW |
|
|
21
|
-
| `vaultAddress` | *string* | :heavy_check_mark: | The vault address you are withdrawing from. |
|
|
21
|
+
| `vaultAddress` | *string* | :heavy_check_mark: | The vault address you are withdrawing from. | 0xfdB431E661372fA1146efB70bf120ECDed944a78 |
|
|
22
22
|
| `amount` | *any* | :heavy_check_mark: | The amount of tokens to withdraw from the vault. If set to 'ALL', your total deposited token amount will be withdrawn. | |
|
|
23
23
|
| `receiver` | *string* | :heavy_minus_sign: | The address which will receive the tokens withdrawn. Defaults to the sender. | |
|
|
24
|
-
| `chain` | [components.VaultWithdrawRequestChain](../../models/components/vaultwithdrawrequestchain.md) | :heavy_check_mark: | N/A |
|
|
25
|
-
| `sender` | *string* | :heavy_check_mark: | The address of the transaction sender. |
|
|
24
|
+
| `chain` | [components.VaultWithdrawRequestChain](../../models/components/vaultwithdrawrequestchain.md) | :heavy_check_mark: | N/A | base |
|
|
25
|
+
| `sender` | *string* | :heavy_check_mark: | The address of the transaction sender. | 0x52680FEe4CC87AFB748F98F9B2f8D80190b8EF2c |
|
|
26
26
|
| `estimateGas` | *boolean* | :heavy_minus_sign: | Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed. | true |
|
|
@@ -19,7 +19,7 @@ let value: WrapEthRequest = {
|
|
|
19
19
|
| Field | Type | Required | Description | Example |
|
|
20
20
|
| ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
|
|
21
21
|
| `actionType` | *"WRAP_ETH"* | :heavy_minus_sign: | N/A | WRAP_ETH |
|
|
22
|
-
| `amount` | *components.WrapEthRequestAmount* | :heavy_check_mark: | The amount of ETH to wrap. |
|
|
23
|
-
| `chain` | [components.WrapEthRequestChain](../../models/components/wrapethrequestchain.md) | :heavy_check_mark: | N/A |
|
|
24
|
-
| `sender` | *string* | :heavy_check_mark: | The address of the transaction sender. |
|
|
22
|
+
| `amount` | *components.WrapEthRequestAmount* | :heavy_check_mark: | The amount of ETH to wrap. | 0.000001 |
|
|
23
|
+
| `chain` | [components.WrapEthRequestChain](../../models/components/wrapethrequestchain.md) | :heavy_check_mark: | N/A | base |
|
|
24
|
+
| `sender` | *string* | :heavy_check_mark: | The address of the transaction sender. | 0xdc3db667461DeE4881E73469c144FAe21eE920A2 |
|
|
25
25
|
| `estimateGas` | *boolean* | :heavy_minus_sign: | Determines whether to estimate gas costs for transactions, also verifying that the transaction can be successfully executed. | true |
|
|
@@ -8,12 +8,12 @@ The amount of ETH to wrap.
|
|
|
8
8
|
### `number`
|
|
9
9
|
|
|
10
10
|
```typescript
|
|
11
|
-
const value: number =
|
|
11
|
+
const value: number = 0.000001;
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
### `string`
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
const value: string = "
|
|
17
|
+
const value: string = "0.000001";
|
|
18
18
|
```
|
|
19
19
|
|
|
@@ -9,7 +9,7 @@ let value: V2EarnPositionsRequest = {
|
|
|
9
9
|
offset: 0,
|
|
10
10
|
limit: 100,
|
|
11
11
|
chain: "base",
|
|
12
|
-
|
|
12
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
13
13
|
};
|
|
14
14
|
```
|
|
15
15
|
|
|
@@ -20,4 +20,4 @@ let value: V2EarnPositionsRequest = {
|
|
|
20
20
|
| `offset` | *number* | :heavy_minus_sign: | The offset of the first item to return. | 0 |
|
|
21
21
|
| `limit` | *number* | :heavy_minus_sign: | The number of items to return. | 100 |
|
|
22
22
|
| `chain` | [operations.V2EarnPositionsChain](../../models/operations/v2earnpositionschain.md) | :heavy_check_mark: | N/A | base |
|
|
23
|
-
| `
|
|
23
|
+
| `owner` | *string* | :heavy_check_mark: | The address of the owner of the earn account to get positions for. | 0x01E62835dd7F52173546A325294762143eE4a882 |
|
package/docs/sdks/earn/README.md
CHANGED
|
@@ -32,7 +32,7 @@ async function run() {
|
|
|
32
32
|
offset: 0,
|
|
33
33
|
limit: 100,
|
|
34
34
|
chain: "base",
|
|
35
|
-
|
|
35
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
console.log(result);
|
|
@@ -60,7 +60,7 @@ async function run() {
|
|
|
60
60
|
offset: 0,
|
|
61
61
|
limit: 100,
|
|
62
62
|
chain: "base",
|
|
63
|
-
|
|
63
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
64
64
|
});
|
|
65
65
|
if (res.ok) {
|
|
66
66
|
const { value: result } = res;
|
|
@@ -281,8 +281,8 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
281
281
|
async function run() {
|
|
282
282
|
const result = await compassApiSDK.earn.earnCreateAccount({
|
|
283
283
|
chain: "base",
|
|
284
|
-
sender: "
|
|
285
|
-
owner: "
|
|
284
|
+
sender: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
285
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
286
286
|
});
|
|
287
287
|
|
|
288
288
|
console.log(result);
|
|
@@ -308,8 +308,8 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
308
308
|
async function run() {
|
|
309
309
|
const res = await earnEarnCreateAccount(compassApiSDK, {
|
|
310
310
|
chain: "base",
|
|
311
|
-
sender: "
|
|
312
|
-
owner: "
|
|
311
|
+
sender: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
312
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
313
313
|
});
|
|
314
314
|
if (res.ok) {
|
|
315
315
|
const { value: result } = res;
|
|
@@ -365,7 +365,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
365
365
|
|
|
366
366
|
async function run() {
|
|
367
367
|
const result = await compassApiSDK.earn.earnTransfer({
|
|
368
|
-
owner: "
|
|
368
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
369
369
|
chain: "base",
|
|
370
370
|
token: "USDC",
|
|
371
371
|
amount: "0.01",
|
|
@@ -394,7 +394,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
394
394
|
|
|
395
395
|
async function run() {
|
|
396
396
|
const res = await earnEarnTransfer(compassApiSDK, {
|
|
397
|
-
owner: "
|
|
397
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
398
398
|
chain: "base",
|
|
399
399
|
token: "USDC",
|
|
400
400
|
amount: "0.01",
|
|
@@ -445,7 +445,10 @@ If `DEPOSIT` is selected for `action`, tokens will be deposited into the selecte
|
|
|
445
445
|
|
|
446
446
|
If `WITHDRAW` is selected for `action`, tokens will be withdrawn from the selected venue address back into the Earn Account associated with the `owner` wallet.
|
|
447
447
|
|
|
448
|
-
A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as
|
|
448
|
+
A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as:
|
|
449
|
+
- `FIXED`: a fixed token amount (e.g., 0.1 means 0.1 tokens)
|
|
450
|
+
- `PERCENTAGE`: a percentage of the transaction amount (e.g., 1.5 means 1.5%)
|
|
451
|
+
- `PERFORMANCE`: a percentage of realized profit using FIFO cost basis (e.g., 10 means 10% of profit). Only applicable for withdrawals.
|
|
449
452
|
|
|
450
453
|
The transaction can be gas-sponsored by an arbitrary wallet address which will sign, submit and pay the required gas for the transaction. If `gas_sponsorship` is 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`) where the `sender` of the transaction can be set.
|
|
451
454
|
|
|
@@ -467,7 +470,7 @@ async function run() {
|
|
|
467
470
|
},
|
|
468
471
|
action: "DEPOSIT",
|
|
469
472
|
amount: "0.01",
|
|
470
|
-
owner: "
|
|
473
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
471
474
|
chain: "base",
|
|
472
475
|
gasSponsorship: false,
|
|
473
476
|
});
|
|
@@ -500,7 +503,7 @@ async function run() {
|
|
|
500
503
|
},
|
|
501
504
|
action: "DEPOSIT",
|
|
502
505
|
amount: "0.01",
|
|
503
|
-
owner: "
|
|
506
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
504
507
|
chain: "base",
|
|
505
508
|
gasSponsorship: false,
|
|
506
509
|
});
|
|
@@ -555,7 +558,7 @@ async function run() {
|
|
|
555
558
|
tokenOut: "USDT",
|
|
556
559
|
amountIn: "0.01",
|
|
557
560
|
slippage: "0.5",
|
|
558
|
-
owner: "
|
|
561
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
559
562
|
chain: "base",
|
|
560
563
|
gasSponsorship: false,
|
|
561
564
|
});
|
|
@@ -586,7 +589,7 @@ async function run() {
|
|
|
586
589
|
tokenOut: "USDT",
|
|
587
590
|
amountIn: "0.01",
|
|
588
591
|
slippage: "0.5",
|
|
589
|
-
owner: "
|
|
592
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
590
593
|
chain: "base",
|
|
591
594
|
gasSponsorship: false,
|
|
592
595
|
});
|
|
@@ -650,7 +653,7 @@ const compassApiSDK = new CompassApiSDK({
|
|
|
650
653
|
|
|
651
654
|
async function run() {
|
|
652
655
|
const result = await compassApiSDK.earn.earnBundle({
|
|
653
|
-
owner: "
|
|
656
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
654
657
|
chain: "ethereum",
|
|
655
658
|
actions: [
|
|
656
659
|
{
|
|
@@ -699,7 +702,7 @@ const compassApiSDK = new CompassApiSDKCore({
|
|
|
699
702
|
|
|
700
703
|
async function run() {
|
|
701
704
|
const res = await earnEarnBundle(compassApiSDK, {
|
|
702
|
-
owner: "
|
|
705
|
+
owner: "0x01E62835dd7F52173546A325294762143eE4a882",
|
|
703
706
|
chain: "ethereum",
|
|
704
707
|
actions: [
|
|
705
708
|
{
|
package/package.json
CHANGED
|
@@ -41,7 +41,10 @@ import { Result } from "../types/fp.js";
|
|
|
41
41
|
*
|
|
42
42
|
* If `WITHDRAW` is selected for `action`, tokens will be withdrawn from the selected venue address back into the Earn Account associated with the `owner` wallet.
|
|
43
43
|
*
|
|
44
|
-
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as
|
|
44
|
+
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as:
|
|
45
|
+
* - `FIXED`: a fixed token amount (e.g., 0.1 means 0.1 tokens)
|
|
46
|
+
* - `PERCENTAGE`: a percentage of the transaction amount (e.g., 1.5 means 1.5%)
|
|
47
|
+
* - `PERFORMANCE`: a percentage of realized profit using FIFO cost basis (e.g., 10 means 10% of profit). Only applicable for withdrawals.
|
|
45
48
|
*
|
|
46
49
|
* The transaction can be gas-sponsored by an arbitrary wallet address which will sign, submit and pay the required gas for the transaction. If `gas_sponsorship` is 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`) where the `sender` of the transaction can be set.
|
|
47
50
|
*/
|
|
@@ -6,19 +6,20 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { ClosedEnum } from "../../types/enums.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens).
|
|
9
|
+
* The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens). If `denomination` is 'PERFORMANCE', this is a percentage of realized profit calculated using FIFO cost basis (e.g., 10 for 10% of profit).
|
|
10
10
|
*/
|
|
11
11
|
export type FeeAmount = number | string;
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
|
-
* The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount)
|
|
14
|
+
* The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount), 'FIXED' for a fixed token amount (e.g., 0.1 means 0.1 tokens), or 'PERFORMANCE' for a fee based on realized profit using FIFO cost basis (e.g., 10 means 10% of profit).
|
|
15
15
|
*/
|
|
16
16
|
export const Denomination = {
|
|
17
17
|
Percentage: "PERCENTAGE",
|
|
18
18
|
Fixed: "FIXED",
|
|
19
|
+
Performance: "PERFORMANCE",
|
|
19
20
|
} as const;
|
|
20
21
|
/**
|
|
21
|
-
* The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount)
|
|
22
|
+
* The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount), 'FIXED' for a fixed token amount (e.g., 0.1 means 0.1 tokens), or 'PERFORMANCE' for a fee based on realized profit using FIFO cost basis (e.g., 10 means 10% of profit).
|
|
22
23
|
*/
|
|
23
24
|
export type Denomination = ClosedEnum<typeof Denomination>;
|
|
24
25
|
|
|
@@ -28,11 +29,11 @@ export type Fee = {
|
|
|
28
29
|
*/
|
|
29
30
|
recipient: string;
|
|
30
31
|
/**
|
|
31
|
-
* The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens).
|
|
32
|
+
* The fee amount. If `denomination` is 'PERCENTAGE', this is a percentage of the transaction amount (e.g., 1.5 for 1.5%). If `denomination` is 'FIXED', this is a fixed amount in token units (e.g., 0.1 for 0.1 tokens). If `denomination` is 'PERFORMANCE', this is a percentage of realized profit calculated using FIFO cost basis (e.g., 10 for 10% of profit).
|
|
32
33
|
*/
|
|
33
34
|
amount: number | string;
|
|
34
35
|
/**
|
|
35
|
-
* The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount)
|
|
36
|
+
* The unit type for the fee amount. Use 'PERCENTAGE' for a percentage-based fee (e.g., 1.5 means 1.5% of the transaction amount), 'FIXED' for a fixed token amount (e.g., 0.1 means 0.1 tokens), or 'PERFORMANCE' for a fee based on realized profit using FIFO cost basis (e.g., 10 means 10% of profit).
|
|
36
37
|
*/
|
|
37
38
|
denomination?: Denomination | undefined;
|
|
38
39
|
};
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
6
|
import { ClosedEnum } from "../../types/enums.js";
|
|
8
7
|
|
|
9
8
|
export const V2EarnPositionsChain = {
|
|
@@ -24,9 +23,9 @@ export type V2EarnPositionsRequest = {
|
|
|
24
23
|
limit?: number | undefined;
|
|
25
24
|
chain: V2EarnPositionsChain;
|
|
26
25
|
/**
|
|
27
|
-
* The address of the
|
|
26
|
+
* The address of the owner of the earn account to get positions for.
|
|
28
27
|
*/
|
|
29
|
-
|
|
28
|
+
owner: string;
|
|
30
29
|
};
|
|
31
30
|
|
|
32
31
|
/** @internal */
|
|
@@ -39,7 +38,7 @@ export type V2EarnPositionsRequest$Outbound = {
|
|
|
39
38
|
offset?: number | undefined;
|
|
40
39
|
limit?: number | undefined;
|
|
41
40
|
chain: string;
|
|
42
|
-
|
|
41
|
+
owner: string;
|
|
43
42
|
};
|
|
44
43
|
|
|
45
44
|
/** @internal */
|
|
@@ -51,11 +50,7 @@ export const V2EarnPositionsRequest$outboundSchema: z.ZodType<
|
|
|
51
50
|
offset: z.number().int().optional(),
|
|
52
51
|
limit: z.number().int().optional(),
|
|
53
52
|
chain: V2EarnPositionsChain$outboundSchema,
|
|
54
|
-
|
|
55
|
-
}).transform((v) => {
|
|
56
|
-
return remap$(v, {
|
|
57
|
-
userAddress: "user_address",
|
|
58
|
-
});
|
|
53
|
+
owner: z.string(),
|
|
59
54
|
});
|
|
60
55
|
|
|
61
56
|
export function v2EarnPositionsRequestToJSON(
|
package/src/sdk/earn.ts
CHANGED
|
@@ -145,7 +145,10 @@ export class Earn extends ClientSDK {
|
|
|
145
145
|
*
|
|
146
146
|
* If `WITHDRAW` is selected for `action`, tokens will be withdrawn from the selected venue address back into the Earn Account associated with the `owner` wallet.
|
|
147
147
|
*
|
|
148
|
-
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as
|
|
148
|
+
* A fee can be configured. This fee is deducted from the total `amount`. It can be expressed as:
|
|
149
|
+
* - `FIXED`: a fixed token amount (e.g., 0.1 means 0.1 tokens)
|
|
150
|
+
* - `PERCENTAGE`: a percentage of the transaction amount (e.g., 1.5 means 1.5%)
|
|
151
|
+
* - `PERFORMANCE`: a percentage of realized profit using FIFO cost basis (e.g., 10 means 10% of profit). Only applicable for withdrawals.
|
|
149
152
|
*
|
|
150
153
|
* The transaction can be gas-sponsored by an arbitrary wallet address which will sign, submit and pay the required gas for the transaction. If `gas_sponsorship` is 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`) where the `sender` of the transaction can be set.
|
|
151
154
|
*/
|