@continuumdao/ctm-mpc-defi 0.2.47 → 0.2.49
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/agent/catalog.cjs +1181 -13
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +1532 -7
- package/dist/agent/catalog.js +1142 -14
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/continuum-dao/SKILL.md +2 -0
- package/dist/agent/skills/derive/SKILL.md +112 -0
- package/dist/agent/skills/hyperliquid/SKILL.md +22 -2
- package/dist/chains/evm/index.d.ts +118 -6
- package/dist/chains/near/index.d.ts +7 -1
- package/dist/chains/solana/index.d.ts +7 -1
- package/dist/core/index.cjs +2 -1
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.ts +138 -7
- package/dist/core/index.js +2 -1
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +848 -16
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/protocols/evm/aave-v4/index.d.ts +600 -6
- package/dist/protocols/evm/aerodrome/index.cjs.map +1 -1
- package/dist/protocols/evm/aerodrome/index.d.ts +125 -5
- package/dist/protocols/evm/aerodrome/index.js.map +1 -1
- package/dist/protocols/evm/arcus/index.d.ts +66 -2
- package/dist/protocols/evm/circle-cctp/index.d.ts +71 -2
- package/dist/protocols/evm/compound-v3/index.d.ts +52 -1
- package/dist/protocols/evm/continuum-dao/index.cjs +475 -1
- package/dist/protocols/evm/continuum-dao/index.cjs.map +1 -1
- package/dist/protocols/evm/continuum-dao/index.d.ts +230 -2
- package/dist/protocols/evm/continuum-dao/index.js +463 -3
- package/dist/protocols/evm/continuum-dao/index.js.map +1 -1
- package/dist/protocols/evm/curve-dao/index.d.ts +66 -2
- package/dist/protocols/evm/derive/index.cjs +2655 -0
- package/dist/protocols/evm/derive/index.cjs.map +1 -0
- package/dist/protocols/evm/derive/index.d.ts +859 -0
- package/dist/protocols/evm/derive/index.js +2536 -0
- package/dist/protocols/evm/derive/index.js.map +1 -0
- package/dist/protocols/evm/ethena/index.d.ts +52 -1
- package/dist/protocols/evm/euler-v2/index.d.ts +115 -16
- package/dist/protocols/evm/gmx/index.d.ts +66 -2
- package/dist/protocols/evm/hyperliquid/index.cjs +545 -267
- package/dist/protocols/evm/hyperliquid/index.cjs.map +1 -1
- package/dist/protocols/evm/hyperliquid/index.d.ts +152 -7
- package/dist/protocols/evm/hyperliquid/index.js +535 -269
- package/dist/protocols/evm/hyperliquid/index.js.map +1 -1
- package/dist/protocols/evm/lido/index.d.ts +52 -1
- package/dist/protocols/evm/maple/index.d.ts +52 -1
- package/dist/protocols/evm/morpho/index.d.ts +115 -4
- package/dist/protocols/evm/pendle/index.cjs +2 -1
- package/dist/protocols/evm/pendle/index.cjs.map +1 -1
- package/dist/protocols/evm/pendle/index.d.ts +125 -5
- package/dist/protocols/evm/pendle/index.js +2 -1
- package/dist/protocols/evm/pendle/index.js.map +1 -1
- package/dist/protocols/evm/permit2/index.d.ts +14 -1
- package/dist/protocols/evm/sky/index.d.ts +52 -1
- package/dist/protocols/evm/uniswap-v4/index.d.ts +78 -4
- package/dist/protocols/evm/venice/index.d.ts +52 -1
- package/package.json +7 -2
- package/dist/buildBatch-tsEUVn_a.d.ts +0 -45
- package/dist/eip712Multisign-6oNIlObj.d.ts +0 -39
- package/dist/envelope-Cm-llShH.d.ts +0 -37
- package/dist/merklDistributor-CdqtZC9N.d.ts +0 -65
- package/dist/multisign-Dr0j9fHm.d.ts +0 -489
- package/dist/registry-BvsXh0-r.d.ts +0 -8
- package/dist/types-RJpoU4Pc.d.ts +0 -34
- package/dist/types-lIfv59N1.d.ts +0 -63
|
@@ -1,7 +1,56 @@
|
|
|
1
|
-
import { b as KeyGenSubsetForPermit, e as ProtocolModule } from '../../../types-lIfv59N1.js';
|
|
2
1
|
import { Address } from 'viem';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
|
|
3
|
+
/** Aligns with app NonEvmChainType + 'evm'. Extend as mpc-auth adds chains. */
|
|
4
|
+
type ChainCategory = 'evm' | 'solana' | 'near' | 'sui' | 'ton' | 'stellar';
|
|
5
|
+
type EvmTokenKind = 'native' | 'erc20' | 'erc721' | 'ctmerc20' | 'ctmrwa1';
|
|
6
|
+
type SolanaTokenKind = 'native' | 'spl' | 'spl2022';
|
|
7
|
+
type NearTokenKind = 'native' | 'nep141';
|
|
8
|
+
type TokenRef = {
|
|
9
|
+
category: 'evm';
|
|
10
|
+
kind: EvmTokenKind;
|
|
11
|
+
address: `0x${string}`;
|
|
12
|
+
} | {
|
|
13
|
+
category: 'solana';
|
|
14
|
+
kind: SolanaTokenKind;
|
|
15
|
+
mint: string;
|
|
16
|
+
} | {
|
|
17
|
+
category: 'near';
|
|
18
|
+
kind: NearTokenKind;
|
|
19
|
+
contractId: string;
|
|
20
|
+
};
|
|
21
|
+
type ParamDoc = {
|
|
22
|
+
type: string;
|
|
23
|
+
required: boolean;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
type ProtocolActionDescriptor = {
|
|
27
|
+
id: string;
|
|
28
|
+
protocolId: string;
|
|
29
|
+
chainCategory: ChainCategory;
|
|
30
|
+
description: string;
|
|
31
|
+
commonParams: Array<'keyGen' | 'purposeText' | 'useCustomGas' | 'useCustomFees'>;
|
|
32
|
+
params: Record<string, ParamDoc>;
|
|
33
|
+
};
|
|
34
|
+
type ChainSupportContext = {
|
|
35
|
+
chainCategory: ChainCategory;
|
|
36
|
+
chainId: string | number;
|
|
37
|
+
};
|
|
38
|
+
interface ProtocolModule {
|
|
39
|
+
id: string;
|
|
40
|
+
chainCategory: ChainCategory;
|
|
41
|
+
isChainSupported(ctx: ChainSupportContext): boolean | Promise<boolean>;
|
|
42
|
+
isTokenSupported(token: TokenRef): boolean | Promise<boolean>;
|
|
43
|
+
actions: ProtocolActionDescriptor[];
|
|
44
|
+
}
|
|
45
|
+
type KeyGenSubset = {
|
|
46
|
+
pubkeyhex?: string;
|
|
47
|
+
keylist?: string[];
|
|
48
|
+
ClientKeys?: Record<string, string>;
|
|
49
|
+
groupId?: string;
|
|
50
|
+
GroupId?: string;
|
|
51
|
+
};
|
|
52
|
+
/** App-compatible alias used by multisign builders and Permit2 helpers. */
|
|
53
|
+
type KeyGenSubsetForPermit = KeyGenSubset;
|
|
5
54
|
|
|
6
55
|
/** Stay below on-chain max borrow LTV when computing per-round headroom (basis points). */
|
|
7
56
|
declare const EULER_SAME_ASSET_BORROW_PROTOCOL_HEADROOM_BPS = 50n;
|
|
@@ -56,7 +105,7 @@ declare function fetchEulerBorrowCollateralMaxWithdrawAssetsWei(args: {
|
|
|
56
105
|
}): Promise<bigint>;
|
|
57
106
|
|
|
58
107
|
declare const EULER_V2_VAULT_WITHDRAW_FALLBACK_GAS = 900000n;
|
|
59
|
-
type ChainRow$
|
|
108
|
+
type ChainRow$6 = {
|
|
60
109
|
legacy?: boolean;
|
|
61
110
|
gasLimit?: number;
|
|
62
111
|
gasMultiplier?: number;
|
|
@@ -112,7 +161,7 @@ declare function buildEvmMultisignBodyEulerV2VaultWithdraw(args: {
|
|
|
112
161
|
keyGen: KeyGenSubsetForPermit;
|
|
113
162
|
chainId: number;
|
|
114
163
|
rpcUrl: string;
|
|
115
|
-
chainDetail: ChainRow$
|
|
164
|
+
chainDetail: ChainRow$6;
|
|
116
165
|
useCustomGas: boolean;
|
|
117
166
|
customGasChainDetails?: Record<string, unknown> | null;
|
|
118
167
|
evault: Address;
|
|
@@ -132,7 +181,7 @@ declare function buildEvmMultisignBodyEulerV2VaultWithdraw(args: {
|
|
|
132
181
|
|
|
133
182
|
/** Conservative fallback when `estimateGas` fails on Euler eVault `deposit`. */
|
|
134
183
|
declare const EULER_V2_ISOLATED_VAULT_DEPOSIT_FALLBACK_GAS = 950000n;
|
|
135
|
-
type ChainRow$
|
|
184
|
+
type ChainRow$5 = {
|
|
136
185
|
legacy?: boolean;
|
|
137
186
|
gasLimit?: number;
|
|
138
187
|
gasMultiplier?: number;
|
|
@@ -149,7 +198,7 @@ declare function buildEvmMultisignBodyEulerV2IsolatedLendDepositBatch(args: {
|
|
|
149
198
|
keyGen: KeyGenSubsetForPermit;
|
|
150
199
|
chainId: number;
|
|
151
200
|
rpcUrl: string;
|
|
152
|
-
chainDetail: ChainRow$
|
|
201
|
+
chainDetail: ChainRow$5;
|
|
153
202
|
useCustomGas: boolean;
|
|
154
203
|
customGasChainDetails?: Record<string, unknown> | null;
|
|
155
204
|
/** Euler eVault (checksummed). */
|
|
@@ -168,7 +217,7 @@ declare function buildEvmMultisignBodyEulerV2IsolatedLendDepositBatch(args: {
|
|
|
168
217
|
messageToSign: string;
|
|
169
218
|
}>;
|
|
170
219
|
|
|
171
|
-
type ChainRow$
|
|
220
|
+
type ChainRow$4 = {
|
|
172
221
|
legacy?: boolean;
|
|
173
222
|
gasLimit?: number;
|
|
174
223
|
gasMultiplier?: number;
|
|
@@ -186,7 +235,7 @@ declare function buildEvmMultisignBodyEulerV2IsolatedBorrowBatch(args: {
|
|
|
186
235
|
keyGen: KeyGenSubsetForPermit;
|
|
187
236
|
chainId: number;
|
|
188
237
|
rpcUrl: string;
|
|
189
|
-
chainDetail: ChainRow$
|
|
238
|
+
chainDetail: ChainRow$4;
|
|
190
239
|
useCustomGas: boolean;
|
|
191
240
|
customGasChainDetails?: Record<string, unknown> | null;
|
|
192
241
|
evc: Address;
|
|
@@ -210,7 +259,7 @@ declare function buildEvmMultisignBodyEulerV2IsolatedBorrowBatch(args: {
|
|
|
210
259
|
messageToSign: string;
|
|
211
260
|
}>;
|
|
212
261
|
|
|
213
|
-
type ChainRow$
|
|
262
|
+
type ChainRow$3 = {
|
|
214
263
|
legacy?: boolean;
|
|
215
264
|
gasLimit?: number;
|
|
216
265
|
gasMultiplier?: number;
|
|
@@ -226,7 +275,7 @@ declare function buildEvmMultisignBodyEulerV2BorrowRepayBatch(args: {
|
|
|
226
275
|
keyGen: KeyGenSubsetForPermit;
|
|
227
276
|
chainId: number;
|
|
228
277
|
rpcUrl: string;
|
|
229
|
-
chainDetail: ChainRow$
|
|
278
|
+
chainDetail: ChainRow$3;
|
|
230
279
|
useCustomGas: boolean;
|
|
231
280
|
customGasChainDetails?: Record<string, unknown> | null;
|
|
232
281
|
evc: Address;
|
|
@@ -245,7 +294,7 @@ declare function buildEvmMultisignBodyEulerV2BorrowRepayBatch(args: {
|
|
|
245
294
|
messageToSign: string;
|
|
246
295
|
}>;
|
|
247
296
|
|
|
248
|
-
type ChainRow$
|
|
297
|
+
type ChainRow$2 = {
|
|
249
298
|
legacy?: boolean;
|
|
250
299
|
gasLimit?: number;
|
|
251
300
|
gasMultiplier?: number;
|
|
@@ -262,7 +311,7 @@ declare function buildEvmMultisignBodyEulerV2BorrowCollateralDepositBatch(args:
|
|
|
262
311
|
keyGen: KeyGenSubsetForPermit;
|
|
263
312
|
chainId: number;
|
|
264
313
|
rpcUrl: string;
|
|
265
|
-
chainDetail: ChainRow$
|
|
314
|
+
chainDetail: ChainRow$2;
|
|
266
315
|
useCustomGas: boolean;
|
|
267
316
|
customGasChainDetails?: Record<string, unknown> | null;
|
|
268
317
|
evc: Address;
|
|
@@ -278,7 +327,7 @@ declare function buildEvmMultisignBodyEulerV2BorrowCollateralDepositBatch(args:
|
|
|
278
327
|
messageToSign: string;
|
|
279
328
|
}>;
|
|
280
329
|
|
|
281
|
-
type ChainRow = {
|
|
330
|
+
type ChainRow$1 = {
|
|
282
331
|
legacy?: boolean;
|
|
283
332
|
gasLimit?: number;
|
|
284
333
|
gasMultiplier?: number;
|
|
@@ -295,7 +344,7 @@ declare function buildEvmMultisignBodyEulerV2BorrowCollateralWithdrawBatch(args:
|
|
|
295
344
|
keyGen: KeyGenSubsetForPermit;
|
|
296
345
|
chainId: number;
|
|
297
346
|
rpcUrl: string;
|
|
298
|
-
chainDetail: ChainRow;
|
|
347
|
+
chainDetail: ChainRow$1;
|
|
299
348
|
useCustomGas: boolean;
|
|
300
349
|
customGasChainDetails?: Record<string, unknown> | null;
|
|
301
350
|
evc: Address;
|
|
@@ -850,13 +899,63 @@ declare function loadEulerV2PortfolioUsdSnapshot(args: {
|
|
|
850
899
|
*/
|
|
851
900
|
declare function loadEulerV2SupportedChainIds(): Promise<ReadonlySet<number>>;
|
|
852
901
|
|
|
902
|
+
type MerklRewardRow = {
|
|
903
|
+
symbol: string;
|
|
904
|
+
token: string;
|
|
905
|
+
amountHuman: string;
|
|
906
|
+
amountWei: string;
|
|
907
|
+
decimals: number;
|
|
908
|
+
root: string;
|
|
909
|
+
};
|
|
910
|
+
type MerklRewardsSummary = {
|
|
911
|
+
chainId: number;
|
|
912
|
+
user: string;
|
|
913
|
+
distributor: string;
|
|
914
|
+
claimable: MerklRewardRow[];
|
|
915
|
+
claimableCount: number;
|
|
916
|
+
firstRootClaimableCount: number;
|
|
917
|
+
additionalRoots: number;
|
|
918
|
+
skippedReulCount: number;
|
|
919
|
+
notes: string;
|
|
920
|
+
};
|
|
921
|
+
|
|
853
922
|
/** Wallet-wide Merkl claimables for the Euler v2 rewards pack. rEUL is listed as skippedReulCount. */
|
|
854
923
|
declare function eulerV2FetchMerklRewardsSummary(args: {
|
|
855
924
|
user: string;
|
|
856
925
|
chainId: number;
|
|
857
926
|
}): Promise<MerklRewardsSummary>;
|
|
858
927
|
|
|
928
|
+
type ChainRow = {
|
|
929
|
+
legacy?: boolean;
|
|
930
|
+
gasLimit?: number;
|
|
931
|
+
gasMultiplier?: number;
|
|
932
|
+
gasPrice?: number;
|
|
933
|
+
baseFee?: number;
|
|
934
|
+
priorityFee?: number;
|
|
935
|
+
baseFeeMultiplier?: number;
|
|
936
|
+
};
|
|
937
|
+
/**
|
|
938
|
+
* Merkl `Distributor.claim` using calldata from {@link encodeMerklDistributorClaimData} / Merkl API proofs.
|
|
939
|
+
*/
|
|
940
|
+
declare function buildEvmMultisignBodyEulerV2MerklDistributorClaim(args: {
|
|
941
|
+
keyGen: KeyGenSubsetForPermit;
|
|
942
|
+
chainId: number;
|
|
943
|
+
rpcUrl: string;
|
|
944
|
+
chainDetail: ChainRow;
|
|
945
|
+
useCustomGas: boolean;
|
|
946
|
+
customGasChainDetails?: Record<string, unknown> | null;
|
|
947
|
+
to: Address;
|
|
948
|
+
data: `0x${string}`;
|
|
949
|
+
valueWei: bigint;
|
|
950
|
+
claimLeafCount: number;
|
|
951
|
+
executorAddress: Address;
|
|
952
|
+
purposeText: string;
|
|
953
|
+
}): Promise<{
|
|
954
|
+
bodyForSign: Record<string, unknown>;
|
|
955
|
+
messageToSign: string;
|
|
956
|
+
}>;
|
|
957
|
+
|
|
859
958
|
declare const EULER_V2_PROTOCOL_ID = "euler-v2";
|
|
860
959
|
declare const eulerV2ProtocolModule: ProtocolModule;
|
|
861
960
|
|
|
862
|
-
export { EULER_EVAULT_CAP_UNLIMITED_WEI, EULER_EVAULT_SUPPLY_CAP_UNLIMITED_WEI, EULER_REUL_UNLOCK_GAS_FALLBACK, EULER_SAME_ASSET_BORROW_APPROVAL_BUFFER_BPS, EULER_SAME_ASSET_BORROW_MAX_ROUNDS, EULER_SAME_ASSET_BORROW_PROTOCOL_HEADROOM_BPS, EULER_SAME_ASSET_BORROW_RATIO_STOP_EPS_BPS, EULER_V2_GOLDSKY_SUBGRAPH_URL_BY_CHAIN_ID, EULER_V2_ISOLATED_VAULT_DEPOSIT_FALLBACK_GAS, EULER_V2_PREFER_ON_CHAIN_LEND_METRICS, EULER_V2_PROTOCOL_ID, EULER_V2_VAULT_WITHDRAW_FALLBACK_GAS, EULER_V3_API_BASE, type EulerReulVestingTranche, type EulerV2AssetModes, type EulerV2BorrowCollateralRow, type EulerV2BorrowOracleQuoteSnapshot, type EulerV2BorrowPairRisk, type EulerV2ChainAssetCache, type EulerV2EarnFlowVaultMeta, type EulerV2EarnOfferingRow, type EulerV2EarnStrategyRow, type EulerV2EarnVaultDiscoveryRow, type EulerV2IsolatedLendMarketRow, type EulerV2LendPositionDraft, type EulerV2LendUiPosition, type EulerV2LendVaultDiscoveryRow, type EulerV2PortfolioUsdSnapshot, type EulerV3VaultRow, type EulerV3VaultVisibility, type EulerVaultOnChainLendMetrics, type EulerVaultOnChainLendMetricsResult, REUL_FULL_VEST_SEC, REUL_LOCK_DAY_SEC, buildEvmMultisignBodyEulerV2BorrowCollateralDepositBatch, buildEvmMultisignBodyEulerV2BorrowCollateralWithdrawBatch, buildEvmMultisignBodyEulerV2BorrowRepayBatch, buildEvmMultisignBodyEulerV2IsolatedBorrowBatch, buildEvmMultisignBodyEulerV2IsolatedLendDepositBatch, buildEvmMultisignBodyEulerV2VaultWithdraw, clampEulerUnderlyingDecimalsForEulerUi, encodeEulerReulWithdrawToByLockTimestampsData, ensureEulerV2ChainAssetCache, estimateBorrowHumanFromLtv, eulerBorrowAndCollateralSameAsset, eulerLabelsAppendUnderlyingIfDistinct, eulerLabelsLookupLabelForVault, eulerReulUnlockAbi, eulerSameAssetApproveAmountWithBuffer, eulerSameAssetTotalCollateralPullWei, eulerSubgraphVaultCapToUnderlyingWei, eulerV2FetchEarnVaultsSummary, eulerV2FetchLendVaultsSummary, eulerV2FetchMerklRewardsSummary, eulerV2GoldskyUrlForChain, eulerV2KeyForNodeAssetRow, eulerV2ProtocolModule, eulerV2QueryGraphQl, eulerVaultLendMetricsFromIndexerVaultState, eulerVaultMaxNewBorrowWei, eulerVaultMaxNewSupplyWei, eulerWrappedGasTokenAliasesLower, fetchCoingeckoTokenUsdByContract, fetchEulerBorrowCollateralMaxWithdrawAssetsWei, fetchEulerLabelsEarnVaultAllowlist, fetchEulerLabelsEntityNameByAddress, fetchEulerLabelsVaultNameMap, fetchEulerLendEarnVaultEffectiveMaxWithdrawWei, fetchEulerReulVestingTranches, fetchEulerV2BorrowDebtWei, fetchEulerV2BorrowOracleQuoteSnapshot, fetchEulerV2BorrowPairLtvs, fetchEulerV2ChainAssetCache, fetchEulerV2EarnOfferingsForRowAsset, fetchEulerV2IsolatedLendMarketsForRowAsset, fetchEulerV2TrackingBorrowEntries, fetchEulerV2TrackingDepositEntries, fetchEulerV3ActiveChainIds, fetchEulerV3EarnVaults, fetchEulerV3EvkVaults, fetchEulerVaultAssetDecimals, fetchEulerVaultMaxWithdrawWei, fetchEulerVaultOnChainLendMetrics, fetchEulerVaultOnChainLendMetricsForVaults, fetchEulerVaultUnderlyingMeta, flattenEulerV2BorrowCollateralRows, formatEulerRayApyPercent, formatEulerRaySupplyApyPercent, formatEulerResolvedCapOrCashForUi, loadEulerV2BorrowPositionsForOwner, loadEulerV2LendSupplyPositionsForOwner, loadEulerV2PortfolioUsdSnapshot, loadEulerV2SupportedChainIds, maxCollateralWeiCappedByBorrowLiquidity, mergeEulerV2PositionsTabRows, parseEulerTrackingBorrowEntry, planSameAssetLeveragedBorrows, resolveEulerAmountCapToSupplyWei, resolveEulerAmountCapToWei, resolveEulerWrappedNativeToken };
|
|
961
|
+
export { EULER_EVAULT_CAP_UNLIMITED_WEI, EULER_EVAULT_SUPPLY_CAP_UNLIMITED_WEI, EULER_REUL_UNLOCK_GAS_FALLBACK, EULER_SAME_ASSET_BORROW_APPROVAL_BUFFER_BPS, EULER_SAME_ASSET_BORROW_MAX_ROUNDS, EULER_SAME_ASSET_BORROW_PROTOCOL_HEADROOM_BPS, EULER_SAME_ASSET_BORROW_RATIO_STOP_EPS_BPS, EULER_V2_GOLDSKY_SUBGRAPH_URL_BY_CHAIN_ID, EULER_V2_ISOLATED_VAULT_DEPOSIT_FALLBACK_GAS, EULER_V2_PREFER_ON_CHAIN_LEND_METRICS, EULER_V2_PROTOCOL_ID, EULER_V2_VAULT_WITHDRAW_FALLBACK_GAS, EULER_V3_API_BASE, type EulerReulVestingTranche, type EulerV2AssetModes, type EulerV2BorrowCollateralRow, type EulerV2BorrowOracleQuoteSnapshot, type EulerV2BorrowPairRisk, type EulerV2ChainAssetCache, type EulerV2EarnFlowVaultMeta, type EulerV2EarnOfferingRow, type EulerV2EarnStrategyRow, type EulerV2EarnVaultDiscoveryRow, type EulerV2IsolatedLendMarketRow, type EulerV2LendPositionDraft, type EulerV2LendUiPosition, type EulerV2LendVaultDiscoveryRow, type EulerV2PortfolioUsdSnapshot, type EulerV3VaultRow, type EulerV3VaultVisibility, type EulerVaultOnChainLendMetrics, type EulerVaultOnChainLendMetricsResult, REUL_FULL_VEST_SEC, REUL_LOCK_DAY_SEC, buildEvmMultisignBodyEulerV2BorrowCollateralDepositBatch, buildEvmMultisignBodyEulerV2BorrowCollateralWithdrawBatch, buildEvmMultisignBodyEulerV2BorrowRepayBatch, buildEvmMultisignBodyEulerV2IsolatedBorrowBatch, buildEvmMultisignBodyEulerV2IsolatedLendDepositBatch, buildEvmMultisignBodyEulerV2MerklDistributorClaim, buildEvmMultisignBodyEulerV2VaultWithdraw, clampEulerUnderlyingDecimalsForEulerUi, encodeEulerReulWithdrawToByLockTimestampsData, ensureEulerV2ChainAssetCache, estimateBorrowHumanFromLtv, eulerBorrowAndCollateralSameAsset, eulerLabelsAppendUnderlyingIfDistinct, eulerLabelsLookupLabelForVault, eulerReulUnlockAbi, eulerSameAssetApproveAmountWithBuffer, eulerSameAssetTotalCollateralPullWei, eulerSubgraphVaultCapToUnderlyingWei, eulerV2FetchEarnVaultsSummary, eulerV2FetchLendVaultsSummary, eulerV2FetchMerklRewardsSummary, eulerV2GoldskyUrlForChain, eulerV2KeyForNodeAssetRow, eulerV2ProtocolModule, eulerV2QueryGraphQl, eulerVaultLendMetricsFromIndexerVaultState, eulerVaultMaxNewBorrowWei, eulerVaultMaxNewSupplyWei, eulerWrappedGasTokenAliasesLower, fetchCoingeckoTokenUsdByContract, fetchEulerBorrowCollateralMaxWithdrawAssetsWei, fetchEulerLabelsEarnVaultAllowlist, fetchEulerLabelsEntityNameByAddress, fetchEulerLabelsVaultNameMap, fetchEulerLendEarnVaultEffectiveMaxWithdrawWei, fetchEulerReulVestingTranches, fetchEulerV2BorrowDebtWei, fetchEulerV2BorrowOracleQuoteSnapshot, fetchEulerV2BorrowPairLtvs, fetchEulerV2ChainAssetCache, fetchEulerV2EarnOfferingsForRowAsset, fetchEulerV2IsolatedLendMarketsForRowAsset, fetchEulerV2TrackingBorrowEntries, fetchEulerV2TrackingDepositEntries, fetchEulerV3ActiveChainIds, fetchEulerV3EarnVaults, fetchEulerV3EvkVaults, fetchEulerVaultAssetDecimals, fetchEulerVaultMaxWithdrawWei, fetchEulerVaultOnChainLendMetrics, fetchEulerVaultOnChainLendMetricsForVaults, fetchEulerVaultUnderlyingMeta, flattenEulerV2BorrowCollateralRows, formatEulerRayApyPercent, formatEulerRaySupplyApyPercent, formatEulerResolvedCapOrCashForUi, loadEulerV2BorrowPositionsForOwner, loadEulerV2LendSupplyPositionsForOwner, loadEulerV2PortfolioUsdSnapshot, loadEulerV2SupportedChainIds, maxCollateralWeiCappedByBorrowLiquidity, mergeEulerV2PositionsTabRows, parseEulerTrackingBorrowEntry, planSameAssetLeveragedBorrows, resolveEulerAmountCapToSupplyWei, resolveEulerAmountCapToWei, resolveEulerWrappedNativeToken };
|
|
@@ -1,6 +1,60 @@
|
|
|
1
|
-
import { b as KeyGenSubsetForPermit, M as MultisignBuildResult, e as ProtocolModule } from '../../../types-lIfv59N1.js';
|
|
2
1
|
import { Address } from 'viem';
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
/** Aligns with app NonEvmChainType + 'evm'. Extend as mpc-auth adds chains. */
|
|
4
|
+
type ChainCategory = 'evm' | 'solana' | 'near' | 'sui' | 'ton' | 'stellar';
|
|
5
|
+
type MultisignBuildResult = {
|
|
6
|
+
bodyForSign: Record<string, unknown>;
|
|
7
|
+
messageToSign: string;
|
|
8
|
+
};
|
|
9
|
+
type EvmTokenKind = 'native' | 'erc20' | 'erc721' | 'ctmerc20' | 'ctmrwa1';
|
|
10
|
+
type SolanaTokenKind = 'native' | 'spl' | 'spl2022';
|
|
11
|
+
type NearTokenKind = 'native' | 'nep141';
|
|
12
|
+
type TokenRef = {
|
|
13
|
+
category: 'evm';
|
|
14
|
+
kind: EvmTokenKind;
|
|
15
|
+
address: `0x${string}`;
|
|
16
|
+
} | {
|
|
17
|
+
category: 'solana';
|
|
18
|
+
kind: SolanaTokenKind;
|
|
19
|
+
mint: string;
|
|
20
|
+
} | {
|
|
21
|
+
category: 'near';
|
|
22
|
+
kind: NearTokenKind;
|
|
23
|
+
contractId: string;
|
|
24
|
+
};
|
|
25
|
+
type ParamDoc = {
|
|
26
|
+
type: string;
|
|
27
|
+
required: boolean;
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
type ProtocolActionDescriptor = {
|
|
31
|
+
id: string;
|
|
32
|
+
protocolId: string;
|
|
33
|
+
chainCategory: ChainCategory;
|
|
34
|
+
description: string;
|
|
35
|
+
commonParams: Array<'keyGen' | 'purposeText' | 'useCustomGas' | 'useCustomFees'>;
|
|
36
|
+
params: Record<string, ParamDoc>;
|
|
37
|
+
};
|
|
38
|
+
type ChainSupportContext = {
|
|
39
|
+
chainCategory: ChainCategory;
|
|
40
|
+
chainId: string | number;
|
|
41
|
+
};
|
|
42
|
+
interface ProtocolModule {
|
|
43
|
+
id: string;
|
|
44
|
+
chainCategory: ChainCategory;
|
|
45
|
+
isChainSupported(ctx: ChainSupportContext): boolean | Promise<boolean>;
|
|
46
|
+
isTokenSupported(token: TokenRef): boolean | Promise<boolean>;
|
|
47
|
+
actions: ProtocolActionDescriptor[];
|
|
48
|
+
}
|
|
49
|
+
type KeyGenSubset = {
|
|
50
|
+
pubkeyhex?: string;
|
|
51
|
+
keylist?: string[];
|
|
52
|
+
ClientKeys?: Record<string, string>;
|
|
53
|
+
groupId?: string;
|
|
54
|
+
GroupId?: string;
|
|
55
|
+
};
|
|
56
|
+
/** App-compatible alias used by multisign builders and Permit2 helpers. */
|
|
57
|
+
type KeyGenSubsetForPermit = KeyGenSubset;
|
|
4
58
|
|
|
5
59
|
/** GMX V2 production chains supported in Continuum multi-sign v1. */
|
|
6
60
|
declare const GMX_SUPPORTED_CHAIN_IDS: readonly [42161, 43114];
|
|
@@ -226,6 +280,16 @@ declare function gmxGmxTokenAddress(chainId: number): string;
|
|
|
226
280
|
declare function gmxIsGmMarketTokenAddress(chainId: number, tokenAddress: string): Promise<boolean>;
|
|
227
281
|
declare function gmxIsGmxStakeTokenAddress(chainId: number, tokenAddress: string): boolean;
|
|
228
282
|
|
|
283
|
+
type EvmChainDetail = {
|
|
284
|
+
legacy?: boolean;
|
|
285
|
+
gasLimit?: number;
|
|
286
|
+
gasMultiplier?: number;
|
|
287
|
+
gasPrice?: number;
|
|
288
|
+
baseFee?: number;
|
|
289
|
+
priorityFee?: number;
|
|
290
|
+
baseFeeMultiplier?: number;
|
|
291
|
+
};
|
|
292
|
+
|
|
229
293
|
type GmxMultisignCommon = {
|
|
230
294
|
keyGen: KeyGenSubsetForPermit;
|
|
231
295
|
chainId: number;
|