@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.
Files changed (100) hide show
  1. package/README.md +20 -78
  2. package/dist/agent/catalog.cjs +563 -5
  3. package/dist/agent/catalog.cjs.map +1 -1
  4. package/dist/agent/catalog.d.ts +166 -20
  5. package/dist/agent/catalog.js +551 -7
  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 +13 -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 +79 -224
  16. package/dist/chains/evm/index.cjs.map +1 -1
  17. package/dist/chains/evm/index.d.ts +26 -26
  18. package/dist/chains/evm/index.js +69 -209
  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 +68 -106
  23. package/dist/core/index.cjs.map +1 -1
  24. package/dist/core/index.d.ts +21 -36
  25. package/dist/core/index.js +57 -96
  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 +356 -1855
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.ts +7 -11
  31. package/dist/index.js +332 -1826
  32. package/dist/index.js.map +1 -1
  33. package/dist/protocols/evm/aave-v4/index.cjs +1152 -669
  34. package/dist/protocols/evm/aave-v4/index.cjs.map +1 -1
  35. package/dist/protocols/evm/aave-v4/index.d.ts +418 -3
  36. package/dist/protocols/evm/aave-v4/index.js +1126 -670
  37. package/dist/protocols/evm/aave-v4/index.js.map +1 -1
  38. package/dist/protocols/evm/curve-dao/index.cjs +257 -131
  39. package/dist/protocols/evm/curve-dao/index.cjs.map +1 -1
  40. package/dist/protocols/evm/curve-dao/index.d.ts +69 -5
  41. package/dist/protocols/evm/curve-dao/index.js +242 -124
  42. package/dist/protocols/evm/curve-dao/index.js.map +1 -1
  43. package/dist/protocols/evm/ethena/index.cjs +394 -402
  44. package/dist/protocols/evm/ethena/index.cjs.map +1 -1
  45. package/dist/protocols/evm/ethena/index.d.ts +47 -3
  46. package/dist/protocols/evm/ethena/index.js +390 -404
  47. package/dist/protocols/evm/ethena/index.js.map +1 -1
  48. package/dist/protocols/evm/euler-v2/index.cjs +2810 -1191
  49. package/dist/protocols/evm/euler-v2/index.cjs.map +1 -1
  50. package/dist/protocols/evm/euler-v2/index.d.ts +465 -3
  51. package/dist/protocols/evm/euler-v2/index.js +2761 -1192
  52. package/dist/protocols/evm/euler-v2/index.js.map +1 -1
  53. package/dist/protocols/evm/lido/index.cjs +351 -236
  54. package/dist/protocols/evm/lido/index.cjs.map +1 -1
  55. package/dist/protocols/evm/lido/index.d.ts +34 -4
  56. package/dist/protocols/evm/lido/index.js +348 -238
  57. package/dist/protocols/evm/lido/index.js.map +1 -1
  58. package/dist/protocols/evm/maple/index.cjs +390 -395
  59. package/dist/protocols/evm/maple/index.cjs.map +1 -1
  60. package/dist/protocols/evm/maple/index.d.ts +23 -3
  61. package/dist/protocols/evm/maple/index.js +390 -397
  62. package/dist/protocols/evm/maple/index.js.map +1 -1
  63. package/dist/protocols/evm/sky/index.cjs +454 -232
  64. package/dist/protocols/evm/sky/index.cjs.map +1 -1
  65. package/dist/protocols/evm/sky/index.d.ts +57 -3
  66. package/dist/protocols/evm/sky/index.js +444 -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 };