@continuumdao/ctm-mpc-defi 0.2.48 → 0.2.49

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 (63) hide show
  1. package/dist/agent/catalog.cjs +1083 -4
  2. package/dist/agent/catalog.cjs.map +1 -1
  3. package/dist/agent/catalog.d.ts +1191 -7
  4. package/dist/agent/catalog.js +1047 -5
  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/chains/evm/index.d.ts +118 -6
  9. package/dist/chains/near/index.d.ts +7 -1
  10. package/dist/chains/solana/index.d.ts +7 -1
  11. package/dist/core/index.cjs +2 -1
  12. package/dist/core/index.cjs.map +1 -1
  13. package/dist/core/index.d.ts +138 -7
  14. package/dist/core/index.js +2 -1
  15. package/dist/core/index.js.map +1 -1
  16. package/dist/index.cjs +2 -1
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.ts +848 -16
  19. package/dist/index.js +2 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/protocols/evm/aave-v4/index.d.ts +600 -6
  22. package/dist/protocols/evm/aerodrome/index.cjs.map +1 -1
  23. package/dist/protocols/evm/aerodrome/index.d.ts +125 -5
  24. package/dist/protocols/evm/aerodrome/index.js.map +1 -1
  25. package/dist/protocols/evm/arcus/index.d.ts +66 -2
  26. package/dist/protocols/evm/circle-cctp/index.d.ts +71 -2
  27. package/dist/protocols/evm/compound-v3/index.d.ts +52 -1
  28. package/dist/protocols/evm/continuum-dao/index.d.ts +56 -1
  29. package/dist/protocols/evm/curve-dao/index.d.ts +66 -2
  30. package/dist/protocols/evm/derive/index.cjs +2655 -0
  31. package/dist/protocols/evm/derive/index.cjs.map +1 -0
  32. package/dist/protocols/evm/derive/index.d.ts +859 -0
  33. package/dist/protocols/evm/derive/index.js +2536 -0
  34. package/dist/protocols/evm/derive/index.js.map +1 -0
  35. package/dist/protocols/evm/ethena/index.d.ts +52 -1
  36. package/dist/protocols/evm/euler-v2/index.d.ts +115 -16
  37. package/dist/protocols/evm/gmx/index.d.ts +66 -2
  38. package/dist/protocols/evm/hyperliquid/index.cjs +545 -267
  39. package/dist/protocols/evm/hyperliquid/index.cjs.map +1 -1
  40. package/dist/protocols/evm/hyperliquid/index.d.ts +152 -7
  41. package/dist/protocols/evm/hyperliquid/index.js +535 -269
  42. package/dist/protocols/evm/hyperliquid/index.js.map +1 -1
  43. package/dist/protocols/evm/lido/index.d.ts +52 -1
  44. package/dist/protocols/evm/maple/index.d.ts +52 -1
  45. package/dist/protocols/evm/morpho/index.d.ts +115 -4
  46. package/dist/protocols/evm/pendle/index.cjs +2 -1
  47. package/dist/protocols/evm/pendle/index.cjs.map +1 -1
  48. package/dist/protocols/evm/pendle/index.d.ts +125 -5
  49. package/dist/protocols/evm/pendle/index.js +2 -1
  50. package/dist/protocols/evm/pendle/index.js.map +1 -1
  51. package/dist/protocols/evm/permit2/index.d.ts +14 -1
  52. package/dist/protocols/evm/sky/index.d.ts +52 -1
  53. package/dist/protocols/evm/uniswap-v4/index.d.ts +78 -4
  54. package/dist/protocols/evm/venice/index.d.ts +52 -1
  55. package/package.json +7 -2
  56. package/dist/buildBatch-tsEUVn_a.d.ts +0 -45
  57. package/dist/eip712Multisign-6oNIlObj.d.ts +0 -39
  58. package/dist/envelope-Cm-llShH.d.ts +0 -37
  59. package/dist/merklDistributor-CdqtZC9N.d.ts +0 -65
  60. package/dist/multisign-Dr0j9fHm.d.ts +0 -489
  61. package/dist/registry-BvsXh0-r.d.ts +0 -8
  62. package/dist/types-RJpoU4Pc.d.ts +0 -34
  63. package/dist/types-lIfv59N1.d.ts +0 -63
@@ -1,6 +1,19 @@
1
- import { b as KeyGenSubsetForPermit, M as MultisignBuildResult } from '../../../types-lIfv59N1.js';
2
1
  import { Address } from 'viem';
3
2
 
3
+ type MultisignBuildResult = {
4
+ bodyForSign: Record<string, unknown>;
5
+ messageToSign: string;
6
+ };
7
+ type KeyGenSubset = {
8
+ pubkeyhex?: string;
9
+ keylist?: string[];
10
+ ClientKeys?: Record<string, string>;
11
+ groupId?: string;
12
+ GroupId?: string;
13
+ };
14
+ /** App-compatible alias used by multisign builders and Permit2 helpers. */
15
+ type KeyGenSubsetForPermit = KeyGenSubset;
16
+
4
17
  declare const PERMIT_SINGLE_TYPES: {
5
18
  readonly PermitSingle: readonly [{
6
19
  readonly name: "details";
@@ -1,6 +1,57 @@
1
- import { b as KeyGenSubsetForPermit, e as ProtocolModule } from '../../../types-lIfv59N1.js';
2
1
  import { Address, createPublicClient } from 'viem';
3
2
 
3
+ /** Aligns with app NonEvmChainType + 'evm'. Extend as mpc-auth adds chains. */
4
+ type ChainCategory = 'evm' | 'solana' | 'near' | 'sui' | 'ton' | 'stellar';
5
+ type EvmTokenKind = 'native' | 'erc20' | 'erc721' | 'ctmerc20' | 'ctmrwa1';
6
+ type SolanaTokenKind = 'native' | 'spl' | 'spl2022';
7
+ type NearTokenKind = 'native' | 'nep141';
8
+ type TokenRef = {
9
+ category: 'evm';
10
+ kind: EvmTokenKind;
11
+ address: `0x${string}`;
12
+ } | {
13
+ category: 'solana';
14
+ kind: SolanaTokenKind;
15
+ mint: string;
16
+ } | {
17
+ category: 'near';
18
+ kind: NearTokenKind;
19
+ contractId: string;
20
+ };
21
+ type ParamDoc = {
22
+ type: string;
23
+ required: boolean;
24
+ description: string;
25
+ };
26
+ type ProtocolActionDescriptor = {
27
+ id: string;
28
+ protocolId: string;
29
+ chainCategory: ChainCategory;
30
+ description: string;
31
+ commonParams: Array<'keyGen' | 'purposeText' | 'useCustomGas' | 'useCustomFees'>;
32
+ params: Record<string, ParamDoc>;
33
+ };
34
+ type ChainSupportContext = {
35
+ chainCategory: ChainCategory;
36
+ chainId: string | number;
37
+ };
38
+ interface ProtocolModule {
39
+ id: string;
40
+ chainCategory: ChainCategory;
41
+ isChainSupported(ctx: ChainSupportContext): boolean | Promise<boolean>;
42
+ isTokenSupported(token: TokenRef): boolean | Promise<boolean>;
43
+ actions: ProtocolActionDescriptor[];
44
+ }
45
+ type KeyGenSubset = {
46
+ pubkeyhex?: string;
47
+ keylist?: string[];
48
+ ClientKeys?: Record<string, string>;
49
+ groupId?: string;
50
+ GroupId?: string;
51
+ };
52
+ /** App-compatible alias used by multisign builders and Permit2 helpers. */
53
+ type KeyGenSubsetForPermit = KeyGenSubset;
54
+
4
55
  /**
5
56
  * Sky LockStake on Ethereum mainnet.
6
57
  * @see https://developers.skyeco.com/protocol/rewards/staking-engine/
@@ -1,8 +1,61 @@
1
- import { b as KeyGenSubsetForPermit, M as MultisignBuildResult, e as ProtocolModule } from '../../../types-lIfv59N1.js';
2
- import { Address, createPublicClient, TransactionReceipt, PublicClient } from 'viem';
1
+ import { Address, createPublicClient, TransactionReceipt, PublicClient, TypedDataDomain } from 'viem';
3
2
  import { NodeReadAuth } from '@continuumdao/continuum-node-sdk';
4
- import { E as EvmChainDetail } from '../../../types-RJpoU4Pc.js';
5
- import { d as Eip712TypedDataPayload } from '../../../eip712Multisign-6oNIlObj.js';
3
+
4
+ /** Aligns with app NonEvmChainType + 'evm'. Extend as mpc-auth adds chains. */
5
+ type ChainCategory = 'evm' | 'solana' | 'near' | 'sui' | 'ton' | 'stellar';
6
+ type MultisignBuildResult = {
7
+ bodyForSign: Record<string, unknown>;
8
+ messageToSign: string;
9
+ };
10
+ type EvmTokenKind = 'native' | 'erc20' | 'erc721' | 'ctmerc20' | 'ctmrwa1';
11
+ type SolanaTokenKind = 'native' | 'spl' | 'spl2022';
12
+ type NearTokenKind = 'native' | 'nep141';
13
+ type TokenRef = {
14
+ category: 'evm';
15
+ kind: EvmTokenKind;
16
+ address: `0x${string}`;
17
+ } | {
18
+ category: 'solana';
19
+ kind: SolanaTokenKind;
20
+ mint: string;
21
+ } | {
22
+ category: 'near';
23
+ kind: NearTokenKind;
24
+ contractId: string;
25
+ };
26
+ type ParamDoc = {
27
+ type: string;
28
+ required: boolean;
29
+ description: string;
30
+ };
31
+ type ProtocolActionDescriptor = {
32
+ id: string;
33
+ protocolId: string;
34
+ chainCategory: ChainCategory;
35
+ description: string;
36
+ commonParams: Array<'keyGen' | 'purposeText' | 'useCustomGas' | 'useCustomFees'>;
37
+ params: Record<string, ParamDoc>;
38
+ };
39
+ type ChainSupportContext = {
40
+ chainCategory: ChainCategory;
41
+ chainId: string | number;
42
+ };
43
+ interface ProtocolModule {
44
+ id: string;
45
+ chainCategory: ChainCategory;
46
+ isChainSupported(ctx: ChainSupportContext): boolean | Promise<boolean>;
47
+ isTokenSupported(token: TokenRef): boolean | Promise<boolean>;
48
+ actions: ProtocolActionDescriptor[];
49
+ }
50
+ type KeyGenSubset = {
51
+ pubkeyhex?: string;
52
+ keylist?: string[];
53
+ ClientKeys?: Record<string, string>;
54
+ groupId?: string;
55
+ GroupId?: string;
56
+ };
57
+ /** App-compatible alias used by multisign builders and Permit2 helpers. */
58
+ type KeyGenSubsetForPermit = KeyGenSubset;
6
59
 
7
60
  /** Canonical Uniswap token-allowance contract on most EVM chains. */
8
61
  declare const PERMIT2_ADDRESS: Address;
@@ -887,6 +940,16 @@ declare function computeUniswapV4Session(args: {
887
940
  protocolEnabled: boolean;
888
941
  }): UniswapV4SessionPayload;
889
942
 
943
+ type EvmChainDetail = {
944
+ legacy?: boolean;
945
+ gasLimit?: number;
946
+ gasMultiplier?: number;
947
+ gasPrice?: number;
948
+ baseFee?: number;
949
+ priorityFee?: number;
950
+ baseFeeMultiplier?: number;
951
+ };
952
+
890
953
  type SwapExactInputArgs = {
891
954
  keyGen: KeyGenSubsetForPermit;
892
955
  purposeText: string;
@@ -1173,6 +1236,17 @@ type UniswapV4ChartLivePriceArgs = {
1173
1236
  /** Latest pool price for chart live ticks (subgraph swap or Bitquery OHLC close on Robinhood). */
1174
1237
  declare function fetchUniswapV4ChartLivePrice(args: UniswapV4ChartLivePriceArgs): Promise<number | null>;
1175
1238
 
1239
+ type Eip712TypedDataField = {
1240
+ name: string;
1241
+ type: string;
1242
+ };
1243
+ type Eip712TypedDataPayload = {
1244
+ domain: TypedDataDomain;
1245
+ types: Record<string, readonly Eip712TypedDataField[] | Eip712TypedDataField[]>;
1246
+ primaryType: string;
1247
+ message: Record<string, unknown>;
1248
+ };
1249
+
1176
1250
  declare const UNISWAP_LIMIT_ORDER_CHAIN_ID = 1;
1177
1251
  declare const DEFAULT_UNISWAPX_ORDER_BASE = "https://api.uniswap.org/v2";
1178
1252
  declare const DEFAULT_LIMIT_ORDER_QUOTE_PATH = "/limit_order_quote";
@@ -1,6 +1,57 @@
1
- import { b as KeyGenSubsetForPermit, e as ProtocolModule } from '../../../types-lIfv59N1.js';
2
1
  import { Address } from 'viem';
3
2
 
3
+ /** Aligns with app NonEvmChainType + 'evm'. Extend as mpc-auth adds chains. */
4
+ type ChainCategory = 'evm' | 'solana' | 'near' | 'sui' | 'ton' | 'stellar';
5
+ type EvmTokenKind = 'native' | 'erc20' | 'erc721' | 'ctmerc20' | 'ctmrwa1';
6
+ type SolanaTokenKind = 'native' | 'spl' | 'spl2022';
7
+ type NearTokenKind = 'native' | 'nep141';
8
+ type TokenRef = {
9
+ category: 'evm';
10
+ kind: EvmTokenKind;
11
+ address: `0x${string}`;
12
+ } | {
13
+ category: 'solana';
14
+ kind: SolanaTokenKind;
15
+ mint: string;
16
+ } | {
17
+ category: 'near';
18
+ kind: NearTokenKind;
19
+ contractId: string;
20
+ };
21
+ type ParamDoc = {
22
+ type: string;
23
+ required: boolean;
24
+ description: string;
25
+ };
26
+ type ProtocolActionDescriptor = {
27
+ id: string;
28
+ protocolId: string;
29
+ chainCategory: ChainCategory;
30
+ description: string;
31
+ commonParams: Array<'keyGen' | 'purposeText' | 'useCustomGas' | 'useCustomFees'>;
32
+ params: Record<string, ParamDoc>;
33
+ };
34
+ type ChainSupportContext = {
35
+ chainCategory: ChainCategory;
36
+ chainId: string | number;
37
+ };
38
+ interface ProtocolModule {
39
+ id: string;
40
+ chainCategory: ChainCategory;
41
+ isChainSupported(ctx: ChainSupportContext): boolean | Promise<boolean>;
42
+ isTokenSupported(token: TokenRef): boolean | Promise<boolean>;
43
+ actions: ProtocolActionDescriptor[];
44
+ }
45
+ type KeyGenSubset = {
46
+ pubkeyhex?: string;
47
+ keylist?: string[];
48
+ ClientKeys?: Record<string, string>;
49
+ groupId?: string;
50
+ GroupId?: string;
51
+ };
52
+ /** App-compatible alias used by multisign builders and Permit2 helpers. */
53
+ type KeyGenSubsetForPermit = KeyGenSubset;
54
+
4
55
  declare const VENICE_PROTOCOL_ID: "venice";
5
56
  declare const VENICE_BASE_CHAIN_ID: 8453;
6
57
  /** Venice Token (VVV) on Base. */
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.49",
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,11 @@
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
+ },
133
138
  "./agent": {
134
139
  "types": "./dist/agent/catalog.d.ts",
135
140
  "import": "./dist/agent/catalog.js",
@@ -146,7 +151,7 @@
146
151
  "access": "public"
147
152
  },
148
153
  "scripts": {
149
- "build": "NODE_OPTIONS=--max-old-space-size=8192 tsup && cp -r src/agent/skills dist/agent/",
154
+ "build": "node scripts/build-sdk.mjs",
150
155
  "prepublishOnly": "npm run build",
151
156
  "pretest": "node scripts/link-self-for-sdk.mjs",
152
157
  "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 };