@continuumdao/ctm-mpc-defi 0.2.48 → 0.2.50

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 (69) hide show
  1. package/dist/agent/catalog.cjs +1664 -5
  2. package/dist/agent/catalog.cjs.map +1 -1
  3. package/dist/agent/catalog.d.ts +2705 -7
  4. package/dist/agent/catalog.js +1599 -6
  5. package/dist/agent/catalog.js.map +1 -1
  6. package/dist/agent/skills/derive/SKILL.md +112 -0
  7. package/dist/agent/skills/hyperliquid/SKILL.md +22 -2
  8. package/dist/agent/skills/trueo/SKILL.md +64 -0
  9. package/dist/chains/evm/index.d.ts +118 -6
  10. package/dist/chains/near/index.d.ts +7 -1
  11. package/dist/chains/solana/index.d.ts +7 -1
  12. package/dist/core/index.cjs +3 -1
  13. package/dist/core/index.cjs.map +1 -1
  14. package/dist/core/index.d.ts +138 -7
  15. package/dist/core/index.js +3 -1
  16. package/dist/core/index.js.map +1 -1
  17. package/dist/index.cjs +3 -1
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.ts +848 -16
  20. package/dist/index.js +3 -1
  21. package/dist/index.js.map +1 -1
  22. package/dist/protocols/evm/aave-v4/index.d.ts +600 -6
  23. package/dist/protocols/evm/aerodrome/index.cjs.map +1 -1
  24. package/dist/protocols/evm/aerodrome/index.d.ts +125 -5
  25. package/dist/protocols/evm/aerodrome/index.js.map +1 -1
  26. package/dist/protocols/evm/arcus/index.d.ts +66 -2
  27. package/dist/protocols/evm/circle-cctp/index.d.ts +71 -2
  28. package/dist/protocols/evm/compound-v3/index.d.ts +52 -1
  29. package/dist/protocols/evm/continuum-dao/index.d.ts +56 -1
  30. package/dist/protocols/evm/curve-dao/index.d.ts +66 -2
  31. package/dist/protocols/evm/derive/index.cjs +2655 -0
  32. package/dist/protocols/evm/derive/index.cjs.map +1 -0
  33. package/dist/protocols/evm/derive/index.d.ts +859 -0
  34. package/dist/protocols/evm/derive/index.js +2536 -0
  35. package/dist/protocols/evm/derive/index.js.map +1 -0
  36. package/dist/protocols/evm/ethena/index.d.ts +52 -1
  37. package/dist/protocols/evm/euler-v2/index.d.ts +115 -16
  38. package/dist/protocols/evm/gmx/index.d.ts +66 -2
  39. package/dist/protocols/evm/hyperliquid/index.cjs +545 -267
  40. package/dist/protocols/evm/hyperliquid/index.cjs.map +1 -1
  41. package/dist/protocols/evm/hyperliquid/index.d.ts +152 -7
  42. package/dist/protocols/evm/hyperliquid/index.js +535 -269
  43. package/dist/protocols/evm/hyperliquid/index.js.map +1 -1
  44. package/dist/protocols/evm/lido/index.d.ts +52 -1
  45. package/dist/protocols/evm/maple/index.d.ts +52 -1
  46. package/dist/protocols/evm/morpho/index.d.ts +115 -4
  47. package/dist/protocols/evm/pendle/index.cjs +3 -1
  48. package/dist/protocols/evm/pendle/index.cjs.map +1 -1
  49. package/dist/protocols/evm/pendle/index.d.ts +125 -5
  50. package/dist/protocols/evm/pendle/index.js +3 -1
  51. package/dist/protocols/evm/pendle/index.js.map +1 -1
  52. package/dist/protocols/evm/permit2/index.d.ts +14 -1
  53. package/dist/protocols/evm/sky/index.d.ts +52 -1
  54. package/dist/protocols/evm/trueo/index.cjs +2308 -0
  55. package/dist/protocols/evm/trueo/index.cjs.map +1 -0
  56. package/dist/protocols/evm/trueo/index.d.ts +1254 -0
  57. package/dist/protocols/evm/trueo/index.js +2165 -0
  58. package/dist/protocols/evm/trueo/index.js.map +1 -0
  59. package/dist/protocols/evm/uniswap-v4/index.d.ts +78 -4
  60. package/dist/protocols/evm/venice/index.d.ts +52 -1
  61. package/package.json +12 -2
  62. package/dist/buildBatch-tsEUVn_a.d.ts +0 -45
  63. package/dist/eip712Multisign-6oNIlObj.d.ts +0 -39
  64. package/dist/envelope-Cm-llShH.d.ts +0 -37
  65. package/dist/merklDistributor-CdqtZC9N.d.ts +0 -65
  66. package/dist/multisign-Dr0j9fHm.d.ts +0 -489
  67. package/dist/registry-BvsXh0-r.d.ts +0 -8
  68. package/dist/types-RJpoU4Pc.d.ts +0 -34
  69. package/dist/types-lIfv59N1.d.ts +0 -63
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@continuumdao/ctm-mpc-defi",
3
- "version": "0.2.48",
3
+ "version": "0.2.50",
4
4
  "description": "Continuum MPC DeFi protocol library — multiSignRequest builders for EVM and future chain categories",
5
5
  "repository": {
6
6
  "type": "git",
@@ -130,6 +130,16 @@
130
130
  "import": "./dist/protocols/evm/pendle/index.js",
131
131
  "require": "./dist/protocols/evm/pendle/index.cjs"
132
132
  },
133
+ "./protocols/evm/derive": {
134
+ "types": "./dist/protocols/evm/derive/index.d.ts",
135
+ "import": "./dist/protocols/evm/derive/index.js",
136
+ "require": "./dist/protocols/evm/derive/index.cjs"
137
+ },
138
+ "./protocols/evm/trueo": {
139
+ "types": "./dist/protocols/evm/trueo/index.d.ts",
140
+ "import": "./dist/protocols/evm/trueo/index.js",
141
+ "require": "./dist/protocols/evm/trueo/index.cjs"
142
+ },
133
143
  "./agent": {
134
144
  "types": "./dist/agent/catalog.d.ts",
135
145
  "import": "./dist/agent/catalog.js",
@@ -146,7 +156,7 @@
146
156
  "access": "public"
147
157
  },
148
158
  "scripts": {
149
- "build": "NODE_OPTIONS=--max-old-space-size=8192 tsup && cp -r src/agent/skills dist/agent/",
159
+ "build": "node scripts/build-sdk.mjs",
150
160
  "prepublishOnly": "npm run build",
151
161
  "pretest": "node scripts/link-self-for-sdk.mjs",
152
162
  "test": "vitest run",
@@ -1,45 +0,0 @@
1
- import { Address, PublicClient } from 'viem';
2
- import { M as MultisignBuildResult } from './types-lIfv59N1.js';
3
- import { f as finalizeMultisign } from './envelope-Cm-llShH.js';
4
- import { b as EvmTxStep, a as EvmProtocolContext } from './types-RJpoU4Pc.js';
5
-
6
- type EvmBatchMetaBuilder = (args: {
7
- step: EvmTxStep;
8
- index: number;
9
- gasLimit: bigint;
10
- }) => Record<string, unknown>;
11
- type EvmBuildBatchArgs = {
12
- context: EvmProtocolContext;
13
- steps: EvmTxStep[];
14
- purposeSuffix?: string;
15
- buildBatchMeta: EvmBatchMetaBuilder;
16
- /** First leg msgRaw without 0x prefix; defaults to first step calldata */
17
- firstMsgRawNo0x?: string;
18
- destinationAddress?: Address;
19
- /** Top-level `value` on bodyForSign when the payable amount is not on the first leg */
20
- payableValueWei?: bigint;
21
- resolveGasLimit?: (args: {
22
- step: EvmTxStep;
23
- index: number;
24
- estimatedGas: bigint;
25
- publicClient: PublicClient;
26
- }) => Promise<bigint> | bigint;
27
- /** Override default `estimateGas` (e.g. trade-API gas, skip post-approve deposit estimate). */
28
- estimateGasForStep?: (args: {
29
- step: EvmTxStep;
30
- index: number;
31
- publicClient: PublicClient;
32
- executor: Address;
33
- }) => Promise<bigint> | bigint;
34
- };
35
- /**
36
- * Build unsigned EVM txs, estimate gas, serialize, hash — then assemble mpc-auth body via core envelope.
37
- */
38
- declare function buildEvmMultisignBatch(args: EvmBuildBatchArgs): Promise<MultisignBuildResult>;
39
- declare const evmChainCategoryModule: {
40
- category: "evm";
41
- finalizeMultisign: typeof finalizeMultisign;
42
- buildEvmMultisignBatch: typeof buildEvmMultisignBatch;
43
- };
44
-
45
- export { type EvmBatchMetaBuilder as E, type EvmBuildBatchArgs as a, buildEvmMultisignBatch as b, evmChainCategoryModule as e };
@@ -1,39 +0,0 @@
1
- import { TypedDataDomain } from 'viem';
2
- import { K as KeyGenSubset, M as MultisignBuildResult } from './types-lIfv59N1.js';
3
-
4
- declare const EIP712_SIGN_REQUEST_KIND: "eip712";
5
- type Eip712TypedDataField = {
6
- name: string;
7
- type: string;
8
- };
9
- type Eip712TypedDataPayload = {
10
- domain: TypedDataDomain;
11
- types: Record<string, readonly Eip712TypedDataField[] | Eip712TypedDataField[]>;
12
- primaryType: string;
13
- message: Record<string, unknown>;
14
- };
15
- type Eip712MultisignDelivery = Record<string, unknown> & {
16
- kind: string;
17
- };
18
- type BuildEip712MultisignLeg = {
19
- typedData: Eip712TypedDataPayload;
20
- delivery: Eip712MultisignDelivery;
21
- audit?: Record<string, unknown>;
22
- };
23
- type BuildEip712MultisignArgs = {
24
- keyGen: KeyGenSubset;
25
- purposeText: string;
26
- purposeSuffix?: string;
27
- /** Chain id stored on the sign request (protocol context; may differ from EIP-712 domain chainId). */
28
- destinationChainID: string;
29
- destinationAddress: string;
30
- legs: readonly BuildEip712MultisignLeg[];
31
- expiryDate?: number;
32
- };
33
- /**
34
- * Build an mpc-auth multiSignRequest body for one or more EIP-712 digests (no EVM tx broadcast).
35
- * `extraJSON.eip712` is always an array. N=1 uses `msgHash`/`msgRaw`; N>=2 uses `messageHashes`/`messageRawBatch`.
36
- */
37
- declare function buildEip712Multisign(args: BuildEip712MultisignArgs): MultisignBuildResult;
38
-
39
- export { type BuildEip712MultisignArgs as B, EIP712_SIGN_REQUEST_KIND as E, type BuildEip712MultisignLeg as a, type Eip712MultisignDelivery as b, type Eip712TypedDataField as c, type Eip712TypedDataPayload as d, buildEip712Multisign as e };
@@ -1,37 +0,0 @@
1
- import { K as KeyGenSubset, C as ChainCategory, M as MultisignBuildResult } from './types-lIfv59N1.js';
2
-
3
- interface MultisignLeg {
4
- msgHash: string;
5
- msgRaw: string;
6
- destinationAddress: string;
7
- signatureText: string;
8
- audit: Record<string, unknown>;
9
- feeSnapshot: Record<string, unknown>;
10
- proposalTxParams?: Record<string, unknown>;
11
- /** Payable value wei string for first leg only when relevant */
12
- valueWei?: bigint;
13
- }
14
- interface ChainCategoryBuildInput {
15
- keyGen: KeyGenSubset;
16
- purposeText: string;
17
- purposeSuffix?: string;
18
- destinationChainID: string;
19
- legs: MultisignLeg[];
20
- extraJSON?: Record<string, unknown>;
21
- /** Top-level destination address (first leg destination if omitted) */
22
- destinationAddress?: string;
23
- /** Unix seconds (UTC) for mpc-auth multiSignRequest expiryDate. */
24
- expiryDate?: number;
25
- }
26
- interface ChainCategoryModule {
27
- category: ChainCategory;
28
- finalizeMultisign(input: ChainCategoryBuildInput): MultisignBuildResult;
29
- }
30
- /**
31
- * Assemble mpc-auth `bodyForSign` from category-built legs.
32
- * Supports single-tx and batch (messageHashes / messageRawBatch / proposalTxParams).
33
- */
34
- declare function finalizeMultisign(input: ChainCategoryBuildInput): MultisignBuildResult;
35
- declare const coreChainCategoryModule: ChainCategoryModule;
36
-
37
- export { type ChainCategoryBuildInput as C, type MultisignLeg as M, type ChainCategoryModule as a, coreChainCategoryModule as c, finalizeMultisign as f };
@@ -1,65 +0,0 @@
1
- import { Address } from 'viem';
2
-
3
- declare const MERKL_API_BASE = "https://api.merkl.xyz";
4
- /**
5
- * Canonical Merkl `Distributor.sol` on most EVM chains.
6
- * https://docs.merkl.xyz/integrate-merkl/smart-contract-addresses
7
- */
8
- declare const MERKL_DISTRIBUTOR_ADDRESS: Address;
9
- declare const MERKL_DISTRIBUTOR_CLAIM_GAS_FALLBACK = 500000n;
10
- declare const MERKL_REWARDS_NOTES = "Wallet-wide Merkl on this chain (not protocol-filtered). Other venues\u2019 campaigns can appear. Claims the first Merkle root batch; call again if additionalRoots > 0. rEUL is omitted (Euler unlock flow). Merkl updates every 8\u201312 hours.";
11
- type MerklDistributorClaimLeaf = {
12
- root: string;
13
- token: Address;
14
- amountWei: bigint;
15
- proofs: readonly `0x${string}`[];
16
- symbol: string;
17
- decimals: number;
18
- };
19
- type MerklRewardRow = {
20
- symbol: string;
21
- token: string;
22
- amountHuman: string;
23
- amountWei: string;
24
- decimals: number;
25
- root: string;
26
- };
27
- type MerklRewardsSummary = {
28
- chainId: number;
29
- user: string;
30
- distributor: string;
31
- claimable: MerklRewardRow[];
32
- claimableCount: number;
33
- firstRootClaimableCount: number;
34
- additionalRoots: number;
35
- skippedReulCount: number;
36
- notes: string;
37
- };
38
- declare function merklUserRewardsUrl(addr: Address, chainId: number): string;
39
- declare function loadMerklUserRewardsJson(args: {
40
- chainId: number;
41
- user: Address;
42
- }): Promise<unknown>;
43
- declare function parseMerklUserRewardsToLeaves(raw: unknown, args: {
44
- chainId: number;
45
- user: Address;
46
- }): MerklDistributorClaimLeaf[];
47
- declare function selectFirstRootMerklLeaves(collected: readonly MerklDistributorClaimLeaf[]): MerklDistributorClaimLeaf[];
48
- declare function isMerklRewardEulLeaf(leaf: MerklDistributorClaimLeaf): boolean;
49
- /** Non-rEUL leaves on the first remaining Merkle root (one Distributor.claim tx). */
50
- declare function selectWalletWideMerklClaimLeaves(collected: readonly MerklDistributorClaimLeaf[]): MerklDistributorClaimLeaf[];
51
- declare function fetchAllMerklDistributorClaimLeaves(args: {
52
- chainId: number;
53
- user: Address;
54
- }): Promise<MerklDistributorClaimLeaf[]>;
55
- declare function encodeMerklDistributorClaimData(args: {
56
- user: Address;
57
- leaves: readonly MerklDistributorClaimLeaf[];
58
- }): `0x${string}`;
59
- declare function merklLeafToRow(leaf: MerklDistributorClaimLeaf): MerklRewardRow;
60
- declare function fetchMerklRewardsSummary(args: {
61
- user: string;
62
- chainId: number;
63
- }): Promise<MerklRewardsSummary>;
64
-
65
- export { MERKL_API_BASE as M, MERKL_DISTRIBUTOR_ADDRESS as a, MERKL_DISTRIBUTOR_CLAIM_GAS_FALLBACK as b, MERKL_REWARDS_NOTES as c, type MerklDistributorClaimLeaf as d, type MerklRewardRow as e, type MerklRewardsSummary as f, encodeMerklDistributorClaimData as g, fetchAllMerklDistributorClaimLeaves as h, fetchMerklRewardsSummary as i, isMerklRewardEulLeaf as j, merklUserRewardsUrl as k, loadMerklUserRewardsJson as l, merklLeafToRow as m, selectWalletWideMerklClaimLeaves as n, parseMerklUserRewardsToLeaves as p, selectFirstRootMerklLeaves as s };