damm-sdk 1.4.34 → 1.4.35

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.
@@ -20,6 +20,7 @@ export * from "./erc721";
20
20
  export * from "./iporFusion";
21
21
  export * from "./originArm";
22
22
  export * from "./etherfi";
23
+ export * from "./lido";
23
24
  export * from "./syrup";
24
25
  export * from "./gearbox";
25
26
  export * from "./fluidLite";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,yBAAyB,CAAC;AACxC,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./lido";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/lido/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,96 @@
1
+ export declare const LidoStEthAbi: readonly [{
2
+ readonly inputs: readonly [{
3
+ readonly internalType: "address";
4
+ readonly name: "_referral";
5
+ readonly type: "address";
6
+ }];
7
+ readonly name: "submit";
8
+ readonly outputs: readonly [{
9
+ readonly internalType: "uint256";
10
+ readonly name: "";
11
+ readonly type: "uint256";
12
+ }];
13
+ readonly stateMutability: "payable";
14
+ readonly type: "function";
15
+ }];
16
+ export declare const LidoWstEthAbi: readonly [{
17
+ readonly inputs: readonly [{
18
+ readonly internalType: "uint256";
19
+ readonly name: "_stETHAmount";
20
+ readonly type: "uint256";
21
+ }];
22
+ readonly name: "wrap";
23
+ readonly outputs: readonly [{
24
+ readonly internalType: "uint256";
25
+ readonly name: "";
26
+ readonly type: "uint256";
27
+ }];
28
+ readonly stateMutability: "nonpayable";
29
+ readonly type: "function";
30
+ }, {
31
+ readonly inputs: readonly [{
32
+ readonly internalType: "uint256";
33
+ readonly name: "_wstETHAmount";
34
+ readonly type: "uint256";
35
+ }];
36
+ readonly name: "unwrap";
37
+ readonly outputs: readonly [{
38
+ readonly internalType: "uint256";
39
+ readonly name: "";
40
+ readonly type: "uint256";
41
+ }];
42
+ readonly stateMutability: "nonpayable";
43
+ readonly type: "function";
44
+ }];
45
+ export declare const LidoWithdrawalQueueAbi: readonly [{
46
+ readonly inputs: readonly [{
47
+ readonly internalType: "uint256[]";
48
+ readonly name: "_amounts";
49
+ readonly type: "uint256[]";
50
+ }, {
51
+ readonly internalType: "address";
52
+ readonly name: "_owner";
53
+ readonly type: "address";
54
+ }];
55
+ readonly name: "requestWithdrawals";
56
+ readonly outputs: readonly [{
57
+ readonly internalType: "uint256[]";
58
+ readonly name: "requestIds";
59
+ readonly type: "uint256[]";
60
+ }];
61
+ readonly stateMutability: "nonpayable";
62
+ readonly type: "function";
63
+ }, {
64
+ readonly inputs: readonly [{
65
+ readonly internalType: "uint256[]";
66
+ readonly name: "_amounts";
67
+ readonly type: "uint256[]";
68
+ }, {
69
+ readonly internalType: "address";
70
+ readonly name: "_owner";
71
+ readonly type: "address";
72
+ }];
73
+ readonly name: "requestWithdrawalsWstETH";
74
+ readonly outputs: readonly [{
75
+ readonly internalType: "uint256[]";
76
+ readonly name: "requestIds";
77
+ readonly type: "uint256[]";
78
+ }];
79
+ readonly stateMutability: "nonpayable";
80
+ readonly type: "function";
81
+ }, {
82
+ readonly inputs: readonly [{
83
+ readonly internalType: "uint256[]";
84
+ readonly name: "_requestIds";
85
+ readonly type: "uint256[]";
86
+ }, {
87
+ readonly internalType: "uint256[]";
88
+ readonly name: "_hints";
89
+ readonly type: "uint256[]";
90
+ }];
91
+ readonly name: "claimWithdrawals";
92
+ readonly outputs: readonly [];
93
+ readonly stateMutability: "nonpayable";
94
+ readonly type: "function";
95
+ }];
96
+ //# sourceMappingURL=lido.abi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lido.abi.d.ts","sourceRoot":"","sources":["../../../src/integrations/lido/lido.abi.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY;;;;;;;;;;;;;;EAQf,CAAC;AAGX,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAehB,CAAC;AAKX,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BzB,CAAC"}
@@ -0,0 +1,55 @@
1
+ import type { Address } from "viem";
2
+ import type { HexString, Unwrapable, Call } from "../../types";
3
+ export type SubmitLidoArgs = Readonly<{
4
+ referral: Address;
5
+ }>;
6
+ export declare const SubmitLidoCalldata: ({ referral }: SubmitLidoArgs) => HexString;
7
+ export declare const submitLidoTrx: ({ args, stEthAddress, value, }: {
8
+ args: SubmitLidoArgs;
9
+ stEthAddress: Address;
10
+ value: bigint;
11
+ }) => Unwrapable<Call>;
12
+ export type WrapStEthLidoArgs = Readonly<{
13
+ stEthAmount: bigint;
14
+ }>;
15
+ export declare const WrapStEthLidoCalldata: ({ stEthAmount }: WrapStEthLidoArgs) => HexString;
16
+ export declare const wrapStEthLidoTrx: ({ args, wstEthAddress, }: {
17
+ args: WrapStEthLidoArgs;
18
+ wstEthAddress: Address;
19
+ }) => Unwrapable<Call>;
20
+ export type UnwrapWstEthLidoArgs = Readonly<{
21
+ wstEthAmount: bigint;
22
+ }>;
23
+ export declare const UnwrapWstEthLidoCalldata: ({ wstEthAmount }: UnwrapWstEthLidoArgs) => HexString;
24
+ export declare const unwrapWstEthLidoTrx: ({ args, wstEthAddress, }: {
25
+ args: UnwrapWstEthLidoArgs;
26
+ wstEthAddress: Address;
27
+ }) => Unwrapable<Call>;
28
+ export type RequestWithdrawalsLidoArgs = Readonly<{
29
+ amounts: readonly bigint[];
30
+ owner: Address;
31
+ }>;
32
+ export declare const RequestWithdrawalsLidoCalldata: ({ amounts, owner }: RequestWithdrawalsLidoArgs) => HexString;
33
+ export declare const requestWithdrawalsLidoTrx: ({ args, withdrawalQueueAddress, }: {
34
+ args: RequestWithdrawalsLidoArgs;
35
+ withdrawalQueueAddress: Address;
36
+ }) => Unwrapable<Call>;
37
+ export type RequestWithdrawalsWstEthLidoArgs = Readonly<{
38
+ amounts: readonly bigint[];
39
+ owner: Address;
40
+ }>;
41
+ export declare const RequestWithdrawalsWstEthLidoCalldata: ({ amounts, owner, }: RequestWithdrawalsWstEthLidoArgs) => HexString;
42
+ export declare const requestWithdrawalsWstEthLidoTrx: ({ args, withdrawalQueueAddress, }: {
43
+ args: RequestWithdrawalsWstEthLidoArgs;
44
+ withdrawalQueueAddress: Address;
45
+ }) => Unwrapable<Call>;
46
+ export type ClaimWithdrawalsLidoArgs = Readonly<{
47
+ requestIds: readonly bigint[];
48
+ hints: readonly bigint[];
49
+ }>;
50
+ export declare const ClaimWithdrawalsLidoCalldata: ({ requestIds, hints }: ClaimWithdrawalsLidoArgs) => HexString;
51
+ export declare const claimWithdrawalsLidoTrx: ({ args, withdrawalQueueAddress, }: {
52
+ args: ClaimWithdrawalsLidoArgs;
53
+ withdrawalQueueAddress: Address;
54
+ }) => Unwrapable<Call>;
55
+ //# sourceMappingURL=lido.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lido.d.ts","sourceRoot":"","sources":["../../../src/integrations/lido/lido.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAW/D,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IAClC,QAAQ,EAAE,OAAO,CAAC;CACrB,CAAC,CAAC;AAEH,eAAO,MAAM,kBAAkB,iBAAkB,cAAc,KAAG,SAEjE,CAAC;AAEF,eAAO,MAAM,aAAa;UAKhB,cAAc;kBACN,OAAO;WACd,MAAM;MACb,WAAW,IAAI,CAOlB,CAAC;AAMF,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IACrC,WAAW,EAAE,MAAM,CAAC;CACvB,CAAC,CAAC;AAEH,eAAO,MAAM,qBAAqB,oBAAqB,iBAAiB,KAAG,SAE1E,CAAC;AAEF,eAAO,MAAM,gBAAgB;UAInB,iBAAiB;mBACR,OAAO;MACtB,WAAW,IAAI,CAOlB,CAAC;AAMF,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC;IACxC,YAAY,EAAE,MAAM,CAAC;CACxB,CAAC,CAAC;AAEH,eAAO,MAAM,wBAAwB,qBAAsB,oBAAoB,KAAG,SAEjF,CAAC;AAEF,eAAO,MAAM,mBAAmB;UAItB,oBAAoB;mBACX,OAAO;MACtB,WAAW,IAAI,CAOlB,CAAC;AASF,MAAM,MAAM,0BAA0B,GAAG,QAAQ,CAAC;IAC9C,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,KAAK,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,8BAA8B,uBAAwB,0BAA0B,KAAG,SAE/F,CAAC;AAEF,eAAO,MAAM,yBAAyB;UAI5B,0BAA0B;4BACR,OAAO;MAC/B,WAAW,IAAI,CAOlB,CAAC;AAMF,MAAM,MAAM,gCAAgC,GAAG,QAAQ,CAAC;IACpD,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,KAAK,EAAE,OAAO,CAAC;CAClB,CAAC,CAAC;AAEH,eAAO,MAAM,oCAAoC,wBAG9C,gCAAgC,KAAG,SAErC,CAAC;AAEF,eAAO,MAAM,+BAA+B;UAIlC,gCAAgC;4BACd,OAAO;MAC/B,WAAW,IAAI,CAOlB,CAAC;AAUF,MAAM,MAAM,wBAAwB,GAAG,QAAQ,CAAC;IAC5C,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5B,CAAC,CAAC;AAEH,eAAO,MAAM,4BAA4B,0BAA2B,wBAAwB,KAAG,SAE9F,CAAC;AAEF,eAAO,MAAM,uBAAuB;UAI1B,wBAAwB;4BACN,OAAO;MAC/B,WAAW,IAAI,CAOlB,CAAC"}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "./dist/index.cjs",
5
5
  "types": "./dist/index.d.ts",
6
6
  "type": "module",
7
- "version": "1.4.34",
7
+ "version": "1.4.35",
8
8
  "files": [
9
9
  "dist",
10
10
  "src",
@@ -20,6 +20,7 @@ export * from "./erc721";
20
20
  export * from "./iporFusion";
21
21
  export * from "./originArm";
22
22
  export * from "./etherfi";
23
+ export * from "./lido";
23
24
  export * from "./syrup";
24
25
  export * from "./gearbox";
25
26
  export * from "./fluidLite";
@@ -0,0 +1 @@
1
+ export * from "./lido";
@@ -0,0 +1,64 @@
1
+ // Lido stETH (Lido staking pool — `submit` mints stETH 1:1 on ETH).
2
+ export const LidoStEthAbi = [
3
+ {
4
+ inputs: [{ internalType: "address", name: "_referral", type: "address" }],
5
+ name: "submit",
6
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
7
+ stateMutability: "payable",
8
+ type: "function",
9
+ },
10
+ ] as const;
11
+
12
+ // Lido wstETH wrapper — wraps rebasing stETH into non-rebasing wstETH.
13
+ export const LidoWstEthAbi = [
14
+ {
15
+ inputs: [{ internalType: "uint256", name: "_stETHAmount", type: "uint256" }],
16
+ name: "wrap",
17
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
18
+ stateMutability: "nonpayable",
19
+ type: "function",
20
+ },
21
+ {
22
+ inputs: [{ internalType: "uint256", name: "_wstETHAmount", type: "uint256" }],
23
+ name: "unwrap",
24
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
25
+ stateMutability: "nonpayable",
26
+ type: "function",
27
+ },
28
+ ] as const;
29
+
30
+ // Lido WithdrawalQueue — async unstake. requestWithdrawals burns stETH and mints
31
+ // an NFT per amount; claimWithdrawals redeems the NFT for ETH after the
32
+ // network-level oracle finalizes the request.
33
+ export const LidoWithdrawalQueueAbi = [
34
+ {
35
+ inputs: [
36
+ { internalType: "uint256[]", name: "_amounts", type: "uint256[]" },
37
+ { internalType: "address", name: "_owner", type: "address" },
38
+ ],
39
+ name: "requestWithdrawals",
40
+ outputs: [{ internalType: "uint256[]", name: "requestIds", type: "uint256[]" }],
41
+ stateMutability: "nonpayable",
42
+ type: "function",
43
+ },
44
+ {
45
+ inputs: [
46
+ { internalType: "uint256[]", name: "_amounts", type: "uint256[]" },
47
+ { internalType: "address", name: "_owner", type: "address" },
48
+ ],
49
+ name: "requestWithdrawalsWstETH",
50
+ outputs: [{ internalType: "uint256[]", name: "requestIds", type: "uint256[]" }],
51
+ stateMutability: "nonpayable",
52
+ type: "function",
53
+ },
54
+ {
55
+ inputs: [
56
+ { internalType: "uint256[]", name: "_requestIds", type: "uint256[]" },
57
+ { internalType: "uint256[]", name: "_hints", type: "uint256[]" },
58
+ ],
59
+ name: "claimWithdrawals",
60
+ outputs: [],
61
+ stateMutability: "nonpayable",
62
+ type: "function",
63
+ },
64
+ ] as const;
@@ -0,0 +1,186 @@
1
+ import { ethers } from "ethers";
2
+ import { LidoStEthAbi, LidoWstEthAbi, LidoWithdrawalQueueAbi } from "./lido.abi";
3
+ import type { Address } from "viem";
4
+ import type { HexString, Unwrapable, Call } from "../../types";
5
+ import { createCall } from "../../types";
6
+
7
+ const stEthInterface = new ethers.utils.Interface(LidoStEthAbi);
8
+ const wstEthInterface = new ethers.utils.Interface(LidoWstEthAbi);
9
+ const withdrawalQueueInterface = new ethers.utils.Interface(LidoWithdrawalQueueAbi);
10
+
11
+ // ============================================================================
12
+ // Submit (stake ETH for stETH, payable)
13
+ // ============================================================================
14
+
15
+ export type SubmitLidoArgs = Readonly<{
16
+ referral: Address;
17
+ }>;
18
+
19
+ export const SubmitLidoCalldata = ({ referral }: SubmitLidoArgs): HexString => {
20
+ return stEthInterface.encodeFunctionData("submit", [referral]) as HexString;
21
+ };
22
+
23
+ export const submitLidoTrx = ({
24
+ args,
25
+ stEthAddress,
26
+ value,
27
+ }: {
28
+ args: SubmitLidoArgs;
29
+ stEthAddress: Address;
30
+ value: bigint;
31
+ }): Unwrapable<Call> => {
32
+ return createCall({
33
+ operation: 0,
34
+ to: stEthAddress,
35
+ value,
36
+ data: SubmitLidoCalldata(args),
37
+ });
38
+ };
39
+
40
+ // ============================================================================
41
+ // Wrap stETH → wstETH
42
+ // ============================================================================
43
+
44
+ export type WrapStEthLidoArgs = Readonly<{
45
+ stEthAmount: bigint;
46
+ }>;
47
+
48
+ export const WrapStEthLidoCalldata = ({ stEthAmount }: WrapStEthLidoArgs): HexString => {
49
+ return wstEthInterface.encodeFunctionData("wrap", [stEthAmount]) as HexString;
50
+ };
51
+
52
+ export const wrapStEthLidoTrx = ({
53
+ args,
54
+ wstEthAddress,
55
+ }: {
56
+ args: WrapStEthLidoArgs;
57
+ wstEthAddress: Address;
58
+ }): Unwrapable<Call> => {
59
+ return createCall({
60
+ operation: 0,
61
+ to: wstEthAddress,
62
+ value: 0n,
63
+ data: WrapStEthLidoCalldata(args),
64
+ });
65
+ };
66
+
67
+ // ============================================================================
68
+ // Unwrap wstETH → stETH
69
+ // ============================================================================
70
+
71
+ export type UnwrapWstEthLidoArgs = Readonly<{
72
+ wstEthAmount: bigint;
73
+ }>;
74
+
75
+ export const UnwrapWstEthLidoCalldata = ({ wstEthAmount }: UnwrapWstEthLidoArgs): HexString => {
76
+ return wstEthInterface.encodeFunctionData("unwrap", [wstEthAmount]) as HexString;
77
+ };
78
+
79
+ export const unwrapWstEthLidoTrx = ({
80
+ args,
81
+ wstEthAddress,
82
+ }: {
83
+ args: UnwrapWstEthLidoArgs;
84
+ wstEthAddress: Address;
85
+ }): Unwrapable<Call> => {
86
+ return createCall({
87
+ operation: 0,
88
+ to: wstEthAddress,
89
+ value: 0n,
90
+ data: UnwrapWstEthLidoCalldata(args),
91
+ });
92
+ };
93
+
94
+ // ============================================================================
95
+ // Request Withdrawals (stETH → batched NFTs)
96
+ //
97
+ // Owner is set to the avatar safe. The contract enforces a per-request max
98
+ // (currently 1000 stETH); larger withdrawals must be split across `amounts`.
99
+ // ============================================================================
100
+
101
+ export type RequestWithdrawalsLidoArgs = Readonly<{
102
+ amounts: readonly bigint[];
103
+ owner: Address;
104
+ }>;
105
+
106
+ export const RequestWithdrawalsLidoCalldata = ({ amounts, owner }: RequestWithdrawalsLidoArgs): HexString => {
107
+ return withdrawalQueueInterface.encodeFunctionData("requestWithdrawals", [amounts, owner]) as HexString;
108
+ };
109
+
110
+ export const requestWithdrawalsLidoTrx = ({
111
+ args,
112
+ withdrawalQueueAddress,
113
+ }: {
114
+ args: RequestWithdrawalsLidoArgs;
115
+ withdrawalQueueAddress: Address;
116
+ }): Unwrapable<Call> => {
117
+ return createCall({
118
+ operation: 0,
119
+ to: withdrawalQueueAddress,
120
+ value: 0n,
121
+ data: RequestWithdrawalsLidoCalldata(args),
122
+ });
123
+ };
124
+
125
+ // ============================================================================
126
+ // Request Withdrawals from wstETH (wstETH-denominated input)
127
+ // ============================================================================
128
+
129
+ export type RequestWithdrawalsWstEthLidoArgs = Readonly<{
130
+ amounts: readonly bigint[];
131
+ owner: Address;
132
+ }>;
133
+
134
+ export const RequestWithdrawalsWstEthLidoCalldata = ({
135
+ amounts,
136
+ owner,
137
+ }: RequestWithdrawalsWstEthLidoArgs): HexString => {
138
+ return withdrawalQueueInterface.encodeFunctionData("requestWithdrawalsWstETH", [amounts, owner]) as HexString;
139
+ };
140
+
141
+ export const requestWithdrawalsWstEthLidoTrx = ({
142
+ args,
143
+ withdrawalQueueAddress,
144
+ }: {
145
+ args: RequestWithdrawalsWstEthLidoArgs;
146
+ withdrawalQueueAddress: Address;
147
+ }): Unwrapable<Call> => {
148
+ return createCall({
149
+ operation: 0,
150
+ to: withdrawalQueueAddress,
151
+ value: 0n,
152
+ data: RequestWithdrawalsWstEthLidoCalldata(args),
153
+ });
154
+ };
155
+
156
+ // ============================================================================
157
+ // Claim Withdrawals
158
+ //
159
+ // `requestIds` and `hints` must be the same length. Hints come from the
160
+ // off-chain `findCheckpointHints` call (or 0 to fall back to a slow on-chain
161
+ // scan). Operator passes them in directly.
162
+ // ============================================================================
163
+
164
+ export type ClaimWithdrawalsLidoArgs = Readonly<{
165
+ requestIds: readonly bigint[];
166
+ hints: readonly bigint[];
167
+ }>;
168
+
169
+ export const ClaimWithdrawalsLidoCalldata = ({ requestIds, hints }: ClaimWithdrawalsLidoArgs): HexString => {
170
+ return withdrawalQueueInterface.encodeFunctionData("claimWithdrawals", [requestIds, hints]) as HexString;
171
+ };
172
+
173
+ export const claimWithdrawalsLidoTrx = ({
174
+ args,
175
+ withdrawalQueueAddress,
176
+ }: {
177
+ args: ClaimWithdrawalsLidoArgs;
178
+ withdrawalQueueAddress: Address;
179
+ }): Unwrapable<Call> => {
180
+ return createCall({
181
+ operation: 0,
182
+ to: withdrawalQueueAddress,
183
+ value: 0n,
184
+ data: ClaimWithdrawalsLidoCalldata(args),
185
+ });
186
+ };