UNPKG

@byzantine/vault-sdk

Version:

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

50 lines (49 loc) 2.42 kB
import { ethers } from "ethers"; /** * Get the distribution ratio of the supervault * @param supervaultContract - The supervault contract instance * @returns The current distribution ratio */ export declare function getDistributionRatio(supervaultContract: ethers.Contract): Promise<bigint>; /** * Check if an address is the balancer manager * @param supervaultContract - The supervault contract instance * @param address - Address to check * @returns True if the address is the balancer manager */ export declare function isBalancerManager(supervaultContract: ethers.Contract, address: string): Promise<boolean>; /** * Get the current rebalance status of the supervault * @param supervaultContract - The supervault contract instance * @returns The rebalance status information (implementation dependent) */ export declare function getRebalanceStatus(supervaultContract: ethers.Contract): Promise<any>; /** * Get the underlying vaults of the supervault * @param supervaultContract - The supervault contract instance * @returns Array of underlying vault addresses */ export declare function getUnderlyingVaults(supervaultContract: ethers.Contract): Promise<string[]>; /** * Update the distribution ratio of the supervault * @param signer - Ethereum signer (must be the balancer manager) * @param supervaultContract - The supervault contract connected to signer * @param ratio - New distribution ratio * @returns Transaction response */ export declare function updateDistributionRatio(signer: ethers.Signer, supervaultContract: ethers.Contract, ratio: bigint): Promise<ethers.TransactionResponse>; /** * Set a new balancer manager * @param signer - Ethereum signer (must be the role admin) * @param supervaultContract - The supervault contract connected to signer * @param newManagerAddress - Address of the new balancer manager * @returns Transaction response */ export declare function setBalancerManager(signer: ethers.Signer, supervaultContract: ethers.Contract, newManagerAddress: string): Promise<ethers.TransactionResponse>; /** * Force a rebalance of the supervault * @param signer - Ethereum signer (permissions vary by implementation) * @param supervaultContract - The supervault contract connected to signer * @returns Transaction response */ export declare function forceRebalance(signer: ethers.Signer, supervaultContract: ethers.Contract): Promise<ethers.TransactionResponse>;