Skip to main content

contracts/handlers/institutional-vault-handler

Classes

InstitutionalVaultHandler

Handler for the InstitutionalVault contract exposing methods to interact with the contract.

Constructors

new InstitutionalVaultHandler()

new InstitutionalVaultHandler(chain, walletClient, publicClient): InstitutionalVaultHandler

Create the handler for the InstitutionalVault contract exposing methods to interact with the contract.

Parameters
ParameterTypeDescription
chainChainChain to use for the client.
walletClientobjectThe wallet client to use for wallet interactions.
publicClientobjectThe public client to use for public interactions.
Returns

InstitutionalVaultHandler

Source

lib/contracts/handlers/institutional-vault-handler.ts:42

Properties

PropertyModifierTypeDescription
address?private`0x${string}`-
publicClientprivateobjectThe public client to use for public interactions.
viemChainprivateChain-
walletClientprivateobjectThe wallet client to use for wallet interactions.

Methods

allowance()

allowance(owner, spender): Promise<bigint>

Get the allowance for the spender to spend the owner's tokens.

Parameters
ParameterTypeDescription
owner`0x${string}`The owner of the tokens.
spender`0x${string}`The spender of the tokens.
Returns

Promise<bigint>

The allowance of the owner for the spender.

Source

lib/contracts/handlers/institutional-vault-handler.ts:140

approve()

approve(spender, amount): Promise<`0x${string}`>

Approve the spender to spend the owner's tokens.

Parameters
ParameterTypeDescription
spender`0x${string}`The spender of the tokens.
amountbigintThe amount of tokens to approve.
Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/institutional-vault-handler.ts:150

asset()

asset(): Promise<`0x${string}`>

Get the asset of the vault.

Returns

Promise<`0x${string}`>

The asset of the vault.

Source

lib/contracts/handlers/institutional-vault-handler.ts:162

authority()

authority(): Promise<`0x${string}`>

Get the authority of the vault.

Returns

Promise<`0x${string}`>

The authority of the vault.

Source

lib/contracts/handlers/institutional-vault-handler.ts:171

balanceOf()

balanceOf(address): Promise<bigint>

Get the balance of the address.

Parameters
ParameterTypeDescription
address`0x${string}`The address to get the balance of.
Returns

Promise<bigint>

The balance of the address.

Source

lib/contracts/handlers/institutional-vault-handler.ts:181

completeQueuedWithdrawals()

completeQueuedWithdrawals(withdrawals, receiveAsTokens): Promise<`0x${string}`>

Complete the queued withdrawals.

Parameters
ParameterTypeDescription
withdrawalsQueuedWithdrawal[]The withdrawals to complete.
receiveAsTokensboolean[]Whether to receive the assets as tokens.
Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/institutional-vault-handler.ts:200

convertToAssets()

convertToAssets(shares): Promise<bigint>

Convert shares to assets.

Parameters
ParameterTypeDescription
sharesbigintThe number of shares to convert.
Returns

Promise<bigint>

The number of assets.

Source

lib/contracts/handlers/institutional-vault-handler.ts:219

convertToShares()

convertToShares(assets): Promise<bigint>

Convert assets to shares.

Parameters
ParameterTypeDescription
assetsbigintThe number of assets to convert.
Returns

Promise<bigint>

The number of shares.

Source

lib/contracts/handlers/institutional-vault-handler.ts:229

customExternalCall()

customExternalCall(target, data, value): Promise<`0x${string}`>

Call a custom external function.

Parameters
ParameterTypeDescription
target`0x${string}`The target contract address.
data`0x${string}`The calldata to send a transaction to the target contract.
valuebigintThe amount of value to send to the target contract.
Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/institutional-vault-handler.ts:555

decimals()

decimals(): Promise<number>

Get the number of decimals of the token.

Returns

Promise<number>

The number of decimals of the token.

Source

lib/contracts/handlers/institutional-vault-handler.ts:190

deposit()

deposit(assets, receiver): Promise<`0x${string}`>

Deposit assets into the vault.

Parameters
ParameterTypeDescription
assetsbigintThe number of assets to deposit.
receiver`0x${string}`The address to receive the shares.
Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/institutional-vault-handler.ts:239

depositETH()

depositETH(receiver, value): Promise<`0x${string}`>

Deposit ETH into the vault.

Parameters
ParameterTypeDescription
receiver`0x${string}`The address to receive the shares.
valuebigintThe amount of ETH to deposit.
Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/institutional-vault-handler.ts:252

getAddress()

getAddress(): undefined | `0x${string}`

Get the address of the contract for this handler.

Returns

undefined | `0x${string}`

The address of the contract.

Source

lib/contracts/handlers/institutional-vault-handler.ts:67

getBeaconDepositContract()

getBeaconDepositContract(): Promise<`0x${string}`>

Get the beacon deposit contract address.

Returns

Promise<`0x${string}`>

The beacon deposit contract address.

Source

lib/contracts/handlers/institutional-vault-handler.ts:102

getContract()

getContract(): object

Get the contract. This is a method because the typings are complex and lost when trying to make it a member.

Returns

object

The viem contract.

Source

lib/contracts/handlers/institutional-vault-handler.ts:77

getEigenDelegationManager()

getEigenDelegationManager(): Promise<`0x${string}`>

Get the eigen delegation manager contract address.

Returns

Promise<`0x${string}`>

The eigen delegation manager.

Source

lib/contracts/handlers/institutional-vault-handler.ts:111

getEigenPod()

getEigenPod(): Promise<`0x${string}`>

Get the eigen pod address.

Returns

Promise<`0x${string}`>

The eigen pod address.

Source

lib/contracts/handlers/institutional-vault-handler.ts:129

getEigenPodManager()

getEigenPodManager(): Promise<`0x${string}`>

Get the eigen pod manager contract address.

Returns

Promise<`0x${string}`>

The eigen pod manager contract address.

Source

lib/contracts/handlers/institutional-vault-handler.ts:120

getNonRestakedValidatorETH()

getNonRestakedValidatorETH(): Promise<bigint>

Get the non-restaked validator ETH.

Returns

Promise<bigint>

The non-restaked validator ETH.

Source

lib/contracts/handlers/institutional-vault-handler.ts:265

getRestakedValidatorETH()

getRestakedValidatorETH(): Promise<bigint>

Get the restaked validator ETH.

Returns

Promise<bigint>

The restaked validator ETH.

Source

lib/contracts/handlers/institutional-vault-handler.ts:274

getWithdrawalCredentials()

getWithdrawalCredentials(): Promise<`0x${string}`>

Get the withdrawal credentials.

Returns

Promise<`0x${string}`>

The withdrawal credentials.

Source

lib/contracts/handlers/institutional-vault-handler.ts:283

maxDeposit()

maxDeposit(address): Promise<bigint>

Get the maximum deposit amount for the address.

Parameters
ParameterTypeDescription
address`0x${string}`The address to get the maximum deposit amount for.
Returns

Promise<bigint>

The maximum deposit amount for the address.

Source

lib/contracts/handlers/institutional-vault-handler.ts:293

maxMint()

maxMint(address): Promise<bigint>

Get the maximum mint amount for the address.

Parameters
ParameterTypeDescription
address`0x${string}`The address to get the maximum mint amount for.
Returns

Promise<bigint>

The maximum mint amount for the address.

Source

lib/contracts/handlers/institutional-vault-handler.ts:303

maxRedeem()

maxRedeem(address): Promise<bigint>

Get the maximum redeem amount for the address.

Parameters
ParameterTypeDescription
address`0x${string}`The address to get the maximum redeem amount for.
Returns

Promise<bigint>

The maximum redeem amount for the address.

Source

lib/contracts/handlers/institutional-vault-handler.ts:313

maxWithdraw()

maxWithdraw(address): Promise<bigint>

Get the maximum withdraw amount for the address.

Parameters
ParameterTypeDescription
address`0x${string}`The address to get the maximum withdraw amount for.
Returns

Promise<bigint>

The maximum withdraw amount for the address.

Source

lib/contracts/handlers/institutional-vault-handler.ts:323

mint()

mint(shares, receiver): Promise<`0x${string}`>

Mint shares to the receiver.

Parameters
ParameterTypeDescription
sharesbigintThe number of shares to mint.
receiver`0x${string}`The address to receive the shares.
Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/institutional-vault-handler.ts:333

name()

name(): Promise<string>

Get the name of the contract.

Returns

Promise<string>

The name of the contract.

Source

lib/contracts/handlers/institutional-vault-handler.ts:345

previewDeposit()

previewDeposit(assets): Promise<bigint>

Preview the deposit amount for the assets.

Parameters
ParameterTypeDescription
assetsbigintThe number of assets to deposit.
Returns

Promise<bigint>

The number of shares to receive.

Source

lib/contracts/handlers/institutional-vault-handler.ts:355

previewMint()

previewMint(shares): Promise<bigint>

Preview the mint amount for the shares.

Parameters
ParameterTypeDescription
sharesbigintThe number of shares to mint.
Returns

Promise<bigint>

The number of assets to receive.

Source

lib/contracts/handlers/institutional-vault-handler.ts:365

previewRedeem()

previewRedeem(shares): Promise<bigint>

Preview the redeem amount for the shares.

Parameters
ParameterTypeDescription
sharesbigintThe number of shares to redeem.
Returns

Promise<bigint>

The number of assets to receive.

Source

lib/contracts/handlers/institutional-vault-handler.ts:375

previewWithdraw()

previewWithdraw(shares): Promise<bigint>

Preview the withdraw amount for the shares.

Parameters
ParameterTypeDescription
sharesbigintThe number of shares to withdraw.
Returns

Promise<bigint>

The number of assets to receive.

Source

lib/contracts/handlers/institutional-vault-handler.ts:385

queueWithdrawals()

queueWithdrawals(shares): Promise<`0x${string}`>

Queue the withdrawals.

Parameters
ParameterTypeDescription
sharesbigintThe number of shares to withdraw.
Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/institutional-vault-handler.ts:394

redeem()

redeem(shares, receiver, owner): Promise<`0x${string}`>

Redeem the shares to the receiver.

Parameters
ParameterTypeDescription
sharesbigintThe number of shares to redeem.
receiver`0x${string}`The address to receive the assets.
owner`0x${string}`The owner of the shares.
Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/institutional-vault-handler.ts:408

requestEigenPodConsolidation()

requestEigenPodConsolidation(srcPubkeys, targetPubkeys, value): Promise<`0x${string}`>

Request EigenPod consolidation.

Parameters
ParameterTypeDescription
srcPubkeys`0x${string}`[]The source public keys.
targetPubkeys`0x${string}`[]The target public keys.
valuebigintThe amount to send to the target contract (small quantity of GWei)
Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/institutional-vault-handler.ts:569

setValidatorsETH()

setValidatorsETH(restakedValidatorsETH, nonRestakedValidatorsETH): Promise<`0x${string}`>

Set the validators ETH.

Parameters
ParameterTypeDescription
restakedValidatorsETHbigintThe amount of restaked validator ETH.
nonRestakedValidatorsETHbigintThe amount of non-restaked validator ETH.
Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/institutional-vault-handler.ts:421

startNonRestakingValidators()

startNonRestakingValidators(pubKeys, signatures, amountsInGwei, depositDataRoots): Promise<`0x${string}`>

Start the non-restaking validators.

Parameters
ParameterTypeDescription
pubKeys`0x${string}`[]The public keys of the validators.
signatures`0x${string}`[]The signatures of the validators.
amountsInGweibigint[]The amounts of the validators.
depositDataRoots`0x${string}`[]The deposit data roots of the validators.
Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/institutional-vault-handler.ts:442

startRestakingValidators()

startRestakingValidators(pubKeys, signatures, amountsInGwei, depositDataRoots): Promise<`0x${string}`>

Start the restaking validators.

Parameters
ParameterTypeDescription
pubKeys`0x${string}`[]The public keys of the validators.
signatures`0x${string}`[]The signatures of the validators.
amountsInGweibigint[]The amounts of the validators.
depositDataRoots`0x${string}`[]The deposit data roots of the validators.
Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/institutional-vault-handler.ts:465

symbol()

symbol(): Promise<string>

Get the symbol of the contract.

Returns

Promise<string>

The symbol of the contract.

Source

lib/contracts/handlers/institutional-vault-handler.ts:499

totalAssets()

totalAssets(): Promise<bigint>

Get the total assets of the vault.

Returns

Promise<bigint>

The total assets of the vault.

Source

lib/contracts/handlers/institutional-vault-handler.ts:508

totalSupply()

totalSupply(): Promise<bigint>

Get the total supply of the vault.

Returns

Promise<bigint>

The total supply of the vault.

Source

lib/contracts/handlers/institutional-vault-handler.ts:517

transfer()

transfer(to, value): Promise<`0x${string}`>

Transfer the value to the to address.

Parameters
ParameterTypeDescription
to`0x${string}`The address to transfer the value to.
valuebigintThe amount of value to transfer.
Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/institutional-vault-handler.ts:527

transferFrom()

transferFrom(from, to, value): Promise<`0x${string}`>

Transfer the value from the from address to the to address.

Parameters
ParameterTypeDescription
from`0x${string}`The address to transfer the value from.
to`0x${string}`The address to transfer the value to.
valuebigintThe amount of value to transfer.
Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/institutional-vault-handler.ts:541

withAddress()

withAddress(address): InstitutionalVaultHandler

Set the address of the contract for this handler.

Parameters
ParameterTypeDescription
address`0x${string}`The address of the contract.
Returns

InstitutionalVaultHandler

The handler.

Source

lib/contracts/handlers/institutional-vault-handler.ts:56

withdraw()

withdraw(assets, receiver, owner): Promise<`0x${string}`>

Withdraw the assets to the receiver.

Parameters
ParameterTypeDescription
assetsbigintThe number of assets to withdraw.
receiver`0x${string}`The address to receive the assets.
owner`0x${string}`The owner of the assets.
Returns

Promise<`0x${string}`>

Source

lib/contracts/handlers/institutional-vault-handler.ts:487

Type Aliases

QueuedWithdrawal

QueuedWithdrawal: object

Type declaration

delegatedTo

delegatedTo: Address

nonce

nonce: bigint

scaledShares

scaledShares: bigint[]

staker

staker: Address

startBlock

startBlock: number

strategies

strategies: Address[]

withdrawer

withdrawer: Address

Source

lib/contracts/handlers/institutional-vault-handler.ts:14