@continuumdao/ctm-mpc-defi 0.1.3
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/LICENSE +18 -0
- package/README.md +111 -0
- package/dist/agent/catalog.cjs +484 -0
- package/dist/agent/catalog.cjs.map +1 -0
- package/dist/agent/catalog.d.cts +117 -0
- package/dist/agent/catalog.d.ts +117 -0
- package/dist/agent/catalog.js +474 -0
- package/dist/agent/catalog.js.map +1 -0
- package/dist/chains/evm/index.cjs +474 -0
- package/dist/chains/evm/index.cjs.map +1 -0
- package/dist/chains/evm/index.d.cts +62 -0
- package/dist/chains/evm/index.d.ts +62 -0
- package/dist/chains/evm/index.js +459 -0
- package/dist/chains/evm/index.js.map +1 -0
- package/dist/chains/near/index.cjs +25 -0
- package/dist/chains/near/index.cjs.map +1 -0
- package/dist/chains/near/index.d.cts +37 -0
- package/dist/chains/near/index.d.ts +37 -0
- package/dist/chains/near/index.js +20 -0
- package/dist/chains/near/index.js.map +1 -0
- package/dist/chains/solana/index.cjs +25 -0
- package/dist/chains/solana/index.cjs.map +1 -0
- package/dist/chains/solana/index.d.cts +40 -0
- package/dist/chains/solana/index.d.ts +40 -0
- package/dist/chains/solana/index.js +20 -0
- package/dist/chains/solana/index.js.map +1 -0
- package/dist/core/index.cjs +128 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +10 -0
- package/dist/core/index.d.ts +10 -0
- package/dist/core/index.js +116 -0
- package/dist/core/index.js.map +1 -0
- package/dist/envelope-CcE5Cz_q.d.ts +35 -0
- package/dist/envelope-DYDPnrHZ.d.cts +35 -0
- package/dist/index.cjs +2481 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +2446 -0
- package/dist/index.js.map +1 -0
- package/dist/keygen-CfNp8yKJ.d.cts +9 -0
- package/dist/keygen-DsINazx8.d.ts +9 -0
- package/dist/nodeRead-BnmSaMGO.d.cts +8 -0
- package/dist/nodeRead-BnmSaMGO.d.ts +8 -0
- package/dist/protocols/evm/curve-dao/index.cjs +869 -0
- package/dist/protocols/evm/curve-dao/index.cjs.map +1 -0
- package/dist/protocols/evm/curve-dao/index.d.cts +147 -0
- package/dist/protocols/evm/curve-dao/index.d.ts +147 -0
- package/dist/protocols/evm/curve-dao/index.js +846 -0
- package/dist/protocols/evm/curve-dao/index.js.map +1 -0
- package/dist/protocols/evm/uniswap-v4/index.cjs +1700 -0
- package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -0
- package/dist/protocols/evm/uniswap-v4/index.d.cts +323 -0
- package/dist/protocols/evm/uniswap-v4/index.d.ts +323 -0
- package/dist/protocols/evm/uniswap-v4/index.js +1659 -0
- package/dist/protocols/evm/uniswap-v4/index.js.map +1 -0
- package/dist/registry-BwZoE668.d.cts +8 -0
- package/dist/registry-oMKlO_5z.d.ts +8 -0
- package/dist/txParams-BC7ogvdR.d.cts +19 -0
- package/dist/txParams-BC7ogvdR.d.ts +19 -0
- package/dist/types-5u863Fd9.d.ts +34 -0
- package/dist/types-B8idm_gu.d.cts +34 -0
- package/dist/types-Ce2qNHai.d.cts +57 -0
- package/dist/types-Ce2qNHai.d.ts +57 -0
- package/package.json +94 -0
|
@@ -0,0 +1,57 @@
|
|
|
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 };
|
package/package.json
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@continuumdao/ctm-mpc-defi",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "Continuum MPC DeFi protocol library — multiSignRequest builders for EVM and future chain categories",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/ContinuumDAO/ctm-mpc-defi.git"
|
|
8
|
+
},
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"main": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js",
|
|
19
|
+
"require": "./dist/index.cjs"
|
|
20
|
+
},
|
|
21
|
+
"./core": {
|
|
22
|
+
"types": "./dist/core/index.d.ts",
|
|
23
|
+
"import": "./dist/core/index.js",
|
|
24
|
+
"require": "./dist/core/index.cjs"
|
|
25
|
+
},
|
|
26
|
+
"./chains/evm": {
|
|
27
|
+
"types": "./dist/chains/evm/index.d.ts",
|
|
28
|
+
"import": "./dist/chains/evm/index.js",
|
|
29
|
+
"require": "./dist/chains/evm/index.cjs"
|
|
30
|
+
},
|
|
31
|
+
"./chains/solana": {
|
|
32
|
+
"types": "./dist/chains/solana/index.d.ts",
|
|
33
|
+
"import": "./dist/chains/solana/index.js",
|
|
34
|
+
"require": "./dist/chains/solana/index.cjs"
|
|
35
|
+
},
|
|
36
|
+
"./chains/near": {
|
|
37
|
+
"types": "./dist/chains/near/index.d.ts",
|
|
38
|
+
"import": "./dist/chains/near/index.js",
|
|
39
|
+
"require": "./dist/chains/near/index.cjs"
|
|
40
|
+
},
|
|
41
|
+
"./protocols/evm/uniswap-v4": {
|
|
42
|
+
"types": "./dist/protocols/evm/uniswap-v4/index.d.ts",
|
|
43
|
+
"import": "./dist/protocols/evm/uniswap-v4/index.js",
|
|
44
|
+
"require": "./dist/protocols/evm/uniswap-v4/index.cjs"
|
|
45
|
+
},
|
|
46
|
+
"./protocols/evm/curve-dao": {
|
|
47
|
+
"types": "./dist/protocols/evm/curve-dao/index.d.ts",
|
|
48
|
+
"import": "./dist/protocols/evm/curve-dao/index.js",
|
|
49
|
+
"require": "./dist/protocols/evm/curve-dao/index.cjs"
|
|
50
|
+
},
|
|
51
|
+
"./agent": {
|
|
52
|
+
"types": "./dist/agent/catalog.d.ts",
|
|
53
|
+
"import": "./dist/agent/catalog.js",
|
|
54
|
+
"require": "./dist/agent/catalog.cjs"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"files": [
|
|
58
|
+
"dist",
|
|
59
|
+
"README.md",
|
|
60
|
+
"LICENSE"
|
|
61
|
+
],
|
|
62
|
+
"sideEffects": false,
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "tsup",
|
|
65
|
+
"prepublishOnly": "npm run build",
|
|
66
|
+
"publish:npm": "npm publish --registry=https://registry.npmjs.org",
|
|
67
|
+
"test": "vitest run",
|
|
68
|
+
"test:watch": "vitest",
|
|
69
|
+
"typecheck": "tsc --noEmit"
|
|
70
|
+
},
|
|
71
|
+
"engines": {
|
|
72
|
+
"node": ">=22.19.0"
|
|
73
|
+
},
|
|
74
|
+
"peerDependencies": {
|
|
75
|
+
"viem": "^2.46.0",
|
|
76
|
+
"@curvefi/api": "^2.68.0"
|
|
77
|
+
},
|
|
78
|
+
"peerDependenciesMeta": {
|
|
79
|
+
"@curvefi/api": {
|
|
80
|
+
"optional": true
|
|
81
|
+
},
|
|
82
|
+
"@solana/kit": {
|
|
83
|
+
"optional": true
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"devDependencies": {
|
|
87
|
+
"@curvefi/api": "^2.68.18",
|
|
88
|
+
"tsup": "^8.5.0",
|
|
89
|
+
"typescript": "^5.9.3",
|
|
90
|
+
"viem": "^2.46.1",
|
|
91
|
+
"vitest": "^3.2.4"
|
|
92
|
+
},
|
|
93
|
+
"license": "BUSL-1.1"
|
|
94
|
+
}
|