@gearbox-protocol/sdk 16.0.0-next.35 → 16.0.0-next.37

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 (47) hide show
  1. package/dist/cjs/model/delayed-intent.schema.js +35 -0
  2. package/dist/cjs/model/index.js +5 -0
  3. package/dist/cjs/model/withdrawals.js +1 -0
  4. package/dist/cjs/model/withdrawals.schema.js +39 -0
  5. package/dist/cjs/onchain/accounts/CreditAccountsServiceV310.js +0 -10
  6. package/dist/cjs/onchain/positions/MultichainPositionsService.js +14 -0
  7. package/dist/cjs/onchain/positions/PositionsService.js +60 -0
  8. package/dist/cjs/preview/index.js +2 -0
  9. package/dist/cjs/preview/preview/estimateClaimableAt.js +21 -0
  10. package/dist/cjs/preview/preview/index.js +2 -0
  11. package/dist/cjs/preview/preview/previewOperation.js +2 -0
  12. package/dist/cjs/sdk/positions/PositionsNamespace.js +6 -0
  13. package/dist/cjs/sdk/prepare/PrepareApi.js +22 -1
  14. package/dist/esm/model/delayed-intent.schema.js +34 -0
  15. package/dist/esm/model/index.js +3 -1
  16. package/dist/esm/model/withdrawals.js +1 -0
  17. package/dist/esm/model/withdrawals.schema.js +36 -0
  18. package/dist/esm/onchain/accounts/CreditAccountsServiceV310.js +0 -10
  19. package/dist/esm/onchain/positions/MultichainPositionsService.js +14 -0
  20. package/dist/esm/onchain/positions/PositionsService.js +60 -0
  21. package/dist/esm/preview/index.js +2 -1
  22. package/dist/esm/preview/preview/estimateClaimableAt.js +20 -0
  23. package/dist/esm/preview/preview/index.js +2 -1
  24. package/dist/esm/preview/preview/previewOperation.js +2 -0
  25. package/dist/esm/sdk/positions/PositionsNamespace.js +6 -0
  26. package/dist/esm/sdk/prepare/PrepareApi.js +22 -1
  27. package/dist/types/model/delayed-intent.schema.d.ts +28 -0
  28. package/dist/types/model/index.d.ts +3 -1
  29. package/dist/types/model/previews.d.ts +7 -1
  30. package/dist/types/model/withdrawals.d.ts +87 -0
  31. package/dist/types/model/withdrawals.schema.d.ts +243 -0
  32. package/dist/types/onchain/accounts/CreditAccountsServiceV310.d.ts +1 -5
  33. package/dist/types/onchain/accounts/index.d.ts +2 -2
  34. package/dist/types/onchain/accounts/intents/types.d.ts +2 -1
  35. package/dist/types/onchain/accounts/types.d.ts +2 -27
  36. package/dist/types/onchain/index.d.ts +3 -3
  37. package/dist/types/onchain/positions/MultichainPositionsService.d.ts +7 -1
  38. package/dist/types/onchain/positions/PositionsService.d.ts +9 -1
  39. package/dist/types/onchain/positions/index.d.ts +2 -2
  40. package/dist/types/onchain/positions/types.d.ts +31 -2
  41. package/dist/types/preview/index.d.ts +2 -1
  42. package/dist/types/preview/preview/estimateClaimableAt.d.ts +19 -0
  43. package/dist/types/preview/preview/index.d.ts +2 -1
  44. package/dist/types/sdk/positions/PositionsNamespace.d.ts +8 -2
  45. package/dist/types/sdk/positions/types.d.ts +11 -3
  46. package/dist/types/sdk/prepare/types.d.ts +6 -5
  47. package/package.json +1 -1
@@ -41,7 +41,7 @@ var PrepareApi = class extends MultichainConstruct {
41
41
  if (!intent) return refuse("noRecordedIntent", void 0);
42
42
  return service(sdk).finishIntent({
43
43
  intent,
44
- claimable: params.claimable,
44
+ claimable: toClaimableWithdrawal(params.claimable),
45
45
  creditAccount: await slice(sdk, position.creditAccount),
46
46
  sdk,
47
47
  slippage: params.slippage,
@@ -340,6 +340,27 @@ function resumable(intent) {
340
340
  return intent ?? void 0;
341
341
  }
342
342
  /**
343
+ * Unwraps a read-model claimable withdrawal into the compressor shape the
344
+ * intents engine plans from.
345
+ **/
346
+ function toClaimableWithdrawal(claimable) {
347
+ return {
348
+ token: claimable.sourceToken.address,
349
+ withdrawalPhantomToken: claimable.withdrawalPhantomToken.token.address,
350
+ withdrawalTokenSpent: claimable.withdrawalPhantomToken.value,
351
+ outputs: claimable.outputs.map((o) => ({
352
+ token: o.token.address,
353
+ amount: o.value,
354
+ isDelayed: false
355
+ })),
356
+ claimCalls: [{
357
+ target: claimable.claimCall.to,
358
+ callData: claimable.claimCall.callData
359
+ }],
360
+ redeemer: claimable.redeemer
361
+ };
362
+ }
363
+ /**
343
364
  * A pool route the market does not offer, as the refusal a caller reads.
344
365
  *
345
366
  * `to` is absent where {@link lpRoute} found no output to name at all, which
@@ -0,0 +1,28 @@
1
+ import { z } from "zod/v4";
2
+ //#region src/model/delayed-intent.schema.d.ts
3
+ /**
4
+ * {@link DelayedIntent}
5
+ **/
6
+ declare const delayedIntentSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7
+ type: z.ZodLiteral<"INCREASE_LEVERAGE">;
8
+ }, z.core.$strip>, z.ZodObject<{
9
+ type: z.ZodLiteral<"DEPOSIT">;
10
+ }, z.core.$strip>, z.ZodObject<{
11
+ type: z.ZodLiteral<"DEPOSIT_AND_INCREASE_LEVERAGE">;
12
+ }, z.core.$strip>, z.ZodObject<{
13
+ type: z.ZodLiteral<"WITHDRAW_COLLATERAL">;
14
+ to: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
15
+ withdrawToken: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
16
+ withdrawAmount: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
17
+ sourceToken: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
18
+ debtRepaid: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
19
+ }, z.core.$strip>, z.ZodObject<{
20
+ type: z.ZodLiteral<"CLOSE_ACCOUNT">;
21
+ to: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
22
+ }, z.core.$strip>, z.ZodObject<{
23
+ type: z.ZodLiteral<"ADD_COLLATERAL">;
24
+ }, z.core.$strip>, z.ZodObject<{
25
+ type: z.ZodLiteral<"DECREASE_LEVERAGE">;
26
+ }, z.core.$strip>], "type">;
27
+ //#endregion
28
+ export { delayedIntentSchema };
@@ -19,4 +19,6 @@ import { borrowRateBreakdownSchema, pnlBreakdownSchema, pointsProgramPnLSchema,
19
19
  import { amountSchema, assetTypeSchema, bpsSchema, chainIdSchema, leverageSchema, timestampSchema, tokenAmountSchema, tokenSchema, txCallSchema, underlyingTokenSchema } from "./primitives.schema.js";
20
20
  import { ChainFailed, ChainMetadata, ChainScoped, ChainSucceeded, DataResponse, DataSource, ResponseMetadata } from "./response.js";
21
21
  import { chainFailedSchema, chainMetadataSchema, chainSucceededSchema, dataSourceSchema, responseMetadataSchema, responseSchema } from "./response.schema.js";
22
- export { AccountHoldings, AccountMetrics, AccountProjection, AccountStateChange, AdjustStrategyPositionPreview, Amount, ApyBreakdown, Asset, AssetType, BorrowRateBreakdown, Bps, CHART_METRIC_UNITS, CHART_RANGES, CHART_UNAVAILABLE_CODES, ChainFailed, ChainId, ChainMetadata, ChainScoped, ChainScopedFilter, ChainSucceeded, ChartBundle, ChartDenomination, ChartMetric, ChartQuery, ChartRange, ChartSeries, ChartSeriesOk, ChartSeriesUnavailable, ChartUnavailableCode, ChartUnit, ChartValue, ChartWindow, CompareTag, CompareTolerance, CreditOperationMarket, Curator, CuratorName, DataResponse, DataSource, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedReceivedAsset, DelayedStrategyPositionOperationPreview, DelayedWithdrawCollateralIntent, ERROR_ADAPTER_CALL_OUTSIDE_BRACKET, ERROR_INVALID_TRANSACTION_VALUE, ERROR_MALFORMED_BRACKET, ERROR_NON_ADAPTER_CALL_IN_BRACKET, ERROR_UNPREVIEWABLE_ADAPTER_CALL, ERROR_UNPRICEABLE_TOKEN, ERROR_UNSUPPORTED_OUT_OF_BRACKET_CALL, Estimated, EstimatedProjection, ExitStrategyPositionPreview, FILTER_ALL, FilterAll, Filterable, GridSampling, InstantReceivedAsset, InstantStrategyPositionOperationPreview, Leverage, LiquidatableAccount, LiquidatableAccountFilter, LiquidationApproval, LiquidationDetails, LiquidationPosition, Notice, NoticeKind, NoticeSubject, OpenStrategyPositionPreview, OperationPreview, OperationPreviewError, Opportunity, OpportunityBase, OpportunityChartMetric, OpportunityDetail, OpportunityFilter, OpportunityId, OpportunityKey, OpportunityKind, OpportunityTotals, POOL_OPPORTUNITY_CHART_METRICS, POOL_POSITION_CHART_METRICS, PnlBreakdown, PointRewards, PointsProgram, PointsProgramPnL, PointsRewardsPnL, PoolOperationType, PoolOpportunity, PoolOpportunityChartMetric, PoolOpportunityDetail, PoolOpportunityKey, PoolOpportunityRef, PoolPosition, PoolPositionChartMetric, PoolPositionKey, PoolPositionOperationPreview, PoolPositionRef, Position, PositionChartMetric, PositionCollateral, PositionFilter, PositionId, PositionKey, PositionKind, PositionTransaction, PositionTransactionKind, PositionsTotals, PreviewOperationInput, PreviewOperationOptions, PriceFeedData, PriceFeedSummary, QuotaAsset, RateCurve, RateCurvePoint, ReceivedAsset, RepayStrategyPositionPreview, ResponseMetadata, Rewards, RewardsPnL, RoutedField, STRATEGY_OPPORTUNITY_CHART_METRICS, STRATEGY_POSITION_CHART_METRICS, STRATEGY_POSITION_COLLATERAL_ERROR, StrategyOpportunity, StrategyOpportunityChartMetric, StrategyOpportunityDetail, StrategyOpportunityKey, StrategyOpportunityRef, StrategyPosition, StrategyPositionChartMetric, StrategyPositionKey, StrategyPositionRef, Timestamp, Token, TokenAmount, TokenQuotaRate, TokenRewards, TokenRewardsPnL, ToleranceCompareTag, TxCall, UnderlyingToken, amountSchema, apyBreakdownSchema, asEstimated, assetTypeSchema, backendPreferred, booleanParamSchema, borrowRateBreakdownSchema, bpsSchema, chainFailedSchema, chainIdSchema, chainMetadataSchema, chainSucceededSchema, chartBundleSchemaFor, chartDenominationSchema, chartMetricSchema, chartQueryCodec, chartQueryParamsSchema, chartQuerySchema, chartRangeSchema, chartSeriesSchema, chartValueSchema, chartWindowSchema, compareTagOf, curatorNameSchema, curatorSchema, dataSourceSchema, delayedReceivedAssetSchema, encodeFlag, filterAllSchema, filterable, instantReceivedAssetSchema, isFilterSet, leverageSchema, liquidatableAccountFilterSchema, liquidatableAccountSchema, liquidationApprovalSchema, liquidationDetailsSchema, liquidationPositionId, liquidationPositionSchema, matchesLiquidatableAccountFilter, matchesOpportunityFilter, matchesPositionFilter, noticeKindSchema, noticeSchema, offchainOnly, onchainOnly, opportunityBaseSchema, opportunityDetailSchema, opportunityFilterQueryParamsSchema, opportunityFilterQuerySchema, opportunityFilterSchema, opportunityId, opportunityKeySchema, opportunityKindSchema, opportunitySchema, opportunityTotalsSchema, pnlBreakdownSchema, pointRewardsSchema, pointsProgramPnLSchema, pointsProgramSchema, pointsRewardsPnLSchema, poolOpportunityChartMetricSchema, poolOpportunityDetailSchema, poolOpportunityId, poolOpportunityKeySchema, poolOpportunitySchema, poolPositionChartMetricSchema, poolPositionId, poolPositionKeySchema, poolPositionSchema, positionCollateralSchema, positionFilterQueryParamsSchema, positionFilterQuerySchema, positionFilterSchema, positionId, positionKeySchema, positionKindSchema, positionSchema, positionTransactionKindSchema, positionTransactionSchema, positionsTotalsSchema, priceFeedDataSchema, priceFeedSummarySchema, quotaAssetSchema, rateCurvePointSchema, rateCurveSchema, receivedAssetSchema, responseMetadataSchema, responseSchema, rewardsPnLSchema, rewardsSchema, strategyOpportunityChartMetricSchema, strategyOpportunityDetailSchema, strategyOpportunityId, strategyOpportunityKeySchema, strategyOpportunitySchema, strategyPositionChartMetricSchema, strategyPositionId, strategyPositionKeySchema, strategyPositionSchema, timestampSchema, tokenAmountSchema, tokenQuotaRateSchema, tokenRewardsPnLSchema, tokenRewardsSchema, tokenSchema, tolerance, txCallSchema, underlyingTokenSchema };
22
+ import { PositionClaimableWithdrawal, PositionPendingWithdrawal, PositionWithdrawals } from "./withdrawals.js";
23
+ import { positionClaimableWithdrawalSchema, positionPendingWithdrawalSchema, positionWithdrawalsSchema } from "./withdrawals.schema.js";
24
+ export { AccountHoldings, AccountMetrics, AccountProjection, AccountStateChange, AdjustStrategyPositionPreview, Amount, ApyBreakdown, Asset, AssetType, BorrowRateBreakdown, Bps, CHART_METRIC_UNITS, CHART_RANGES, CHART_UNAVAILABLE_CODES, ChainFailed, ChainId, ChainMetadata, ChainScoped, ChainScopedFilter, ChainSucceeded, ChartBundle, ChartDenomination, ChartMetric, ChartQuery, ChartRange, ChartSeries, ChartSeriesOk, ChartSeriesUnavailable, ChartUnavailableCode, ChartUnit, ChartValue, ChartWindow, CompareTag, CompareTolerance, CreditOperationMarket, Curator, CuratorName, DataResponse, DataSource, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedReceivedAsset, DelayedStrategyPositionOperationPreview, DelayedWithdrawCollateralIntent, ERROR_ADAPTER_CALL_OUTSIDE_BRACKET, ERROR_INVALID_TRANSACTION_VALUE, ERROR_MALFORMED_BRACKET, ERROR_NON_ADAPTER_CALL_IN_BRACKET, ERROR_UNPREVIEWABLE_ADAPTER_CALL, ERROR_UNPRICEABLE_TOKEN, ERROR_UNSUPPORTED_OUT_OF_BRACKET_CALL, Estimated, EstimatedProjection, ExitStrategyPositionPreview, FILTER_ALL, FilterAll, Filterable, GridSampling, InstantReceivedAsset, InstantStrategyPositionOperationPreview, Leverage, LiquidatableAccount, LiquidatableAccountFilter, LiquidationApproval, LiquidationDetails, LiquidationPosition, Notice, NoticeKind, NoticeSubject, OpenStrategyPositionPreview, OperationPreview, OperationPreviewError, Opportunity, OpportunityBase, OpportunityChartMetric, OpportunityDetail, OpportunityFilter, OpportunityId, OpportunityKey, OpportunityKind, OpportunityTotals, POOL_OPPORTUNITY_CHART_METRICS, POOL_POSITION_CHART_METRICS, PnlBreakdown, PointRewards, PointsProgram, PointsProgramPnL, PointsRewardsPnL, PoolOperationType, PoolOpportunity, PoolOpportunityChartMetric, PoolOpportunityDetail, PoolOpportunityKey, PoolOpportunityRef, PoolPosition, PoolPositionChartMetric, PoolPositionKey, PoolPositionOperationPreview, PoolPositionRef, Position, PositionChartMetric, PositionClaimableWithdrawal, PositionCollateral, PositionFilter, PositionId, PositionKey, PositionKind, PositionPendingWithdrawal, PositionTransaction, PositionTransactionKind, PositionWithdrawals, PositionsTotals, PreviewOperationInput, PreviewOperationOptions, PriceFeedData, PriceFeedSummary, QuotaAsset, RateCurve, RateCurvePoint, ReceivedAsset, RepayStrategyPositionPreview, ResponseMetadata, Rewards, RewardsPnL, RoutedField, STRATEGY_OPPORTUNITY_CHART_METRICS, STRATEGY_POSITION_CHART_METRICS, STRATEGY_POSITION_COLLATERAL_ERROR, StrategyOpportunity, StrategyOpportunityChartMetric, StrategyOpportunityDetail, StrategyOpportunityKey, StrategyOpportunityRef, StrategyPosition, StrategyPositionChartMetric, StrategyPositionKey, StrategyPositionRef, Timestamp, Token, TokenAmount, TokenQuotaRate, TokenRewards, TokenRewardsPnL, ToleranceCompareTag, TxCall, UnderlyingToken, amountSchema, apyBreakdownSchema, asEstimated, assetTypeSchema, backendPreferred, booleanParamSchema, borrowRateBreakdownSchema, bpsSchema, chainFailedSchema, chainIdSchema, chainMetadataSchema, chainSucceededSchema, chartBundleSchemaFor, chartDenominationSchema, chartMetricSchema, chartQueryCodec, chartQueryParamsSchema, chartQuerySchema, chartRangeSchema, chartSeriesSchema, chartValueSchema, chartWindowSchema, compareTagOf, curatorNameSchema, curatorSchema, dataSourceSchema, delayedReceivedAssetSchema, encodeFlag, filterAllSchema, filterable, instantReceivedAssetSchema, isFilterSet, leverageSchema, liquidatableAccountFilterSchema, liquidatableAccountSchema, liquidationApprovalSchema, liquidationDetailsSchema, liquidationPositionId, liquidationPositionSchema, matchesLiquidatableAccountFilter, matchesOpportunityFilter, matchesPositionFilter, noticeKindSchema, noticeSchema, offchainOnly, onchainOnly, opportunityBaseSchema, opportunityDetailSchema, opportunityFilterQueryParamsSchema, opportunityFilterQuerySchema, opportunityFilterSchema, opportunityId, opportunityKeySchema, opportunityKindSchema, opportunitySchema, opportunityTotalsSchema, pnlBreakdownSchema, pointRewardsSchema, pointsProgramPnLSchema, pointsProgramSchema, pointsRewardsPnLSchema, poolOpportunityChartMetricSchema, poolOpportunityDetailSchema, poolOpportunityId, poolOpportunityKeySchema, poolOpportunitySchema, poolPositionChartMetricSchema, poolPositionId, poolPositionKeySchema, poolPositionSchema, positionClaimableWithdrawalSchema, positionCollateralSchema, positionFilterQueryParamsSchema, positionFilterQuerySchema, positionFilterSchema, positionId, positionKeySchema, positionKindSchema, positionPendingWithdrawalSchema, positionSchema, positionTransactionKindSchema, positionTransactionSchema, positionWithdrawalsSchema, positionsTotalsSchema, priceFeedDataSchema, priceFeedSummarySchema, quotaAssetSchema, rateCurvePointSchema, rateCurveSchema, receivedAssetSchema, responseMetadataSchema, responseSchema, rewardsPnLSchema, rewardsSchema, strategyOpportunityChartMetricSchema, strategyOpportunityDetailSchema, strategyOpportunityId, strategyOpportunityKeySchema, strategyOpportunitySchema, strategyPositionChartMetricSchema, strategyPositionId, strategyPositionKeySchema, strategyPositionSchema, timestampSchema, tokenAmountSchema, tokenQuotaRateSchema, tokenRewardsPnLSchema, tokenRewardsSchema, tokenSchema, tolerance, txCallSchema, underlyingTokenSchema };
@@ -1,4 +1,4 @@
1
- import { Bps, ChainId, Leverage, TokenAmount } from "./primitives.js";
1
+ import { Bps, ChainId, Leverage, Timestamp, TokenAmount } from "./primitives.js";
2
2
  import { Curator } from "./curators.js";
3
3
  import { DelayedIntent } from "./delayed-intents.js";
4
4
  import { BorrowRateBreakdown } from "./positions.js";
@@ -544,6 +544,12 @@ interface DelayedStrategyPositionOperationPreview extends CreditOperationMarket
544
544
  * request carries no intent (e.g. Mellow)
545
545
  */
546
546
  intent?: DelayedIntent;
547
+ /**
548
+ * Estimated unix timestamp (seconds) when the delayed outputs become
549
+ * claimable: `now + withdrawalLength` of phantom token.
550
+ * Undefined when the compressor has no information about the asset.
551
+ */
552
+ estClaimableAt?: Timestamp;
547
553
  /**
548
554
  * What this transaction does right now: the delayed withdrawal is
549
555
  * represented by the phantom token among the account's assets
@@ -0,0 +1,87 @@
1
+ import { Timestamp, Token, TokenAmount, TxCall } from "./primitives.js";
2
+ import { DelayedIntent } from "./delayed-intents.js";
3
+ import { Address } from "viem";
4
+ //#region src/model/withdrawals.d.ts
5
+ /**
6
+ * A delayed withdrawal of a strategy position that has matured and can be claimed.
7
+ **/
8
+ interface PositionClaimableWithdrawal {
9
+ /**
10
+ * Source token the withdrawal was requested from.
11
+ **/
12
+ sourceToken: Token;
13
+ /**
14
+ * Withdrawal phantom token that represents this position, and the amount
15
+ * that will be burned when the withdrawal is claimed.
16
+ **/
17
+ withdrawalPhantomToken: TokenAmount;
18
+ /**
19
+ * Tokens received by the credit account upon claiming.
20
+ **/
21
+ outputs: TokenAmount[];
22
+ /**
23
+ * Adapter call that executes the claim. Subcompressors always report exactly
24
+ * one call; it is wrapped into a facade multicall by `assembleClaimDelayedCalls`.
25
+ **/
26
+ claimCall: TxCall;
27
+ /**
28
+ * Redeemer contract the withdrawal is claimed from. `undefined` on
29
+ * compressor versions below 313, which do not report it.
30
+ **/
31
+ redeemer?: Address;
32
+ /**
33
+ * Delayed intent decoded from the withdrawal's `extraData`. `undefined` on
34
+ * compressor versions below 313, and on v313+ when the withdrawal was
35
+ * requested without an intent (empty `extraData`).
36
+ **/
37
+ intent?: DelayedIntent;
38
+ }
39
+ /**
40
+ * A delayed withdrawal of a strategy position that is not yet claimable.
41
+ **/
42
+ interface PositionPendingWithdrawal {
43
+ /**
44
+ * Source token the withdrawal was requested from.
45
+ **/
46
+ sourceToken: Token;
47
+ /**
48
+ * Withdrawal phantom token that represents this position.
49
+ **/
50
+ withdrawalPhantomToken: Token;
51
+ /**
52
+ * Estimated tokens the position will receive once the withdrawal
53
+ * matures and is claimed.
54
+ **/
55
+ expectedOutputs: TokenAmount[];
56
+ /**
57
+ * Unix timestamp (in seconds) when the withdrawal becomes claimable.
58
+ **/
59
+ claimableAt: Timestamp;
60
+ /**
61
+ * Redeemer contract the withdrawal will be claimed from. `undefined` on
62
+ * compressor versions below 313, which do not report it.
63
+ **/
64
+ redeemer?: Address;
65
+ /**
66
+ * Delayed intent decoded from the withdrawal's `extraData`. `undefined` on
67
+ * compressor versions below 313, and on v313+ when the withdrawal was
68
+ * requested without an intent (empty `extraData`).
69
+ **/
70
+ intent?: DelayedIntent;
71
+ }
72
+ /**
73
+ * Delayed withdrawals of a strategy position, split into immediately claimable
74
+ * and still-pending entries.
75
+ **/
76
+ interface PositionWithdrawals {
77
+ /**
78
+ * Withdrawals that have matured and can be claimed now.
79
+ **/
80
+ claimable: PositionClaimableWithdrawal[];
81
+ /**
82
+ * Withdrawals that are still maturing.
83
+ **/
84
+ pending: PositionPendingWithdrawal[];
85
+ }
86
+ //#endregion
87
+ export { PositionClaimableWithdrawal, PositionPendingWithdrawal, PositionWithdrawals };
@@ -0,0 +1,243 @@
1
+ import { z } from "zod/v4";
2
+ //#region src/model/withdrawals.schema.d.ts
3
+ /**
4
+ * {@link PositionClaimableWithdrawal}
5
+ **/
6
+ declare const positionClaimableWithdrawalSchema: z.ZodObject<{
7
+ sourceToken: z.ZodObject<{
8
+ chainId: z.ZodNumber;
9
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
10
+ symbol: z.ZodString;
11
+ name: z.ZodString;
12
+ decimals: z.ZodNumber;
13
+ assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
14
+ }, z.core.$strip>;
15
+ withdrawalPhantomToken: z.ZodObject<{
16
+ value: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
17
+ valueUsd: z.ZodNullable<z.ZodNumber>;
18
+ token: z.ZodObject<{
19
+ chainId: z.ZodNumber;
20
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
21
+ symbol: z.ZodString;
22
+ name: z.ZodString;
23
+ decimals: z.ZodNumber;
24
+ assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
25
+ }, z.core.$strip>;
26
+ }, z.core.$strip>;
27
+ outputs: z.ZodArray<z.ZodObject<{
28
+ value: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
29
+ valueUsd: z.ZodNullable<z.ZodNumber>;
30
+ token: z.ZodObject<{
31
+ chainId: z.ZodNumber;
32
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
33
+ symbol: z.ZodString;
34
+ name: z.ZodString;
35
+ decimals: z.ZodNumber;
36
+ assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
37
+ }, z.core.$strip>;
38
+ }, z.core.$strip>>;
39
+ claimCall: z.ZodObject<{
40
+ to: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
41
+ callData: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
42
+ value: z.ZodOptional<z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>>;
43
+ }, z.core.$strip>;
44
+ redeemer: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>>;
45
+ intent: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
46
+ type: z.ZodLiteral<"INCREASE_LEVERAGE">;
47
+ }, z.core.$strip>, z.ZodObject<{
48
+ type: z.ZodLiteral<"DEPOSIT">;
49
+ }, z.core.$strip>, z.ZodObject<{
50
+ type: z.ZodLiteral<"DEPOSIT_AND_INCREASE_LEVERAGE">;
51
+ }, z.core.$strip>, z.ZodObject<{
52
+ type: z.ZodLiteral<"WITHDRAW_COLLATERAL">;
53
+ to: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
54
+ withdrawToken: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
55
+ withdrawAmount: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
56
+ sourceToken: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
57
+ debtRepaid: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
58
+ }, z.core.$strip>, z.ZodObject<{
59
+ type: z.ZodLiteral<"CLOSE_ACCOUNT">;
60
+ to: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
61
+ }, z.core.$strip>, z.ZodObject<{
62
+ type: z.ZodLiteral<"ADD_COLLATERAL">;
63
+ }, z.core.$strip>, z.ZodObject<{
64
+ type: z.ZodLiteral<"DECREASE_LEVERAGE">;
65
+ }, z.core.$strip>], "type">>;
66
+ }, z.core.$strip>;
67
+ /**
68
+ * {@link PositionPendingWithdrawal}
69
+ **/
70
+ declare const positionPendingWithdrawalSchema: z.ZodObject<{
71
+ sourceToken: z.ZodObject<{
72
+ chainId: z.ZodNumber;
73
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
74
+ symbol: z.ZodString;
75
+ name: z.ZodString;
76
+ decimals: z.ZodNumber;
77
+ assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
78
+ }, z.core.$strip>;
79
+ withdrawalPhantomToken: z.ZodObject<{
80
+ chainId: z.ZodNumber;
81
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
82
+ symbol: z.ZodString;
83
+ name: z.ZodString;
84
+ decimals: z.ZodNumber;
85
+ assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
86
+ }, z.core.$strip>;
87
+ expectedOutputs: z.ZodArray<z.ZodObject<{
88
+ value: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
89
+ valueUsd: z.ZodNullable<z.ZodNumber>;
90
+ token: z.ZodObject<{
91
+ chainId: z.ZodNumber;
92
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
93
+ symbol: z.ZodString;
94
+ name: z.ZodString;
95
+ decimals: z.ZodNumber;
96
+ assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
97
+ }, z.core.$strip>;
98
+ }, z.core.$strip>>;
99
+ claimableAt: z.ZodNumber;
100
+ redeemer: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>>;
101
+ intent: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
102
+ type: z.ZodLiteral<"INCREASE_LEVERAGE">;
103
+ }, z.core.$strip>, z.ZodObject<{
104
+ type: z.ZodLiteral<"DEPOSIT">;
105
+ }, z.core.$strip>, z.ZodObject<{
106
+ type: z.ZodLiteral<"DEPOSIT_AND_INCREASE_LEVERAGE">;
107
+ }, z.core.$strip>, z.ZodObject<{
108
+ type: z.ZodLiteral<"WITHDRAW_COLLATERAL">;
109
+ to: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
110
+ withdrawToken: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
111
+ withdrawAmount: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
112
+ sourceToken: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
113
+ debtRepaid: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
114
+ }, z.core.$strip>, z.ZodObject<{
115
+ type: z.ZodLiteral<"CLOSE_ACCOUNT">;
116
+ to: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
117
+ }, z.core.$strip>, z.ZodObject<{
118
+ type: z.ZodLiteral<"ADD_COLLATERAL">;
119
+ }, z.core.$strip>, z.ZodObject<{
120
+ type: z.ZodLiteral<"DECREASE_LEVERAGE">;
121
+ }, z.core.$strip>], "type">>;
122
+ }, z.core.$strip>;
123
+ /**
124
+ * {@link PositionWithdrawals}
125
+ **/
126
+ declare const positionWithdrawalsSchema: z.ZodObject<{
127
+ claimable: z.ZodArray<z.ZodObject<{
128
+ sourceToken: z.ZodObject<{
129
+ chainId: z.ZodNumber;
130
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
131
+ symbol: z.ZodString;
132
+ name: z.ZodString;
133
+ decimals: z.ZodNumber;
134
+ assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
135
+ }, z.core.$strip>;
136
+ withdrawalPhantomToken: z.ZodObject<{
137
+ value: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
138
+ valueUsd: z.ZodNullable<z.ZodNumber>;
139
+ token: z.ZodObject<{
140
+ chainId: z.ZodNumber;
141
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
142
+ symbol: z.ZodString;
143
+ name: z.ZodString;
144
+ decimals: z.ZodNumber;
145
+ assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
146
+ }, z.core.$strip>;
147
+ }, z.core.$strip>;
148
+ outputs: z.ZodArray<z.ZodObject<{
149
+ value: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
150
+ valueUsd: z.ZodNullable<z.ZodNumber>;
151
+ token: z.ZodObject<{
152
+ chainId: z.ZodNumber;
153
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
154
+ symbol: z.ZodString;
155
+ name: z.ZodString;
156
+ decimals: z.ZodNumber;
157
+ assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
158
+ }, z.core.$strip>;
159
+ }, z.core.$strip>>;
160
+ claimCall: z.ZodObject<{
161
+ to: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
162
+ callData: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
163
+ value: z.ZodOptional<z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>>;
164
+ }, z.core.$strip>;
165
+ redeemer: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>>;
166
+ intent: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
167
+ type: z.ZodLiteral<"INCREASE_LEVERAGE">;
168
+ }, z.core.$strip>, z.ZodObject<{
169
+ type: z.ZodLiteral<"DEPOSIT">;
170
+ }, z.core.$strip>, z.ZodObject<{
171
+ type: z.ZodLiteral<"DEPOSIT_AND_INCREASE_LEVERAGE">;
172
+ }, z.core.$strip>, z.ZodObject<{
173
+ type: z.ZodLiteral<"WITHDRAW_COLLATERAL">;
174
+ to: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
175
+ withdrawToken: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
176
+ withdrawAmount: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
177
+ sourceToken: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
178
+ debtRepaid: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
179
+ }, z.core.$strip>, z.ZodObject<{
180
+ type: z.ZodLiteral<"CLOSE_ACCOUNT">;
181
+ to: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
182
+ }, z.core.$strip>, z.ZodObject<{
183
+ type: z.ZodLiteral<"ADD_COLLATERAL">;
184
+ }, z.core.$strip>, z.ZodObject<{
185
+ type: z.ZodLiteral<"DECREASE_LEVERAGE">;
186
+ }, z.core.$strip>], "type">>;
187
+ }, z.core.$strip>>;
188
+ pending: z.ZodArray<z.ZodObject<{
189
+ sourceToken: z.ZodObject<{
190
+ chainId: z.ZodNumber;
191
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
192
+ symbol: z.ZodString;
193
+ name: z.ZodString;
194
+ decimals: z.ZodNumber;
195
+ assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
196
+ }, z.core.$strip>;
197
+ withdrawalPhantomToken: z.ZodObject<{
198
+ chainId: z.ZodNumber;
199
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
200
+ symbol: z.ZodString;
201
+ name: z.ZodString;
202
+ decimals: z.ZodNumber;
203
+ assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
204
+ }, z.core.$strip>;
205
+ expectedOutputs: z.ZodArray<z.ZodObject<{
206
+ value: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
207
+ valueUsd: z.ZodNullable<z.ZodNumber>;
208
+ token: z.ZodObject<{
209
+ chainId: z.ZodNumber;
210
+ address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
211
+ symbol: z.ZodString;
212
+ name: z.ZodString;
213
+ decimals: z.ZodNumber;
214
+ assetType: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>>;
215
+ }, z.core.$strip>;
216
+ }, z.core.$strip>>;
217
+ claimableAt: z.ZodNumber;
218
+ redeemer: z.ZodOptional<z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>>;
219
+ intent: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
220
+ type: z.ZodLiteral<"INCREASE_LEVERAGE">;
221
+ }, z.core.$strip>, z.ZodObject<{
222
+ type: z.ZodLiteral<"DEPOSIT">;
223
+ }, z.core.$strip>, z.ZodObject<{
224
+ type: z.ZodLiteral<"DEPOSIT_AND_INCREASE_LEVERAGE">;
225
+ }, z.core.$strip>, z.ZodObject<{
226
+ type: z.ZodLiteral<"WITHDRAW_COLLATERAL">;
227
+ to: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
228
+ withdrawToken: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
229
+ withdrawAmount: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
230
+ sourceToken: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
231
+ debtRepaid: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
232
+ }, z.core.$strip>, z.ZodObject<{
233
+ type: z.ZodLiteral<"CLOSE_ACCOUNT">;
234
+ to: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
235
+ }, z.core.$strip>, z.ZodObject<{
236
+ type: z.ZodLiteral<"ADD_COLLATERAL">;
237
+ }, z.core.$strip>, z.ZodObject<{
238
+ type: z.ZodLiteral<"DECREASE_LEVERAGE">;
239
+ }, z.core.$strip>], "type">>;
240
+ }, z.core.$strip>>;
241
+ }, z.core.$strip>;
242
+ //#endregion
243
+ export { positionClaimableWithdrawalSchema, positionPendingWithdrawalSchema, positionWithdrawalsSchema };
@@ -15,7 +15,7 @@ import "../base/index.js";
15
15
  import { GetCreditAccountsOptions } from "./credit-account-compressor/types.js";
16
16
  import "./credit-account-compressor/index.js";
17
17
  import "./withdrawal-compressor/index.js";
18
- import { AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, ClaimFarmRewardsProps, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, ICreditAccountsService, OpenCAProps, PartiallyLiquidateProps, PreviewDelayedWithdrawalProps, Rewards } from "./types.js";
18
+ import { AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, ClaimFarmRewardsProps, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, ICreditAccountsService, OpenCAProps, PartiallyLiquidateProps, PreviewDelayedWithdrawalProps, Rewards } from "./types.js";
19
19
  import { AccountBotsService } from "./bots/AccountBotsService.js";
20
20
  import "./bots/index.js";
21
21
  import { Address } from "viem";
@@ -68,10 +68,6 @@ declare class CreditAccountsServiceV310 extends SDKConstruct implements ICreditA
68
68
  * {@inheritDoc ICreditAccountsService.previewDelayedWithdrawal}
69
69
  **/
70
70
  previewDelayedWithdrawal({ creditAccount, amount, token, withdrawalPhantomToken, intent }: PreviewDelayedWithdrawalProps): Promise<RequestableWithdrawal>;
71
- /**
72
- * {@inheritDoc ICreditAccountsService.getPendingWithdrawals}
73
- **/
74
- getPendingWithdrawals({ creditAccount }: GetPendingWithdrawalsProps): Promise<GetPendingWithdrawalsResult>;
75
71
  /**
76
72
  * {@inheritDoc ICreditAccountsService.assembleStartDelayedWithdrawalCalls}
77
73
  **/
@@ -14,7 +14,7 @@ import { WithdrawalCompressorV310Contract } from "./withdrawal-compressor/Withdr
14
14
  import { WithdrawalCompressorV311Contract } from "./withdrawal-compressor/WithdrawalCompressorV311Contract.js";
15
15
  import { WithdrawalCompressorV313Contract } from "./withdrawal-compressor/WithdrawalCompressorV313Contract.js";
16
16
  import "./withdrawal-compressor/index.js";
17
- import { AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, ClaimFarmRewardsProps, CloseCreditAccountResult, CreditAccountOperationResult, CreditManagerOperationResult, EncodableCreditAccountOperation, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, ICreditAccountsService, OpenCAProps, PartiallyLiquidateProps, PreviewDelayedWithdrawalProps, Rewards } from "./types.js";
17
+ import { AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, ClaimFarmRewardsProps, CloseCreditAccountResult, CreditAccountOperationResult, CreditManagerOperationResult, EncodableCreditAccountOperation, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, ICreditAccountsService, OpenCAProps, PartiallyLiquidateProps, PreviewDelayedWithdrawalProps, Rewards } from "./types.js";
18
18
  import { AccountToCheck, BotStatusCall, BotsDirectResponse, CMSlice, ConnectedBotsCall, ConnectedBotsPerAccount, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, MulticallWithFailure, SetBotProps, SetBotResult } from "./bots/types.js";
19
19
  import { AccountBotsService } from "./bots/AccountBotsService.js";
20
20
  import { PeripheryCompressorV310Contract } from "./bots/PeripheryCompressorV310Contract.js";
@@ -34,4 +34,4 @@ import { BuildLiquidationTxProps, BuildLiquidationTxPropsBase, GetLiquidatableAc
34
34
  import { LiquidationsService } from "./liquidations/LiquidationsService.js";
35
35
  import { MultichainLiquidationsService } from "./liquidations/MultichainLiquidationsService.js";
36
36
  import "./liquidations/index.js";
37
- export { AbstractWithdrawalCompressorContract, AccountBotsService, type AccountCalculatorOperation, AccountToCheck, type AddCollateralIntent, type AdjustLeverageIntent, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, BotStatusCall, BotsDirectResponse, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, CalcDefaultQuotaProps, CalcQuotaUpdateProps, CalcRecommendedQuotaProps, ClaimFarmRewardsProps, ClaimableWithdrawal, CloseCreditAccountResult, ConnectedBotsCall, ConnectedBotsPerAccount, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountDataCall, CreditAccountFilter, CreditAccountOperationResult, CreditAccountOperationsService, CreditAccountReadOptions, type CreditAccountSlice, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsServiceV310, CreditAccountsTarget, CreditManagerFilter, CreditManagerOperationResult, CurrentWithdrawals, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, type DelayableIntent, DelayedIntentExtended, type DelayedRoute, type DelayedStart, type DelayedStartResult, type DepositStrategyIntent, EncodableCreditAccountOperation, type FinishIntentProps, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetExternalAccountCurrentWithdrawalsProps, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetWithdrawalRequestResultProps, ICreditAccountsService, IRedemptionLoggerContract, IWithdrawalCompressorContract, type InstantRoute, type IntentPreviewResult, type IntentRoutesResult, InvalidDelayedIntentError, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, type LeverageBand, LiquidationsService, LoadRWALiquidatorsProps, MulticallWithFailure, MultichainLiquidationsService, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OpenCAProps, OpenStrategyPreviewResult, type OpenStrategyProps, type OpenStrategyState, type OperationState, PartiallyLiquidateProps, type PathLossRate, PendingWithdrawal, PeripheryCompressorV310Contract, PreviewDelayedWithdrawalProps, RWALiquidatorInfo, RedemptionLog, RedemptionLoggerV310Contract, type RepayStrategyIntent, RequestableWithdrawal, type ResumableIntent, Rewards, type RouteRefusals, SetBotProps, SetBotResult, type StartIntent, type WithdrawAssetIntent, type WithdrawStrategyIntent, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, borrowable, calcDefaultQuota, calcQuotaUpdate, calcRecommendedQuota, createRedemptionLogger, createWithdrawalCompressor, decodeDelayedIntent, encodeDelayedIntent, fetchCreditAccountSlice, getWithdrawalCompressorAddress, iCreditAccountAbi, isPhantomToken, roundUpQuota, toClaimableWithdrawal, toCreditAccountSlice, toPendingWithdrawal, toRequestableWithdrawal, toWithdrawalStatus };
37
+ export { AbstractWithdrawalCompressorContract, AccountBotsService, type AccountCalculatorOperation, AccountToCheck, type AddCollateralIntent, type AdjustLeverageIntent, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, BotStatusCall, BotsDirectResponse, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, CalcDefaultQuotaProps, CalcQuotaUpdateProps, CalcRecommendedQuotaProps, ClaimFarmRewardsProps, ClaimableWithdrawal, CloseCreditAccountResult, ConnectedBotsCall, ConnectedBotsPerAccount, CreditAccountCompressor, CreditAccountCompressorV310Contract, CreditAccountDataCall, CreditAccountFilter, CreditAccountOperationResult, CreditAccountOperationsService, CreditAccountReadOptions, type CreditAccountSlice, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsServiceV310, CreditAccountsTarget, CreditManagerFilter, CreditManagerOperationResult, CurrentWithdrawals, DELAYED_INTENT_TYPES, DELAYED_INTENT_VERSION, type DelayableIntent, DelayedIntentExtended, type DelayedRoute, type DelayedStart, type DelayedStartResult, type DepositStrategyIntent, EncodableCreditAccountOperation, type FinishIntentProps, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetExternalAccountCurrentWithdrawalsProps, GetLiquidatableAccountsProps, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetWithdrawalRequestResultProps, ICreditAccountsService, IRedemptionLoggerContract, IWithdrawalCompressorContract, type InstantRoute, type IntentPreviewResult, type IntentRoutesResult, InvalidDelayedIntentError, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, type LeverageBand, LiquidationsService, LoadRWALiquidatorsProps, MulticallWithFailure, MultichainLiquidationsService, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OpenCAProps, OpenStrategyPreviewResult, type OpenStrategyProps, type OpenStrategyState, type OperationState, PartiallyLiquidateProps, type PathLossRate, PendingWithdrawal, PeripheryCompressorV310Contract, PreviewDelayedWithdrawalProps, RWALiquidatorInfo, RedemptionLog, RedemptionLoggerV310Contract, type RepayStrategyIntent, RequestableWithdrawal, type ResumableIntent, Rewards, type RouteRefusals, SetBotProps, SetBotResult, type StartIntent, type WithdrawAssetIntent, type WithdrawStrategyIntent, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, borrowable, calcDefaultQuota, calcQuotaUpdate, calcRecommendedQuota, createRedemptionLogger, createWithdrawalCompressor, decodeDelayedIntent, encodeDelayedIntent, fetchCreditAccountSlice, getWithdrawalCompressorAddress, iCreditAccountAbi, isPhantomToken, roundUpQuota, toClaimableWithdrawal, toCreditAccountSlice, toPendingWithdrawal, toRequestableWithdrawal, toWithdrawalStatus };
@@ -390,7 +390,8 @@ type FinishIntentProps = StartIntentProps & {
390
390
  intent: ResumableIntent;
391
391
  /**
392
392
  * The matured withdrawal, as reported by
393
- * `sdk.accounts.getPendingWithdrawals`.
393
+ * `sdk.positions.getCurrentWithdrawals` (mapped back to the compressor
394
+ * shape at `prepare.finalize`).
394
395
  */
395
396
  claimable: ClaimableWithdrawal;
396
397
  };
@@ -1,6 +1,6 @@
1
1
  import { DelayedIntent } from "../../model/delayed-intents.js";
2
2
  import "../../model/index.js";
3
- import { ClaimableWithdrawal, PendingWithdrawal, RequestableWithdrawal } from "./withdrawal-compressor/types.js";
3
+ import { ClaimableWithdrawal, RequestableWithdrawal } from "./withdrawal-compressor/types.js";
4
4
  import { Asset, CreditAccountData, CreditAccountTokensSlice, PermitResult } from "../base/types.js";
5
5
  import { GetOpenAccountRequirementsProps, RWAOpenAccountRequirements, RWAOperationArgs } from "../market/rwa/types.js";
6
6
  import "../market/rwa/index.js";
@@ -127,25 +127,6 @@ interface PreviewDelayedWithdrawalProps {
127
127
  withdrawalPhantomToken?: Address;
128
128
  intent?: DelayedIntent;
129
129
  }
130
- interface GetPendingWithdrawalsProps {
131
- /**
132
- * Minimal credit account data on which operation is performed
133
- */
134
- creditAccount: Address;
135
- }
136
- /**
137
- * Aggregated delayed withdrawal status, split into immediately claimable and still-pending entries.
138
- **/
139
- interface GetPendingWithdrawalsResult {
140
- /**
141
- * Withdrawals that have matured and can be claimed now.
142
- **/
143
- claimableNow: Array<ClaimableWithdrawal>;
144
- /**
145
- * Withdrawals that are still in their delay period.
146
- **/
147
- pending: Array<PendingWithdrawal>;
148
- }
149
130
  /**
150
131
  * Input for {@link ICreditAccountsService.assembleStartDelayedWithdrawalCalls}.
151
132
  */
@@ -499,12 +480,6 @@ interface ICreditAccountsService extends Construct {
499
480
  * @returns
500
481
  */
501
482
  previewDelayedWithdrawal(props: PreviewDelayedWithdrawalProps): Promise<RequestableWithdrawal>;
502
- /**
503
- * Get claimable and pending withdrawals of an account
504
- * @param props - {@link GetPendingWithdrawalsProps}
505
- * @returns
506
- */
507
- getPendingWithdrawals(props: GetPendingWithdrawalsProps): Promise<GetPendingWithdrawalsResult>;
508
483
  /**
509
484
  * Returns address to which approval should be given on collateral token
510
485
  * It's credit manager for classical markets and special wallet for RWA markets
@@ -672,4 +647,4 @@ interface ICreditAccountsService extends Construct {
672
647
  claimFarmRewards(props: ClaimFarmRewardsProps): Promise<RawTx>;
673
648
  }
674
649
  //#endregion
675
- export { AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, ClaimFarmRewardsProps, CloseCreditAccountResult, CreditAccountOperationResult, CreditManagerOperationResult, EncodableCreditAccountOperation, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, ICreditAccountsService, OpenCAProps, PartiallyLiquidateProps, PreviewDelayedWithdrawalProps, Rewards };
650
+ export { AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, ClaimFarmRewardsProps, CloseCreditAccountResult, CreditAccountOperationResult, CreditManagerOperationResult, EncodableCreditAccountOperation, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, ICreditAccountsService, OpenCAProps, PartiallyLiquidateProps, PreviewDelayedWithdrawalProps, Rewards };