@continuumdao/ctm-mpc-defi 0.1.4 → 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 (94) hide show
  1. package/README.md +20 -78
  2. package/dist/agent/catalog.cjs +1388 -144
  3. package/dist/agent/catalog.cjs.map +1 -1
  4. package/dist/agent/catalog.d.ts +881 -17
  5. package/dist/agent/catalog.js +1327 -145
  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 -213
  16. package/dist/chains/evm/index.cjs.map +1 -1
  17. package/dist/chains/evm/index.d.ts +15 -25
  18. package/dist/chains/evm/index.js +21 -199
  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 -1184
  29. package/dist/index.cjs.map +1 -1
  30. package/dist/index.d.ts +7 -10
  31. package/dist/index.js +227 -1156
  32. package/dist/index.js.map +1 -1
  33. package/dist/protocols/evm/aave-v4/index.cjs +1710 -0
  34. package/dist/protocols/evm/aave-v4/index.cjs.map +1 -0
  35. package/dist/protocols/evm/aave-v4/index.d.ts +499 -0
  36. package/dist/protocols/evm/aave-v4/index.js +1666 -0
  37. package/dist/protocols/evm/aave-v4/index.js.map +1 -0
  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 +853 -0
  44. package/dist/protocols/evm/ethena/index.cjs.map +1 -0
  45. package/dist/protocols/evm/ethena/index.d.ts +160 -0
  46. package/dist/protocols/evm/ethena/index.js +831 -0
  47. package/dist/protocols/evm/ethena/index.js.map +1 -0
  48. package/dist/protocols/evm/euler-v2/index.cjs +1585 -0
  49. package/dist/protocols/evm/euler-v2/index.cjs.map +1 -0
  50. package/dist/protocols/evm/euler-v2/index.d.ts +316 -0
  51. package/dist/protocols/evm/euler-v2/index.js +1560 -0
  52. package/dist/protocols/evm/euler-v2/index.js.map +1 -0
  53. package/dist/protocols/evm/lido/index.cjs +839 -0
  54. package/dist/protocols/evm/lido/index.cjs.map +1 -0
  55. package/dist/protocols/evm/lido/index.d.ts +119 -0
  56. package/dist/protocols/evm/lido/index.js +814 -0
  57. package/dist/protocols/evm/lido/index.js.map +1 -0
  58. package/dist/protocols/evm/maple/index.cjs +619 -0
  59. package/dist/protocols/evm/maple/index.cjs.map +1 -0
  60. package/dist/protocols/evm/maple/index.d.ts +108 -0
  61. package/dist/protocols/evm/maple/index.js +605 -0
  62. package/dist/protocols/evm/maple/index.js.map +1 -0
  63. package/dist/protocols/evm/sky/index.cjs +1259 -0
  64. package/dist/protocols/evm/sky/index.cjs.map +1 -0
  65. package/dist/protocols/evm/sky/index.d.ts +217 -0
  66. package/dist/protocols/evm/sky/index.js +1234 -0
  67. package/dist/protocols/evm/sky/index.js.map +1 -0
  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 +43 -8
  77. package/dist/agent/catalog.d.cts +0 -195
  78. package/dist/chains/evm/index.d.cts +0 -62
  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 -15
  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/curve-dao/index.d.cts +0 -147
  89. package/dist/protocols/evm/uniswap-v4/index.d.cts +0 -324
  90. package/dist/registry-BwZoE668.d.cts +0 -8
  91. package/dist/txParams-BC7ogvdR.d.cts +0 -19
  92. package/dist/txParams-BC7ogvdR.d.ts +0 -19
  93. package/dist/types-B8idm_gu.d.cts +0 -34
  94. package/dist/types-Ce2qNHai.d.ts +0 -57
@@ -0,0 +1,814 @@
1
+ import { getAddress, parseAbi, zeroAddress, parseUnits, encodeFunctionData, defineChain, createPublicClient, http, parseGwei, serializeTransaction, keccak256 } from 'viem';
2
+ import { fetchChainFeeParams, gasLimitFromEstimateAndChainConfig, gweiToDecimalString, proposalTxParamsToFeeSnapshot, alignEip1559FeesWithLatestBase, getClientIdFromKeyGenResult } from '@continuumdao/continuum-node-sdk';
3
+
4
+ // src/core/registry.ts
5
+ var modules = [];
6
+ function registerProtocolModule(mod) {
7
+ const existing = modules.findIndex((m) => m.id === mod.id);
8
+ if (existing >= 0) {
9
+ modules[existing] = mod;
10
+ } else {
11
+ modules.push(mod);
12
+ }
13
+ }
14
+ var LIDO_STETH_CONTRACT_MAINNET = getAddress(
15
+ "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84"
16
+ );
17
+ var LIDO_WSTETH_CONTRACT_MAINNET = getAddress(
18
+ "0x7f39C581F595B853cBbF37C12FfeeA971C5a5bEa"
19
+ );
20
+ var LIDO_WITHDRAWAL_QUEUE_MAINNET = getAddress("0x889edC2eDab5f40e902b864aD4d7AdE8E412F9B1");
21
+ var LIDO_ETHEREUM_MAINNET_CHAIN_ID = 1;
22
+ var LIDO_SUBMIT_REFERRAL_MAINNET = zeroAddress;
23
+ function isEthereumMainnetChainId(chainIdStr) {
24
+ return String(chainIdStr ?? "").trim() === String(LIDO_ETHEREUM_MAINNET_CHAIN_ID);
25
+ }
26
+
27
+ // src/core/purpose.ts
28
+ function mergePurposeText(purposeText, purposeSuffix) {
29
+ const t = purposeText.trim();
30
+ const suffix = (purposeSuffix ?? "").trim();
31
+ if (!suffix) return t;
32
+ return t ? `${t}
33
+
34
+ ${suffix}` : suffix;
35
+ }
36
+
37
+ // src/core/envelope.ts
38
+ function finalizeMultisign(input) {
39
+ const { keyGen, destinationChainID, legs } = input;
40
+ if (legs.length === 0) {
41
+ throw new Error("finalizeMultisign requires at least one leg");
42
+ }
43
+ const ph = (keyGen.pubkeyhex ?? "").trim();
44
+ if (!ph) throw new Error("keyGen pubKey (pubkeyhex) is required");
45
+ const keyList = keyGen.keylist ?? [];
46
+ const clientId = getClientIdFromKeyGenResult(keyGen);
47
+ const first = legs[0];
48
+ const messageHashes = legs.map((l) => l.msgHash);
49
+ const messageRawBatch = legs.map((l) => l.msgRaw);
50
+ const batchMeta = legs.map((l) => ({
51
+ destinationAddress: l.destinationAddress,
52
+ signatureText: l.signatureText,
53
+ ...l.audit
54
+ }));
55
+ const proposalTxParams = legs.map((l) => l.proposalTxParams).filter((p) => p != null && typeof p === "object");
56
+ const extraPayload = {
57
+ batchMeta,
58
+ ...input.extraJSON ?? {}
59
+ };
60
+ const extraJSON = JSON.stringify(extraPayload);
61
+ const bodyForSign = {
62
+ keyList,
63
+ pubKey: ph,
64
+ msgHash: messageHashes[0],
65
+ msgRaw: first.msgRaw,
66
+ destinationChainID,
67
+ destinationAddress: input.destinationAddress ?? first.destinationAddress,
68
+ extraJSON,
69
+ signatureText: first.signatureText,
70
+ purpose: mergePurposeText(input.purposeText, input.purposeSuffix),
71
+ ...first.feeSnapshot
72
+ };
73
+ if (legs.length > 1) {
74
+ bodyForSign.messageHashes = messageHashes;
75
+ bodyForSign.messageRawBatch = messageRawBatch;
76
+ }
77
+ if (proposalTxParams.length > 0) {
78
+ bodyForSign.proposalTxParams = proposalTxParams;
79
+ }
80
+ const valueWei = first.valueWei;
81
+ if (valueWei != null && valueWei > 0n) {
82
+ bodyForSign.value = valueWei.toString();
83
+ }
84
+ if (clientId) bodyForSign.clientId = clientId;
85
+ return { bodyForSign, messageToSign: JSON.stringify(bodyForSign) };
86
+ }
87
+ function routerSwapGasLimitFromEstimate(estimatedGas, chainGasLimit) {
88
+ if (chainGasLimit != null && Number.isFinite(chainGasLimit) && chainGasLimit > 0) {
89
+ return gasLimitFromEstimateAndChainConfig(estimatedGas, chainGasLimit);
90
+ }
91
+ return (estimatedGas * 12n + 9n) / 10n;
92
+ }
93
+
94
+ // src/chains/evm/buildBatch.ts
95
+ async function buildEvmMultisignBatch(args) {
96
+ const { context, steps } = args;
97
+ const {
98
+ chainId,
99
+ rpcUrl,
100
+ executorAddress,
101
+ chainDetail,
102
+ useCustomGas,
103
+ customGasChainDetails,
104
+ keyGen,
105
+ purposeText
106
+ } = context;
107
+ if (steps.length === 0) throw new Error("buildEvmMultisignBatch requires at least one step");
108
+ const ch = defineChain({
109
+ id: chainId,
110
+ name: "Destination",
111
+ nativeCurrency: { decimals: 18, name: "Ether", symbol: "ETH" },
112
+ rpcUrls: { default: { http: [rpcUrl] } }
113
+ });
114
+ const publicClient = createPublicClient({ chain: ch, transport: http(rpcUrl) });
115
+ const feeParams = await fetchChainFeeParams(rpcUrl, chainId);
116
+ const legacy = Boolean(chainDetail?.legacy) || !feeParams.isEip1559;
117
+ const latestBaseFeeWei = !legacy ? (await publicClient.getBlock({ blockTag: "latest" })).baseFeePerGas ?? 0n : 0n;
118
+ const gasLimitConfig = useCustomGas && chainDetail?.gasLimit != null ? Number(chainDetail.gasLimit) : void 0;
119
+ const chainGasLimitRouter = chainDetail?.gasLimit != null && Number.isFinite(Number(chainDetail.gasLimit)) && Number(chainDetail.gasLimit) > 0 ? Number(chainDetail.gasLimit) : void 0;
120
+ const gasFeeMultiplier = useCustomGas && chainDetail?.gasMultiplier != null ? Number(chainDetail.gasMultiplier) : void 0;
121
+ const executor = getAddress(executorAddress);
122
+ const baseNonce = await publicClient.getTransactionCount({ address: executor, blockTag: "pending" });
123
+ const legs = [];
124
+ for (let i = 0; i < steps.length; i++) {
125
+ const step = steps[i];
126
+ const currentNonce = baseNonce + i;
127
+ let estimatedGas;
128
+ if (args.estimateGasForStep) {
129
+ estimatedGas = await args.estimateGasForStep({ step, index: i, publicClient, executor });
130
+ } else {
131
+ try {
132
+ estimatedGas = await publicClient.estimateGas({
133
+ to: step.to,
134
+ data: step.data,
135
+ value: step.value,
136
+ account: executor
137
+ });
138
+ } catch {
139
+ estimatedGas = step.fallbackGas ?? 100000n;
140
+ }
141
+ }
142
+ let gasLimitI;
143
+ if (args.resolveGasLimit) {
144
+ gasLimitI = await args.resolveGasLimit({ step, index: i, estimatedGas, publicClient });
145
+ } else if (step.routerSwap) {
146
+ gasLimitI = routerSwapGasLimitFromEstimate(estimatedGas, chainGasLimitRouter);
147
+ } else {
148
+ gasLimitI = useCustomGas ? gasLimitFromEstimateAndChainConfig(estimatedGas, gasLimitConfig) : estimatedGas;
149
+ }
150
+ let proposalTxParams;
151
+ let feeSnapshot;
152
+ let serialized;
153
+ if (legacy) {
154
+ let gasPriceWei = await publicClient.getGasPrice();
155
+ if (useCustomGas && gasFeeMultiplier != null && gasFeeMultiplier > 0) {
156
+ gasPriceWei = gasPriceWei * BigInt(100 + gasFeeMultiplier) / 100n;
157
+ }
158
+ if (useCustomGas && chainDetail?.gasPrice != null && chainDetail.gasPrice > 0) {
159
+ const configured = parseGwei(gweiToDecimalString(Number(chainDetail.gasPrice)));
160
+ if (configured > gasPriceWei) gasPriceWei = configured;
161
+ }
162
+ serialized = serializeTransaction({
163
+ type: "legacy",
164
+ to: step.to,
165
+ data: step.data,
166
+ value: step.value,
167
+ gas: gasLimitI,
168
+ gasPrice: gasPriceWei,
169
+ nonce: currentNonce,
170
+ chainId
171
+ });
172
+ proposalTxParams = {
173
+ nonce: currentNonce,
174
+ gasLimit: gasLimitI.toString(),
175
+ txType: "legacy",
176
+ gasPrice: gasPriceWei.toString()
177
+ };
178
+ feeSnapshot = proposalTxParamsToFeeSnapshot(proposalTxParams);
179
+ } else {
180
+ const fetchedBase = feeParams.baseFeeGwei ?? 0;
181
+ const fetchedPriority = feeParams.priorityFeeGwei ?? 0;
182
+ const configuredBase = useCustomGas && chainDetail?.baseFee != null ? Number(chainDetail.baseFee) : 0;
183
+ const configuredPriority = useCustomGas && chainDetail?.priorityFee != null ? Number(chainDetail.priorityFee) : 0;
184
+ const effectiveBaseFeeGwei = Math.max(fetchedBase, configuredBase);
185
+ const effectivePriorityFeeGwei = Math.max(fetchedPriority, configuredPriority);
186
+ const baseFeeMultiplierPct = useCustomGas && chainDetail?.baseFeeMultiplier != null ? Math.max(100, Number(chainDetail.baseFeeMultiplier)) : 100;
187
+ const baseComponentGwei = effectiveBaseFeeGwei * baseFeeMultiplierPct / 100;
188
+ const maxFeePerGasGwei = baseComponentGwei + effectivePriorityFeeGwei;
189
+ let maxPriorityFeePerGas = effectivePriorityFeeGwei > 0 ? parseGwei(gweiToDecimalString(effectivePriorityFeeGwei)) : parseGwei("1");
190
+ let maxFeePerGas = parseGwei(gweiToDecimalString(maxFeePerGasGwei));
191
+ if (useCustomGas && gasFeeMultiplier != null && gasFeeMultiplier > 0) {
192
+ maxPriorityFeePerGas = maxPriorityFeePerGas * BigInt(100 + gasFeeMultiplier) / 100n;
193
+ maxFeePerGas = maxFeePerGas * BigInt(100 + gasFeeMultiplier) / 100n;
194
+ }
195
+ ({ maxFeePerGas, maxPriorityFeePerGas } = alignEip1559FeesWithLatestBase(
196
+ maxFeePerGas,
197
+ maxPriorityFeePerGas,
198
+ latestBaseFeeWei
199
+ ));
200
+ serialized = serializeTransaction({
201
+ type: "eip1559",
202
+ to: step.to,
203
+ data: step.data,
204
+ value: step.value,
205
+ gas: gasLimitI,
206
+ maxFeePerGas,
207
+ maxPriorityFeePerGas,
208
+ nonce: currentNonce,
209
+ chainId
210
+ });
211
+ proposalTxParams = {
212
+ nonce: currentNonce,
213
+ gasLimit: gasLimitI.toString(),
214
+ txType: "eip1559",
215
+ maxFeePerGas: maxFeePerGas.toString(),
216
+ maxPriorityFeePerGas: maxPriorityFeePerGas.toString()
217
+ };
218
+ feeSnapshot = i === 0 ? proposalTxParamsToFeeSnapshot(proposalTxParams) : {};
219
+ }
220
+ const h = keccak256(serialized);
221
+ const msgHash = h.startsWith("0x") ? h.slice(2) : h;
222
+ const batchMetaExtra = args.buildBatchMeta({ step, index: i, gasLimit: gasLimitI });
223
+ legs.push({
224
+ msgHash,
225
+ msgRaw: i === 0 && args.firstMsgRawNo0x != null ? args.firstMsgRawNo0x : serialized,
226
+ destinationAddress: step.to,
227
+ signatureText: typeof batchMetaExtra.signatureText === "string" ? batchMetaExtra.signatureText : JSON.stringify(batchMetaExtra.signatureText ?? {}),
228
+ audit: batchMetaExtra,
229
+ feeSnapshot: i === 0 ? feeSnapshot : {},
230
+ proposalTxParams,
231
+ valueWei: i === 0 ? step.value : void 0
232
+ });
233
+ if (i === 0 && args.firstMsgRawNo0x != null) {
234
+ legs[0].msgRaw = args.firstMsgRawNo0x;
235
+ }
236
+ }
237
+ const extraJSON = {};
238
+ if (useCustomGas && customGasChainDetails && Object.keys(customGasChainDetails).length > 0) {
239
+ extraJSON.customGasChainDetails = customGasChainDetails;
240
+ }
241
+ const result = finalizeMultisign({
242
+ keyGen,
243
+ purposeText,
244
+ purposeSuffix: args.purposeSuffix,
245
+ destinationChainID: String(chainId),
246
+ destinationAddress: args.destinationAddress ?? steps[0].to,
247
+ legs,
248
+ extraJSON: Object.keys(extraJSON).length > 0 ? extraJSON : void 0
249
+ });
250
+ const pv = args.payableValueWei;
251
+ if (pv != null && pv > 0n) {
252
+ result.bodyForSign.value = pv.toString();
253
+ }
254
+ return result;
255
+ }
256
+
257
+ // src/protocols/evm/lido/multisign.ts
258
+ var LIDO_SUBMIT_FALLBACK_GAS_UNITS = 450000n;
259
+ var LIDO_APPROVE_FALLBACK = 110000n;
260
+ var LIDO_REQUEST_WITHDRAWALS_FALLBACK_GAS_UNITS = 1350000n;
261
+ var LIDO_CLAIM_WITHDRAWAL_FALLBACK_GAS_UNITS = 900000n;
262
+ var LIDO_WSTETH_WRAP_FALLBACK_GAS_UNITS = 520000n;
263
+ var LIDO_WSTETH_UNWRAP_FALLBACK_GAS_UNITS = 600000n;
264
+ var MIN_LIDO_EXECUTE_GAS = 260000n;
265
+ var erc20Abi = parseAbi([
266
+ "function allowance(address owner, address spender) view returns (uint256)",
267
+ "function approve(address spender, uint256 amount) returns (bool)"
268
+ ]);
269
+ var lidoAbi = parseAbi([
270
+ "function submit(address referral) payable returns (uint256)",
271
+ "function getSharesByPooledEth(uint256 ethAmount) view returns (uint256)"
272
+ ]);
273
+ var wqAbi = parseAbi([
274
+ "function MIN_STETH_WITHDRAWAL_AMOUNT() view returns (uint256)",
275
+ "function MAX_STETH_WITHDRAWAL_AMOUNT() view returns (uint256)",
276
+ "function requestWithdrawals(uint256[] amounts, address owner) returns (uint256[] requestIds)",
277
+ "function claimWithdrawal(uint256 requestId)"
278
+ ]);
279
+ var wstethAbi = parseAbi([
280
+ "function wrap(uint256 stETHAmount) returns (uint256)",
281
+ "function unwrap(uint256 wstETHAmount) returns (uint256)"
282
+ ]);
283
+ function parseExtraJsonObject(detail) {
284
+ const raw = detail?.ExtraJSON ?? detail?.extraJSON;
285
+ if (raw == null) return null;
286
+ if (typeof raw === "object" && !Array.isArray(raw)) return raw;
287
+ if (typeof raw === "string" && raw.trim()) {
288
+ try {
289
+ const p = JSON.parse(raw);
290
+ if (p && typeof p === "object" && !Array.isArray(p)) return p;
291
+ } catch {
292
+ return null;
293
+ }
294
+ }
295
+ return null;
296
+ }
297
+ function parseOptionalGasLimitString(raw) {
298
+ if (raw == null) return null;
299
+ const s = String(raw).trim();
300
+ if (!s) return null;
301
+ try {
302
+ if (/^0x[0-9a-fA-F]+$/.test(s)) return BigInt(s);
303
+ return BigInt(s);
304
+ } catch {
305
+ return null;
306
+ }
307
+ }
308
+ var LIDO_EVM_TYPES = /* @__PURE__ */ new Set([
309
+ "lido_submit",
310
+ "lido_steth_approve",
311
+ "lido_request_withdrawals",
312
+ "lido_claim_withdrawal",
313
+ "lido_wsteth_wrap",
314
+ "lido_wsteth_unwrap"
315
+ ]);
316
+ function lidoRequestWithdrawalsBatchIndices(detail) {
317
+ const ex = parseExtraJsonObject(detail);
318
+ if (!ex) return [];
319
+ const bm = ex.batchMeta;
320
+ if (!Array.isArray(bm)) return [];
321
+ const out = [];
322
+ bm.forEach((entry, idx) => {
323
+ if (!entry || typeof entry !== "object" || Array.isArray(entry)) return;
324
+ const evm = entry.evm;
325
+ if (!evm || typeof evm !== "object" || Array.isArray(evm)) return;
326
+ const t = String(evm.type ?? "").trim();
327
+ if (t === "lido_request_withdrawals") out.push(idx);
328
+ });
329
+ return out;
330
+ }
331
+ function isLidoBatchStepEvmSignRequest(detail, batchIndex) {
332
+ const ex = parseExtraJsonObject(detail);
333
+ if (!ex) return false;
334
+ const idx = batchIndex >= 0 ? batchIndex : 0;
335
+ const bm = ex.batchMeta;
336
+ if (Array.isArray(bm) && bm[idx] && typeof bm[idx] === "object" && !Array.isArray(bm[idx])) {
337
+ const evm0 = bm[idx].evm;
338
+ if (evm0 && typeof evm0 === "object" && !Array.isArray(evm0)) {
339
+ const t = String(evm0.type ?? "");
340
+ if (LIDO_EVM_TYPES.has(t)) return true;
341
+ }
342
+ }
343
+ return false;
344
+ }
345
+ function resolveLidoBatchStepGasFromSignRequest(detail, batchIndex) {
346
+ if (!detail) return null;
347
+ const idx = batchIndex >= 0 ? batchIndex : 0;
348
+ const propBatch = detail.proposal_tx_params ?? detail.proposalTxParams ?? detail.ProposalTxParams;
349
+ if (Array.isArray(propBatch) && propBatch.length > idx) {
350
+ const row = propBatch[idx];
351
+ if (row && typeof row === "object" && !Array.isArray(row)) {
352
+ const r = row;
353
+ const gl = parseOptionalGasLimitString(
354
+ r.gas_limit ?? r.gasLimit ?? r.GasLimit
355
+ );
356
+ if (gl != null && gl > 0n) return gl;
357
+ }
358
+ }
359
+ const ex = parseExtraJsonObject(detail);
360
+ const bm = ex?.batchMeta;
361
+ if (Array.isArray(bm) && bm[idx] && typeof bm[idx] === "object" && !Array.isArray(bm[idx])) {
362
+ const l = bm[idx].lido;
363
+ const gs = l?.gasSubmit ?? l?.gasApprove ?? l?.gasRequestWithdrawals ?? l?.gasClaimWithdrawal ?? l?.gasWstethWrap ?? l?.gasWstethUnwrap;
364
+ const base = parseOptionalGasLimitString(gs?.baseGasUnits);
365
+ if (base != null && base > 0n) return base;
366
+ }
367
+ return null;
368
+ }
369
+ async function finalizeLidoMultipart(steps, args) {
370
+ const evmSteps = steps.map((s) => ({
371
+ to: s.to,
372
+ data: s.data,
373
+ value: s.value,
374
+ fallbackGas: s.fallbackGas
375
+ }));
376
+ const firstDataNo0x = evmSteps[0].data.startsWith("0x") ? evmSteps[0].data.slice(2) : evmSteps[0].data;
377
+ return buildEvmMultisignBatch({
378
+ context: {
379
+ chainCategory: "evm",
380
+ keyGen: args.keyGen,
381
+ purposeText: args.purposeText,
382
+ chainId: LIDO_ETHEREUM_MAINNET_CHAIN_ID,
383
+ rpcUrl: args.rpcUrl.trim(),
384
+ executorAddress: args.executorAddress,
385
+ chainDetail: args.chainDetail,
386
+ useCustomGas: args.useCustomGas,
387
+ customGasChainDetails: args.customGasChainDetails
388
+ },
389
+ steps: evmSteps,
390
+ purposeSuffix: args.purposeSuffix,
391
+ firstMsgRawNo0x: firstDataNo0x,
392
+ destinationAddress: steps[0].to,
393
+ buildBatchMeta: ({ index, gasLimit }) => steps[index].buildBatchMeta({ gasLimit })
394
+ });
395
+ }
396
+ async function buildEvmMultisignBodyLidoSubmit(args) {
397
+ if (args.chainId !== LIDO_ETHEREUM_MAINNET_CHAIN_ID) {
398
+ throw new Error("Lido stake is supported on Ethereum mainnet (chain id 1) only.");
399
+ }
400
+ const lido = LIDO_STETH_CONTRACT_MAINNET;
401
+ const amt = parseUnits(args.ethAmountHuman, 18);
402
+ if (amt === 0n) throw new Error("ETH amount must be greater than zero.");
403
+ const referral = getAddress(LIDO_SUBMIT_REFERRAL_MAINNET);
404
+ const data = encodeFunctionData({
405
+ abi: lidoAbi,
406
+ functionName: "submit",
407
+ args: [referral]
408
+ });
409
+ const step = {
410
+ to: lido,
411
+ data,
412
+ value: amt,
413
+ fallbackGas: LIDO_SUBMIT_FALLBACK_GAS_UNITS,
414
+ buildBatchMeta: ({ gasLimit }) => ({
415
+ destinationAddress: lido,
416
+ signatureText: JSON.stringify({
417
+ kind: "Lido",
418
+ name: "Lido.submit",
419
+ referral,
420
+ valueWei: amt.toString(),
421
+ ethAmountHuman: args.ethAmountHuman,
422
+ chainId: LIDO_ETHEREUM_MAINNET_CHAIN_ID
423
+ }),
424
+ evm: { type: "lido_submit", version: 1, chainId: String(LIDO_ETHEREUM_MAINNET_CHAIN_ID) },
425
+ lido: { step: "submit", ethAmountHuman: args.ethAmountHuman, gasSubmit: { baseGasUnits: gasLimit.toString() } }
426
+ })
427
+ };
428
+ const purposeSuffix = `Lido: stake ${args.ethAmountHuman} ETH \u2192 stETH (submit) on Ethereum.`;
429
+ return finalizeLidoMultipart([step], {
430
+ keyGen: args.keyGen,
431
+ rpcUrl: args.rpcUrl,
432
+ chainDetail: args.chainDetail,
433
+ useCustomGas: args.useCustomGas,
434
+ customGasChainDetails: args.customGasChainDetails,
435
+ purposeText: args.purposeText,
436
+ purposeSuffix,
437
+ executorAddress: args.executorAddress
438
+ });
439
+ }
440
+ async function buildEvmMultisignBodyLidoRequestWithdrawals(args) {
441
+ if (args.chainId !== LIDO_ETHEREUM_MAINNET_CHAIN_ID) {
442
+ throw new Error("Lido withdrawals are supported on Ethereum mainnet (chain id 1) only.");
443
+ }
444
+ const steth = LIDO_STETH_CONTRACT_MAINNET;
445
+ const wq = LIDO_WITHDRAWAL_QUEUE_MAINNET;
446
+ const ch = defineChain({
447
+ id: LIDO_ETHEREUM_MAINNET_CHAIN_ID,
448
+ name: "Ethereum",
449
+ nativeCurrency: { decimals: 18, name: "Ether", symbol: "ETH" },
450
+ rpcUrls: { default: { http: [args.rpcUrl.trim()] } }
451
+ });
452
+ const publicClient = createPublicClient({ chain: ch, transport: http(args.rpcUrl.trim()) });
453
+ const amountWei = parseUnits(args.stEthAmountHuman, 18);
454
+ if (amountWei === 0n) throw new Error("stETH amount must be greater than zero.");
455
+ const minW = await publicClient.readContract({
456
+ address: wq,
457
+ abi: wqAbi,
458
+ functionName: "MIN_STETH_WITHDRAWAL_AMOUNT"
459
+ });
460
+ const maxW = await publicClient.readContract({
461
+ address: wq,
462
+ abi: wqAbi,
463
+ functionName: "MAX_STETH_WITHDRAWAL_AMOUNT"
464
+ });
465
+ if (amountWei < minW) {
466
+ throw new Error(
467
+ `Withdrawal amount is below the queue minimum (${minW.toString()} wei of stETH; check decimals / protocol constants).`
468
+ );
469
+ }
470
+ if (amountWei > maxW) {
471
+ throw new Error(
472
+ `This flow sends a single request; amount exceeds the queue maximum (${maxW.toString()} wei). Split across multiple requests.`
473
+ );
474
+ }
475
+ const executor = getAddress(args.executorAddress);
476
+ const ownerAddr = getAddress(args.owner);
477
+ const steps = [];
478
+ let approvalNeeded = false;
479
+ const allowance = await publicClient.readContract({
480
+ address: steth,
481
+ abi: erc20Abi,
482
+ functionName: "allowance",
483
+ args: [executor, wq]
484
+ });
485
+ if (allowance < amountWei) {
486
+ approvalNeeded = true;
487
+ if (allowance > 0n) {
488
+ const dataReset = encodeFunctionData({
489
+ abi: erc20Abi,
490
+ functionName: "approve",
491
+ args: [wq, 0n]
492
+ });
493
+ steps.push({
494
+ to: steth,
495
+ data: dataReset,
496
+ value: 0n,
497
+ fallbackGas: LIDO_APPROVE_FALLBACK,
498
+ buildBatchMeta: ({ gasLimit }) => ({
499
+ destinationAddress: steth,
500
+ signatureText: JSON.stringify({
501
+ kind: "Lido",
502
+ name: "stETH.approve (reset allowance before new amount)",
503
+ spender: wq,
504
+ chainId: LIDO_ETHEREUM_MAINNET_CHAIN_ID
505
+ }),
506
+ evm: { type: "lido_steth_approve", version: 1, chainId: String(LIDO_ETHEREUM_MAINNET_CHAIN_ID) },
507
+ lido: { step: "approve_reset", gasApprove: { baseGasUnits: gasLimit.toString() } }
508
+ })
509
+ });
510
+ }
511
+ const dataApprove = encodeFunctionData({
512
+ abi: erc20Abi,
513
+ functionName: "approve",
514
+ args: [wq, amountWei]
515
+ });
516
+ steps.push({
517
+ to: steth,
518
+ data: dataApprove,
519
+ value: 0n,
520
+ fallbackGas: LIDO_APPROVE_FALLBACK,
521
+ buildBatchMeta: ({ gasLimit }) => ({
522
+ destinationAddress: steth,
523
+ signatureText: JSON.stringify({
524
+ kind: "Lido",
525
+ name: "stETH.approve",
526
+ spender: wq,
527
+ amountWei: amountWei.toString(),
528
+ chainId: LIDO_ETHEREUM_MAINNET_CHAIN_ID
529
+ }),
530
+ evm: { type: "lido_steth_approve", version: 1, chainId: String(LIDO_ETHEREUM_MAINNET_CHAIN_ID) },
531
+ lido: {
532
+ step: "approve_exact",
533
+ stEthAmountHuman: args.stEthAmountHuman,
534
+ gasApprove: { baseGasUnits: gasLimit.toString() }
535
+ }
536
+ })
537
+ });
538
+ }
539
+ const dataReq = encodeFunctionData({
540
+ abi: wqAbi,
541
+ functionName: "requestWithdrawals",
542
+ args: [[amountWei], ownerAddr]
543
+ });
544
+ steps.push({
545
+ to: wq,
546
+ data: dataReq,
547
+ value: 0n,
548
+ fallbackGas: LIDO_REQUEST_WITHDRAWALS_FALLBACK_GAS_UNITS,
549
+ buildBatchMeta: ({ gasLimit }) => ({
550
+ destinationAddress: wq,
551
+ signatureText: JSON.stringify({
552
+ kind: "Lido",
553
+ name: "WithdrawalQueue.requestWithdrawals",
554
+ amountsWei: [amountWei.toString()],
555
+ owner: ownerAddr,
556
+ chainId: LIDO_ETHEREUM_MAINNET_CHAIN_ID
557
+ }),
558
+ evm: { type: "lido_request_withdrawals", version: 1, chainId: String(LIDO_ETHEREUM_MAINNET_CHAIN_ID) },
559
+ lido: {
560
+ step: "requestWithdrawals",
561
+ stEthAmountHuman: args.stEthAmountHuman,
562
+ owner: ownerAddr,
563
+ approvalNeeded,
564
+ gasRequestWithdrawals: { baseGasUnits: gasLimit.toString() }
565
+ }
566
+ })
567
+ });
568
+ const purposeSuffix = `Lido: withdrawal queue \u2014 approve (if needed) + requestWithdrawals (${args.stEthAmountHuman} stETH) on Ethereum (claim ETH in a follow-up tx when finalized).`;
569
+ return finalizeLidoMultipart(steps, {
570
+ keyGen: args.keyGen,
571
+ rpcUrl: args.rpcUrl,
572
+ chainDetail: args.chainDetail,
573
+ useCustomGas: args.useCustomGas,
574
+ customGasChainDetails: args.customGasChainDetails,
575
+ purposeText: args.purposeText,
576
+ purposeSuffix,
577
+ executorAddress: executor
578
+ });
579
+ }
580
+ async function buildEvmMultisignBodyLidoClaimWithdrawal(args) {
581
+ if (args.chainId !== LIDO_ETHEREUM_MAINNET_CHAIN_ID) {
582
+ throw new Error("Lido withdrawals are supported on Ethereum mainnet (chain id 1) only.");
583
+ }
584
+ if (args.requestId <= 0n) throw new Error("Withdrawal request id must be greater than zero.");
585
+ const wq = LIDO_WITHDRAWAL_QUEUE_MAINNET;
586
+ const data = encodeFunctionData({
587
+ abi: wqAbi,
588
+ functionName: "claimWithdrawal",
589
+ args: [args.requestId]
590
+ });
591
+ const step = {
592
+ to: wq,
593
+ data,
594
+ value: 0n,
595
+ fallbackGas: LIDO_CLAIM_WITHDRAWAL_FALLBACK_GAS_UNITS,
596
+ buildBatchMeta: ({ gasLimit }) => ({
597
+ destinationAddress: wq,
598
+ signatureText: JSON.stringify({
599
+ kind: "Lido",
600
+ name: "WithdrawalQueue.claimWithdrawal",
601
+ requestId: args.requestId.toString(),
602
+ chainId: LIDO_ETHEREUM_MAINNET_CHAIN_ID
603
+ }),
604
+ evm: { type: "lido_claim_withdrawal", version: 1, chainId: String(LIDO_ETHEREUM_MAINNET_CHAIN_ID) },
605
+ lido: {
606
+ step: "claimWithdrawal",
607
+ requestId: args.requestId.toString(),
608
+ gasClaimWithdrawal: { baseGasUnits: gasLimit.toString() }
609
+ }
610
+ })
611
+ };
612
+ const purposeSuffix = `Lido: claim ETH for finalized withdrawal request #${args.requestId.toString()} on Ethereum (separate tx from requesting).`;
613
+ return finalizeLidoMultipart([step], {
614
+ keyGen: args.keyGen,
615
+ rpcUrl: args.rpcUrl,
616
+ chainDetail: args.chainDetail,
617
+ useCustomGas: args.useCustomGas,
618
+ customGasChainDetails: args.customGasChainDetails,
619
+ purposeText: args.purposeText,
620
+ purposeSuffix,
621
+ executorAddress: args.executorAddress
622
+ });
623
+ }
624
+ async function buildEvmMultisignBodyLidoWrapStEth(args) {
625
+ if (args.chainId !== LIDO_ETHEREUM_MAINNET_CHAIN_ID) {
626
+ throw new Error("Lido wrap is supported on Ethereum mainnet (chain id 1) only.");
627
+ }
628
+ const steth = LIDO_STETH_CONTRACT_MAINNET;
629
+ const wsteth = LIDO_WSTETH_CONTRACT_MAINNET;
630
+ const ch = defineChain({
631
+ id: LIDO_ETHEREUM_MAINNET_CHAIN_ID,
632
+ name: "Ethereum",
633
+ nativeCurrency: { decimals: 18, name: "Ether", symbol: "ETH" },
634
+ rpcUrls: { default: { http: [args.rpcUrl.trim()] } }
635
+ });
636
+ const publicClient = createPublicClient({ chain: ch, transport: http(args.rpcUrl.trim()) });
637
+ const amountWei = parseUnits(args.stEthAmountHuman, 18);
638
+ if (amountWei === 0n) throw new Error("stETH amount must be greater than zero.");
639
+ const executor = getAddress(args.executorAddress);
640
+ const steps = [];
641
+ let approvalNeeded = false;
642
+ const allowance = await publicClient.readContract({
643
+ address: steth,
644
+ abi: erc20Abi,
645
+ functionName: "allowance",
646
+ args: [executor, wsteth]
647
+ });
648
+ if (allowance < amountWei) {
649
+ approvalNeeded = true;
650
+ if (allowance > 0n) {
651
+ const dataReset = encodeFunctionData({
652
+ abi: erc20Abi,
653
+ functionName: "approve",
654
+ args: [wsteth, 0n]
655
+ });
656
+ steps.push({
657
+ to: steth,
658
+ data: dataReset,
659
+ value: 0n,
660
+ fallbackGas: LIDO_APPROVE_FALLBACK,
661
+ buildBatchMeta: ({ gasLimit }) => ({
662
+ destinationAddress: steth,
663
+ signatureText: JSON.stringify({
664
+ kind: "Lido",
665
+ name: "stETH.approve (reset for wstETH wrap)",
666
+ spender: wsteth,
667
+ chainId: LIDO_ETHEREUM_MAINNET_CHAIN_ID
668
+ }),
669
+ evm: { type: "lido_steth_approve", version: 1, chainId: String(LIDO_ETHEREUM_MAINNET_CHAIN_ID) },
670
+ lido: { step: "approve_wrap_reset", spender: "wstETH", gasApprove: { baseGasUnits: gasLimit.toString() } }
671
+ })
672
+ });
673
+ }
674
+ const dataApprove = encodeFunctionData({
675
+ abi: erc20Abi,
676
+ functionName: "approve",
677
+ args: [wsteth, amountWei]
678
+ });
679
+ steps.push({
680
+ to: steth,
681
+ data: dataApprove,
682
+ value: 0n,
683
+ fallbackGas: LIDO_APPROVE_FALLBACK,
684
+ buildBatchMeta: ({ gasLimit }) => ({
685
+ destinationAddress: steth,
686
+ signatureText: JSON.stringify({
687
+ kind: "Lido",
688
+ name: "stETH.approve",
689
+ spender: wsteth,
690
+ amountWei: amountWei.toString(),
691
+ chainId: LIDO_ETHEREUM_MAINNET_CHAIN_ID
692
+ }),
693
+ evm: { type: "lido_steth_approve", version: 1, chainId: String(LIDO_ETHEREUM_MAINNET_CHAIN_ID) },
694
+ lido: {
695
+ step: "approve_wrap_exact",
696
+ stEthAmountHuman: args.stEthAmountHuman,
697
+ gasApprove: { baseGasUnits: gasLimit.toString() }
698
+ }
699
+ })
700
+ });
701
+ }
702
+ const dataWrap = encodeFunctionData({
703
+ abi: wstethAbi,
704
+ functionName: "wrap",
705
+ args: [amountWei]
706
+ });
707
+ steps.push({
708
+ to: wsteth,
709
+ data: dataWrap,
710
+ value: 0n,
711
+ fallbackGas: LIDO_WSTETH_WRAP_FALLBACK_GAS_UNITS,
712
+ buildBatchMeta: ({ gasLimit }) => ({
713
+ destinationAddress: wsteth,
714
+ signatureText: JSON.stringify({
715
+ kind: "Lido",
716
+ name: "WstETH.wrap",
717
+ stEthAmountWei: amountWei.toString(),
718
+ chainId: LIDO_ETHEREUM_MAINNET_CHAIN_ID
719
+ }),
720
+ evm: { type: "lido_wsteth_wrap", version: 1, chainId: String(LIDO_ETHEREUM_MAINNET_CHAIN_ID) },
721
+ lido: {
722
+ step: "wrap",
723
+ stEthAmountHuman: args.stEthAmountHuman,
724
+ approvalNeeded,
725
+ gasWstethWrap: { baseGasUnits: gasLimit.toString() }
726
+ }
727
+ })
728
+ });
729
+ const purposeSuffix = `Lido: approve (if needed) + wrap (${args.stEthAmountHuman} stETH \u2192 wstETH) on Ethereum.`;
730
+ return finalizeLidoMultipart(steps, {
731
+ keyGen: args.keyGen,
732
+ rpcUrl: args.rpcUrl,
733
+ chainDetail: args.chainDetail,
734
+ useCustomGas: args.useCustomGas,
735
+ customGasChainDetails: args.customGasChainDetails,
736
+ purposeText: args.purposeText,
737
+ purposeSuffix,
738
+ executorAddress: executor
739
+ });
740
+ }
741
+ async function buildEvmMultisignBodyLidoUnwrapWstEth(args) {
742
+ if (args.chainId !== LIDO_ETHEREUM_MAINNET_CHAIN_ID) {
743
+ throw new Error("Lido unwrap is supported on Ethereum mainnet (chain id 1) only.");
744
+ }
745
+ const wsteth = LIDO_WSTETH_CONTRACT_MAINNET;
746
+ const amt = parseUnits(args.wstEthAmountHuman, 18);
747
+ if (amt === 0n) throw new Error("wstETH amount must be greater than zero.");
748
+ const data = encodeFunctionData({
749
+ abi: wstethAbi,
750
+ functionName: "unwrap",
751
+ args: [amt]
752
+ });
753
+ const step = {
754
+ to: wsteth,
755
+ data,
756
+ value: 0n,
757
+ fallbackGas: LIDO_WSTETH_UNWRAP_FALLBACK_GAS_UNITS,
758
+ buildBatchMeta: ({ gasLimit }) => ({
759
+ destinationAddress: wsteth,
760
+ signatureText: JSON.stringify({
761
+ kind: "Lido",
762
+ name: "WstETH.unwrap",
763
+ wstEthAmountWei: amt.toString(),
764
+ chainId: LIDO_ETHEREUM_MAINNET_CHAIN_ID
765
+ }),
766
+ evm: { type: "lido_wsteth_unwrap", version: 1, chainId: String(LIDO_ETHEREUM_MAINNET_CHAIN_ID) },
767
+ lido: {
768
+ step: "unwrap",
769
+ wstEthAmountHuman: args.wstEthAmountHuman,
770
+ gasWstethUnwrap: { baseGasUnits: gasLimit.toString() }
771
+ }
772
+ })
773
+ };
774
+ const purposeSuffix = `Lido: unwrap (${args.wstEthAmountHuman} wstETH \u2192 stETH) on Ethereum.`;
775
+ return finalizeLidoMultipart([step], {
776
+ keyGen: args.keyGen,
777
+ rpcUrl: args.rpcUrl,
778
+ chainDetail: args.chainDetail,
779
+ useCustomGas: args.useCustomGas,
780
+ customGasChainDetails: args.customGasChainDetails,
781
+ purposeText: args.purposeText,
782
+ purposeSuffix,
783
+ executorAddress: args.executorAddress
784
+ });
785
+ }
786
+ function isLidoEvmSignRequestForEstimateWorkaround(detail, batchIndex) {
787
+ return isLidoBatchStepEvmSignRequest(detail, batchIndex ?? 0);
788
+ }
789
+
790
+ // src/protocols/evm/lido/index.ts
791
+ var LIDO_PROTOCOL_ID = "lido";
792
+ var lidoProtocolModule = {
793
+ id: LIDO_PROTOCOL_ID,
794
+ chainCategory: "evm",
795
+ isChainSupported(ctx) {
796
+ if (ctx.chainCategory !== "evm") return false;
797
+ return Number(ctx.chainId) === LIDO_ETHEREUM_MAINNET_CHAIN_ID;
798
+ },
799
+ isTokenSupported(token) {
800
+ return token.category === "evm" && (token.kind === "native" || token.kind === "erc20");
801
+ },
802
+ actions: [
803
+ { id: "lido.submit", protocolId: LIDO_PROTOCOL_ID, chainCategory: "evm", description: "Stake ETH via Lido submit()", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: { valueWei: { type: "string", required: true, description: "ETH to stake (wei string)" } } },
804
+ { id: "lido.request-withdrawals", protocolId: LIDO_PROTOCOL_ID, chainCategory: "evm", description: "Queue stETH withdrawal", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
805
+ { id: "lido.claim-withdrawal", protocolId: LIDO_PROTOCOL_ID, chainCategory: "evm", description: "Claim finalized withdrawal", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
806
+ { id: "lido.wrap-steth", protocolId: LIDO_PROTOCOL_ID, chainCategory: "evm", description: "Wrap stETH to wstETH", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} },
807
+ { id: "lido.unwrap-wsteth", protocolId: LIDO_PROTOCOL_ID, chainCategory: "evm", description: "Unwrap wstETH to stETH", commonParams: ["keyGen", "purposeText", "useCustomGas"], params: {} }
808
+ ]
809
+ };
810
+ registerProtocolModule(lidoProtocolModule);
811
+
812
+ export { LIDO_CLAIM_WITHDRAWAL_FALLBACK_GAS_UNITS, LIDO_ETHEREUM_MAINNET_CHAIN_ID, LIDO_EVM_TYPES, LIDO_PROTOCOL_ID, LIDO_REQUEST_WITHDRAWALS_FALLBACK_GAS_UNITS, LIDO_STETH_CONTRACT_MAINNET, LIDO_SUBMIT_FALLBACK_GAS_UNITS, LIDO_SUBMIT_REFERRAL_MAINNET, LIDO_WITHDRAWAL_QUEUE_MAINNET, LIDO_WSTETH_CONTRACT_MAINNET, LIDO_WSTETH_UNWRAP_FALLBACK_GAS_UNITS, LIDO_WSTETH_WRAP_FALLBACK_GAS_UNITS, MIN_LIDO_EXECUTE_GAS, buildEvmMultisignBodyLidoClaimWithdrawal, buildEvmMultisignBodyLidoRequestWithdrawals, buildEvmMultisignBodyLidoSubmit, buildEvmMultisignBodyLidoUnwrapWstEth, buildEvmMultisignBodyLidoWrapStEth, isEthereumMainnetChainId, isLidoBatchStepEvmSignRequest, isLidoEvmSignRequestForEstimateWorkaround, lidoProtocolModule, lidoRequestWithdrawalsBatchIndices, resolveLidoBatchStepGasFromSignRequest };
813
+ //# sourceMappingURL=index.js.map
814
+ //# sourceMappingURL=index.js.map