@ember-finance/sdk 1.2.3 → 1.3.0

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.
@@ -1,6 +1,6 @@
1
1
  import { Signer, Provider } from "ethers";
2
2
  import { EVMOnChainCalls } from "./onchain-calls";
3
- import { IEvmDeployment, IUserCallOptions, IEvmCallOptions, EvmOnChainCallResponse, IPermitSignature } from "../interfaces";
3
+ import { IEvmDeployment, IUserCallOptions, IEvmCallOptions, EvmOnChainCallResponse, IPermitSignature, IETHDepositOptions } from "../interfaces";
4
4
  import { NumStr } from "../../common/types";
5
5
  /**
6
6
  * User Calls for Ember Protocol on EVM (ERC-4626 Compatible)
@@ -58,7 +58,7 @@ export declare class EVMUserCalls extends EVMOnChainCalls {
58
58
  *
59
59
  * @param vaultAddress The address of the vault
60
60
  * @param assets The amount of assets to deposit
61
- * @param options Optional tx execution params (includes optional receiver, defaults to caller)
61
+ * @param options Optional tx execution params (includes optional receiver, isETHVault flag)
62
62
  * @returns EvmOnChainCallResponse
63
63
  */
64
64
  deposit(vaultAddress: string, assets: NumStr, options?: IUserCallOptions): Promise<EvmOnChainCallResponse>;
@@ -72,7 +72,7 @@ export declare class EVMUserCalls extends EVMOnChainCalls {
72
72
  * @param vaultAddress The address of the vault
73
73
  * @param assets The amount of assets to deposit
74
74
  * @param permitSignature The EIP-2612 permit signature components
75
- * @param options Optional tx execution params (includes optional receiver, defaults to caller)
75
+ * @param options Optional tx execution params (includes optional receiver, isETHVault flag)
76
76
  * @returns EvmOnChainCallResponse
77
77
  *
78
78
  * @example
@@ -103,7 +103,7 @@ export declare class EVMUserCalls extends EVMOnChainCalls {
103
103
  *
104
104
  * @param vaultAddress The address of the vault
105
105
  * @param shares The number of shares to mint
106
- * @param options Optional tx execution params (includes optional receiver, defaults to caller)
106
+ * @param options Optional tx execution params (includes optional receiver, isETHVault flag)
107
107
  * @returns EvmOnChainCallResponse
108
108
  */
109
109
  mint(vaultAddress: string, shares: NumStr, options?: IUserCallOptions): Promise<EvmOnChainCallResponse>;
@@ -117,7 +117,7 @@ export declare class EVMUserCalls extends EVMOnChainCalls {
117
117
  * @param vaultAddress The address of the vault
118
118
  * @param shares The number of shares to mint
119
119
  * @param permitSignature The EIP-2612 permit signature components
120
- * @param options Optional tx execution params (includes optional receiver, defaults to caller)
120
+ * @param options Optional tx execution params (includes optional receiver, isETHVault flag)
121
121
  * @returns EvmOnChainCallResponse
122
122
  *
123
123
  * @example
@@ -140,6 +140,53 @@ export declare class EVMUserCalls extends EVMOnChainCalls {
140
140
  * ```
141
141
  */
142
142
  mintWithPermit(vaultAddress: string, shares: NumStr, permitSignature: IPermitSignature, options?: IUserCallOptions): Promise<EvmOnChainCallResponse>;
143
+ /**
144
+ * Deposit native ETH into an ETH vault
145
+ *
146
+ * This method is for EmberETHVault contracts that accept native ETH.
147
+ * The vault will wrap the ETH to WETH internally.
148
+ *
149
+ * @param vaultAddress The address of the ETH vault
150
+ * @param options ETH deposit options including value (ETH amount) and optional receiver
151
+ * @returns EvmOnChainCallResponse
152
+ *
153
+ * @example
154
+ * ```typescript
155
+ * // Deposit 1 ETH to the vault
156
+ * await userCalls.depositETH(vaultAddress, {
157
+ * value: ethers.parseEther("1.0")
158
+ * });
159
+ *
160
+ * // Deposit ETH to a different receiver
161
+ * await userCalls.depositETH(vaultAddress, {
162
+ * value: ethers.parseEther("1.0"),
163
+ * receiver: otherAddress
164
+ * });
165
+ * ```
166
+ */
167
+ depositETH(vaultAddress: string, options: IETHDepositOptions): Promise<EvmOnChainCallResponse>;
168
+ /**
169
+ * Mint a specific number of shares by depositing native ETH
170
+ *
171
+ * This method is for EmberETHVault contracts that accept native ETH.
172
+ * You must send enough ETH to cover the required assets for the desired shares.
173
+ * Any excess ETH will be refunded.
174
+ *
175
+ * @param vaultAddress The address of the ETH vault
176
+ * @param shares The number of shares to mint
177
+ * @param options ETH deposit options including value (ETH amount) and optional receiver
178
+ * @returns EvmOnChainCallResponse
179
+ *
180
+ * @example
181
+ * ```typescript
182
+ * // Mint shares with ETH (send slightly more than needed for safety)
183
+ * const assetsNeeded = await vaultReader.previewMint(vaultAddress, shares);
184
+ * await userCalls.mintWithETH(vaultAddress, shares, {
185
+ * value: assetsNeeded + (assetsNeeded / 100n) // Add 1% buffer
186
+ * });
187
+ * ```
188
+ */
189
+ mintWithETH(vaultAddress: string, shares: NumStr, options: IETHDepositOptions): Promise<EvmOnChainCallResponse>;
143
190
  /**
144
191
  * Redeem shares to initiate a withdrawal request
145
192
  *
@@ -149,7 +196,7 @@ export declare class EVMUserCalls extends EVMOnChainCalls {
149
196
  *
150
197
  * @param vaultAddress The address of the vault
151
198
  * @param shares The number of shares to redeem
152
- * @param options Optional tx execution params (includes optional receiver, defaults to caller)
199
+ * @param options Optional tx execution params (includes optional receiver, isETHVault flag)
153
200
  * @returns EvmOnChainCallResponse
154
201
  */
155
202
  redeemShares(vaultAddress: string, shares: NumStr, options?: IUserCallOptions): Promise<EvmOnChainCallResponse>;
@@ -157,7 +204,7 @@ export declare class EVMUserCalls extends EVMOnChainCalls {
157
204
  * Cancel a pending withdrawal request
158
205
  * @param vaultAddress The address of the vault
159
206
  * @param requestSequenceNumber The sequence number of the withdrawal request to cancel
160
- * @param options Optional tx execution params
207
+ * @param options Optional tx execution params (includes isETHVault flag)
161
208
  * @returns EvmOnChainCallResponse
162
209
  */
163
210
  cancelPendingWithdrawalRequest(vaultAddress: string, requestSequenceNumber: NumStr, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
@@ -180,6 +227,8 @@ export declare class EVMUserCalls extends EVMOnChainCalls {
180
227
  approveTokenMax(tokenAddress: string, spender: string, options?: IEvmCallOptions): Promise<EvmOnChainCallResponse>;
181
228
  /**
182
229
  * Gets the vault contract instance for read operations
230
+ * @param vaultAddress The address of the vault
231
+ * @param isETHVault If true, uses EmberETHVault ABI
183
232
  */
184
233
  private getVaultContract;
185
234
  /**
@@ -7,6 +7,7 @@ exports.EVMUserCalls = void 0;
7
7
  const ethers_1 = require("ethers");
8
8
  const onchain_calls_1 = require("./onchain-calls");
9
9
  const EmberVault_json_1 = __importDefault(require("../../abis/EmberVault.json"));
10
+ const EmberETHVault_json_1 = __importDefault(require("../../abis/EmberETHVault.json"));
10
11
  /**
11
12
  * User Calls for Ember Protocol on EVM (ERC-4626 Compatible)
12
13
  *
@@ -68,12 +69,12 @@ class EVMUserCalls extends onchain_calls_1.EVMOnChainCalls {
68
69
  *
69
70
  * @param vaultAddress The address of the vault
70
71
  * @param assets The amount of assets to deposit
71
- * @param options Optional tx execution params (includes optional receiver, defaults to caller)
72
+ * @param options Optional tx execution params (includes optional receiver, isETHVault flag)
72
73
  * @returns EvmOnChainCallResponse
73
74
  */
74
75
  async deposit(vaultAddress, assets, options) {
75
76
  const receiver = options?.receiver ?? (await this.getWalletAddress());
76
- const txCall = this.txBuilder.deposit(vaultAddress, assets, receiver);
77
+ const txCall = this.txBuilder.deposit(vaultAddress, assets, receiver, options?.isETHVault);
77
78
  return this.execCall(txCall, options);
78
79
  }
79
80
  /**
@@ -86,7 +87,7 @@ class EVMUserCalls extends onchain_calls_1.EVMOnChainCalls {
86
87
  * @param vaultAddress The address of the vault
87
88
  * @param assets The amount of assets to deposit
88
89
  * @param permitSignature The EIP-2612 permit signature components
89
- * @param options Optional tx execution params (includes optional receiver, defaults to caller)
90
+ * @param options Optional tx execution params (includes optional receiver, isETHVault flag)
90
91
  * @returns EvmOnChainCallResponse
91
92
  *
92
93
  * @example
@@ -110,7 +111,7 @@ class EVMUserCalls extends onchain_calls_1.EVMOnChainCalls {
110
111
  */
111
112
  async depositWithPermit(vaultAddress, assets, permitSignature, options) {
112
113
  const receiver = options?.receiver ?? (await this.getWalletAddress());
113
- const txCall = this.txBuilder.depositWithPermit(vaultAddress, assets, receiver, permitSignature);
114
+ const txCall = this.txBuilder.depositWithPermit(vaultAddress, assets, receiver, permitSignature, options?.isETHVault);
114
115
  return this.execCall(txCall, options);
115
116
  }
116
117
  // ============================================
@@ -124,12 +125,12 @@ class EVMUserCalls extends onchain_calls_1.EVMOnChainCalls {
124
125
  *
125
126
  * @param vaultAddress The address of the vault
126
127
  * @param shares The number of shares to mint
127
- * @param options Optional tx execution params (includes optional receiver, defaults to caller)
128
+ * @param options Optional tx execution params (includes optional receiver, isETHVault flag)
128
129
  * @returns EvmOnChainCallResponse
129
130
  */
130
131
  async mint(vaultAddress, shares, options) {
131
132
  const receiver = options?.receiver ?? (await this.getWalletAddress());
132
- const txCall = this.txBuilder.mint(vaultAddress, shares, receiver);
133
+ const txCall = this.txBuilder.mint(vaultAddress, shares, receiver, options?.isETHVault);
133
134
  return this.execCall(txCall, options);
134
135
  }
135
136
  /**
@@ -142,7 +143,7 @@ class EVMUserCalls extends onchain_calls_1.EVMOnChainCalls {
142
143
  * @param vaultAddress The address of the vault
143
144
  * @param shares The number of shares to mint
144
145
  * @param permitSignature The EIP-2612 permit signature components
145
- * @param options Optional tx execution params (includes optional receiver, defaults to caller)
146
+ * @param options Optional tx execution params (includes optional receiver, isETHVault flag)
146
147
  * @returns EvmOnChainCallResponse
147
148
  *
148
149
  * @example
@@ -166,7 +167,65 @@ class EVMUserCalls extends onchain_calls_1.EVMOnChainCalls {
166
167
  */
167
168
  async mintWithPermit(vaultAddress, shares, permitSignature, options) {
168
169
  const receiver = options?.receiver ?? (await this.getWalletAddress());
169
- const txCall = this.txBuilder.mintWithPermit(vaultAddress, shares, receiver, permitSignature);
170
+ const txCall = this.txBuilder.mintWithPermit(vaultAddress, shares, receiver, permitSignature, options?.isETHVault);
171
+ return this.execCall(txCall, options);
172
+ }
173
+ // ============================================
174
+ // ETH Vault Methods (EmberETHVault)
175
+ // ============================================
176
+ /**
177
+ * Deposit native ETH into an ETH vault
178
+ *
179
+ * This method is for EmberETHVault contracts that accept native ETH.
180
+ * The vault will wrap the ETH to WETH internally.
181
+ *
182
+ * @param vaultAddress The address of the ETH vault
183
+ * @param options ETH deposit options including value (ETH amount) and optional receiver
184
+ * @returns EvmOnChainCallResponse
185
+ *
186
+ * @example
187
+ * ```typescript
188
+ * // Deposit 1 ETH to the vault
189
+ * await userCalls.depositETH(vaultAddress, {
190
+ * value: ethers.parseEther("1.0")
191
+ * });
192
+ *
193
+ * // Deposit ETH to a different receiver
194
+ * await userCalls.depositETH(vaultAddress, {
195
+ * value: ethers.parseEther("1.0"),
196
+ * receiver: otherAddress
197
+ * });
198
+ * ```
199
+ */
200
+ async depositETH(vaultAddress, options) {
201
+ const receiver = options.receiver ?? (await this.getWalletAddress());
202
+ const txCall = this.txBuilder.depositETH(vaultAddress, receiver, options.value);
203
+ return this.execCall(txCall, options);
204
+ }
205
+ /**
206
+ * Mint a specific number of shares by depositing native ETH
207
+ *
208
+ * This method is for EmberETHVault contracts that accept native ETH.
209
+ * You must send enough ETH to cover the required assets for the desired shares.
210
+ * Any excess ETH will be refunded.
211
+ *
212
+ * @param vaultAddress The address of the ETH vault
213
+ * @param shares The number of shares to mint
214
+ * @param options ETH deposit options including value (ETH amount) and optional receiver
215
+ * @returns EvmOnChainCallResponse
216
+ *
217
+ * @example
218
+ * ```typescript
219
+ * // Mint shares with ETH (send slightly more than needed for safety)
220
+ * const assetsNeeded = await vaultReader.previewMint(vaultAddress, shares);
221
+ * await userCalls.mintWithETH(vaultAddress, shares, {
222
+ * value: assetsNeeded + (assetsNeeded / 100n) // Add 1% buffer
223
+ * });
224
+ * ```
225
+ */
226
+ async mintWithETH(vaultAddress, shares, options) {
227
+ const receiver = options.receiver ?? (await this.getWalletAddress());
228
+ const txCall = this.txBuilder.mintWithETH(vaultAddress, shares, receiver, options.value);
170
229
  return this.execCall(txCall, options);
171
230
  }
172
231
  // ============================================
@@ -181,12 +240,12 @@ class EVMUserCalls extends onchain_calls_1.EVMOnChainCalls {
181
240
  *
182
241
  * @param vaultAddress The address of the vault
183
242
  * @param shares The number of shares to redeem
184
- * @param options Optional tx execution params (includes optional receiver, defaults to caller)
243
+ * @param options Optional tx execution params (includes optional receiver, isETHVault flag)
185
244
  * @returns EvmOnChainCallResponse
186
245
  */
187
246
  async redeemShares(vaultAddress, shares, options) {
188
247
  const receiver = options?.receiver ?? (await this.getWalletAddress());
189
- const txCall = this.txBuilder.redeemShares(vaultAddress, shares, receiver);
248
+ const txCall = this.txBuilder.redeemShares(vaultAddress, shares, receiver, options?.isETHVault);
190
249
  return this.execCall(txCall, options);
191
250
  }
192
251
  // ============================================
@@ -196,11 +255,11 @@ class EVMUserCalls extends onchain_calls_1.EVMOnChainCalls {
196
255
  * Cancel a pending withdrawal request
197
256
  * @param vaultAddress The address of the vault
198
257
  * @param requestSequenceNumber The sequence number of the withdrawal request to cancel
199
- * @param options Optional tx execution params
258
+ * @param options Optional tx execution params (includes isETHVault flag)
200
259
  * @returns EvmOnChainCallResponse
201
260
  */
202
261
  async cancelPendingWithdrawalRequest(vaultAddress, requestSequenceNumber, options) {
203
- const txCall = this.txBuilder.cancelPendingWithdrawalRequest(vaultAddress, requestSequenceNumber);
262
+ const txCall = this.txBuilder.cancelPendingWithdrawalRequest(vaultAddress, requestSequenceNumber, options?.isETHVault);
204
263
  return this.execCall(txCall, options);
205
264
  }
206
265
  // ============================================
@@ -235,12 +294,15 @@ class EVMUserCalls extends onchain_calls_1.EVMOnChainCalls {
235
294
  // ============================================
236
295
  /**
237
296
  * Gets the vault contract instance for read operations
297
+ * @param vaultAddress The address of the vault
298
+ * @param isETHVault If true, uses EmberETHVault ABI
238
299
  */
239
- getVaultContract(vaultAddress) {
300
+ getVaultContract(vaultAddress, isETHVault) {
240
301
  if (!this.provider) {
241
302
  throw new Error("Provider required for read operations");
242
303
  }
243
- return new ethers_1.Contract(vaultAddress, EmberVault_json_1.default.abi, this.provider);
304
+ const abi = isETHVault ? EmberETHVault_json_1.default.abi : EmberVault_json_1.default.abi;
305
+ return new ethers_1.Contract(vaultAddress, abi, this.provider);
244
306
  }
245
307
  /**
246
308
  * Gets an ERC20 contract instance for read operations
@@ -172,6 +172,8 @@ export declare class EVMVaultReader {
172
172
  updateDeployment(newDeployment: IEvmDeployment): void;
173
173
  /**
174
174
  * Creates an ethers Contract instance for a vault
175
+ * @param vaultAddress The vault address
176
+ * @param isETHVault If true, uses EmberETHVault ABI (defaults to EmberVault ABI)
175
177
  */
176
178
  private getVaultContract;
177
179
  /**
@@ -185,196 +187,225 @@ export declare class EVMVaultReader {
185
187
  /**
186
188
  * Gets the basic vault state
187
189
  * @param vaultAddress The vault address
190
+ * @param isETHVault If true, uses EmberETHVault ABI
188
191
  * @returns Vault state information
189
192
  */
190
- getVaultState(vaultAddress: string): Promise<IVaultState>;
193
+ getVaultState(vaultAddress: string, isETHVault?: boolean): Promise<IVaultState>;
191
194
  /**
192
195
  * Gets the vault rate information
193
196
  * @param vaultAddress The vault address
197
+ * @param isETHVault If true, uses EmberETHVault ABI
194
198
  * @returns Rate information
195
199
  */
196
- getVaultRate(vaultAddress: string): Promise<IVaultRate>;
200
+ getVaultRate(vaultAddress: string, isETHVault?: boolean): Promise<IVaultRate>;
197
201
  /**
198
202
  * Gets the vault roles (admin, operator, rate manager)
199
203
  * @param vaultAddress The vault address
204
+ * @param isETHVault If true, uses EmberETHVault ABI
200
205
  * @returns Vault roles
201
206
  */
202
- getVaultRoles(vaultAddress: string): Promise<IVaultRoles>;
207
+ getVaultRoles(vaultAddress: string, isETHVault?: boolean): Promise<IVaultRoles>;
203
208
  /**
204
209
  * Gets the vault pause status
205
210
  * @param vaultAddress The vault address
211
+ * @param isETHVault If true, uses EmberETHVault ABI
206
212
  * @returns Pause status for different operations
207
213
  */
208
- getVaultPauseStatus(vaultAddress: string): Promise<IVaultPauseStatus>;
214
+ getVaultPauseStatus(vaultAddress: string, isETHVault?: boolean): Promise<IVaultPauseStatus>;
209
215
  /**
210
216
  * Gets the platform fee information
211
217
  * @param vaultAddress The vault address
218
+ * @param isETHVault If true, uses EmberETHVault ABI
212
219
  * @returns Platform fee information
213
220
  */
214
- getVaultPlatformFee(vaultAddress: string): Promise<IVaultPlatformFee>;
221
+ getVaultPlatformFee(vaultAddress: string, isETHVault?: boolean): Promise<IVaultPlatformFee>;
215
222
  /**
216
223
  * Gets complete vault information in a single call
217
224
  * @param vaultAddress The vault address
225
+ * @param isETHVault If true, uses EmberETHVault ABI
218
226
  * @returns Complete vault information
219
227
  */
220
- getCompleteVaultInfo(vaultAddress: string): Promise<ICompleteVaultInfo>;
228
+ getCompleteVaultInfo(vaultAddress: string, isETHVault?: boolean): Promise<ICompleteVaultInfo>;
221
229
  /**
222
230
  * Gets the underlying asset address
223
231
  * @param vaultAddress The vault address
232
+ * @param isETHVault If true, uses EmberETHVault ABI
224
233
  * @returns Asset address
225
234
  */
226
- getAsset(vaultAddress: string): Promise<string>;
235
+ getAsset(vaultAddress: string, isETHVault?: boolean): Promise<string>;
227
236
  /**
228
237
  * Gets total assets under management
229
238
  * @param vaultAddress The vault address
239
+ * @param isETHVault If true, uses EmberETHVault ABI
230
240
  * @returns Total assets
231
241
  */
232
- getTotalAssets(vaultAddress: string): Promise<bigint>;
242
+ getTotalAssets(vaultAddress: string, isETHVault?: boolean): Promise<bigint>;
233
243
  /**
234
244
  * Gets total shares supply
235
245
  * @param vaultAddress The vault address
246
+ * @param isETHVault If true, uses EmberETHVault ABI
236
247
  * @returns Total supply
237
248
  */
238
- getTotalSupply(vaultAddress: string): Promise<bigint>;
249
+ getTotalSupply(vaultAddress: string, isETHVault?: boolean): Promise<bigint>;
239
250
  /**
240
251
  * Converts assets to shares
241
252
  * @param vaultAddress The vault address
242
253
  * @param assets Amount of assets
254
+ * @param isETHVault If true, uses EmberETHVault ABI
243
255
  * @returns Equivalent shares
244
256
  */
245
- convertToShares(vaultAddress: string, assets: NumStr): Promise<bigint>;
257
+ convertToShares(vaultAddress: string, assets: NumStr, isETHVault?: boolean): Promise<bigint>;
246
258
  /**
247
259
  * Converts shares to assets
248
260
  * @param vaultAddress The vault address
249
261
  * @param shares Amount of shares
262
+ * @param isETHVault If true, uses EmberETHVault ABI
250
263
  * @returns Equivalent assets
251
264
  */
252
- convertToAssets(vaultAddress: string, shares: NumStr): Promise<bigint>;
265
+ convertToAssets(vaultAddress: string, shares: NumStr, isETHVault?: boolean): Promise<bigint>;
253
266
  /**
254
267
  * Preview deposit - returns shares that would be minted
255
268
  * @param vaultAddress The vault address
256
269
  * @param assets Amount of assets to deposit
270
+ * @param isETHVault If true, uses EmberETHVault ABI
257
271
  * @returns Shares that would be minted
258
272
  */
259
- previewDeposit(vaultAddress: string, assets: NumStr): Promise<bigint>;
273
+ previewDeposit(vaultAddress: string, assets: NumStr, isETHVault?: boolean): Promise<bigint>;
260
274
  /**
261
275
  * Preview mint - returns assets required for shares
262
276
  * @param vaultAddress The vault address
263
277
  * @param shares Amount of shares to mint
278
+ * @param isETHVault If true, uses EmberETHVault ABI
264
279
  * @returns Assets required
265
280
  */
266
- previewMint(vaultAddress: string, shares: NumStr): Promise<bigint>;
281
+ previewMint(vaultAddress: string, shares: NumStr, isETHVault?: boolean): Promise<bigint>;
267
282
  /**
268
283
  * Preview redeem - returns assets that would be received
269
284
  * @param vaultAddress The vault address
270
285
  * @param shares Amount of shares to redeem
286
+ * @param isETHVault If true, uses EmberETHVault ABI
271
287
  * @returns Assets that would be received
272
288
  */
273
- previewRedeem(vaultAddress: string, shares: NumStr): Promise<bigint>;
289
+ previewRedeem(vaultAddress: string, shares: NumStr, isETHVault?: boolean): Promise<bigint>;
274
290
  /**
275
291
  * Preview withdraw - returns shares that would be burned
276
292
  * @param vaultAddress The vault address
277
293
  * @param assets Amount of assets to withdraw
294
+ * @param isETHVault If true, uses EmberETHVault ABI
278
295
  * @returns Shares that would be burned
279
296
  */
280
- previewWithdraw(vaultAddress: string, assets: NumStr): Promise<bigint>;
297
+ previewWithdraw(vaultAddress: string, assets: NumStr, isETHVault?: boolean): Promise<bigint>;
281
298
  /**
282
299
  * Gets max deposit for an account
283
300
  * @param vaultAddress The vault address
284
301
  * @param account The account address
302
+ * @param isETHVault If true, uses EmberETHVault ABI
285
303
  * @returns Maximum deposit amount
286
304
  */
287
- maxDeposit(vaultAddress: string, account: string): Promise<bigint>;
305
+ maxDeposit(vaultAddress: string, account: string, isETHVault?: boolean): Promise<bigint>;
288
306
  /**
289
307
  * Gets max mint for an account
290
308
  * @param vaultAddress The vault address
291
309
  * @param account The account address
310
+ * @param isETHVault If true, uses EmberETHVault ABI
292
311
  * @returns Maximum mint amount
293
312
  */
294
- maxMint(vaultAddress: string, account: string): Promise<bigint>;
313
+ maxMint(vaultAddress: string, account: string, isETHVault?: boolean): Promise<bigint>;
295
314
  /**
296
315
  * Gets max redeem for an account
297
316
  * @param vaultAddress The vault address
298
317
  * @param account The account address
318
+ * @param isETHVault If true, uses EmberETHVault ABI
299
319
  * @returns Maximum redeem amount
300
320
  */
301
- maxRedeem(vaultAddress: string, account: string): Promise<bigint>;
321
+ maxRedeem(vaultAddress: string, account: string, isETHVault?: boolean): Promise<bigint>;
302
322
  /**
303
323
  * Gets max withdraw for an account
304
324
  * @param vaultAddress The vault address
305
325
  * @param account The account address
326
+ * @param isETHVault If true, uses EmberETHVault ABI
306
327
  * @returns Maximum withdraw amount
307
328
  */
308
- maxWithdraw(vaultAddress: string, account: string): Promise<bigint>;
329
+ maxWithdraw(vaultAddress: string, account: string, isETHVault?: boolean): Promise<bigint>;
309
330
  /**
310
331
  * Gets the share balance for an account
311
332
  * @param vaultAddress The vault address
312
333
  * @param account The account address
334
+ * @param isETHVault If true, uses EmberETHVault ABI
313
335
  * @returns Share balance
314
336
  */
315
- balanceOf(vaultAddress: string, account: string): Promise<bigint>;
337
+ balanceOf(vaultAddress: string, account: string, isETHVault?: boolean): Promise<bigint>;
316
338
  /**
317
339
  * Gets the allowance for a spender
318
340
  * @param vaultAddress The vault address
319
341
  * @param owner The owner address
320
342
  * @param spender The spender address
343
+ * @param isETHVault If true, uses EmberETHVault ABI
321
344
  * @returns Allowance amount
322
345
  */
323
- allowance(vaultAddress: string, owner: string, spender: string): Promise<bigint>;
346
+ allowance(vaultAddress: string, owner: string, spender: string, isETHVault?: boolean): Promise<bigint>;
324
347
  /**
325
348
  * Gets the account state including pending withdrawals
326
349
  * @param vaultAddress The vault address
327
350
  * @param account The account address
351
+ * @param isETHVault If true, uses EmberETHVault ABI
328
352
  * @returns Account state
329
353
  */
330
- getAccountState(vaultAddress: string, account: string): Promise<IAccountState>;
354
+ getAccountState(vaultAddress: string, account: string, isETHVault?: boolean): Promise<IAccountState>;
331
355
  /**
332
356
  * Gets complete user position in a vault
333
357
  * @param vaultAddress The vault address
334
358
  * @param account The account address
359
+ * @param isETHVault If true, uses EmberETHVault ABI
335
360
  * @returns Complete user position
336
361
  */
337
- getUserPosition(vaultAddress: string, account: string): Promise<IUserPosition>;
362
+ getUserPosition(vaultAddress: string, account: string, isETHVault?: boolean): Promise<IUserPosition>;
338
363
  /**
339
364
  * Gets the number of pending withdrawal requests
340
365
  * @param vaultAddress The vault address
366
+ * @param isETHVault If true, uses EmberETHVault ABI
341
367
  * @returns Count of pending withdrawals
342
368
  */
343
- getPendingWithdrawalsCount(vaultAddress: string): Promise<bigint>;
369
+ getPendingWithdrawalsCount(vaultAddress: string, isETHVault?: boolean): Promise<bigint>;
344
370
  /**
345
371
  * Gets a pending withdrawal request by index
346
372
  * @param vaultAddress The vault address
347
373
  * @param index The index in the pending withdrawals queue
374
+ * @param isETHVault If true, uses EmberETHVault ABI
348
375
  * @returns Withdrawal request details
349
376
  */
350
- getPendingWithdrawal(vaultAddress: string, index: NumStr): Promise<IWithdrawalRequest>;
377
+ getPendingWithdrawal(vaultAddress: string, index: NumStr, isETHVault?: boolean): Promise<IWithdrawalRequest>;
351
378
  /**
352
379
  * Gets all pending withdrawal requests for a vault
353
380
  * @param vaultAddress The vault address
381
+ * @param isETHVault If true, uses EmberETHVault ABI
354
382
  * @returns Array of withdrawal requests
355
383
  */
356
- getAllPendingWithdrawals(vaultAddress: string): Promise<IWithdrawalRequest[]>;
384
+ getAllPendingWithdrawals(vaultAddress: string, isETHVault?: boolean): Promise<IWithdrawalRequest[]>;
357
385
  /**
358
386
  * Checks if an address is a sub-account
359
387
  * @param vaultAddress The vault address
360
388
  * @param account The account to check
389
+ * @param isETHVault If true, uses EmberETHVault ABI
361
390
  * @returns True if the account is a sub-account
362
391
  */
363
- isSubAccount(vaultAddress: string, account: string): Promise<boolean>;
392
+ isSubAccount(vaultAddress: string, account: string, isETHVault?: boolean): Promise<boolean>;
364
393
  /**
365
394
  * Gets the underlying token balance for an account
366
395
  * @param vaultAddress The vault address
367
396
  * @param account The account address
397
+ * @param isETHVault If true, uses EmberETHVault ABI
368
398
  * @returns Token balance
369
399
  */
370
- getUnderlyingTokenBalance(vaultAddress: string, account: string): Promise<bigint>;
400
+ getUnderlyingTokenBalance(vaultAddress: string, account: string, isETHVault?: boolean): Promise<bigint>;
371
401
  /**
372
402
  * Gets the underlying token allowance for the vault
373
403
  * @param vaultAddress The vault address
374
404
  * @param owner The token owner
405
+ * @param isETHVault If true, uses EmberETHVault ABI
375
406
  * @returns Allowance for the vault
376
407
  */
377
- getUnderlyingTokenAllowance(vaultAddress: string, owner: string): Promise<bigint>;
408
+ getUnderlyingTokenAllowance(vaultAddress: string, owner: string, isETHVault?: boolean): Promise<bigint>;
378
409
  /**
379
410
  * Gets the protocol pause status
380
411
  * @returns True if protocol is paused
@@ -399,9 +430,10 @@ export declare class EVMVaultReader {
399
430
  /**
400
431
  * Gets the chain timestamp in milliseconds
401
432
  * @param vaultAddress The vault address
433
+ * @param isETHVault If true, uses EmberETHVault ABI
402
434
  * @returns Chain timestamp in ms
403
435
  */
404
- getChainTimestampMs(vaultAddress: string): Promise<bigint>;
436
+ getChainTimestampMs(vaultAddress: string, isETHVault?: boolean): Promise<bigint>;
405
437
  /**
406
438
  * Gets information for multiple vaults
407
439
  * @param vaultAddresses Array of vault addresses