@compass-labs/api-sdk 2.2.100 → 2.2.101

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/commonjs/models/components/creditlooprequest.d.ts +4 -4
  2. package/dist/commonjs/models/components/creditlooprequest.d.ts.map +1 -1
  3. package/dist/commonjs/models/components/creditlooprequest.js +4 -5
  4. package/dist/commonjs/models/components/creditlooprequest.js.map +1 -1
  5. package/dist/commonjs/models/components/creditunlooprequest.d.ts +20 -1
  6. package/dist/commonjs/models/components/creditunlooprequest.d.ts.map +1 -1
  7. package/dist/commonjs/models/components/creditunlooprequest.js +12 -1
  8. package/dist/commonjs/models/components/creditunlooprequest.js.map +1 -1
  9. package/dist/commonjs/models/components/creditunloopresponse.d.ts +3 -3
  10. package/dist/commonjs/models/components/creditunloopresponse.d.ts.map +1 -1
  11. package/dist/commonjs/models/components/creditunloopresponse.js +1 -1
  12. package/dist/commonjs/models/components/creditunloopresponse.js.map +1 -1
  13. package/dist/esm/models/components/creditlooprequest.d.ts +4 -4
  14. package/dist/esm/models/components/creditlooprequest.d.ts.map +1 -1
  15. package/dist/esm/models/components/creditlooprequest.js +3 -4
  16. package/dist/esm/models/components/creditlooprequest.js.map +1 -1
  17. package/dist/esm/models/components/creditunlooprequest.d.ts +20 -1
  18. package/dist/esm/models/components/creditunlooprequest.d.ts.map +1 -1
  19. package/dist/esm/models/components/creditunlooprequest.js +11 -0
  20. package/dist/esm/models/components/creditunlooprequest.js.map +1 -1
  21. package/dist/esm/models/components/creditunloopresponse.d.ts +3 -3
  22. package/dist/esm/models/components/creditunloopresponse.d.ts.map +1 -1
  23. package/dist/esm/models/components/creditunloopresponse.js +1 -1
  24. package/dist/esm/models/components/creditunloopresponse.js.map +1 -1
  25. package/docs/models/components/creditlooprequest.md +1 -1
  26. package/docs/models/components/{pricing.md → creditlooprequestpricing.md} +3 -3
  27. package/docs/models/components/creditunlooprequest.md +17 -16
  28. package/docs/models/components/creditunlooprequestpricing.md +17 -0
  29. package/docs/models/components/creditunloopresponse.md +4 -4
  30. package/openapi_prepped_for_speakeasy.json +22 -4
  31. package/package.json +1 -1
  32. package/src/models/components/creditlooprequest.ts +9 -6
  33. package/src/models/components/creditunlooprequest.ts +27 -1
  34. package/src/models/components/creditunloopresponse.ts +4 -4
@@ -43,4 +43,4 @@ let value: CreditLoopRequest = {
43
43
  | `emodeCategory` | *number* | :heavy_minus_sign: | Aave only: e-mode category to enable before looping (higher LTV for correlated pairs, e.g. ETH-correlated). | |
44
44
  | `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 typed data for gas-sponsored execution instead of an unsigned transaction. | false |
45
45
  | `preview` | *boolean* | :heavy_minus_sign: | If true, build a display ESTIMATE: no firm RFQ quote is ever requested (quote_expires_at stays null) and no transaction is returned. How the estimate is priced follows `pricing`: on a firm-covered pair under 'auto' or 'firm' it is computed from the firm venue's live price levels (swap_provider='bebop', indicative); otherwise swap legs are priced by the default aggregator. Set it on every call made while a user is exploring parameters, and leave it false only for the build they actually intend to sign — firm quotes are single-use maker commitments, and requesting them for displays that are never executed degrades the pricing this API is offered. | false |
46
- | `pricing` | [components.Pricing](../../models/components/pricing.md) | :heavy_minus_sign: | Swap-leg routing policy. 'auto': firm quotes where a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route — previews whose target the firm venue cannot serve return the coverage advisory alone (preview=null, zero aggregator calls), and executions fail with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; every leg is priced by the aggregator and bounded by max_slippage_percent (which firm legs ignore). 'firm' is incompatible with gas_sponsorship (sponsored loops force market routing). | auto |
46
+ | `pricing` | [components.CreditLoopRequestPricing](../../models/components/creditlooprequestpricing.md) | :heavy_minus_sign: | Swap-leg routing policy. 'auto': firm quotes where a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route — previews whose target the firm venue cannot serve return the coverage advisory alone (preview=null, zero aggregator calls), and executions fail with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; every leg is priced by the aggregator and bounded by max_slippage_percent (which firm legs ignore). 'firm' is incompatible with gas_sponsorship (sponsored loops force market routing). | auto |
@@ -1,13 +1,13 @@
1
- # Pricing
1
+ # CreditLoopRequestPricing
2
2
 
3
3
  Swap-leg routing policy. 'auto': firm quotes where a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route — previews whose target the firm venue cannot serve return the coverage advisory alone (preview=null, zero aggregator calls), and executions fail with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; every leg is priced by the aggregator and bounded by max_slippage_percent (which firm legs ignore). 'firm' is incompatible with gas_sponsorship (sponsored loops force market routing).
4
4
 
5
5
  ## Example Usage
6
6
 
7
7
  ```typescript
8
- import { Pricing } from "@compass-labs/api-sdk/models/components";
8
+ import { CreditLoopRequestPricing } from "@compass-labs/api-sdk/models/components";
9
9
 
10
- let value: Pricing = "auto";
10
+ let value: CreditLoopRequestPricing = "auto";
11
11
  ```
12
12
 
13
13
  ## Values
@@ -23,19 +23,20 @@ let value: CreditUnloopRequest = {
23
23
 
24
24
  ## Fields
25
25
 
26
- | Field | Type | Required | Description | Example |
27
- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
28
- | `owner` | *string* | :heavy_check_mark: | The address that owns the Credit Account. | 0x0E407CdeBD8e078E6966ef6740540d25F5897082 |
29
- | `chain` | [components.CreditUnloopRequestChain](../../models/components/creditunlooprequestchain.md) | :heavy_check_mark: | Blockchain network. | ethereum |
30
- | `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. ``MORPHO`` identifies Morpho<br/>Blue lending markets by their bytes32 ``market_id``. ``EULER`` identifies Euler<br/>V2 markets by their EVK ``collateral_vault`` + ``borrow_vault`` addresses and<br/>supports isolated per-sub-account positions (``sub_account_id``). All three<br/>support the loop/unloop leverage endpoints. | |
31
- | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
32
- | `collateralVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault the loop's collateral is in. Required when protocol=EULER. | |
33
- | `borrowVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault the loop borrowed from (the sub-account's controller). Required when protocol=EULER. | |
34
- | `subAccountId` | *number* | :heavy_minus_sign: | Euler only: the EVC sub-account (0-255) holding the looped position to unwind. 0 is the Credit Account itself. | 0 |
35
- | `collateralToken` | *string* | :heavy_check_mark: | Token supplied as collateral in the loop being unwound. For MORPHO it must be the market's collateral token. | WETH |
36
- | `borrowToken` | *string* | :heavy_check_mark: | Token borrowed in the loop; withdrawn collateral is swapped back to it and used to repay. For MORPHO it must be the market's loan token. | USDC |
37
- | `targetMultiplier` | *components.CreditUnloopRequestTargetMultiplier* | :heavy_minus_sign: | Target leverage after the unwind. Omit (null) for a FULL unwind: the debt is cleared exactly — accrued interest included — and all pair collateral is withdrawn back to the Credit Account. `1` runs the same exact debt close but leaves the collateral supplied (earning). A value greater than 1 delevers the position to that multiplier. Must be below the position's current multiplier. | |
38
- | `maxSlippagePercent` | *components.CreditUnloopRequestMaxSlippagePercent* | :heavy_minus_sign: | Per-swap slippage tolerance in percent. Unwind dust is bounded by this per iteration, so tighter slippage means less dust. | 0.5 |
39
- | `allowPartial` | *boolean* | :heavy_minus_sign: | If the target cannot be reached in one transaction (e.g. a position opened very close to the liquidation threshold), return the maximum-progress plan (preview.fully_unwound=false) instead of a 400. A second unloop call, now from a much lower leverage, finishes the job. | false |
40
- | `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 typed data for gas-sponsored execution instead of an unsigned transaction. | false |
41
- | `preview` | *boolean* | :heavy_minus_sign: | If true, build a display estimate only: the swap legs are priced at market rate and no single-use firm quote is ever spent. Set it on every parameter-exploration call and omit it only on the build the user is about to sign. | false |
26
+ | Field | Type | Required | Description | Example |
27
+ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
28
+ | `owner` | *string* | :heavy_check_mark: | The address that owns the Credit Account. | 0x0E407CdeBD8e078E6966ef6740540d25F5897082 |
29
+ | `chain` | [components.CreditUnloopRequestChain](../../models/components/creditunlooprequestchain.md) | :heavy_check_mark: | Blockchain network. | ethereum |
30
+ | `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. ``MORPHO`` identifies Morpho<br/>Blue lending markets by their bytes32 ``market_id``. ``EULER`` identifies Euler<br/>V2 markets by their EVK ``collateral_vault`` + ``borrow_vault`` addresses and<br/>supports isolated per-sub-account positions (``sub_account_id``). All three<br/>support the loop/unloop leverage endpoints. | |
31
+ | `marketId` | *string* | :heavy_minus_sign: | Morpho only: the bytes32 market id (from /v2/credit/morpho_markets). Required when protocol=MORPHO. | |
32
+ | `collateralVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault the loop's collateral is in. Required when protocol=EULER. | |
33
+ | `borrowVault` | *string* | :heavy_minus_sign: | Euler only: the EVK vault the loop borrowed from (the sub-account's controller). Required when protocol=EULER. | |
34
+ | `subAccountId` | *number* | :heavy_minus_sign: | Euler only: the EVC sub-account (0-255) holding the looped position to unwind. 0 is the Credit Account itself. | 0 |
35
+ | `collateralToken` | *string* | :heavy_check_mark: | Token supplied as collateral in the loop being unwound. For MORPHO it must be the market's collateral token. | WETH |
36
+ | `borrowToken` | *string* | :heavy_check_mark: | Token borrowed in the loop; withdrawn collateral is swapped back to it and used to repay. For MORPHO it must be the market's loan token. | USDC |
37
+ | `targetMultiplier` | *components.CreditUnloopRequestTargetMultiplier* | :heavy_minus_sign: | Target leverage after the unwind. Omit (null) for a FULL unwind: the debt is cleared exactly — accrued interest included — and all pair collateral is withdrawn back to the Credit Account. `1` runs the same exact debt close but leaves the collateral supplied (earning). A value greater than 1 delevers the position to that multiplier. Must be below the position's current multiplier. | |
38
+ | `maxSlippagePercent` | *components.CreditUnloopRequestMaxSlippagePercent* | :heavy_minus_sign: | Per-swap slippage tolerance in percent. Unwind dust is bounded by this per iteration, so tighter slippage means less dust. | 0.5 |
39
+ | `allowPartial` | *boolean* | :heavy_minus_sign: | If the target cannot be reached in one transaction (e.g. a position opened very close to the liquidation threshold), return the maximum-progress plan (preview.fully_unwound=false) instead of a 400. A second unloop call, now from a much lower leverage, finishes the job. | false |
40
+ | `gasSponsorship` | *boolean* | :heavy_minus_sign: | If true, returns EIP-712 typed data for gas-sponsored execution instead of an unsigned transaction. | false |
41
+ | `preview` | *boolean* | :heavy_minus_sign: | If true, build a display estimate only — no single-use firm quote is ever spent. On a firm-covered unwind (pricing 'auto' or 'firm') the numbers are firm-INDICATIVE, priced off the firm venue's live maker levels (swap_provider='bebop'); otherwise they are market-priced with slippage-bounded floors. Under pricing='firm' a preview the firm venue cannot serve returns the advisory alone (preview=null + firm_available). Set it on every parameter-exploration call and omit it only on the build the user is about to sign. | false |
42
+ | `pricing` | [components.CreditUnloopRequestPricing](../../models/components/creditunlooprequestpricing.md) | :heavy_minus_sign: | Swap-leg routing policy. 'auto': firm quotes where a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route — previews the firm venue cannot serve return the firm_available advisory alone (preview=null, zero aggregator calls), and executions fail with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; every leg is priced by the aggregator. max_slippage_percent applies on EVERY policy — unlike the loop, firm unwinds consume it to size the guaranteed withdraw/repay floors (the fills themselves are exact). 'firm' is incompatible with gas_sponsorship (sponsored unwinds force market routing). | auto |
@@ -0,0 +1,17 @@
1
+ # CreditUnloopRequestPricing
2
+
3
+ Swap-leg routing policy. 'auto': firm quotes where a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route — previews the firm venue cannot serve return the firm_available advisory alone (preview=null, zero aggregator calls), and executions fail with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; every leg is priced by the aggregator. max_slippage_percent applies on EVERY policy — unlike the loop, firm unwinds consume it to size the guaranteed withdraw/repay floors (the fills themselves are exact). 'firm' is incompatible with gas_sponsorship (sponsored unwinds force market routing).
4
+
5
+ ## Example Usage
6
+
7
+ ```typescript
8
+ import { CreditUnloopRequestPricing } from "@compass-labs/api-sdk/models/components";
9
+
10
+ let value: CreditUnloopRequestPricing = "auto";
11
+ ```
12
+
13
+ ## Values
14
+
15
+ ```typescript
16
+ "auto" | "firm" | "market"
17
+ ```
@@ -9,7 +9,7 @@ import { CreditUnloopResponse } from "@compass-labs/api-sdk/models/components";
9
9
 
10
10
  let value: CreditUnloopResponse = {
11
11
  preview: {
12
- iterations: 257708,
12
+ iterations: 468261,
13
13
  totalCollateralWithdrawn: "<value>",
14
14
  totalDebtRepaid: "<id>",
15
15
  endingCollateral: "<value>",
@@ -18,7 +18,7 @@ let value: CreditUnloopResponse = {
18
18
  projectedLtv: "<value>",
19
19
  projectedHealthFactor: "<value>",
20
20
  estimatedMaxDust: "<value>",
21
- fullyUnwound: true,
21
+ fullyUnwound: false,
22
22
  legs: [],
23
23
  },
24
24
  swapProvider: "one_inch",
@@ -31,7 +31,7 @@ let value: CreditUnloopResponse = {
31
31
  | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
32
32
  | `transaction` | [components.UnsignedTransaction](../../models/components/unsignedtransaction.md) | :heavy_minus_sign: | Unsigned transaction for direct execution by the owner. Present when gas_sponsorship=false — except firm-priced previews (preview=true with swap_provider='bebop'), which carry numbers only: the firm quotes are fetched at execution time, so there is no payload to sign yet. | |
33
33
  | `eip712` | [components.BatchedSafeOperationsResponseOutput](../../models/components/batchedsafeoperationsresponseoutput.md) | :heavy_minus_sign: | EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true. | |
34
- | `preview` | [components.CreditUnloopPreview](../../models/components/creditunlooppreview.md) | :heavy_check_mark: | Projected end state of the unwind, computed on GUARANTEED swap floors. | |
34
+ | `preview` | [components.CreditUnloopPreview](../../models/components/creditunlooppreview.md) | :heavy_check_mark: | Projected end state, computed on guaranteed swap floors. Null only on pricing='firm' preview responses whose unwind the firm venue cannot serve: no leg was priced on any venue, and the response carries the firm_available advisory alone. | |
35
35
  | `swapProvider` | [components.CreditUnloopResponseSwapProvider](../../models/components/creditunloopresponseswapprovider.md) | :heavy_minus_sign: | Which venue priced the swap leg(s): 'one_inch' (market route, slippage-bounded floors) or 'bebop' (firm quotes, one per swap leg, each partially filled at the leg's size). On preview=true responses, 'bebop' means the numbers are INDICATIVE, computed from the firm venue's live maker price levels without spending any quote; execution fetches the firm quotes at signing time. Always present, including on fallbacks. | one_inch |
36
36
  | `quoteExpiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Deadline of the firm swap quotes (the earliest across the unwind's swap legs) — sign and broadcast before it or the transaction reverts on-chain; refresh by re-calling this endpoint (discard the previous payload). Present only on executable swap_provider='bebop' builds; null on previews (no quote is spent for a preview). | |
37
- | `firmAvailable` | *boolean* | :heavy_minus_sign: | Preview-only advisory: whether a firm-quote venue can serve this unwind's swap legs (estimated without spending any quote). Present only on preview=true responses; null otherwise. | |
37
+ | `firmAvailable` | *boolean* | :heavy_minus_sign: | Preview-only advisory: whether a firm-quote venue can serve this unwind's swap legs (estimated without spending any quote). Present only on preview=true responses; null otherwise. Computed on every policy — including pricing='market', whose preview numbers stay market-priced — so a client that opted out can keep the boundary visible. | |
@@ -14497,8 +14497,19 @@
14497
14497
  "preview": {
14498
14498
  "type": "boolean",
14499
14499
  "title": "Preview",
14500
- "description": "If true, build a display estimate only: the swap legs are priced at market rate and no single-use firm quote is ever spent. Set it on every parameter-exploration call and omit it only on the build the user is about to sign.",
14500
+ "description": "If true, build a display estimate only \u2014 no single-use firm quote is ever spent. On a firm-covered unwind (pricing 'auto' or 'firm') the numbers are firm-INDICATIVE, priced off the firm venue's live maker levels (swap_provider='bebop'); otherwise they are market-priced with slippage-bounded floors. Under pricing='firm' a preview the firm venue cannot serve returns the advisory alone (preview=null + firm_available). Set it on every parameter-exploration call and omit it only on the build the user is about to sign.",
14501
14501
  "example": false
14502
+ },
14503
+ "pricing": {
14504
+ "type": "string",
14505
+ "enum": [
14506
+ "auto",
14507
+ "firm",
14508
+ "market"
14509
+ ],
14510
+ "title": "Pricing",
14511
+ "description": "Swap-leg routing policy. 'auto': firm quotes where a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route \u2014 previews the firm venue cannot serve return the firm_available advisory alone (preview=null, zero aggregator calls), and executions fail with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; every leg is priced by the aggregator. max_slippage_percent applies on EVERY policy \u2014 unlike the loop, firm unwinds consume it to size the guaranteed withdraw/repay floors (the fills themselves are exact). 'firm' is incompatible with gas_sponsorship (sponsored unwinds force market routing).",
14512
+ "example": "auto"
14502
14513
  }
14503
14514
  },
14504
14515
  "type": "object",
@@ -14546,8 +14557,15 @@
14546
14557
  "description": "EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true."
14547
14558
  },
14548
14559
  "preview": {
14549
- "$ref": "#/components/schemas/CreditUnloopPreview",
14550
- "description": "Projected end state, computed on guaranteed swap floors."
14560
+ "anyOf": [
14561
+ {
14562
+ "$ref": "#/components/schemas/CreditUnloopPreview"
14563
+ },
14564
+ {
14565
+ "type": "null"
14566
+ }
14567
+ ],
14568
+ "description": "Projected end state, computed on guaranteed swap floors. Null only on pricing='firm' preview responses whose unwind the firm venue cannot serve: no leg was priced on any venue, and the response carries the firm_available advisory alone."
14551
14569
  },
14552
14570
  "swap_provider": {
14553
14571
  "type": "string",
@@ -14582,7 +14600,7 @@
14582
14600
  }
14583
14601
  ],
14584
14602
  "title": "Firm Available",
14585
- "description": "Preview-only advisory: whether a firm-quote venue can serve this unwind's swap legs (estimated without spending any quote). Present only on preview=true responses; null otherwise."
14603
+ "description": "Preview-only advisory: whether a firm-quote venue can serve this unwind's swap legs (estimated without spending any quote). Present only on preview=true responses; null otherwise. Computed on every policy \u2014 including pricing='market', whose preview numbers stay market-priced \u2014 so a client that opted out can keep the boundary visible."
14586
14604
  }
14587
14605
  },
14588
14606
  "type": "object",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compass-labs/api-sdk",
3
- "version": "2.2.100",
3
+ "version": "2.2.101",
4
4
  "author": "royalnine",
5
5
  "type": "module",
6
6
  "tshy": {
@@ -49,7 +49,7 @@ export type CreditLoopRequestMaxSlippagePercent = number | string;
49
49
  /**
50
50
  * Swap-leg routing policy. 'auto': firm quotes where a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route — previews whose target the firm venue cannot serve return the coverage advisory alone (preview=null, zero aggregator calls), and executions fail with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; every leg is priced by the aggregator and bounded by max_slippage_percent (which firm legs ignore). 'firm' is incompatible with gas_sponsorship (sponsored loops force market routing).
51
51
  */
52
- export const Pricing = {
52
+ export const CreditLoopRequestPricing = {
53
53
  Auto: "auto",
54
54
  Firm: "firm",
55
55
  Market: "market",
@@ -57,7 +57,9 @@ export const Pricing = {
57
57
  /**
58
58
  * Swap-leg routing policy. 'auto': firm quotes where a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route — previews whose target the firm venue cannot serve return the coverage advisory alone (preview=null, zero aggregator calls), and executions fail with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; every leg is priced by the aggregator and bounded by max_slippage_percent (which firm legs ignore). 'firm' is incompatible with gas_sponsorship (sponsored loops force market routing).
59
59
  */
60
- export type Pricing = ClosedEnum<typeof Pricing>;
60
+ export type CreditLoopRequestPricing = ClosedEnum<
61
+ typeof CreditLoopRequestPricing
62
+ >;
61
63
 
62
64
  /**
63
65
  * Open a leveraged loop: repeatedly supply collateral, borrow, and swap the
@@ -143,7 +145,7 @@ export type CreditLoopRequest = {
143
145
  /**
144
146
  * Swap-leg routing policy. 'auto': firm quotes where a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route — previews whose target the firm venue cannot serve return the coverage advisory alone (preview=null, zero aggregator calls), and executions fail with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; every leg is priced by the aggregator and bounded by max_slippage_percent (which firm legs ignore). 'firm' is incompatible with gas_sponsorship (sponsored loops force market routing).
145
147
  */
146
- pricing?: Pricing | undefined;
148
+ pricing?: CreditLoopRequestPricing | undefined;
147
149
  };
148
150
 
149
151
  /** @internal */
@@ -233,8 +235,9 @@ export function creditLoopRequestMaxSlippagePercentToJSON(
233
235
  }
234
236
 
235
237
  /** @internal */
236
- export const Pricing$outboundSchema: z.ZodNativeEnum<typeof Pricing> = z
237
- .nativeEnum(Pricing);
238
+ export const CreditLoopRequestPricing$outboundSchema: z.ZodNativeEnum<
239
+ typeof CreditLoopRequestPricing
240
+ > = z.nativeEnum(CreditLoopRequestPricing);
238
241
 
239
242
  /** @internal */
240
243
  export type CreditLoopRequest$Outbound = {
@@ -279,7 +282,7 @@ export const CreditLoopRequest$outboundSchema: z.ZodType<
279
282
  emodeCategory: z.nullable(z.number().int()).optional(),
280
283
  gasSponsorship: z.boolean().optional(),
281
284
  preview: z.boolean().optional(),
282
- pricing: Pricing$outboundSchema.optional(),
285
+ pricing: CreditLoopRequestPricing$outboundSchema.optional(),
283
286
  }).transform((v) => {
284
287
  return remap$(v, {
285
288
  marketId: "market_id",
@@ -38,6 +38,21 @@ export type CreditUnloopRequestTargetMultiplier = number | string;
38
38
  */
39
39
  export type CreditUnloopRequestMaxSlippagePercent = number | string;
40
40
 
41
+ /**
42
+ * Swap-leg routing policy. 'auto': firm quotes where a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route — previews the firm venue cannot serve return the firm_available advisory alone (preview=null, zero aggregator calls), and executions fail with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; every leg is priced by the aggregator. max_slippage_percent applies on EVERY policy — unlike the loop, firm unwinds consume it to size the guaranteed withdraw/repay floors (the fills themselves are exact). 'firm' is incompatible with gas_sponsorship (sponsored unwinds force market routing).
43
+ */
44
+ export const CreditUnloopRequestPricing = {
45
+ Auto: "auto",
46
+ Firm: "firm",
47
+ Market: "market",
48
+ } as const;
49
+ /**
50
+ * Swap-leg routing policy. 'auto': firm quotes where a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route — previews the firm venue cannot serve return the firm_available advisory alone (preview=null, zero aggregator calls), and executions fail with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; every leg is priced by the aggregator. max_slippage_percent applies on EVERY policy — unlike the loop, firm unwinds consume it to size the guaranteed withdraw/repay floors (the fills themselves are exact). 'firm' is incompatible with gas_sponsorship (sponsored unwinds force market routing).
51
+ */
52
+ export type CreditUnloopRequestPricing = ClosedEnum<
53
+ typeof CreditUnloopRequestPricing
54
+ >;
55
+
41
56
  /**
42
57
  * Unwind a leveraged loop: repeatedly withdraw collateral, swap it back to
43
58
  *
@@ -108,9 +123,13 @@ export type CreditUnloopRequest = {
108
123
  */
109
124
  gasSponsorship?: boolean | undefined;
110
125
  /**
111
- * If true, build a display estimate only: the swap legs are priced at market rate and no single-use firm quote is ever spent. Set it on every parameter-exploration call and omit it only on the build the user is about to sign.
126
+ * If true, build a display estimate only — no single-use firm quote is ever spent. On a firm-covered unwind (pricing 'auto' or 'firm') the numbers are firm-INDICATIVE, priced off the firm venue's live maker levels (swap_provider='bebop'); otherwise they are market-priced with slippage-bounded floors. Under pricing='firm' a preview the firm venue cannot serve returns the advisory alone (preview=null + firm_available). Set it on every parameter-exploration call and omit it only on the build the user is about to sign.
112
127
  */
113
128
  preview?: boolean | undefined;
129
+ /**
130
+ * Swap-leg routing policy. 'auto': firm quotes where a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route — previews the firm venue cannot serve return the firm_available advisory alone (preview=null, zero aggregator calls), and executions fail with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; every leg is priced by the aggregator. max_slippage_percent applies on EVERY policy — unlike the loop, firm unwinds consume it to size the guaranteed withdraw/repay floors (the fills themselves are exact). 'firm' is incompatible with gas_sponsorship (sponsored unwinds force market routing).
131
+ */
132
+ pricing?: CreditUnloopRequestPricing | undefined;
114
133
  };
115
134
 
116
135
  /** @internal */
@@ -158,6 +177,11 @@ export function creditUnloopRequestMaxSlippagePercentToJSON(
158
177
  );
159
178
  }
160
179
 
180
+ /** @internal */
181
+ export const CreditUnloopRequestPricing$outboundSchema: z.ZodNativeEnum<
182
+ typeof CreditUnloopRequestPricing
183
+ > = z.nativeEnum(CreditUnloopRequestPricing);
184
+
161
185
  /** @internal */
162
186
  export type CreditUnloopRequest$Outbound = {
163
187
  owner: string;
@@ -174,6 +198,7 @@ export type CreditUnloopRequest$Outbound = {
174
198
  allow_partial?: boolean | undefined;
175
199
  gas_sponsorship?: boolean | undefined;
176
200
  preview?: boolean | undefined;
201
+ pricing?: string | undefined;
177
202
  };
178
203
 
179
204
  /** @internal */
@@ -196,6 +221,7 @@ export const CreditUnloopRequest$outboundSchema: z.ZodType<
196
221
  allowPartial: z.boolean().optional(),
197
222
  gasSponsorship: z.boolean().optional(),
198
223
  preview: z.boolean().optional(),
224
+ pricing: CreditUnloopRequestPricing$outboundSchema.optional(),
199
225
  }).transform((v) => {
200
226
  return remap$(v, {
201
227
  marketId: "market_id",