@continuumdao/ctm-mpc-defi 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -78
- package/dist/agent/catalog.cjs +563 -5
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +166 -20
- package/dist/agent/catalog.js +551 -7
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/aave-v4/SKILL.md +43 -0
- package/dist/agent/skills/curve-dao/SKILL.md +13 -0
- package/dist/agent/skills/ethena/SKILL.md +10 -0
- package/dist/agent/skills/euler-v2/SKILL.md +10 -0
- package/dist/agent/skills/lido/SKILL.md +22 -0
- package/dist/agent/skills/maple-syrup/SKILL.md +10 -0
- package/dist/agent/skills/sky/SKILL.md +10 -0
- package/dist/agent/skills/uniswap-v4/SKILL.md +22 -0
- package/dist/chains/evm/index.cjs +79 -224
- package/dist/chains/evm/index.cjs.map +1 -1
- package/dist/chains/evm/index.d.ts +26 -26
- package/dist/chains/evm/index.js +69 -209
- package/dist/chains/evm/index.js.map +1 -1
- package/dist/chains/near/index.d.ts +1 -1
- package/dist/chains/solana/index.d.ts +1 -1
- package/dist/core/index.cjs +68 -106
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.ts +21 -36
- package/dist/core/index.js +57 -96
- package/dist/core/index.js.map +1 -1
- package/dist/{envelope-CcE5Cz_q.d.ts → envelope-CpBUh9eP.d.ts} +1 -1
- package/dist/index.cjs +356 -1855
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +7 -11
- package/dist/index.js +332 -1826
- package/dist/index.js.map +1 -1
- package/dist/protocols/evm/aave-v4/index.cjs +1152 -669
- package/dist/protocols/evm/aave-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/aave-v4/index.d.ts +418 -3
- package/dist/protocols/evm/aave-v4/index.js +1126 -670
- package/dist/protocols/evm/aave-v4/index.js.map +1 -1
- package/dist/protocols/evm/curve-dao/index.cjs +257 -131
- package/dist/protocols/evm/curve-dao/index.cjs.map +1 -1
- package/dist/protocols/evm/curve-dao/index.d.ts +69 -5
- package/dist/protocols/evm/curve-dao/index.js +242 -124
- package/dist/protocols/evm/curve-dao/index.js.map +1 -1
- package/dist/protocols/evm/ethena/index.cjs +394 -402
- package/dist/protocols/evm/ethena/index.cjs.map +1 -1
- package/dist/protocols/evm/ethena/index.d.ts +47 -3
- package/dist/protocols/evm/ethena/index.js +390 -404
- package/dist/protocols/evm/ethena/index.js.map +1 -1
- package/dist/protocols/evm/euler-v2/index.cjs +2810 -1191
- package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
- package/dist/protocols/evm/euler-v2/index.d.ts +465 -3
- package/dist/protocols/evm/euler-v2/index.js +2761 -1192
- package/dist/protocols/evm/euler-v2/index.js.map +1 -1
- package/dist/protocols/evm/lido/index.cjs +351 -236
- package/dist/protocols/evm/lido/index.cjs.map +1 -1
- package/dist/protocols/evm/lido/index.d.ts +34 -4
- package/dist/protocols/evm/lido/index.js +348 -238
- package/dist/protocols/evm/lido/index.js.map +1 -1
- package/dist/protocols/evm/maple/index.cjs +390 -395
- package/dist/protocols/evm/maple/index.cjs.map +1 -1
- package/dist/protocols/evm/maple/index.d.ts +23 -3
- package/dist/protocols/evm/maple/index.js +390 -397
- package/dist/protocols/evm/maple/index.js.map +1 -1
- package/dist/protocols/evm/sky/index.cjs +454 -232
- package/dist/protocols/evm/sky/index.cjs.map +1 -1
- package/dist/protocols/evm/sky/index.d.ts +57 -3
- package/dist/protocols/evm/sky/index.js +444 -231
- package/dist/protocols/evm/sky/index.js.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.cjs +423 -658
- package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -1
- package/dist/protocols/evm/uniswap-v4/index.d.ts +3 -4
- package/dist/protocols/evm/uniswap-v4/index.js +422 -657
- package/dist/protocols/evm/uniswap-v4/index.js.map +1 -1
- package/dist/{registry-oMKlO_5z.d.ts → registry-Bv5o37_w.d.ts} +1 -1
- package/dist/{types-Ce2qNHai.d.cts → types-BfjWdw1j.d.ts} +3 -1
- package/dist/{types-5u863Fd9.d.ts → types-DUeNJLr9.d.ts} +1 -1
- package/package.json +7 -6
- package/dist/agent/catalog.d.cts +0 -939
- package/dist/chains/evm/index.d.cts +0 -64
- package/dist/chains/near/index.d.cts +0 -37
- package/dist/chains/solana/index.d.cts +0 -40
- package/dist/core/index.d.cts +0 -43
- package/dist/envelope-DYDPnrHZ.d.cts +0 -35
- package/dist/index.d.cts +0 -16
- package/dist/keygen-CfNp8yKJ.d.cts +0 -9
- package/dist/keygen-DsINazx8.d.ts +0 -9
- package/dist/nodeRead-BnmSaMGO.d.cts +0 -8
- package/dist/nodeRead-BnmSaMGO.d.ts +0 -8
- package/dist/protocols/evm/aave-v4/index.d.cts +0 -500
- package/dist/protocols/evm/curve-dao/index.d.cts +0 -147
- package/dist/protocols/evm/ethena/index.d.cts +0 -161
- package/dist/protocols/evm/euler-v2/index.d.cts +0 -317
- package/dist/protocols/evm/lido/index.d.cts +0 -120
- package/dist/protocols/evm/maple/index.d.cts +0 -109
- package/dist/protocols/evm/sky/index.d.cts +0 -218
- package/dist/protocols/evm/uniswap-v4/index.d.cts +0 -324
- package/dist/registry-BwZoE668.d.cts +0 -8
- package/dist/txParams-BC7ogvdR.d.cts +0 -19
- package/dist/txParams-BC7ogvdR.d.ts +0 -19
- package/dist/types-B8idm_gu.d.cts +0 -34
- package/dist/types-Ce2qNHai.d.ts +0 -57
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Proposal-time EVM fields for POST /multiSignRequest (mpc-auth).
|
|
3
|
-
* Same shape as trigger txParams and GET /getSignRequestById?tx_params=1.
|
|
4
|
-
*/
|
|
5
|
-
type ProposalTxParams = {
|
|
6
|
-
nonce: number;
|
|
7
|
-
gasLimit: string;
|
|
8
|
-
txType: 'eip1559' | 'legacy';
|
|
9
|
-
maxFeePerGas?: string;
|
|
10
|
-
maxPriorityFeePerGas?: string;
|
|
11
|
-
gasPrice?: string;
|
|
12
|
-
};
|
|
13
|
-
declare function gasLimitFromEstimateAndChainConfig(estimatedGas: bigint, chainGasLimit?: number): bigint;
|
|
14
|
-
declare function routerSwapGasLimitFromEstimate(estimatedGas: bigint, chainGasLimit?: number | null): bigint;
|
|
15
|
-
declare function composeFeePayloadToTxParams(p: Record<string, unknown>, legacy: boolean): ProposalTxParams | undefined;
|
|
16
|
-
declare function triggerTxParamsFromComposeBody(body: Record<string, unknown>): ProposalTxParams;
|
|
17
|
-
declare function proposalTxParamsToFeeSnapshot(params: ProposalTxParams): Record<string, unknown>;
|
|
18
|
-
|
|
19
|
-
export { type ProposalTxParams as P, composeFeePayloadToTxParams as c, gasLimitFromEstimateAndChainConfig as g, proposalTxParamsToFeeSnapshot as p, routerSwapGasLimitFromEstimate as r, triggerTxParamsFromComposeBody as t };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { b as MultisignCommonArgs, E as EvmTokenKind } from './types-Ce2qNHai.cjs';
|
|
2
|
-
import { Address } from 'viem';
|
|
3
|
-
|
|
4
|
-
type EvmChainDetail = {
|
|
5
|
-
legacy?: boolean;
|
|
6
|
-
gasLimit?: number;
|
|
7
|
-
gasMultiplier?: number;
|
|
8
|
-
gasPrice?: number;
|
|
9
|
-
baseFee?: number;
|
|
10
|
-
priorityFee?: number;
|
|
11
|
-
baseFeeMultiplier?: number;
|
|
12
|
-
};
|
|
13
|
-
interface EvmProtocolContext extends MultisignCommonArgs {
|
|
14
|
-
chainCategory: 'evm';
|
|
15
|
-
chainId: number;
|
|
16
|
-
rpcUrl: string;
|
|
17
|
-
executorAddress: Address;
|
|
18
|
-
chainDetail: EvmChainDetail;
|
|
19
|
-
useCustomGas: boolean;
|
|
20
|
-
customGasChainDetails?: Record<string, unknown> | null;
|
|
21
|
-
}
|
|
22
|
-
type EvmTxStep = {
|
|
23
|
-
to: Address;
|
|
24
|
-
data: `0x${string}`;
|
|
25
|
-
value: bigint;
|
|
26
|
-
/** Fallback when estimateGas reverts */
|
|
27
|
-
fallbackGas?: bigint;
|
|
28
|
-
/** When set, use routerSwapGasLimitFromEstimate instead of plain estimate */
|
|
29
|
-
routerSwap?: boolean;
|
|
30
|
-
};
|
|
31
|
-
declare function isEvmNativeToken(address: string): boolean;
|
|
32
|
-
declare function matchEvmTokenKind(kind: EvmTokenKind, address: string): boolean;
|
|
33
|
-
|
|
34
|
-
export { type EvmChainDetail as E, type EvmProtocolContext as a, type EvmTxStep as b, isEvmNativeToken as i, matchEvmTokenKind as m };
|
package/dist/types-Ce2qNHai.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/** Aligns with app NonEvmChainType + 'evm'. Extend as mpc-auth adds chains. */
|
|
2
|
-
type ChainCategory = 'evm' | 'solana' | 'near' | 'sui' | 'ton' | 'stellar';
|
|
3
|
-
type MultisignBuildResult = {
|
|
4
|
-
bodyForSign: Record<string, unknown>;
|
|
5
|
-
messageToSign: string;
|
|
6
|
-
};
|
|
7
|
-
type EvmTokenKind = 'native' | 'erc20' | 'erc721' | 'ctmerc20' | 'ctmrwa1';
|
|
8
|
-
type SolanaTokenKind = 'native' | 'spl' | 'spl2022';
|
|
9
|
-
type NearTokenKind = 'native' | 'nep141';
|
|
10
|
-
type TokenRef = {
|
|
11
|
-
category: 'evm';
|
|
12
|
-
kind: EvmTokenKind;
|
|
13
|
-
address: `0x${string}`;
|
|
14
|
-
} | {
|
|
15
|
-
category: 'solana';
|
|
16
|
-
kind: SolanaTokenKind;
|
|
17
|
-
mint: string;
|
|
18
|
-
} | {
|
|
19
|
-
category: 'near';
|
|
20
|
-
kind: NearTokenKind;
|
|
21
|
-
contractId: string;
|
|
22
|
-
};
|
|
23
|
-
type ParamDoc = {
|
|
24
|
-
type: string;
|
|
25
|
-
required: boolean;
|
|
26
|
-
description: string;
|
|
27
|
-
};
|
|
28
|
-
type ProtocolActionDescriptor = {
|
|
29
|
-
id: string;
|
|
30
|
-
protocolId: string;
|
|
31
|
-
chainCategory: ChainCategory;
|
|
32
|
-
description: string;
|
|
33
|
-
commonParams: Array<'keyGen' | 'purposeText' | 'useCustomGas' | 'useCustomFees'>;
|
|
34
|
-
params: Record<string, ParamDoc>;
|
|
35
|
-
};
|
|
36
|
-
type ChainSupportContext = {
|
|
37
|
-
chainCategory: ChainCategory;
|
|
38
|
-
chainId: string | number;
|
|
39
|
-
};
|
|
40
|
-
interface ProtocolModule {
|
|
41
|
-
id: string;
|
|
42
|
-
chainCategory: ChainCategory;
|
|
43
|
-
isChainSupported(ctx: ChainSupportContext): boolean | Promise<boolean>;
|
|
44
|
-
isTokenSupported(token: TokenRef): boolean | Promise<boolean>;
|
|
45
|
-
actions: ProtocolActionDescriptor[];
|
|
46
|
-
}
|
|
47
|
-
interface MultisignCommonArgs {
|
|
48
|
-
keyGen: KeyGenSubset;
|
|
49
|
-
purposeText: string;
|
|
50
|
-
}
|
|
51
|
-
type KeyGenSubset = {
|
|
52
|
-
pubkeyhex?: string;
|
|
53
|
-
keylist?: string[];
|
|
54
|
-
ClientKeys?: Record<string, string>;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export type { ChainCategory as C, EvmTokenKind as E, KeyGenSubset as K, MultisignBuildResult as M, NearTokenKind as N, ParamDoc as P, SolanaTokenKind as S, TokenRef as T, ChainSupportContext as a, MultisignCommonArgs as b, ProtocolActionDescriptor as c, ProtocolModule as d };
|