UNPKG

@byzantine/vault-sdk

Version:

Byzantine Vault SDK for creating and managing vaults on Ethereum for restaking strategies

47 lines (46 loc) 1.95 kB
import { ethers } from "ethers"; /** * Check if the vault's shares are tokenized (transferable like ERC20) * @param vaultContract - The vault contract instance * @returns True if the vault's shares are tokenized */ export declare function isTokenized(vaultContract: ethers.Contract): Promise<boolean>; /** * Get the name of the vault share token * @param vaultContract - The vault contract instance * @returns The name of the vault share token */ export declare function getSharesName(vaultContract: ethers.Contract): Promise<string>; /** * Get the symbol of the vault share token * @param vaultContract - The vault contract instance * @returns The symbol of the vault share token */ export declare function getSharesSymbol(vaultContract: ethers.Contract): Promise<string>; /** * Get the total supply of vault shares * @param vaultContract - The vault contract instance * @returns The total supply of shares */ export declare function getTotalShares(vaultContract: ethers.Contract): Promise<bigint>; /** * Get the balance of shares for a specific address * @param vaultContract - The vault contract instance * @param address - The address to check * @returns The balance of shares for the address */ export declare function getSharesBalance(vaultContract: ethers.Contract, address: string): Promise<bigint>; /** * Convert a given amount of assets to shares * @param vaultContract - The vault contract instance * @param assets - The amount of assets to convert * @returns The equivalent amount of shares */ export declare function convertToShares(vaultContract: ethers.Contract, assets: bigint): Promise<bigint>; /** * Convert a given amount of shares to assets * @param vaultContract - The vault contract instance * @param shares - The amount of shares to convert * @returns The equivalent amount of assets */ export declare function convertToAssets(vaultContract: ethers.Contract, shares: bigint): Promise<bigint>;