@continuumdao/ctm-mpc-defi 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/README.md +20 -78
  2. package/dist/agent/catalog.cjs +511 -4
  3. package/dist/agent/catalog.cjs.map +1 -1
  4. package/dist/agent/catalog.d.ts +140 -20
  5. package/dist/agent/catalog.js +501 -6
  6. package/dist/agent/catalog.js.map +1 -1
  7. package/dist/agent/skills/aave-v4/SKILL.md +43 -0
  8. package/dist/agent/skills/curve-dao/SKILL.md +12 -0
  9. package/dist/agent/skills/ethena/SKILL.md +10 -0
  10. package/dist/agent/skills/euler-v2/SKILL.md +10 -0
  11. package/dist/agent/skills/lido/SKILL.md +22 -0
  12. package/dist/agent/skills/maple-syrup/SKILL.md +10 -0
  13. package/dist/agent/skills/sky/SKILL.md +10 -0
  14. package/dist/agent/skills/uniswap-v4/SKILL.md +22 -0
  15. package/dist/chains/evm/index.cjs +27 -226
  16. package/dist/chains/evm/index.cjs.map +1 -1
  17. package/dist/chains/evm/index.d.ts +14 -26
  18. package/dist/chains/evm/index.js +21 -211
  19. package/dist/chains/evm/index.js.map +1 -1
  20. package/dist/chains/near/index.d.ts +1 -1
  21. package/dist/chains/solana/index.d.ts +1 -1
  22. package/dist/core/index.cjs +8 -110
  23. package/dist/core/index.cjs.map +1 -1
  24. package/dist/core/index.d.ts +5 -39
  25. package/dist/core/index.js +6 -100
  26. package/dist/core/index.js.map +1 -1
  27. package/dist/{envelope-CcE5Cz_q.d.ts → envelope-CpBUh9eP.d.ts} +1 -1
  28. package/dist/index.cjs +238 -1868
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.ts +7 -11
  31. package/dist/index.js +227 -1839
  32. package/dist/index.js.map +1 -1
  33. package/dist/protocols/evm/aave-v4/index.cjs +385 -662
  34. package/dist/protocols/evm/aave-v4/index.cjs.map +1 -1
  35. package/dist/protocols/evm/aave-v4/index.d.ts +1 -2
  36. package/dist/protocols/evm/aave-v4/index.js +385 -662
  37. package/dist/protocols/evm/aave-v4/index.js.map +1 -1
  38. package/dist/protocols/evm/curve-dao/index.cjs +24 -124
  39. package/dist/protocols/evm/curve-dao/index.cjs.map +1 -1
  40. package/dist/protocols/evm/curve-dao/index.d.ts +3 -4
  41. package/dist/protocols/evm/curve-dao/index.js +15 -115
  42. package/dist/protocols/evm/curve-dao/index.js.map +1 -1
  43. package/dist/protocols/evm/ethena/index.cjs +290 -402
  44. package/dist/protocols/evm/ethena/index.cjs.map +1 -1
  45. package/dist/protocols/evm/ethena/index.d.ts +1 -2
  46. package/dist/protocols/evm/ethena/index.js +291 -403
  47. package/dist/protocols/evm/ethena/index.js.map +1 -1
  48. package/dist/protocols/evm/euler-v2/index.cjs +485 -1163
  49. package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
  50. package/dist/protocols/evm/euler-v2/index.d.ts +1 -2
  51. package/dist/protocols/evm/euler-v2/index.js +486 -1164
  52. package/dist/protocols/evm/euler-v2/index.js.map +1 -1
  53. package/dist/protocols/evm/lido/index.cjs +241 -236
  54. package/dist/protocols/evm/lido/index.cjs.map +1 -1
  55. package/dist/protocols/evm/lido/index.d.ts +1 -2
  56. package/dist/protocols/evm/lido/index.js +242 -237
  57. package/dist/protocols/evm/lido/index.js.map +1 -1
  58. package/dist/protocols/evm/maple/index.cjs +310 -398
  59. package/dist/protocols/evm/maple/index.cjs.map +1 -1
  60. package/dist/protocols/evm/maple/index.d.ts +1 -2
  61. package/dist/protocols/evm/maple/index.js +311 -399
  62. package/dist/protocols/evm/maple/index.js.map +1 -1
  63. package/dist/protocols/evm/sky/index.cjs +238 -233
  64. package/dist/protocols/evm/sky/index.cjs.map +1 -1
  65. package/dist/protocols/evm/sky/index.d.ts +1 -2
  66. package/dist/protocols/evm/sky/index.js +236 -231
  67. package/dist/protocols/evm/sky/index.js.map +1 -1
  68. package/dist/protocols/evm/uniswap-v4/index.cjs +423 -658
  69. package/dist/protocols/evm/uniswap-v4/index.cjs.map +1 -1
  70. package/dist/protocols/evm/uniswap-v4/index.d.ts +3 -4
  71. package/dist/protocols/evm/uniswap-v4/index.js +422 -657
  72. package/dist/protocols/evm/uniswap-v4/index.js.map +1 -1
  73. package/dist/{registry-oMKlO_5z.d.ts → registry-Bv5o37_w.d.ts} +1 -1
  74. package/dist/{types-Ce2qNHai.d.cts → types-BfjWdw1j.d.ts} +3 -1
  75. package/dist/{types-5u863Fd9.d.ts → types-DUeNJLr9.d.ts} +1 -1
  76. package/package.json +7 -6
  77. package/dist/agent/catalog.d.cts +0 -939
  78. package/dist/chains/evm/index.d.cts +0 -64
  79. package/dist/chains/near/index.d.cts +0 -37
  80. package/dist/chains/solana/index.d.cts +0 -40
  81. package/dist/core/index.d.cts +0 -43
  82. package/dist/envelope-DYDPnrHZ.d.cts +0 -35
  83. package/dist/index.d.cts +0 -16
  84. package/dist/keygen-CfNp8yKJ.d.cts +0 -9
  85. package/dist/keygen-DsINazx8.d.ts +0 -9
  86. package/dist/nodeRead-BnmSaMGO.d.cts +0 -8
  87. package/dist/nodeRead-BnmSaMGO.d.ts +0 -8
  88. package/dist/protocols/evm/aave-v4/index.d.cts +0 -500
  89. package/dist/protocols/evm/curve-dao/index.d.cts +0 -147
  90. package/dist/protocols/evm/ethena/index.d.cts +0 -161
  91. package/dist/protocols/evm/euler-v2/index.d.cts +0 -317
  92. package/dist/protocols/evm/lido/index.d.cts +0 -120
  93. package/dist/protocols/evm/maple/index.d.cts +0 -109
  94. package/dist/protocols/evm/sky/index.d.cts +0 -218
  95. package/dist/protocols/evm/uniswap-v4/index.d.cts +0 -324
  96. package/dist/registry-BwZoE668.d.cts +0 -8
  97. package/dist/txParams-BC7ogvdR.d.cts +0 -19
  98. package/dist/txParams-BC7ogvdR.d.ts +0 -19
  99. package/dist/types-B8idm_gu.d.cts +0 -34
  100. 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 };
@@ -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 };