@gearbox-protocol/sdk 14.12.0-next.77 → 14.12.0-next.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/model/primitives.schema.js +5 -4
- package/dist/cjs/preview/index.js +0 -1
- package/dist/cjs/preview/preview/buildDelayedPreview.js +4 -3
- package/dist/cjs/preview/preview/index.js +0 -1
- package/dist/cjs/preview/preview/previewAdjustCreditAccount.js +3 -2
- package/dist/cjs/preview/preview/types.js +0 -16
- package/dist/cjs/sdk/accounts/CreditAccountsServiceV310.js +12 -38
- package/dist/cjs/sdk/accounts/credit-account-compressor/CreditAccountCompressor.js +1 -1
- package/dist/cjs/sdk/index.js +3 -0
- package/dist/cjs/sdk/market/credit/CreditFacadeV310Contract.js +10 -0
- package/dist/cjs/sdk/market/credit/expectedBalanceDeltas.js +25 -0
- package/dist/cjs/sdk/market/credit/index.js +2 -0
- package/dist/cjs/sdk/market/index.js +2 -0
- package/dist/cjs/sdk/utils/index.js +1 -0
- package/dist/cjs/sdk/utils/zod.js +36 -14
- package/dist/esm/dev/AccountOpener.js +1 -1
- package/dist/esm/dev/withdrawalUtils.js +1 -1
- package/dist/esm/model/primitives.schema.js +6 -5
- package/dist/esm/plugins/adapters/contracts/ERC4626AdapterContract.js +1 -1
- package/dist/esm/preview/index.js +2 -2
- package/dist/esm/preview/preview/buildDelayedPreview.js +5 -4
- package/dist/esm/preview/preview/index.js +2 -2
- package/dist/esm/preview/preview/previewAdjustCreditAccount.js +4 -3
- package/dist/esm/preview/preview/types.js +1 -16
- package/dist/esm/preview/simulate/simulatePoolOperation.js +1 -1
- package/dist/esm/preview/trace/extractTransfers.js +1 -1
- package/dist/esm/sdk/accounts/CreditAccountsServiceV310.js +14 -40
- package/dist/esm/sdk/accounts/credit-account-compressor/CreditAccountCompressor.js +1 -1
- package/dist/esm/sdk/accounts/liquidations/LiquidationsService.js +1 -1
- package/dist/esm/sdk/accounts/withdrawal-compressor/RedemptionLoggerV310Contract.js +1 -1
- package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.js +1 -1
- package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.js +1 -1
- package/dist/esm/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.js +1 -1
- package/dist/esm/sdk/base/TokensMeta.js +2 -2
- package/dist/esm/sdk/chain/detectNetwork.js +1 -1
- package/dist/esm/sdk/core/createAddressProvider.js +1 -1
- package/dist/esm/sdk/index.js +3 -2
- package/dist/esm/sdk/market/credit/CreditFacadeV310BaseContract.js +1 -1
- package/dist/esm/sdk/market/credit/CreditFacadeV310Contract.js +10 -0
- package/dist/esm/sdk/market/credit/expectedBalanceDeltas.js +24 -0
- package/dist/esm/sdk/market/credit/index.js +2 -1
- package/dist/esm/sdk/market/index.js +2 -1
- package/dist/esm/sdk/market/pool/PoolV310Contract.js +1 -1
- package/dist/esm/sdk/market/zapper/IETHZapperContract.js +1 -1
- package/dist/esm/sdk/market/zapper/ZapperContract.js +1 -1
- package/dist/esm/sdk/pools/PoolService.js +1 -1
- package/dist/esm/sdk/utils/index.js +2 -2
- package/dist/esm/sdk/utils/viem/simulateWithPriceUpdates.js +1 -1
- package/dist/esm/sdk/utils/zod.js +36 -15
- package/dist/types/dev/AccountOpener.d.ts +1 -1
- package/dist/types/model/curators.schema.d.ts +1 -1
- package/dist/types/model/history.schema.d.ts +6 -6
- package/dist/types/model/liquidations.schema.d.ts +47 -47
- package/dist/types/model/opportunities.schema.d.ts +101 -101
- package/dist/types/model/positions.schema.d.ts +92 -92
- package/dist/types/model/primitives.d.ts +1 -0
- package/dist/types/model/primitives.schema.d.ts +9 -8
- package/dist/types/preview/index.d.ts +2 -2
- package/dist/types/preview/preview/index.d.ts +2 -2
- package/dist/types/preview/preview/types.d.ts +1 -16
- package/dist/types/sdk/OnchainSDK.d.ts +3 -3
- package/dist/types/sdk/accounts/CreditAccountsServiceV310.d.ts +8 -7
- package/dist/types/sdk/accounts/bots/types.d.ts +1 -1
- package/dist/types/sdk/accounts/credit-account-compressor/CreditAccountCompressor.d.ts +1 -1
- package/dist/types/sdk/accounts/credit-account-compressor/CreditAccountCompressorV310Contract.d.ts +1 -1
- package/dist/types/sdk/accounts/index.d.ts +2 -2
- package/dist/types/sdk/accounts/intents/operations/repay-credit-account/index.d.ts +1 -2
- package/dist/types/sdk/accounts/types.d.ts +8 -78
- package/dist/types/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.d.ts +1 -1
- package/dist/types/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.d.ts +1 -1
- package/dist/types/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.d.ts +1 -1
- package/dist/types/sdk/base/index.d.ts +2 -2
- package/dist/types/sdk/base/types.d.ts +42 -1
- package/dist/types/sdk/index.d.ts +25 -24
- package/dist/types/sdk/market/credit/CreditFacadeV310Contract.d.ts +6 -3
- package/dist/types/sdk/market/credit/CreditSuite.d.ts +2 -2
- package/dist/types/sdk/market/credit/expectedBalanceDeltas.d.ts +39 -0
- package/dist/types/sdk/market/credit/index.d.ts +3 -2
- package/dist/types/sdk/market/credit/types.d.ts +26 -3
- package/dist/types/sdk/market/index.d.ts +4 -3
- package/dist/types/sdk/market/rwa/index.d.ts +2 -2
- package/dist/types/sdk/market/rwa/securitize/SecuritizeRWAFactory.d.ts +1 -2
- package/dist/types/sdk/market/rwa/types.d.ts +11 -2
- package/dist/types/sdk/options.d.ts +4 -4
- package/dist/types/sdk/pools/types.d.ts +1 -12
- package/dist/types/sdk/utils/index.d.ts +2 -2
- package/dist/types/sdk/utils/zod.d.ts +7 -3
- package/package.json +1 -1
|
@@ -25,14 +25,15 @@ declare const bpsSchema: z.ZodNumber;
|
|
|
25
25
|
**/
|
|
26
26
|
declare const assetTypeSchema: z.ZodUnion<readonly [z.ZodLiteral<"Stable">, z.ZodLiteral<"ETH">, z.ZodLiteral<"BTC">]>;
|
|
27
27
|
/**
|
|
28
|
-
* {@link Leverage}
|
|
28
|
+
* {@link Leverage}. Nonnegative rather than positive: `0` is the backend's
|
|
29
|
+
* encoding of "leverage unavailable".
|
|
29
30
|
**/
|
|
30
31
|
declare const leverageSchema: z.ZodNumber;
|
|
31
32
|
/**
|
|
32
33
|
* {@link Amount}
|
|
33
34
|
**/
|
|
34
35
|
declare const amountSchema: z.ZodObject<{
|
|
35
|
-
value: z.ZodBigInt
|
|
36
|
+
value: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
|
|
36
37
|
valueUsd: z.ZodNullable<z.ZodNumber>;
|
|
37
38
|
}, z.core.$strip>;
|
|
38
39
|
/**
|
|
@@ -40,7 +41,7 @@ declare const amountSchema: z.ZodObject<{
|
|
|
40
41
|
**/
|
|
41
42
|
declare const tokenSchema: z.ZodObject<{
|
|
42
43
|
chainId: z.ZodNumber;
|
|
43
|
-
address: z.
|
|
44
|
+
address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
|
|
44
45
|
symbol: z.ZodString;
|
|
45
46
|
name: z.ZodString;
|
|
46
47
|
decimals: z.ZodNumber;
|
|
@@ -50,11 +51,11 @@ declare const tokenSchema: z.ZodObject<{
|
|
|
50
51
|
* {@link TokenAmount}
|
|
51
52
|
**/
|
|
52
53
|
declare const tokenAmountSchema: z.ZodObject<{
|
|
53
|
-
value: z.ZodBigInt
|
|
54
|
+
value: z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>;
|
|
54
55
|
valueUsd: z.ZodNullable<z.ZodNumber>;
|
|
55
56
|
token: z.ZodObject<{
|
|
56
57
|
chainId: z.ZodNumber;
|
|
57
|
-
address: z.
|
|
58
|
+
address: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
|
|
58
59
|
symbol: z.ZodString;
|
|
59
60
|
name: z.ZodString;
|
|
60
61
|
decimals: z.ZodNumber;
|
|
@@ -65,9 +66,9 @@ declare const tokenAmountSchema: z.ZodObject<{
|
|
|
65
66
|
* {@link TxCall}
|
|
66
67
|
**/
|
|
67
68
|
declare const txCallSchema: z.ZodObject<{
|
|
68
|
-
to: z.
|
|
69
|
-
callData: z.
|
|
70
|
-
value: z.ZodOptional<z.ZodBigInt
|
|
69
|
+
to: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
|
|
70
|
+
callData: z.ZodCodec<z.ZodString, z.ZodCustom<`0x${string}`, `0x${string}`>>;
|
|
71
|
+
value: z.ZodOptional<z.ZodCodec<z.ZodUnion<[z.ZodString, z.ZodBigInt]>, z.ZodBigInt>>;
|
|
71
72
|
}, z.core.$strip>;
|
|
72
73
|
//#endregion
|
|
73
74
|
export { amountSchema, assetTypeSchema, bpsSchema, chainIdSchema, leverageSchema, timestampSchema, tokenAmountSchema, tokenSchema, txCallSchema };
|
|
@@ -27,7 +27,7 @@ import { checkPrerequisites } from "./prerequisites/checkPrerequisites.js";
|
|
|
27
27
|
import "./prerequisites/index.js";
|
|
28
28
|
import { CreditAccountState, CreditAccountStateProps } from "./preview/CreditAccountState.js";
|
|
29
29
|
import { DetectedDelayedOperation, detectDelayedOperation } from "./preview/detectDelayedOperation.js";
|
|
30
|
-
import { AdjustCreditAccountPreview, CloseCreditAccountPreview, DelayedCreditAccountOperationPreview, ERROR_ADAPTER_CALL_OUTSIDE_BRACKET, ERROR_INVALID_TRANSACTION_VALUE, ERROR_MALFORMED_BRACKET, ERROR_NON_ADAPTER_CALL_IN_BRACKET, ERROR_UNPREVIEWABLE_ADAPTER_CALL, ERROR_UNPREVIEWABLE_RWA_WRAP_UNWRAP, ERROR_UNPRICEABLE_TOKEN, InstantOperationPreview, OpenCreditAccountPreview, OperationPreview, OperationPreviewError,
|
|
30
|
+
import { AdjustCreditAccountPreview, CloseCreditAccountPreview, DelayedCreditAccountOperationPreview, ERROR_ADAPTER_CALL_OUTSIDE_BRACKET, ERROR_INVALID_TRANSACTION_VALUE, ERROR_MALFORMED_BRACKET, ERROR_NON_ADAPTER_CALL_IN_BRACKET, ERROR_UNPREVIEWABLE_ADAPTER_CALL, ERROR_UNPREVIEWABLE_RWA_WRAP_UNWRAP, ERROR_UNPRICEABLE_TOKEN, InstantOperationPreview, OpenCreditAccountPreview, OperationPreview, OperationPreviewError, PoolOperationPreview, RepayCreditAccountPreview } from "./preview/types.js";
|
|
31
31
|
import { ConvertFn, buildDelayedPreview } from "./preview/buildDelayedPreview.js";
|
|
32
32
|
import { classifyCloseOrRepay, isCloseOrRepay } from "./preview/detectCloseOrRepay.js";
|
|
33
33
|
import { DetectedDelayedClaim, detectDelayedClaim, resolveDelayedClaimIntent } from "./preview/detectDelayedClaim.js";
|
|
@@ -38,4 +38,4 @@ import { previewOperation } from "./preview/previewOperation.js";
|
|
|
38
38
|
import { ReplayState, makeReplayState, replayInnerOperations } from "./preview/replayInnerOperations.js";
|
|
39
39
|
import { ReplayMulticallResult, ReplayableOperation, replayMulticall } from "./preview/replayMulticall.js";
|
|
40
40
|
import "./preview/index.js";
|
|
41
|
-
export { AdapterOperation, AdapterOperationBase, AddCollateralOp, AdjustCreditAccountPreview, AllowanceDetail, AllowancePrerequisite, AllowanceResult, BalanceDetail, BalancePrerequisite, BalanceResult, ClassifyInnerOperationsProps, CloseCreditAccountOperation, CloseCreditAccountPreview, CloseOrRepayOperation, CompareBalancesOp, ConvertFn, CreditAccountOperation, CreditAccountState, CreditAccountStateProps, DecreaseDebtOp, DelayedCreditAccountOperationPreview, DetectedDelayedClaim, DetectedDelayedOperation, DirectTokenTransferOperation, ERROR_ADAPTER_CALL_OUTSIDE_BRACKET, ERROR_INVALID_TRANSACTION_VALUE, ERROR_MALFORMED_BRACKET, ERROR_NON_ADAPTER_CALL_IN_BRACKET, ERROR_UNPREVIEWABLE_ADAPTER_CALL, ERROR_UNPREVIEWABLE_RWA_WRAP_UNWRAP, ERROR_UNPRICEABLE_TOKEN, ExtractTransfersResult, FacadeCallType, FacadeOperationMetadata, FacadeParsedCall, IncreaseDebtOp, InnerFacadeOperation, InnerOperation, InstantOperationPreview, LiquidateCreditAccountOperation, MulticallOperation, OpenCreditAccountOperation, OpenCreditAccountPreview, Operation, OperationMetadata, OperationPreview, OperationPreviewError, OuterFacadeOperation,
|
|
41
|
+
export { AdapterOperation, AdapterOperationBase, AddCollateralOp, AdjustCreditAccountPreview, AllowanceDetail, AllowancePrerequisite, AllowanceResult, BalanceDetail, BalancePrerequisite, BalanceResult, ClassifyInnerOperationsProps, CloseCreditAccountOperation, CloseCreditAccountPreview, CloseOrRepayOperation, CompareBalancesOp, ConvertFn, CreditAccountOperation, CreditAccountState, CreditAccountStateProps, DecreaseDebtOp, DelayedCreditAccountOperationPreview, DetectedDelayedClaim, DetectedDelayedOperation, DirectTokenTransferOperation, ERROR_ADAPTER_CALL_OUTSIDE_BRACKET, ERROR_INVALID_TRANSACTION_VALUE, ERROR_MALFORMED_BRACKET, ERROR_NON_ADAPTER_CALL_IN_BRACKET, ERROR_UNPREVIEWABLE_ADAPTER_CALL, ERROR_UNPREVIEWABLE_RWA_WRAP_UNWRAP, ERROR_UNPRICEABLE_TOKEN, ExtractTransfersResult, FacadeCallType, FacadeOperationMetadata, FacadeParsedCall, IncreaseDebtOp, InnerFacadeOperation, InnerOperation, InstantOperationPreview, LiquidateCreditAccountOperation, MulticallOperation, OpenCreditAccountOperation, OpenCreditAccountPreview, Operation, OperationMetadata, OperationPreview, OperationPreviewError, OuterFacadeOperation, PartialLiquidationOperation, PoolDepositOperation, PoolMintOperation, PoolOperation, PoolOperationPreview, PoolOperationType, PoolRedeemOperation, PoolWithdrawOperation, Prerequisite, PrerequisiteContext, PrerequisiteError, PrerequisiteKind, PrerequisiteOutcome, PrerequisiteResult, PreviewOperationInput, PreviewOperationOptions, RWAMulticallOperation, RWAOpenCreditAccountOperation, RWAOpenRequirementsDetail, RWAOpenRequirementsPrerequisite, RWAOpenRequirementsResult, RWAOperation, RWAOperationMetadata, RepayCreditAccountPreview, ReplayMulticallResult, ReplayState, ReplayableOperation, StoreExpectedBalancesOp, TokenTransfer, TraceAdapterExt, TransferAlignmentError, UnexpectedFacadeEventOrderError, UnknownAdapterError, UnknownFacadeCallError, UnsupportedOperationError, UnsupportedPoolFunctionError, UnsupportedTargetError, UnsupportedZapperFunctionError, UpdateQuotaOp, WithdrawCollateralAlignmentError, WithdrawCollateralEventInfo, WithdrawCollateralOp, buildDelayedPreview, checkPrerequisites, classifyCloseOrRepay, classifyInnerOperations, detectDelayedClaim, detectDelayedOperation, extractAdapterCallTraces, extractTransfers, findFacadeCalls, isCloseOrRepay, isPoolOperation, isRWAOperation, makeReplayState, parseFacadeOperationCalldata, parseOperationCalldata, parsePoolOperationCalldata, parseRWAFactoryOperationCalldata, previewAdjustCreditAccount, previewCloseOrRepayCreditAccount, previewOperation, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CreditAccountState, CreditAccountStateProps } from "./CreditAccountState.js";
|
|
2
2
|
import { DetectedDelayedOperation, detectDelayedOperation } from "./detectDelayedOperation.js";
|
|
3
|
-
import { AdjustCreditAccountPreview, CloseCreditAccountPreview, DelayedCreditAccountOperationPreview, ERROR_ADAPTER_CALL_OUTSIDE_BRACKET, ERROR_INVALID_TRANSACTION_VALUE, ERROR_MALFORMED_BRACKET, ERROR_NON_ADAPTER_CALL_IN_BRACKET, ERROR_UNPREVIEWABLE_ADAPTER_CALL, ERROR_UNPREVIEWABLE_RWA_WRAP_UNWRAP, ERROR_UNPRICEABLE_TOKEN, InstantOperationPreview, OpenCreditAccountPreview, OperationPreview, OperationPreviewError,
|
|
3
|
+
import { AdjustCreditAccountPreview, CloseCreditAccountPreview, DelayedCreditAccountOperationPreview, ERROR_ADAPTER_CALL_OUTSIDE_BRACKET, ERROR_INVALID_TRANSACTION_VALUE, ERROR_MALFORMED_BRACKET, ERROR_NON_ADAPTER_CALL_IN_BRACKET, ERROR_UNPREVIEWABLE_ADAPTER_CALL, ERROR_UNPREVIEWABLE_RWA_WRAP_UNWRAP, ERROR_UNPRICEABLE_TOKEN, InstantOperationPreview, OpenCreditAccountPreview, OperationPreview, OperationPreviewError, PoolOperationPreview, RepayCreditAccountPreview } from "./types.js";
|
|
4
4
|
import { ConvertFn, buildDelayedPreview } from "./buildDelayedPreview.js";
|
|
5
5
|
import { classifyCloseOrRepay, isCloseOrRepay } from "./detectCloseOrRepay.js";
|
|
6
6
|
import { DetectedDelayedClaim, detectDelayedClaim, resolveDelayedClaimIntent } from "./detectDelayedClaim.js";
|
|
@@ -10,4 +10,4 @@ import { CloseOrRepayOperation, previewCloseOrRepayCreditAccount } from "./previ
|
|
|
10
10
|
import { previewOperation } from "./previewOperation.js";
|
|
11
11
|
import { ReplayState, makeReplayState, replayInnerOperations } from "./replayInnerOperations.js";
|
|
12
12
|
import { ReplayMulticallResult, ReplayableOperation, replayMulticall } from "./replayMulticall.js";
|
|
13
|
-
export { AdjustCreditAccountPreview, CloseCreditAccountPreview, CloseOrRepayOperation, ConvertFn, CreditAccountState, CreditAccountStateProps, DelayedCreditAccountOperationPreview, DetectedDelayedClaim, DetectedDelayedOperation, ERROR_ADAPTER_CALL_OUTSIDE_BRACKET, ERROR_INVALID_TRANSACTION_VALUE, ERROR_MALFORMED_BRACKET, ERROR_NON_ADAPTER_CALL_IN_BRACKET, ERROR_UNPREVIEWABLE_ADAPTER_CALL, ERROR_UNPREVIEWABLE_RWA_WRAP_UNWRAP, ERROR_UNPRICEABLE_TOKEN, InstantOperationPreview, OpenCreditAccountPreview, OperationPreview, OperationPreviewError,
|
|
13
|
+
export { AdjustCreditAccountPreview, CloseCreditAccountPreview, CloseOrRepayOperation, ConvertFn, CreditAccountState, CreditAccountStateProps, DelayedCreditAccountOperationPreview, DetectedDelayedClaim, DetectedDelayedOperation, ERROR_ADAPTER_CALL_OUTSIDE_BRACKET, ERROR_INVALID_TRANSACTION_VALUE, ERROR_MALFORMED_BRACKET, ERROR_NON_ADAPTER_CALL_IN_BRACKET, ERROR_UNPREVIEWABLE_ADAPTER_CALL, ERROR_UNPREVIEWABLE_RWA_WRAP_UNWRAP, ERROR_UNPRICEABLE_TOKEN, InstantOperationPreview, OpenCreditAccountPreview, OperationPreview, OperationPreviewError, PoolOperationPreview, RepayCreditAccountPreview, ReplayMulticallResult, ReplayState, ReplayableOperation, UnsupportedOperationError, buildDelayedPreview, classifyCloseOrRepay, detectDelayedClaim, detectDelayedOperation, isCloseOrRepay, makeReplayState, previewAdjustCreditAccount, previewCloseOrRepayCreditAccount, previewOperation, replayInnerOperations, replayMulticall, resolveDelayedClaimIntent };
|
|
@@ -37,21 +37,6 @@ declare const ERROR_UNPREVIEWABLE_RWA_WRAP_UNWRAP = 1005;
|
|
|
37
37
|
declare const ERROR_INVALID_TRANSACTION_VALUE = 1006;
|
|
38
38
|
/** A token in the preview could not be priced by the oracle */
|
|
39
39
|
declare const ERROR_UNPRICEABLE_TOKEN = 2001;
|
|
40
|
-
/**
|
|
41
|
-
* Dust threshold for replayed preview balances and balance changes.
|
|
42
|
-
*
|
|
43
|
-
* Multicalls assembled by `CreditAccountsServiceV310` subtract a 10-unit
|
|
44
|
-
* safety buffer from every expected output token in their
|
|
45
|
-
* `storeExpectedBalances` deltas (`amount - 10n` in
|
|
46
|
-
* `assembleStartDelayedWithdrawalCalls`/`assembleClaimDelayedCalls`), while
|
|
47
|
-
* subsequent calls in the same multicall spend exact on-chain amounts. A
|
|
48
|
-
* replay that credits only the min-guarantee can therefore be off by up to
|
|
49
|
-
* 10 units per token, including small negative residues that are impossible
|
|
50
|
-
* on-chain. Amounts within this threshold (in absolute value) are filtered
|
|
51
|
-
* from preview outputs; anything beyond it is a genuine discrepancy and is
|
|
52
|
-
* reported.
|
|
53
|
-
*/
|
|
54
|
-
declare const PREVIEW_DUST = 10n;
|
|
55
40
|
/**
|
|
56
41
|
* Non-throwing preview failure. When set on a preview, all fields are still
|
|
57
42
|
* computed best-effort, but some of them may be unreliable.
|
|
@@ -337,4 +322,4 @@ interface DelayedCreditAccountOperationPreview {
|
|
|
337
322
|
*/
|
|
338
323
|
type OperationPreview = PoolOperationPreview | OpenCreditAccountPreview | AdjustCreditAccountPreview | CloseCreditAccountPreview | RepayCreditAccountPreview | DelayedCreditAccountOperationPreview;
|
|
339
324
|
//#endregion
|
|
340
|
-
export { AdjustCreditAccountPreview, CloseCreditAccountPreview, DelayedCreditAccountOperationPreview, ERROR_ADAPTER_CALL_OUTSIDE_BRACKET, ERROR_INVALID_TRANSACTION_VALUE, ERROR_MALFORMED_BRACKET, ERROR_NON_ADAPTER_CALL_IN_BRACKET, ERROR_UNPREVIEWABLE_ADAPTER_CALL, ERROR_UNPREVIEWABLE_RWA_WRAP_UNWRAP, ERROR_UNPRICEABLE_TOKEN, InstantOperationPreview, OpenCreditAccountPreview, OperationPreview, OperationPreviewError,
|
|
325
|
+
export { AdjustCreditAccountPreview, CloseCreditAccountPreview, DelayedCreditAccountOperationPreview, ERROR_ADAPTER_CALL_OUTSIDE_BRACKET, ERROR_INVALID_TRANSACTION_VALUE, ERROR_MALFORMED_BRACKET, ERROR_NON_ADAPTER_CALL_IN_BRACKET, ERROR_UNPREVIEWABLE_ADAPTER_CALL, ERROR_UNPREVIEWABLE_RWA_WRAP_UNWRAP, ERROR_UNPRICEABLE_TOKEN, InstantOperationPreview, OpenCreditAccountPreview, OperationPreview, OperationPreviewError, PoolOperationPreview, RepayCreditAccountPreview };
|
|
@@ -7,15 +7,14 @@ import "./constants/index.js";
|
|
|
7
7
|
import { PluginsMap } from "./plugins/types.js";
|
|
8
8
|
import "./plugins/index.js";
|
|
9
9
|
import { RWARegistry } from "./market/rwa/RWARegistry.js";
|
|
10
|
-
import { IRouterContract } from "./router/types.js";
|
|
11
|
-
import "./router/index.js";
|
|
12
|
-
import { ICreditAccountsService } from "./accounts/types.js";
|
|
13
10
|
import { GearboxStateHuman } from "./types/state-human.js";
|
|
14
11
|
import { PythOptions } from "./market/pricefeeds/updates/PythUpdater.js";
|
|
15
12
|
import { RedstoneOptions } from "./market/pricefeeds/updates/RedstoneUpdater.js";
|
|
16
13
|
import "./market/pricefeeds/updates/index.js";
|
|
17
14
|
import { PriceFeedRegister } from "./market/pricefeeds/PriceFeedsRegister.js";
|
|
18
15
|
import "./market/pricefeeds/index.js";
|
|
16
|
+
import { IRouterContract } from "./router/types.js";
|
|
17
|
+
import "./router/index.js";
|
|
19
18
|
import { MarketRegister } from "./market/MarketRegister.js";
|
|
20
19
|
import "./market/index.js";
|
|
21
20
|
import { OpportunitiesService } from "./opportunities/OpportunitiesService.js";
|
|
@@ -30,6 +29,7 @@ import "./core/index.js";
|
|
|
30
29
|
import { GearboxState } from "./types/state.js";
|
|
31
30
|
import "./types/index.js";
|
|
32
31
|
import "./base/index.js";
|
|
32
|
+
import { ICreditAccountsService } from "./accounts/types.js";
|
|
33
33
|
import { LiquidationsService } from "./accounts/liquidations/LiquidationsService.js";
|
|
34
34
|
import "./accounts/index.js";
|
|
35
35
|
import { Address, PublicClient, Transport } from "viem";
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { RequestableWithdrawal } from "./withdrawal-compressor/types.js";
|
|
2
|
-
import { Asset, CreditAccountData, CreditAccountTokensSlice } from "../base/types.js";
|
|
2
|
+
import { Asset, CreditAccountData, CreditAccountTokensSlice, PermitResult } from "../base/types.js";
|
|
3
3
|
import { StrategyPosition } from "../../model/positions.js";
|
|
4
4
|
import "../../model/index.js";
|
|
5
|
-
import { RWAOpenAccountRequirements } from "../market/rwa/types.js";
|
|
5
|
+
import { GetOpenAccountRequirementsProps, RWAOpenAccountRequirements } from "../market/rwa/types.js";
|
|
6
6
|
import "../market/rwa/index.js";
|
|
7
|
+
import { PriceUpdate } from "../market/pricefeeds/types.js";
|
|
8
|
+
import { PrepareUpdateQuotasProps } from "../market/credit/types.js";
|
|
7
9
|
import { RouterCASlice } from "../router/types.js";
|
|
8
10
|
import "../router/index.js";
|
|
9
|
-
import { GetCreditAccountsOptions, ListStrategyPositionsProps } from "./credit-account-compressor/types.js";
|
|
10
|
-
import "./credit-account-compressor/index.js";
|
|
11
|
-
import "./withdrawal-compressor/index.js";
|
|
12
|
-
import { AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, ClaimFarmRewardsProps, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, GetOpenAccountRequirementsProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, ICreditAccountsService, OpenCAProps, PartiallyLiquidateProps, PermitResult, PrepareUpdateQuotasProps, PreviewDelayedWithdrawalProps, Rewards } from "./types.js";
|
|
13
|
-
import { PriceUpdate } from "../market/pricefeeds/types.js";
|
|
14
11
|
import "../market/index.js";
|
|
15
12
|
import { MultiCall, RawTx } from "../types/transactions.js";
|
|
16
13
|
import { OnchainSDK } from "../OnchainSDK.js";
|
|
17
14
|
import "../types/index.js";
|
|
18
15
|
import { SDKConstruct } from "../base/SDKConstruct.js";
|
|
19
16
|
import "../base/index.js";
|
|
17
|
+
import { GetCreditAccountsOptions, ListStrategyPositionsProps } from "./credit-account-compressor/types.js";
|
|
18
|
+
import "./credit-account-compressor/index.js";
|
|
19
|
+
import "./withdrawal-compressor/index.js";
|
|
20
|
+
import { AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, ClaimFarmRewardsProps, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, ICreditAccountsService, OpenCAProps, PartiallyLiquidateProps, PreviewDelayedWithdrawalProps, Rewards } from "./types.js";
|
|
20
21
|
import { AccountBotsService } from "./bots/AccountBotsService.js";
|
|
21
22
|
import "./bots/index.js";
|
|
22
23
|
import { Address } from "viem";
|
|
@@ -3,8 +3,8 @@ import { peripheryCompressorAbi } from "../../../abi/compressors/peripheryCompre
|
|
|
3
3
|
import { ConnectedBotData } from "../../base/types.js";
|
|
4
4
|
import { RouterCASlice } from "../../router/types.js";
|
|
5
5
|
import "../../router/index.js";
|
|
6
|
-
import { CreditAccountOperationResult, CreditManagerOperationResult } from "../types.js";
|
|
7
6
|
import "../../base/index.js";
|
|
7
|
+
import { CreditAccountOperationResult, CreditManagerOperationResult } from "../types.js";
|
|
8
8
|
import { Address, ContractFunctionParameters } from "viem";
|
|
9
9
|
//#region src/sdk/accounts/bots/types.d.ts
|
|
10
10
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CreditAccountData } from "../../base/types.js";
|
|
2
2
|
import { StrategyPosition } from "../../../model/positions.js";
|
|
3
3
|
import "../../../model/index.js";
|
|
4
|
-
import { GetCreditAccountsOptions, ListStrategyPositionsProps } from "./types.js";
|
|
5
4
|
import { SDKConstruct } from "../../base/SDKConstruct.js";
|
|
6
5
|
import "../../base/index.js";
|
|
6
|
+
import { GetCreditAccountsOptions, ListStrategyPositionsProps } from "./types.js";
|
|
7
7
|
import { Address } from "viem";
|
|
8
8
|
//#region src/sdk/accounts/credit-account-compressor/CreditAccountCompressor.d.ts
|
|
9
9
|
/**
|
package/dist/types/sdk/accounts/credit-account-compressor/CreditAccountCompressorV310Contract.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CreditAccountData } from "../../base/types.js";
|
|
2
|
-
import { CreditAccountDataCall, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsTarget, GetCreditAccountsArgs } from "./types.js";
|
|
3
2
|
import { OnchainSDK } from "../../OnchainSDK.js";
|
|
4
3
|
import { BaseContract } from "../../base/BaseContract.js";
|
|
5
4
|
import "../../base/index.js";
|
|
5
|
+
import { CreditAccountDataCall, CreditAccountsCall, CreditAccountsQuery, CreditAccountsReadOptions, CreditAccountsTarget, GetCreditAccountsArgs } from "./types.js";
|
|
6
6
|
import { Address } from "viem";
|
|
7
7
|
//#region src/sdk/accounts/credit-account-compressor/CreditAccountCompressorV310Contract.d.ts
|
|
8
8
|
declare const abi: readonly [{
|
|
@@ -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,
|
|
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";
|
|
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";
|
|
@@ -28,4 +28,4 @@ import { BuildLiquidationTxProps, BuildLiquidationTxPropsBase, GetLiquidatableAc
|
|
|
28
28
|
import { LiquidationsService } from "./liquidations/LiquidationsService.js";
|
|
29
29
|
import { MultichainLiquidationsService } from "./liquidations/MultichainLiquidationsService.js";
|
|
30
30
|
import "./liquidations/index.js";
|
|
31
|
-
export { AbstractWithdrawalCompressorContract, AccountBotsService, AccountToCheck, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, BotStatusCall, BotsDirectResponse, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, 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, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedWithdrawCollateralIntent, EncodableCreditAccountOperation, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase,
|
|
31
|
+
export { AbstractWithdrawalCompressorContract, AccountBotsService, AccountToCheck, AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, BotStatusCall, BotsDirectResponse, BuildLiquidationTxProps, BuildLiquidationTxPropsBase, CMSlice, 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, DelayedAddCollateralIntent, DelayedCloseAccountIntent, DelayedDecreaseLeverageIntent, DelayedDepositAndIncreaseLeverageIntent, DelayedDepositIntent, DelayedIncreaseLeverageIntent, DelayedIntent, DelayedIntentExtended, DelayedWithdrawCollateralIntent, EncodableCreditAccountOperation, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, GetConnectedBotsResponse, GetConnectedBotsResult, GetConnectedMigrationBotsResult, GetCreditAccountsArgs, GetCreditAccountsOptions, GetLiquidatableAccountsProps, GetLiquidatableAccountsPropsBase, GetLiquidationDetailsProps, GetLiquidationDetailsPropsBase, GetLiquidationPositionsProps, GetLiquidationPositionsPropsBase, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, GetWithdrawalRequestResultProps, ICreditAccountsService, IRedemptionLoggerContract, IWithdrawalCompressorContract, type IntentPreviewResult, InvalidDelayedIntentError, LIQUIDATION_APPROVAL_BUFFER, LIQUIDATION_COMPRESSOR_V313_ADDRESS, LiquidationsService, ListStrategyPositionsProps, LoadRWALiquidatorsProps, MulticallWithFailure, MultichainLiquidationsService, OnchainLiquidationCall, OnchainLiquidationData, OnchainLiquidationOutput, OnchainRequestableWithdrawal, OpenCAProps, PartiallyLiquidateProps, PendingWithdrawal, PeripheryCompressorV310Contract, PreviewDelayedWithdrawalProps, RWALiquidatorInfo, RedemptionLog, RedemptionLoggerV310Contract, RequestableWithdrawal, Rewards, SetBotProps, SetBotResult, WithdrawableAsset, WithdrawalCompressorLocation, WithdrawalCompressorV310Contract, WithdrawalCompressorV311Contract, WithdrawalCompressorV313Contract, WithdrawalCompressorVersion, WithdrawalOutput, WithdrawalStatus, WithdrawalsState, createRedemptionLogger, createWithdrawalCompressor, decodeDelayedIntent, encodeDelayedIntent, getWithdrawalCompressorAddress, iCreditAccountAbi, primaryInstantOutput, toClaimableWithdrawal, toPendingWithdrawal, toRequestableWithdrawal, toWithdrawalStatus };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Asset } from "../../../../base/types.js";
|
|
1
|
+
import { Asset, PermitResult } from "../../../../base/types.js";
|
|
2
2
|
import { RouterCASlice } from "../../../../router/types.js";
|
|
3
|
-
import { PermitResult } from "../../../types.js";
|
|
4
3
|
import { MultiCall } from "../../../../types/transactions.js";
|
|
5
4
|
import { OnchainSDK } from "../../../../OnchainSDK.js";
|
|
6
5
|
import "../../../../index.js";
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
import { ClaimableWithdrawal, DelayedIntent, PendingWithdrawal, RequestableWithdrawal } from "./withdrawal-compressor/types.js";
|
|
2
|
-
import { Asset, CreditAccountData, CreditAccountTokensSlice } from "../base/types.js";
|
|
2
|
+
import { Asset, CreditAccountData, CreditAccountTokensSlice, PermitResult } from "../base/types.js";
|
|
3
3
|
import { StrategyPosition } from "../../model/positions.js";
|
|
4
4
|
import "../../model/index.js";
|
|
5
|
-
import { RWAOpenAccountRequirements, RWAOperationArgs } from "../market/rwa/types.js";
|
|
5
|
+
import { GetOpenAccountRequirementsProps, RWAOpenAccountRequirements, RWAOperationArgs } from "../market/rwa/types.js";
|
|
6
6
|
import "../market/rwa/index.js";
|
|
7
|
+
import { PriceUpdate } from "../market/pricefeeds/types.js";
|
|
8
|
+
import { PartialLiquidationParams, PrepareUpdateQuotasProps } from "../market/credit/types.js";
|
|
7
9
|
import { RouterCASlice, RouterCloseResult } from "../router/types.js";
|
|
8
10
|
import "../router/index.js";
|
|
9
|
-
import { GetCreditAccountsOptions, ListStrategyPositionsProps } from "./credit-account-compressor/types.js";
|
|
10
|
-
import "./credit-account-compressor/index.js";
|
|
11
|
-
import "./withdrawal-compressor/index.js";
|
|
12
|
-
import { PriceUpdate } from "../market/pricefeeds/types.js";
|
|
13
|
-
import { PartialLiquidationParams } from "../market/credit/types.js";
|
|
14
11
|
import { CreditSuite } from "../market/credit/CreditSuite.js";
|
|
15
12
|
import "../market/index.js";
|
|
16
13
|
import { MultiCall, RawTx } from "../types/transactions.js";
|
|
@@ -18,6 +15,9 @@ import { OnchainSDK } from "../OnchainSDK.js";
|
|
|
18
15
|
import { Construct } from "../base/Construct.js";
|
|
19
16
|
import "../types/index.js";
|
|
20
17
|
import "../base/index.js";
|
|
18
|
+
import { GetCreditAccountsOptions, ListStrategyPositionsProps } from "./credit-account-compressor/types.js";
|
|
19
|
+
import "./credit-account-compressor/index.js";
|
|
20
|
+
import "./withdrawal-compressor/index.js";
|
|
21
21
|
import { AccountBotsService } from "./bots/AccountBotsService.js";
|
|
22
22
|
import "./bots/index.js";
|
|
23
23
|
import { Address, Hex } from "viem";
|
|
@@ -106,25 +106,6 @@ type AssembleRepayCreditAccountCallsProps = {
|
|
|
106
106
|
*/
|
|
107
107
|
calls?: Array<MultiCall>;
|
|
108
108
|
};
|
|
109
|
-
/**
|
|
110
|
-
* Quota `Asset.balance` values are denominated in **pool underlying token
|
|
111
|
-
* units**, not in the quoted token's own units.
|
|
112
|
-
**/
|
|
113
|
-
interface PrepareUpdateQuotasProps {
|
|
114
|
-
/**
|
|
115
|
-
* Average quota for desired token, in pool underlying units
|
|
116
|
-
* (see {@link PrepareUpdateQuotasProps})
|
|
117
|
-
*/
|
|
118
|
-
averageQuota: Array<Asset>;
|
|
119
|
-
/**
|
|
120
|
-
* Minimum quota for desired token, in pool underlying units.
|
|
121
|
-
* The credit facade rounds quota changes down to a multiple of
|
|
122
|
-
* `PERCENTAGE_FACTOR`; the min quota bound must not exceed the rounded
|
|
123
|
-
* value, otherwise the quota keeper reverts with
|
|
124
|
-
* `QuotaIsOutOfBoundsException`.
|
|
125
|
-
*/
|
|
126
|
-
minQuota: Array<Asset>;
|
|
127
|
-
}
|
|
128
109
|
interface PreviewDelayedWithdrawalProps {
|
|
129
110
|
/**
|
|
130
111
|
* Amount of source token (ex. cp0xlrt)
|
|
@@ -313,47 +294,6 @@ interface PartiallyLiquidateProps extends PartialLiquidationParams {
|
|
|
313
294
|
*/
|
|
314
295
|
to: Address;
|
|
315
296
|
}
|
|
316
|
-
/**
|
|
317
|
-
* EIP-2612 permit signature data for a token, enabling gasless approval for credit account operations.
|
|
318
|
-
**/
|
|
319
|
-
interface PermitResult {
|
|
320
|
-
/**
|
|
321
|
-
* ECDSA signature `r` component.
|
|
322
|
-
**/
|
|
323
|
-
r: Address;
|
|
324
|
-
/**
|
|
325
|
-
* ECDSA signature `s` component.
|
|
326
|
-
**/
|
|
327
|
-
s: Address;
|
|
328
|
-
/**
|
|
329
|
-
* ECDSA signature `v` component.
|
|
330
|
-
**/
|
|
331
|
-
v: number;
|
|
332
|
-
/**
|
|
333
|
-
* Token address the permit is for.
|
|
334
|
-
**/
|
|
335
|
-
token: Address;
|
|
336
|
-
/**
|
|
337
|
-
* Address of the token holder granting the permit.
|
|
338
|
-
**/
|
|
339
|
-
owner: Address;
|
|
340
|
-
/**
|
|
341
|
-
* Address authorized to spend the tokens.
|
|
342
|
-
**/
|
|
343
|
-
spender: Address;
|
|
344
|
-
/**
|
|
345
|
-
* Amount of tokens approved.
|
|
346
|
-
**/
|
|
347
|
-
value: bigint;
|
|
348
|
-
/**
|
|
349
|
-
* Timestamp after which the permit expires.
|
|
350
|
-
**/
|
|
351
|
-
deadline: bigint;
|
|
352
|
-
/**
|
|
353
|
-
* Owner's current permit nonce.
|
|
354
|
-
**/
|
|
355
|
-
nonce: bigint;
|
|
356
|
-
}
|
|
357
297
|
/**
|
|
358
298
|
* Claimable reward tokens associated with a single staking adapter and phantom token pair.
|
|
359
299
|
**/
|
|
@@ -375,16 +315,6 @@ interface Rewards {
|
|
|
375
315
|
**/
|
|
376
316
|
rewards: Array<Asset>;
|
|
377
317
|
}
|
|
378
|
-
/**
|
|
379
|
-
* Options to get open account requirements
|
|
380
|
-
* Compatible with StrategyConfigPayload
|
|
381
|
-
*/
|
|
382
|
-
interface GetOpenAccountRequirementsProps {
|
|
383
|
-
/**
|
|
384
|
-
* Token address of the strategy
|
|
385
|
-
*/
|
|
386
|
-
tokenOutAddress: Address;
|
|
387
|
-
}
|
|
388
318
|
/**
|
|
389
319
|
* Options to get approval address for collateral token
|
|
390
320
|
*/
|
|
@@ -737,4 +667,4 @@ interface ICreditAccountsService extends Construct {
|
|
|
737
667
|
claimFarmRewards(props: ClaimFarmRewardsProps): Promise<RawTx>;
|
|
738
668
|
}
|
|
739
669
|
//#endregion
|
|
740
|
-
export { AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, ClaimFarmRewardsProps, CloseCreditAccountResult, CreditAccountOperationResult, CreditManagerOperationResult, EncodableCreditAccountOperation, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps,
|
|
670
|
+
export { AssembleCaOperationsProps, AssembleClaimDelayedCallsProps, AssembleCloseCreditAccountCallsProps, AssembleRepayCreditAccountCallsProps, AssembleStartDelayedWithdrawalCallsProps, ClaimFarmRewardsProps, CloseCreditAccountResult, CreditAccountOperationResult, CreditManagerOperationResult, EncodableCreditAccountOperation, FullyLiquidateProps, FullyLiquidateResult, GetApprovalAddressProps, GetPendingWithdrawalsProps, GetPendingWithdrawalsResult, ICreditAccountsService, OpenCAProps, PartiallyLiquidateProps, PreviewDelayedWithdrawalProps, Rewards };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
|
|
2
1
|
import { OnchainSDK } from "../../OnchainSDK.js";
|
|
2
|
+
import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
|
|
3
3
|
import { Address } from "viem";
|
|
4
4
|
//#region src/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV310Contract.d.ts
|
|
5
5
|
declare const abi: readonly [{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
|
|
2
1
|
import { OnchainSDK } from "../../OnchainSDK.js";
|
|
2
|
+
import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
|
|
3
3
|
import { Address } from "viem";
|
|
4
4
|
//#region src/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV311Contract.d.ts
|
|
5
5
|
declare const abi: readonly [{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CurrentWithdrawals, GetWithdrawalRequestResultProps, RequestableWithdrawal, WithdrawalStatus } from "./types.js";
|
|
2
|
-
import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
|
|
3
2
|
import { OnchainSDK } from "../../OnchainSDK.js";
|
|
3
|
+
import { AbstractWithdrawalCompressorContract } from "./AbstractWithdrawalCompressorContract.js";
|
|
4
4
|
import { Address } from "viem";
|
|
5
5
|
//#region src/sdk/accounts/withdrawal-compressor/WithdrawalCompressorV313Contract.d.ts
|
|
6
6
|
declare const abi: readonly [{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AdapterData, AssertAssignable, Asset, BaseParams, BaseState, ConnectedBotData, CreditAccountData, CreditAccountDataPayload, CreditAccountTokensSlice, CreditConfiguratorState, CreditFacadeState, CreditManagerDebtParams, CreditManagerState, CreditSuiteState, GaugeData, IBaseContract, MarketData, MarketFilter, ParsedCall, ParsedCallArgs, ParsedCallV2, PoolState, PriceFeedAnswer, PriceFeedMapEntry, PriceFeedTreeNode, PriceOracleData, QuotaKeeperState, QuotaState, RateKeeperState, RelaxedBaseParams, RewardInfo, TokenInfo, Unarray, VotingContractStatus } from "./types.js";
|
|
1
|
+
import { AdapterData, AssertAssignable, Asset, BaseParams, BaseState, ConnectedBotData, CreditAccountData, CreditAccountDataPayload, CreditAccountTokensSlice, CreditConfiguratorState, CreditFacadeState, CreditManagerDebtParams, CreditManagerState, CreditSuiteState, GaugeData, IBaseContract, MarketData, MarketFilter, ParsedCall, ParsedCallArgs, ParsedCallV2, PermitResult, PoolState, PriceFeedAnswer, PriceFeedMapEntry, PriceFeedTreeNode, PriceOracleData, QuotaKeeperState, QuotaState, RateKeeperState, RelaxedBaseParams, RewardInfo, TokenInfo, Unarray, VotingContractStatus } from "./types.js";
|
|
2
2
|
import { LPMonopolizedPoolMeta, PHANTOM_TOKEN_CONTRACT_TYPES, PhantomTokenContractType, PhantomTokenMeta, RWADefaultTokenMeta, RWAOnDemandLPMeta, RWAOnDemandLPMonopolizedMeta, RWAOnDemandLpContractType, RWAOnDemandTokenMeta, RWATokenMeta, RWAUnderlyingContractType, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, SimpleTokenMeta, TokenMetaData } from "./token-types.js";
|
|
3
3
|
import { FormatBNOptions, TokensMeta } from "./TokensMeta.js";
|
|
4
4
|
import { ChainContractsRegister, ContractOrInterface } from "./ChainContractsRegister.js";
|
|
@@ -8,4 +8,4 @@ import { MissingSerializedParamsError } from "./errors.js";
|
|
|
8
8
|
import { ChainQueryProps, MultichainConstruct } from "./MultichainConstruct.js";
|
|
9
9
|
import { PlaceholderContract } from "./PlaceholderContract.js";
|
|
10
10
|
import { SDKConstruct } from "./SDKConstruct.js";
|
|
11
|
-
export { AdapterData, AssertAssignable, Asset, BaseContract, BaseContractArgs, BaseParams, BaseState, ChainContractsRegister, ChainQueryProps, ConnectedBotData, Construct, ConstructOptions, ContractOrInterface, ContractParseError, ContractParseErrorOptions, CreditAccountData, CreditAccountDataPayload, CreditAccountTokensSlice, CreditConfiguratorState, CreditFacadeState, CreditManagerDebtParams, CreditManagerState, CreditSuiteState, FormatBNOptions, GaugeData, IBaseContract, LPMonopolizedPoolMeta, MarketData, MarketFilter, MissingSerializedParamsError, MultichainConstruct, PHANTOM_TOKEN_CONTRACT_TYPES, ParsedCall, ParsedCallArgs, ParsedCallV2, PhantomTokenContractType, PhantomTokenMeta, PlaceholderContract, PoolState, PriceFeedAnswer, PriceFeedMapEntry, PriceFeedTreeNode, PriceOracleData, QuotaKeeperState, QuotaState, RWADefaultTokenMeta, RWAOnDemandLPMeta, RWAOnDemandLPMonopolizedMeta, RWAOnDemandLpContractType, RWAOnDemandTokenMeta, RWATokenMeta, RWAUnderlyingContractType, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RateKeeperState, RelaxedBaseParams, RewardInfo, SDKConstruct, SimpleTokenMeta, TokenInfo, TokenMetaData, TokensMeta, Unarray, VotingContractStatus };
|
|
11
|
+
export { AdapterData, AssertAssignable, Asset, BaseContract, BaseContractArgs, BaseParams, BaseState, ChainContractsRegister, ChainQueryProps, ConnectedBotData, Construct, ConstructOptions, ContractOrInterface, ContractParseError, ContractParseErrorOptions, CreditAccountData, CreditAccountDataPayload, CreditAccountTokensSlice, CreditConfiguratorState, CreditFacadeState, CreditManagerDebtParams, CreditManagerState, CreditSuiteState, FormatBNOptions, GaugeData, IBaseContract, LPMonopolizedPoolMeta, MarketData, MarketFilter, MissingSerializedParamsError, MultichainConstruct, PHANTOM_TOKEN_CONTRACT_TYPES, ParsedCall, ParsedCallArgs, ParsedCallV2, PermitResult, PhantomTokenContractType, PhantomTokenMeta, PlaceholderContract, PoolState, PriceFeedAnswer, PriceFeedMapEntry, PriceFeedTreeNode, PriceOracleData, QuotaKeeperState, QuotaState, RWADefaultTokenMeta, RWAOnDemandLPMeta, RWAOnDemandLPMonopolizedMeta, RWAOnDemandLpContractType, RWAOnDemandTokenMeta, RWATokenMeta, RWAUnderlyingContractType, RWA_ON_DEMAND_LP_MONOPOLIZED, RWA_UNDERLYING_DEFAULT, RWA_UNDERLYING_ON_DEMAND, RateKeeperState, RelaxedBaseParams, RewardInfo, SDKConstruct, SimpleTokenMeta, TokenInfo, TokenMetaData, TokensMeta, Unarray, VotingContractStatus };
|
|
@@ -103,6 +103,47 @@ interface Asset {
|
|
|
103
103
|
**/
|
|
104
104
|
balance: bigint;
|
|
105
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* EIP-2612 permit signature data for a token, enabling gasless approval for credit account operations.
|
|
108
|
+
**/
|
|
109
|
+
interface PermitResult {
|
|
110
|
+
/**
|
|
111
|
+
* ECDSA signature `r` component.
|
|
112
|
+
**/
|
|
113
|
+
r: Address;
|
|
114
|
+
/**
|
|
115
|
+
* ECDSA signature `s` component.
|
|
116
|
+
**/
|
|
117
|
+
s: Address;
|
|
118
|
+
/**
|
|
119
|
+
* ECDSA signature `v` component.
|
|
120
|
+
**/
|
|
121
|
+
v: number;
|
|
122
|
+
/**
|
|
123
|
+
* Token address the permit is for.
|
|
124
|
+
**/
|
|
125
|
+
token: Address;
|
|
126
|
+
/**
|
|
127
|
+
* Address of the token holder granting the permit.
|
|
128
|
+
**/
|
|
129
|
+
owner: Address;
|
|
130
|
+
/**
|
|
131
|
+
* Address authorized to spend the tokens.
|
|
132
|
+
**/
|
|
133
|
+
spender: Address;
|
|
134
|
+
/**
|
|
135
|
+
* Amount of tokens approved.
|
|
136
|
+
**/
|
|
137
|
+
value: bigint;
|
|
138
|
+
/**
|
|
139
|
+
* Timestamp after which the permit expires.
|
|
140
|
+
**/
|
|
141
|
+
deadline: bigint;
|
|
142
|
+
/**
|
|
143
|
+
* Owner's current permit nonce.
|
|
144
|
+
**/
|
|
145
|
+
nonce: bigint;
|
|
146
|
+
}
|
|
106
147
|
/**
|
|
107
148
|
* Compile-time assertion: `U` must be assignable to `T`.
|
|
108
149
|
*
|
|
@@ -445,4 +486,4 @@ interface IBaseContract {
|
|
|
445
486
|
parseFunctionDataV2: (calldata: Hex, strict?: boolean) => ParsedCallV2;
|
|
446
487
|
}
|
|
447
488
|
//#endregion
|
|
448
|
-
export { AdapterData, AssertAssignable, Asset, BaseParams, BaseState, ConnectedBotData, CreditAccountData, CreditAccountDataPayload, CreditAccountTokensSlice, CreditConfiguratorState, CreditFacadeState, CreditManagerDebtParams, CreditManagerState, CreditSuiteState, GaugeData, IBaseContract, MarketData, MarketFilter, ParsedCall, ParsedCallArgs, ParsedCallV2, PoolState, PriceFeedAnswer, PriceFeedMapEntry, PriceFeedTreeNode, PriceOracleData, QuotaKeeperState, QuotaState, RateKeeperState, RelaxedBaseParams, RewardInfo, TokenInfo, Unarray, VotingContractStatus };
|
|
489
|
+
export { AdapterData, AssertAssignable, Asset, BaseParams, BaseState, ConnectedBotData, CreditAccountData, CreditAccountDataPayload, CreditAccountTokensSlice, CreditConfiguratorState, CreditFacadeState, CreditManagerDebtParams, CreditManagerState, CreditSuiteState, GaugeData, IBaseContract, MarketData, MarketFilter, ParsedCall, ParsedCallArgs, ParsedCallV2, PermitResult, PoolState, PriceFeedAnswer, PriceFeedMapEntry, PriceFeedTreeNode, PriceOracleData, QuotaKeeperState, QuotaState, RateKeeperState, RelaxedBaseParams, RewardInfo, TokenInfo, Unarray, VotingContractStatus };
|