@compass-labs/api-sdk 2.2.111 → 2.2.112-rc.1
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/dist/commonjs/models/components/createaccountrequest.d.ts +1 -0
- package/dist/commonjs/models/components/createaccountrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/createaccountrequest.js +1 -0
- package/dist/commonjs/models/components/createaccountrequest.js.map +1 -1
- package/dist/commonjs/models/components/earnmanagerequest.d.ts +19 -3
- package/dist/commonjs/models/components/earnmanagerequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/earnmanagerequest.js +15 -3
- package/dist/commonjs/models/components/earnmanagerequest.js.map +1 -1
- package/dist/commonjs/models/components/earnpositionsallresponse.d.ts +1 -1
- package/dist/commonjs/models/components/earnswaprequest.d.ts +20 -3
- package/dist/commonjs/models/components/earnswaprequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/earnswaprequest.js +15 -3
- package/dist/commonjs/models/components/earnswaprequest.js.map +1 -1
- package/dist/commonjs/models/components/earntransferrequest.d.ts +19 -3
- package/dist/commonjs/models/components/earntransferrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/earntransferrequest.js +15 -3
- package/dist/commonjs/models/components/earntransferrequest.js.map +1 -1
- package/dist/commonjs/models/components/v2bundlerequest.d.ts +20 -3
- package/dist/commonjs/models/components/v2bundlerequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/v2bundlerequest.js +15 -3
- package/dist/commonjs/models/components/v2bundlerequest.js.map +1 -1
- package/dist/commonjs/models/operations/v2earnbalances.d.ts +1 -0
- package/dist/commonjs/models/operations/v2earnbalances.d.ts.map +1 -1
- package/dist/commonjs/models/operations/v2earnbalances.js +1 -0
- package/dist/commonjs/models/operations/v2earnbalances.js.map +1 -1
- package/dist/commonjs/models/operations/v2earnpositions.d.ts +1 -0
- package/dist/commonjs/models/operations/v2earnpositions.d.ts.map +1 -1
- package/dist/commonjs/models/operations/v2earnpositions.js +1 -0
- package/dist/commonjs/models/operations/v2earnpositions.js.map +1 -1
- package/dist/commonjs/models/operations/v2earnswapquote.d.ts +4 -6
- package/dist/commonjs/models/operations/v2earnswapquote.d.ts.map +1 -1
- package/dist/commonjs/models/operations/v2earnswapquote.js +3 -5
- package/dist/commonjs/models/operations/v2earnswapquote.js.map +1 -1
- package/dist/esm/models/components/createaccountrequest.d.ts +1 -0
- package/dist/esm/models/components/createaccountrequest.d.ts.map +1 -1
- package/dist/esm/models/components/createaccountrequest.js +1 -0
- package/dist/esm/models/components/createaccountrequest.js.map +1 -1
- package/dist/esm/models/components/earnmanagerequest.d.ts +19 -3
- package/dist/esm/models/components/earnmanagerequest.d.ts.map +1 -1
- package/dist/esm/models/components/earnmanagerequest.js +14 -2
- package/dist/esm/models/components/earnmanagerequest.js.map +1 -1
- package/dist/esm/models/components/earnpositionsallresponse.d.ts +1 -1
- package/dist/esm/models/components/earnswaprequest.d.ts +20 -3
- package/dist/esm/models/components/earnswaprequest.d.ts.map +1 -1
- package/dist/esm/models/components/earnswaprequest.js +14 -2
- package/dist/esm/models/components/earnswaprequest.js.map +1 -1
- package/dist/esm/models/components/earntransferrequest.d.ts +19 -3
- package/dist/esm/models/components/earntransferrequest.d.ts.map +1 -1
- package/dist/esm/models/components/earntransferrequest.js +14 -2
- package/dist/esm/models/components/earntransferrequest.js.map +1 -1
- package/dist/esm/models/components/v2bundlerequest.d.ts +20 -3
- package/dist/esm/models/components/v2bundlerequest.d.ts.map +1 -1
- package/dist/esm/models/components/v2bundlerequest.js +14 -2
- package/dist/esm/models/components/v2bundlerequest.js.map +1 -1
- package/dist/esm/models/operations/v2earnbalances.d.ts +1 -0
- package/dist/esm/models/operations/v2earnbalances.d.ts.map +1 -1
- package/dist/esm/models/operations/v2earnbalances.js +1 -0
- package/dist/esm/models/operations/v2earnbalances.js.map +1 -1
- package/dist/esm/models/operations/v2earnpositions.d.ts +1 -0
- package/dist/esm/models/operations/v2earnpositions.d.ts.map +1 -1
- package/dist/esm/models/operations/v2earnpositions.js +1 -0
- package/dist/esm/models/operations/v2earnpositions.js.map +1 -1
- package/dist/esm/models/operations/v2earnswapquote.d.ts +4 -6
- package/dist/esm/models/operations/v2earnswapquote.d.ts.map +1 -1
- package/dist/esm/models/operations/v2earnswapquote.js +3 -5
- package/dist/esm/models/operations/v2earnswapquote.js.map +1 -1
- package/docs/models/components/createaccountrequestchain.md +1 -1
- package/docs/models/components/earnmanagerequest.md +1 -1
- package/docs/models/components/earnmanagerequestchain.md +17 -0
- package/docs/models/components/earnpositionsallresponse.md +4 -4
- package/docs/models/components/earnswaprequest.md +1 -1
- package/docs/models/components/earnswaprequestchain.md +17 -0
- package/docs/models/components/earntransferrequest.md +1 -1
- package/docs/models/components/earntransferrequestchain.md +17 -0
- package/docs/models/components/v2bundlerequest.md +1 -1
- package/docs/models/components/v2bundlerequestchain.md +17 -0
- package/docs/models/operations/v2earnbalanceschain.md +1 -1
- package/docs/models/operations/v2earnpositionschain.md +1 -1
- package/docs/models/operations/v2earnswapquotechain.md +2 -2
- package/openapi_prepped_for_speakeasy.json +47 -11
- package/package.json +1 -1
- package/src/models/components/createaccountrequest.ts +1 -0
- package/src/models/components/earnmanagerequest.ts +24 -4
- package/src/models/components/earnpositionsallresponse.ts +1 -1
- package/src/models/components/earnswaprequest.ts +25 -4
- package/src/models/components/earntransferrequest.ts +26 -4
- package/src/models/components/v2bundlerequest.ts +25 -4
- package/src/models/operations/v2earnbalances.ts +1 -0
- package/src/models/operations/v2earnpositions.ts +1 -0
- package/src/models/operations/v2earnswapquote.ts +4 -6
|
@@ -32,5 +32,5 @@ let value: EarnManageRequest = {
|
|
|
32
32
|
| `amount` | *components.EarnManageRequestAmount* | :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; for PENDLE_PT, this is the amount of `token` to spend (DEPOSIT) or PT to sell (WITHDRAW). Provide as a decimal in token units (not wei); must be > 0. | 0.01 |
|
|
33
33
|
| `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, as a fixed token amount, or as a percentage of realized profit (PERFORMANCE). | |
|
|
34
34
|
| `owner` | *string* | :heavy_check_mark: | The primary wallet address that owns and controls the Earn Account. | 0x06A9aF046187895AcFc7258450B15397CAc67400 |
|
|
35
|
-
| `chain` | [components.
|
|
35
|
+
| `chain` | [components.EarnManageRequestChain](../../models/components/earnmanagerequestchain.md) | :heavy_check_mark: | Blockchain network | base |
|
|
36
36
|
| `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 |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# EarnManageRequestChain
|
|
2
|
+
|
|
3
|
+
Blockchain network
|
|
4
|
+
|
|
5
|
+
## Example Usage
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { EarnManageRequestChain } from "@compass-labs/api-sdk/models/components";
|
|
9
|
+
|
|
10
|
+
let value: EarnManageRequestChain = "base";
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Values
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
"arbitrum" | "base" | "bsc" | "ethereum" | "hyperevm" | "tempo"
|
|
17
|
+
```
|
|
@@ -23,7 +23,7 @@ let value: EarnPositionsAllResponse = {
|
|
|
23
23
|
|
|
24
24
|
## Fields
|
|
25
25
|
|
|
26
|
-
| Field
|
|
27
|
-
|
|
|
28
|
-
| `chains`
|
|
29
|
-
| `totalUsdValue`
|
|
26
|
+
| Field | Type | Required | Description |
|
|
27
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
28
|
+
| `chains` | Record<string, [components.EarnPositionsResponse](../../models/components/earnpositionsresponse.md)> | :heavy_check_mark: | Positions grouped by chain. Keys: 'ethereum', 'base', 'arbitrum', 'hyperevm'. Every key is present; chains without a deployed earn account carry empty lists. |
|
|
29
|
+
| `totalUsdValue` | *string* | :heavy_minus_sign: | Total USD value of all positions across all chains. |
|
|
@@ -29,5 +29,5 @@ let value: EarnSwapRequest = {
|
|
|
29
29
|
| `amountIn` | *components.EarnSwapRequestAmountIn* | :heavy_check_mark: | Human-readable amount of `token_in` to swap (token units, not wei). | 0.01 |
|
|
30
30
|
| `slippage` | *components.EarnSwapRequestSlippage* | :heavy_minus_sign: | Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). | 0.5 |
|
|
31
31
|
| `owner` | *string* | :heavy_check_mark: | The owner's wallet address. | 0x06A9aF046187895AcFc7258450B15397CAc67400 |
|
|
32
|
-
| `chain` | [components.
|
|
32
|
+
| `chain` | [components.EarnSwapRequestChain](../../models/components/earnswaprequestchain.md) | :heavy_check_mark: | Target blockchain network where the swap will execute. | base |
|
|
33
33
|
| `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,17 @@
|
|
|
1
|
+
# EarnSwapRequestChain
|
|
2
|
+
|
|
3
|
+
Target blockchain network where the swap will execute.
|
|
4
|
+
|
|
5
|
+
## Example Usage
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { EarnSwapRequestChain } from "@compass-labs/api-sdk/models/components";
|
|
9
|
+
|
|
10
|
+
let value: EarnSwapRequestChain = "base";
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Values
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
"arbitrum" | "base" | "bsc" | "ethereum" | "hyperevm" | "tempo"
|
|
17
|
+
```
|
|
@@ -19,7 +19,7 @@ let value: EarnTransferRequest = {
|
|
|
19
19
|
| Field | Type | Required | Description | Example |
|
|
20
20
|
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
21
|
| `owner` | *string* | :heavy_check_mark: | The owner's wallet address. | 0x06A9aF046187895AcFc7258450B15397CAc67400 |
|
|
22
|
-
| `chain` | [components.
|
|
22
|
+
| `chain` | [components.EarnTransferRequestChain](../../models/components/earntransferrequestchain.md) | :heavy_check_mark: | Blockchain network | base |
|
|
23
23
|
| `token` | *string* | :heavy_check_mark: | The token you would like to transfer. | USDC |
|
|
24
24
|
| `amount` | *components.EarnTransferRequestAmount* | :heavy_check_mark: | The amount of 'token' to transfer. | 0.01 |
|
|
25
25
|
| `action` | [components.EarnTransferRequestAction](../../models/components/earntransferrequestaction.md) | :heavy_check_mark: | Whether you are depositing to or withdrawing from your earn account. | DEPOSIT |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# EarnTransferRequestChain
|
|
2
|
+
|
|
3
|
+
Blockchain network
|
|
4
|
+
|
|
5
|
+
## Example Usage
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { EarnTransferRequestChain } from "@compass-labs/api-sdk/models/components";
|
|
9
|
+
|
|
10
|
+
let value: EarnTransferRequestChain = "base";
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Values
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
"arbitrum" | "base" | "bsc" | "ethereum" | "hyperevm" | "tempo"
|
|
17
|
+
```
|
|
@@ -89,6 +89,6 @@ let value: V2BundleRequest = {
|
|
|
89
89
|
| Field | Type | Required | Description | Example |
|
|
90
90
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
91
91
|
| `owner` | *string* | :heavy_check_mark: | The owner's wallet address that controls the Earn Account. | 0x06A9aF046187895AcFc7258450B15397CAc67400 |
|
|
92
|
-
| `chain` | [components.
|
|
92
|
+
| `chain` | [components.V2BundleRequestChain](../../models/components/v2bundlerequestchain.md) | :heavy_check_mark: | Target blockchain network where the bundled actions will execute. | ethereum |
|
|
93
93
|
| `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": "100",<br/>"venue": {<br/>"type": "VAULT",<br/>"vault_address": "0x1B4cd53a1A8e5F50aB6320EF34E5fB4D3df7B6f6"<br/>}<br/>}<br/>}<br/>] |
|
|
94
94
|
| `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 |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# V2BundleRequestChain
|
|
2
|
+
|
|
3
|
+
Target blockchain network where the bundled actions will execute.
|
|
4
|
+
|
|
5
|
+
## Example Usage
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { V2BundleRequestChain } from "@compass-labs/api-sdk/models/components";
|
|
9
|
+
|
|
10
|
+
let value: V2BundleRequestChain = "ethereum";
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Values
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
"arbitrum" | "base" | "bsc" | "ethereum" | "hyperevm" | "tempo"
|
|
17
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# V2EarnSwapQuoteChain
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Target blockchain network.
|
|
4
4
|
|
|
5
5
|
## Example Usage
|
|
6
6
|
|
|
@@ -13,5 +13,5 @@ let value: V2EarnSwapQuoteChain = "base";
|
|
|
13
13
|
## Values
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
"
|
|
16
|
+
"arbitrum" | "base" | "bsc" | "ethereum" | "hyperevm" | "tempo"
|
|
17
17
|
```
|
|
@@ -4873,6 +4873,7 @@
|
|
|
4873
4873
|
"base",
|
|
4874
4874
|
"bsc",
|
|
4875
4875
|
"ethereum",
|
|
4876
|
+
"hyperevm",
|
|
4876
4877
|
"tempo"
|
|
4877
4878
|
],
|
|
4878
4879
|
"title": "Chain",
|
|
@@ -5368,17 +5369,14 @@
|
|
|
5368
5369
|
"schema": {
|
|
5369
5370
|
"type": "string",
|
|
5370
5371
|
"enum": [
|
|
5372
|
+
"arbitrum",
|
|
5371
5373
|
"base",
|
|
5374
|
+
"bsc",
|
|
5372
5375
|
"ethereum",
|
|
5373
|
-
"arbitrum",
|
|
5374
5376
|
"hyperevm",
|
|
5375
|
-
"tempo"
|
|
5376
|
-
"bsc",
|
|
5377
|
-
"robinhood",
|
|
5378
|
-
"ethereum_sepolia"
|
|
5377
|
+
"tempo"
|
|
5379
5378
|
],
|
|
5380
5379
|
"title": "Chain",
|
|
5381
|
-
"description": "The chain to use.",
|
|
5382
5380
|
"example": "base"
|
|
5383
5381
|
},
|
|
5384
5382
|
"description": "Target blockchain network."
|
|
@@ -5508,6 +5506,7 @@
|
|
|
5508
5506
|
"base",
|
|
5509
5507
|
"bsc",
|
|
5510
5508
|
"ethereum",
|
|
5509
|
+
"hyperevm",
|
|
5511
5510
|
"tempo"
|
|
5512
5511
|
],
|
|
5513
5512
|
"title": "Chain",
|
|
@@ -12044,6 +12043,7 @@
|
|
|
12044
12043
|
"base",
|
|
12045
12044
|
"bsc",
|
|
12046
12045
|
"ethereum",
|
|
12046
|
+
"hyperevm",
|
|
12047
12047
|
"tempo"
|
|
12048
12048
|
],
|
|
12049
12049
|
"title": "Chain",
|
|
@@ -15420,7 +15420,16 @@
|
|
|
15420
15420
|
"example": "0x06A9aF046187895AcFc7258450B15397CAc67400"
|
|
15421
15421
|
},
|
|
15422
15422
|
"chain": {
|
|
15423
|
-
"
|
|
15423
|
+
"type": "string",
|
|
15424
|
+
"enum": [
|
|
15425
|
+
"arbitrum",
|
|
15426
|
+
"base",
|
|
15427
|
+
"bsc",
|
|
15428
|
+
"ethereum",
|
|
15429
|
+
"hyperevm",
|
|
15430
|
+
"tempo"
|
|
15431
|
+
],
|
|
15432
|
+
"title": "Chain",
|
|
15424
15433
|
"description": "Blockchain network",
|
|
15425
15434
|
"example": "base"
|
|
15426
15435
|
},
|
|
@@ -15489,7 +15498,7 @@
|
|
|
15489
15498
|
},
|
|
15490
15499
|
"type": "object",
|
|
15491
15500
|
"title": "Chains",
|
|
15492
|
-
"description": "Positions grouped by chain. Keys: 'ethereum', 'base', 'arbitrum'."
|
|
15501
|
+
"description": "Positions grouped by chain. Keys: 'ethereum', 'base', 'arbitrum', 'hyperevm'. Every key is present; chains without a deployed earn account carry empty lists."
|
|
15493
15502
|
},
|
|
15494
15503
|
"total_usd_value": {
|
|
15495
15504
|
"anyOf": [
|
|
@@ -15698,7 +15707,16 @@
|
|
|
15698
15707
|
"example": "0x06A9aF046187895AcFc7258450B15397CAc67400"
|
|
15699
15708
|
},
|
|
15700
15709
|
"chain": {
|
|
15701
|
-
"
|
|
15710
|
+
"type": "string",
|
|
15711
|
+
"enum": [
|
|
15712
|
+
"arbitrum",
|
|
15713
|
+
"base",
|
|
15714
|
+
"bsc",
|
|
15715
|
+
"ethereum",
|
|
15716
|
+
"hyperevm",
|
|
15717
|
+
"tempo"
|
|
15718
|
+
],
|
|
15719
|
+
"title": "Chain",
|
|
15702
15720
|
"description": "Target blockchain network where the swap will execute.",
|
|
15703
15721
|
"example": "base"
|
|
15704
15722
|
},
|
|
@@ -15832,7 +15850,16 @@
|
|
|
15832
15850
|
"example": "0x06A9aF046187895AcFc7258450B15397CAc67400"
|
|
15833
15851
|
},
|
|
15834
15852
|
"chain": {
|
|
15835
|
-
"
|
|
15853
|
+
"type": "string",
|
|
15854
|
+
"enum": [
|
|
15855
|
+
"arbitrum",
|
|
15856
|
+
"base",
|
|
15857
|
+
"bsc",
|
|
15858
|
+
"ethereum",
|
|
15859
|
+
"hyperevm",
|
|
15860
|
+
"tempo"
|
|
15861
|
+
],
|
|
15862
|
+
"title": "Chain",
|
|
15836
15863
|
"description": "Blockchain network",
|
|
15837
15864
|
"example": "base"
|
|
15838
15865
|
},
|
|
@@ -28322,7 +28349,16 @@
|
|
|
28322
28349
|
"example": "0x06A9aF046187895AcFc7258450B15397CAc67400"
|
|
28323
28350
|
},
|
|
28324
28351
|
"chain": {
|
|
28325
|
-
"
|
|
28352
|
+
"type": "string",
|
|
28353
|
+
"enum": [
|
|
28354
|
+
"arbitrum",
|
|
28355
|
+
"base",
|
|
28356
|
+
"bsc",
|
|
28357
|
+
"ethereum",
|
|
28358
|
+
"hyperevm",
|
|
28359
|
+
"tempo"
|
|
28360
|
+
],
|
|
28361
|
+
"title": "Chain",
|
|
28326
28362
|
"description": "Target blockchain network where the bundled actions will execute.",
|
|
28327
28363
|
"example": "ethereum"
|
|
28328
28364
|
},
|
package/package.json
CHANGED
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
AaveVenue$Outbound,
|
|
11
11
|
AaveVenue$outboundSchema,
|
|
12
12
|
} from "./aavevenue.js";
|
|
13
|
-
import { Chain, Chain$outboundSchema } from "./chain.js";
|
|
14
13
|
import { Fee, Fee$Outbound, Fee$outboundSchema } from "./fee.js";
|
|
15
14
|
import {
|
|
16
15
|
PendlePTVenue,
|
|
@@ -47,6 +46,22 @@ export type EarnManageRequestAction = ClosedEnum<
|
|
|
47
46
|
*/
|
|
48
47
|
export type EarnManageRequestAmount = number | string;
|
|
49
48
|
|
|
49
|
+
/**
|
|
50
|
+
* Blockchain network
|
|
51
|
+
*/
|
|
52
|
+
export const EarnManageRequestChain = {
|
|
53
|
+
Arbitrum: "arbitrum",
|
|
54
|
+
Base: "base",
|
|
55
|
+
Bsc: "bsc",
|
|
56
|
+
Ethereum: "ethereum",
|
|
57
|
+
Hyperevm: "hyperevm",
|
|
58
|
+
Tempo: "tempo",
|
|
59
|
+
} as const;
|
|
60
|
+
/**
|
|
61
|
+
* Blockchain network
|
|
62
|
+
*/
|
|
63
|
+
export type EarnManageRequestChain = ClosedEnum<typeof EarnManageRequestChain>;
|
|
64
|
+
|
|
50
65
|
/**
|
|
51
66
|
* Request model for the unified manage endpoint.
|
|
52
67
|
*
|
|
@@ -80,9 +95,9 @@ export type EarnManageRequest = {
|
|
|
80
95
|
*/
|
|
81
96
|
owner: string;
|
|
82
97
|
/**
|
|
83
|
-
*
|
|
98
|
+
* Blockchain network
|
|
84
99
|
*/
|
|
85
|
-
chain:
|
|
100
|
+
chain: EarnManageRequestChain;
|
|
86
101
|
/**
|
|
87
102
|
* 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`).
|
|
88
103
|
*/
|
|
@@ -137,6 +152,11 @@ export function earnManageRequestAmountToJSON(
|
|
|
137
152
|
);
|
|
138
153
|
}
|
|
139
154
|
|
|
155
|
+
/** @internal */
|
|
156
|
+
export const EarnManageRequestChain$outboundSchema: z.ZodNativeEnum<
|
|
157
|
+
typeof EarnManageRequestChain
|
|
158
|
+
> = z.nativeEnum(EarnManageRequestChain);
|
|
159
|
+
|
|
140
160
|
/** @internal */
|
|
141
161
|
export type EarnManageRequest$Outbound = {
|
|
142
162
|
action_type?: "V2_MANAGE" | undefined;
|
|
@@ -165,7 +185,7 @@ export const EarnManageRequest$outboundSchema: z.ZodType<
|
|
|
165
185
|
amount: z.union([z.number(), z.string()]),
|
|
166
186
|
fee: z.nullable(Fee$outboundSchema).optional(),
|
|
167
187
|
owner: z.string(),
|
|
168
|
-
chain:
|
|
188
|
+
chain: EarnManageRequestChain$outboundSchema,
|
|
169
189
|
gasSponsorship: z.boolean().optional(),
|
|
170
190
|
}).transform((v) => {
|
|
171
191
|
return remap$(v, {
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
*/
|
|
23
23
|
export type EarnPositionsAllResponse = {
|
|
24
24
|
/**
|
|
25
|
-
* Positions grouped by chain. Keys: 'ethereum', 'base', 'arbitrum'.
|
|
25
|
+
* Positions grouped by chain. Keys: 'ethereum', 'base', 'arbitrum', 'hyperevm'. Every key is present; chains without a deployed earn account carry empty lists.
|
|
26
26
|
*/
|
|
27
27
|
chains: { [k: string]: EarnPositionsResponse };
|
|
28
28
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import {
|
|
7
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Human-readable amount of `token_in` to swap (token units, not wei).
|
|
@@ -16,6 +16,22 @@ export type EarnSwapRequestAmountIn = number | string;
|
|
|
16
16
|
*/
|
|
17
17
|
export type EarnSwapRequestSlippage = number | string;
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* Target blockchain network where the swap will execute.
|
|
21
|
+
*/
|
|
22
|
+
export const EarnSwapRequestChain = {
|
|
23
|
+
Arbitrum: "arbitrum",
|
|
24
|
+
Base: "base",
|
|
25
|
+
Bsc: "bsc",
|
|
26
|
+
Ethereum: "ethereum",
|
|
27
|
+
Hyperevm: "hyperevm",
|
|
28
|
+
Tempo: "tempo",
|
|
29
|
+
} as const;
|
|
30
|
+
/**
|
|
31
|
+
* Target blockchain network where the swap will execute.
|
|
32
|
+
*/
|
|
33
|
+
export type EarnSwapRequestChain = ClosedEnum<typeof EarnSwapRequestChain>;
|
|
34
|
+
|
|
19
35
|
/**
|
|
20
36
|
* Swap one token held in the Earn Account for another, in a single atomic
|
|
21
37
|
*
|
|
@@ -48,9 +64,9 @@ export type EarnSwapRequest = {
|
|
|
48
64
|
*/
|
|
49
65
|
owner: string;
|
|
50
66
|
/**
|
|
51
|
-
*
|
|
67
|
+
* Target blockchain network where the swap will execute.
|
|
52
68
|
*/
|
|
53
|
-
chain:
|
|
69
|
+
chain: EarnSwapRequestChain;
|
|
54
70
|
/**
|
|
55
71
|
* 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`).
|
|
56
72
|
*/
|
|
@@ -93,6 +109,11 @@ export function earnSwapRequestSlippageToJSON(
|
|
|
93
109
|
);
|
|
94
110
|
}
|
|
95
111
|
|
|
112
|
+
/** @internal */
|
|
113
|
+
export const EarnSwapRequestChain$outboundSchema: z.ZodNativeEnum<
|
|
114
|
+
typeof EarnSwapRequestChain
|
|
115
|
+
> = z.nativeEnum(EarnSwapRequestChain);
|
|
116
|
+
|
|
96
117
|
/** @internal */
|
|
97
118
|
export type EarnSwapRequest$Outbound = {
|
|
98
119
|
action_type?: "V2_SWAP" | undefined;
|
|
@@ -117,7 +138,7 @@ export const EarnSwapRequest$outboundSchema: z.ZodType<
|
|
|
117
138
|
amountIn: z.union([z.number(), z.string()]),
|
|
118
139
|
slippage: z.union([z.number(), z.string()]).optional(),
|
|
119
140
|
owner: z.string(),
|
|
120
|
-
chain:
|
|
141
|
+
chain: EarnSwapRequestChain$outboundSchema,
|
|
121
142
|
gasSponsorship: z.boolean().optional(),
|
|
122
143
|
}).transform((v) => {
|
|
123
144
|
return remap$(v, {
|
|
@@ -5,7 +5,24 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { ClosedEnum } from "../../types/enums.js";
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Blockchain network
|
|
11
|
+
*/
|
|
12
|
+
export const EarnTransferRequestChain = {
|
|
13
|
+
Arbitrum: "arbitrum",
|
|
14
|
+
Base: "base",
|
|
15
|
+
Bsc: "bsc",
|
|
16
|
+
Ethereum: "ethereum",
|
|
17
|
+
Hyperevm: "hyperevm",
|
|
18
|
+
Tempo: "tempo",
|
|
19
|
+
} as const;
|
|
20
|
+
/**
|
|
21
|
+
* Blockchain network
|
|
22
|
+
*/
|
|
23
|
+
export type EarnTransferRequestChain = ClosedEnum<
|
|
24
|
+
typeof EarnTransferRequestChain
|
|
25
|
+
>;
|
|
9
26
|
|
|
10
27
|
/**
|
|
11
28
|
* The amount of 'token' to transfer.
|
|
@@ -32,9 +49,9 @@ export type EarnTransferRequest = {
|
|
|
32
49
|
*/
|
|
33
50
|
owner: string;
|
|
34
51
|
/**
|
|
35
|
-
*
|
|
52
|
+
* Blockchain network
|
|
36
53
|
*/
|
|
37
|
-
chain:
|
|
54
|
+
chain: EarnTransferRequestChain;
|
|
38
55
|
/**
|
|
39
56
|
* The token you would like to transfer.
|
|
40
57
|
*/
|
|
@@ -61,6 +78,11 @@ export type EarnTransferRequest = {
|
|
|
61
78
|
recipient?: string | null | undefined;
|
|
62
79
|
};
|
|
63
80
|
|
|
81
|
+
/** @internal */
|
|
82
|
+
export const EarnTransferRequestChain$outboundSchema: z.ZodNativeEnum<
|
|
83
|
+
typeof EarnTransferRequestChain
|
|
84
|
+
> = z.nativeEnum(EarnTransferRequestChain);
|
|
85
|
+
|
|
64
86
|
/** @internal */
|
|
65
87
|
export type EarnTransferRequestAmount$Outbound = number | string;
|
|
66
88
|
|
|
@@ -103,7 +125,7 @@ export const EarnTransferRequest$outboundSchema: z.ZodType<
|
|
|
103
125
|
EarnTransferRequest
|
|
104
126
|
> = z.object({
|
|
105
127
|
owner: z.string(),
|
|
106
|
-
chain:
|
|
128
|
+
chain: EarnTransferRequestChain$outboundSchema,
|
|
107
129
|
token: z.string(),
|
|
108
130
|
amount: z.union([z.number(), z.string()]),
|
|
109
131
|
action: EarnTransferRequestAction$outboundSchema,
|