@compass-labs/api-sdk 2.2.76-rc.0 → 2.2.76-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/README.md +5 -3
- package/codeSamples_typescript.yaml +6 -0
- package/dist/commonjs/funcs/creditCreditMorphoMarkets.d.ts +24 -0
- package/dist/commonjs/funcs/creditCreditMorphoMarkets.d.ts.map +1 -0
- package/dist/commonjs/funcs/creditCreditMorphoMarkets.js +128 -0
- package/dist/commonjs/funcs/creditCreditMorphoMarkets.js.map +1 -0
- package/dist/commonjs/models/components/accountsummary.d.ts +4 -0
- package/dist/commonjs/models/components/accountsummary.d.ts.map +1 -1
- package/dist/commonjs/models/components/accountsummary.js.map +1 -1
- package/dist/commonjs/models/components/collateralposition.d.ts +12 -0
- package/dist/commonjs/models/components/collateralposition.d.ts.map +1 -1
- package/dist/commonjs/models/components/collateralposition.js +4 -0
- package/dist/commonjs/models/components/collateralposition.js.map +1 -1
- package/dist/commonjs/models/components/creditborrowparams.d.ts +4 -0
- package/dist/commonjs/models/components/creditborrowparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditborrowparams.js.map +1 -1
- package/dist/commonjs/models/components/creditborrowrequest.d.ts +4 -0
- package/dist/commonjs/models/components/creditborrowrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditborrowrequest.js.map +1 -1
- package/dist/commonjs/models/components/creditenablecollateralparams.d.ts +4 -0
- package/dist/commonjs/models/components/creditenablecollateralparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditenablecollateralparams.js.map +1 -1
- package/dist/commonjs/models/components/creditprotocol.d.ts +9 -0
- package/dist/commonjs/models/components/creditprotocol.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditprotocol.js +5 -0
- package/dist/commonjs/models/components/creditprotocol.js.map +1 -1
- package/dist/commonjs/models/components/creditrepayparams.d.ts +4 -0
- package/dist/commonjs/models/components/creditrepayparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditrepayparams.js.map +1 -1
- package/dist/commonjs/models/components/creditrepayrequest.d.ts +4 -0
- package/dist/commonjs/models/components/creditrepayrequest.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditrepayrequest.js.map +1 -1
- package/dist/commonjs/models/components/creditsupplyparams.d.ts +4 -0
- package/dist/commonjs/models/components/creditsupplyparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditsupplyparams.js.map +1 -1
- package/dist/commonjs/models/components/creditwithdrawparams.d.ts +4 -0
- package/dist/commonjs/models/components/creditwithdrawparams.d.ts.map +1 -1
- package/dist/commonjs/models/components/creditwithdrawparams.js.map +1 -1
- package/dist/commonjs/models/components/debtposition.d.ts +12 -0
- package/dist/commonjs/models/components/debtposition.d.ts.map +1 -1
- package/dist/commonjs/models/components/debtposition.js +4 -0
- package/dist/commonjs/models/components/debtposition.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +2 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +2 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/morpholendingmarket.d.ts +80 -0
- package/dist/commonjs/models/components/morpholendingmarket.d.ts.map +1 -0
- package/dist/commonjs/models/components/morpholendingmarket.js +82 -0
- package/dist/commonjs/models/components/morpholendingmarket.js.map +1 -0
- package/dist/commonjs/models/components/morphomarketsresponse.d.ts +21 -0
- package/dist/commonjs/models/components/morphomarketsresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/morphomarketsresponse.js +52 -0
- package/dist/commonjs/models/components/morphomarketsresponse.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/v2creditmorphomarkets.d.ts +22 -0
- package/dist/commonjs/models/operations/v2creditmorphomarkets.d.ts.map +1 -0
- package/dist/commonjs/models/operations/v2creditmorphomarkets.js +57 -0
- package/dist/commonjs/models/operations/v2creditmorphomarkets.js.map +1 -0
- package/dist/commonjs/sdk/credit.d.ts +12 -0
- package/dist/commonjs/sdk/credit.d.ts.map +1 -1
- package/dist/commonjs/sdk/credit.js +15 -0
- package/dist/commonjs/sdk/credit.js.map +1 -1
- package/dist/esm/funcs/creditCreditMorphoMarkets.d.ts +24 -0
- package/dist/esm/funcs/creditCreditMorphoMarkets.d.ts.map +1 -0
- package/dist/esm/funcs/creditCreditMorphoMarkets.js +92 -0
- package/dist/esm/funcs/creditCreditMorphoMarkets.js.map +1 -0
- package/dist/esm/models/components/accountsummary.d.ts +4 -0
- package/dist/esm/models/components/accountsummary.d.ts.map +1 -1
- package/dist/esm/models/components/accountsummary.js.map +1 -1
- package/dist/esm/models/components/collateralposition.d.ts +12 -0
- package/dist/esm/models/components/collateralposition.d.ts.map +1 -1
- package/dist/esm/models/components/collateralposition.js +4 -0
- package/dist/esm/models/components/collateralposition.js.map +1 -1
- package/dist/esm/models/components/creditborrowparams.d.ts +4 -0
- package/dist/esm/models/components/creditborrowparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditborrowparams.js.map +1 -1
- package/dist/esm/models/components/creditborrowrequest.d.ts +4 -0
- package/dist/esm/models/components/creditborrowrequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditborrowrequest.js.map +1 -1
- package/dist/esm/models/components/creditenablecollateralparams.d.ts +4 -0
- package/dist/esm/models/components/creditenablecollateralparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditenablecollateralparams.js.map +1 -1
- package/dist/esm/models/components/creditprotocol.d.ts +9 -0
- package/dist/esm/models/components/creditprotocol.d.ts.map +1 -1
- package/dist/esm/models/components/creditprotocol.js +5 -0
- package/dist/esm/models/components/creditprotocol.js.map +1 -1
- package/dist/esm/models/components/creditrepayparams.d.ts +4 -0
- package/dist/esm/models/components/creditrepayparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditrepayparams.js.map +1 -1
- package/dist/esm/models/components/creditrepayrequest.d.ts +4 -0
- package/dist/esm/models/components/creditrepayrequest.d.ts.map +1 -1
- package/dist/esm/models/components/creditrepayrequest.js.map +1 -1
- package/dist/esm/models/components/creditsupplyparams.d.ts +4 -0
- package/dist/esm/models/components/creditsupplyparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditsupplyparams.js.map +1 -1
- package/dist/esm/models/components/creditwithdrawparams.d.ts +4 -0
- package/dist/esm/models/components/creditwithdrawparams.d.ts.map +1 -1
- package/dist/esm/models/components/creditwithdrawparams.js.map +1 -1
- package/dist/esm/models/components/debtposition.d.ts +12 -0
- package/dist/esm/models/components/debtposition.d.ts.map +1 -1
- package/dist/esm/models/components/debtposition.js +4 -0
- package/dist/esm/models/components/debtposition.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +2 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +2 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/morpholendingmarket.d.ts +80 -0
- package/dist/esm/models/components/morpholendingmarket.d.ts.map +1 -0
- package/dist/esm/models/components/morpholendingmarket.js +45 -0
- package/dist/esm/models/components/morpholendingmarket.js.map +1 -0
- package/dist/esm/models/components/morphomarketsresponse.d.ts +21 -0
- package/dist/esm/models/components/morphomarketsresponse.d.ts.map +1 -0
- package/dist/esm/models/components/morphomarketsresponse.js +15 -0
- package/dist/esm/models/components/morphomarketsresponse.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/v2creditmorphomarkets.d.ts +22 -0
- package/dist/esm/models/operations/v2creditmorphomarkets.d.ts.map +1 -0
- package/dist/esm/models/operations/v2creditmorphomarkets.js +20 -0
- package/dist/esm/models/operations/v2creditmorphomarkets.js.map +1 -0
- package/dist/esm/sdk/credit.d.ts +12 -0
- package/dist/esm/sdk/credit.d.ts.map +1 -1
- package/dist/esm/sdk/credit.js +15 -0
- package/dist/esm/sdk/credit.js.map +1 -1
- package/docs/models/components/accountsummary.md +10 -10
- package/docs/models/components/collateralposition.md +16 -14
- package/docs/models/components/creditborrowparams.md +9 -9
- package/docs/models/components/creditborrowrequest.md +19 -19
- package/docs/models/components/creditenablecollateralparams.md +6 -6
- package/docs/models/components/creditprotocol.md +5 -1
- package/docs/models/components/creditrepayparams.md +8 -8
- package/docs/models/components/creditrepayrequest.md +18 -18
- package/docs/models/components/creditsupplyparams.md +7 -7
- package/docs/models/components/creditwithdrawparams.md +7 -7
- package/docs/models/components/debtposition.md +15 -13
- package/docs/models/components/morpholendingmarket.md +49 -0
- package/docs/models/components/morphomarketsresponse.md +21 -0
- package/docs/models/operations/v2creditmorphomarketschain.md +15 -0
- package/docs/models/operations/v2creditmorphomarketsrequest.md +17 -0
- package/docs/sdks/credit/README.md +80 -0
- package/openapi_prepped_for_speakeasy.json +250 -2
- package/package.json +1 -1
- package/src/funcs/creditCreditMorphoMarkets.ts +182 -0
- package/src/models/components/accountsummary.ts +4 -0
- package/src/models/components/collateralposition.ts +16 -0
- package/src/models/components/creditborrowparams.ts +4 -0
- package/src/models/components/creditborrowrequest.ts +4 -0
- package/src/models/components/creditenablecollateralparams.ts +4 -0
- package/src/models/components/creditprotocol.ts +9 -0
- package/src/models/components/creditrepayparams.ts +4 -0
- package/src/models/components/creditrepayrequest.ts +4 -0
- package/src/models/components/creditsupplyparams.ts +4 -0
- package/src/models/components/creditwithdrawparams.ts +4 -0
- package/src/models/components/debtposition.ts +16 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/morpholendingmarket.ts +133 -0
- package/src/models/components/morphomarketsresponse.ts +46 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/v2creditmorphomarkets.ts +49 -0
- package/src/sdk/credit.ts +23 -0
|
@@ -17,17 +17,19 @@ let value: CollateralPosition = {
|
|
|
17
17
|
|
|
18
18
|
## Fields
|
|
19
19
|
|
|
20
|
-
| Field
|
|
21
|
-
|
|
|
22
|
-
| `token`
|
|
23
|
-
| `symbol`
|
|
24
|
-
| `protocol`
|
|
25
|
-
| `vault`
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
20
|
+
| Field | Type | Required | Description | Example |
|
|
21
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
22
|
+
| `token` | *string* | :heavy_check_mark: | Address of the collateral token. | |
|
|
23
|
+
| `symbol` | *string* | :heavy_check_mark: | Symbol of the collateral token (e.g. USDC). | |
|
|
24
|
+
| `protocol` | [components.CreditProtocol](../../models/components/creditprotocol.md) | :heavy_minus_sign: | Which lending protocol a credit action targets.<br/><br/>``AAVE`` is the default so existing callers (which never send a ``protocol``<br/>field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the<br/>Euler V2 path, where the market is identified by EVK vault address(es).<br/>``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is<br/>currently read-only: positions and market discovery only — transaction<br/>builders land with the looping work (COM-7106/7107/7108), so transact<br/>endpoints reject it with a 422. | |
|
|
25
|
+
| `vault` | *string* | :heavy_minus_sign: | Euler only: the EVK collateral vault holding this position. | |
|
|
26
|
+
| `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 id of the isolated market holding this position. | |
|
|
27
|
+
| `isPureSupply` | *boolean* | :heavy_minus_sign: | Morpho only: true when this is a loan-asset supply position (earning supply APY) rather than collateral backing borrows. | |
|
|
28
|
+
| `amountSupplied` | *string* | :heavy_check_mark: | Current on-chain collateral balance (the vault's underlying asset for Euler). | |
|
|
29
|
+
| `usdValue` | *string* | :heavy_minus_sign: | Collateral value in USD. | |
|
|
30
|
+
| `supplyApy` | *string* | :heavy_minus_sign: | Current supply APY in percentage (e.g. 4.5 means 4.5%). | |
|
|
31
|
+
| `totalDeposited` | *string* | :heavy_minus_sign: | Total collateral deposited over all time. | |
|
|
32
|
+
| `totalWithdrawn` | *string* | :heavy_minus_sign: | Total collateral withdrawn over all time. | |
|
|
33
|
+
| `interestEarned` | *string* | :heavy_minus_sign: | Interest earned on collateral: on_chain_balance + total_withdrawn - total_deposited. | |
|
|
34
|
+
| `maxLtv` | *string* | :heavy_minus_sign: | Maximum loan-to-value ratio for this collateral in percentage (e.g. 80 means 80%). | |
|
|
35
|
+
| `events` | [components.CreditEvent](../../models/components/creditevent.md)[] | :heavy_minus_sign: | All historical events for this collateral reserve. | [] |
|
|
@@ -21,12 +21,12 @@ let value: CreditBorrowParams = {
|
|
|
21
21
|
|
|
22
22
|
## Fields
|
|
23
23
|
|
|
24
|
-
| Field
|
|
25
|
-
|
|
|
26
|
-
| `actionType`
|
|
27
|
-
| `token`
|
|
28
|
-
| `amount`
|
|
29
|
-
| `interestRateMode`
|
|
30
|
-
| `fee`
|
|
31
|
-
| `protocol`
|
|
32
|
-
| `borrowVault`
|
|
24
|
+
| Field | Type | Required | Description | Example |
|
|
25
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
26
|
+
| `actionType` | *"CREDIT_BORROW"* | :heavy_check_mark: | N/A | CREDIT_BORROW |
|
|
27
|
+
| `token` | *string* | :heavy_check_mark: | Token to borrow from Aave. | |
|
|
28
|
+
| `amount` | *components.CreditBorrowParamsAmount* | :heavy_check_mark: | Amount in token units to borrow. | |
|
|
29
|
+
| `interestRateMode` | [components.InterestRateMode](../../models/components/interestratemode.md) | :heavy_minus_sign: | On AAVE there are 2 different interest modes.<br/><br/>A stable (but typically higher rate), or a variable rate. | |
|
|
30
|
+
| `fee` | [components.CreditFee](../../models/components/creditfee.md) | :heavy_minus_sign: | Optional fee on the borrowed amount. | |
|
|
31
|
+
| `protocol` | [components.CreditProtocol](../../models/components/creditprotocol.md) | :heavy_minus_sign: | Which lending protocol a credit action targets.<br/><br/>``AAVE`` is the default so existing callers (which never send a ``protocol``<br/>field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the<br/>Euler V2 path, where the market is identified by EVK vault address(es).<br/>``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is<br/>currently read-only: positions and market discovery only — transaction<br/>builders land with the looping work (COM-7106/7107/7108), so transact<br/>endpoints reject it with a 422. | |
|
|
32
|
+
| `borrowVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault to borrow from. Required when protocol=EULER. | |
|
|
@@ -21,22 +21,22 @@ let value: CreditBorrowRequest = {
|
|
|
21
21
|
|
|
22
22
|
## Fields
|
|
23
23
|
|
|
24
|
-
| Field
|
|
25
|
-
|
|
|
26
|
-
| `owner`
|
|
27
|
-
| `chain`
|
|
28
|
-
| `protocol`
|
|
29
|
-
| `collateralVault`
|
|
30
|
-
| `borrowVault`
|
|
31
|
-
| `tokenIn`
|
|
32
|
-
| `amountIn`
|
|
33
|
-
| `collateralToken`
|
|
34
|
-
| `borrowToken`
|
|
35
|
-
| `borrowAmount`
|
|
36
|
-
| `interestRateMode`
|
|
37
|
-
| `slippage`
|
|
38
|
-
| `gasSponsorship`
|
|
39
|
-
| `fee`
|
|
40
|
-
| `permit2Signature`
|
|
41
|
-
| `permit2Nonce`
|
|
42
|
-
| `permit2Deadline`
|
|
24
|
+
| Field | Type | Required | Description | Example |
|
|
25
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
26
|
+
| `owner` | *string* | :heavy_check_mark: | The address that owns the Credit Account. | 0xfeEb60eBf707DAA8248277058eb8D28EaeCF5425 |
|
|
27
|
+
| `chain` | [components.Chain](../../models/components/chain.md) | :heavy_check_mark: | The chain to use. | |
|
|
28
|
+
| `protocol` | [components.CreditProtocol](../../models/components/creditprotocol.md) | :heavy_minus_sign: | Which lending protocol a credit action targets.<br/><br/>``AAVE`` is the default so existing callers (which never send a ``protocol``<br/>field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the<br/>Euler V2 path, where the market is identified by EVK vault address(es).<br/>``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is<br/>currently read-only: positions and market discovery only — transaction<br/>builders land with the looping work (COM-7106/7107/7108), so transact<br/>endpoints reject it with a 422. | |
|
|
29
|
+
| `collateralVault` | *string* | :heavy_minus_sign: | Euler only: the EVK collateral vault to supply into. Required when protocol=EULER and supplying collateral. | |
|
|
30
|
+
| `borrowVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault to borrow from. Required when protocol=EULER. | |
|
|
31
|
+
| `tokenIn` | *string* | :heavy_minus_sign: | Token currently held in the Credit Account to use as input. If the same as collateral_token, no swap is performed. Omit together with amount_in and collateral_token to borrow against existing collateral. | USDC |
|
|
32
|
+
| `amountIn` | *components.CreditBorrowRequestAmountIn* | :heavy_minus_sign: | Amount of token_in to use (in token units, not wei). Omit together with token_in and collateral_token for borrow-only mode. | 100 |
|
|
33
|
+
| `collateralToken` | *string* | :heavy_minus_sign: | Aave reserve token to supply as collateral. Omit together with token_in and amount_in for borrow-only mode. | USDC |
|
|
34
|
+
| `borrowToken` | *string* | :heavy_check_mark: | Asset to borrow from Aave. | WETH |
|
|
35
|
+
| `borrowAmount` | *components.BorrowAmount* | :heavy_check_mark: | Amount to borrow (in token units, not wei). | 0.01 |
|
|
36
|
+
| `interestRateMode` | [components.InterestRateMode](../../models/components/interestratemode.md) | :heavy_minus_sign: | On AAVE there are 2 different interest modes.<br/><br/>A stable (but typically higher rate), or a variable rate. | |
|
|
37
|
+
| `slippage` | *components.CreditBorrowRequestSlippage* | :heavy_minus_sign: | Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Only used when a swap is needed. | 0.5 |
|
|
38
|
+
| `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 signature data instead of an unsigned transaction. | false |
|
|
39
|
+
| `fee` | [components.CreditFee](../../models/components/creditfee.md) | :heavy_minus_sign: | Optional fee configuration. If provided, a fee will be deducted from the borrowed amount and sent to the specified recipient address. | |
|
|
40
|
+
| `permit2Signature` | *string* | :heavy_minus_sign: | The EOA owner's signature of the Permit2 PermitTransferFrom typed data. When provided, the borrow bundle will first pull token_in from the owner's EOA into the Credit Account via Permit2. Obtain by calling /v2/credit/transfer and signing the returned EIP-712 data. | |
|
|
41
|
+
| `permit2Nonce` | *number* | :heavy_minus_sign: | The nonce used in the Permit2 signature (from the signed typed data). | |
|
|
42
|
+
| `permit2Deadline` | *number* | :heavy_minus_sign: | The deadline timestamp used in the Permit2 signature (from the signed typed data). | |
|
|
@@ -18,9 +18,9 @@ let value: CreditEnableCollateralParams = {
|
|
|
18
18
|
|
|
19
19
|
## Fields
|
|
20
20
|
|
|
21
|
-
| Field
|
|
22
|
-
|
|
|
23
|
-
| `actionType`
|
|
24
|
-
| `token`
|
|
25
|
-
| `protocol`
|
|
26
|
-
| `collateralVault`
|
|
21
|
+
| Field | Type | Required | Description | Example |
|
|
22
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
23
|
+
| `actionType` | *"CREDIT_ENABLE_COLLATERAL"* | :heavy_check_mark: | N/A | CREDIT_ENABLE_COLLATERAL |
|
|
24
|
+
| `token` | *string* | :heavy_check_mark: | The underlying reserve token to enable as collateral (e.g. USDC, not aUSDC). | |
|
|
25
|
+
| `protocol` | [components.CreditProtocol](../../models/components/creditprotocol.md) | :heavy_minus_sign: | Which lending protocol a credit action targets.<br/><br/>``AAVE`` is the default so existing callers (which never send a ``protocol``<br/>field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the<br/>Euler V2 path, where the market is identified by EVK vault address(es).<br/>``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is<br/>currently read-only: positions and market discovery only — transaction<br/>builders land with the looping work (COM-7106/7107/7108), so transact<br/>endpoints reject it with a 422. | |
|
|
26
|
+
| `collateralVault` | *string* | :heavy_minus_sign: | Euler only: the EVK collateral vault to enable. Required when protocol=EULER. | |
|
|
@@ -5,6 +5,10 @@ Which lending protocol a credit action targets.
|
|
|
5
5
|
``AAVE`` is the default so existing callers (which never send a ``protocol``
|
|
6
6
|
field) keep hitting the unchanged Aave code path. ``EULER`` opts in to the
|
|
7
7
|
Euler V2 path, where the market is identified by EVK vault address(es).
|
|
8
|
+
``MORPHO`` identifies Morpho Blue lending markets (bytes32 market id) and is
|
|
9
|
+
currently read-only: positions and market discovery only — transaction
|
|
10
|
+
builders land with the looping work (COM-7106/7107/7108), so transact
|
|
11
|
+
endpoints reject it with a 422.
|
|
8
12
|
|
|
9
13
|
## Example Usage
|
|
10
14
|
|
|
@@ -17,5 +21,5 @@ let value: CreditProtocol = "AAVE";
|
|
|
17
21
|
## Values
|
|
18
22
|
|
|
19
23
|
```typescript
|
|
20
|
-
"AAVE" | "EULER"
|
|
24
|
+
"AAVE" | "EULER" | "MORPHO"
|
|
21
25
|
```
|