@byzantine/vault-sdk
Version:
Byzantine Vault SDK for creating and managing vaults on Ethereum for restaking strategies
82 lines (81 loc) • 2.93 kB
TypeScript
import { ethers } from "ethers";
/**
* Contract Provider for handling contract instances with caching
*/
export declare class ContractProvider {
private provider;
private signer?;
private vaultTypeClient;
private vaultCache;
/**
* Creates a new ContractProvider instance
* @param provider Ethereum provider
* @param signer Optional signer for transactions
*/
constructor(provider: ethers.Provider, signer?: ethers.Signer);
/**
* Clear the cache for a specific vault or all vaults
* @param vaultAddress Optional address of the vault to clear from cache
*/
clearCache(vaultAddress?: string): void;
/**
* Get the ERC20 Byzantine vault contract instance
* @param vaultAddress The address of the ERC20 vault
* @returns The ERC20 contract instance
*/
getByzVaultContract(vaultAddress: string): ethers.Contract;
/**
* Get the SuperVault contract instance
* @param vaultAddress The address of the SuperVault
* @returns The SuperVault contract instance
*/
getSuperVaultContract(vaultAddress: string): ethers.Contract;
/**
* Get the Symbiotic Vault contract instance
* @param vaultAddress The address of the Symbiotic vault or SuperVault
* @returns The Vault contract instance
*/
getSymVaultContract(vaultAddress: string): Promise<ethers.Contract>;
/**
* Get the sym vault address of a Symbiotic vault
* @param vaultAddress The address of the vault
* @returns The sym vault address
*/
getSymVaultAddress(vaultAddress: string): Promise<string>;
/**
* Get the Delegator contract instance
* @param vaultAddress The address of the vault
* @returns The Delegator contract instance
*/
getDelegatorContract(vaultAddress: string): Promise<ethers.Contract>;
/**
* Get the delegator address for a vault
* @param vaultAddress The address of the vault
* @returns The delegator address
*/
getDelegatorAddress(vaultAddress: string): Promise<string>;
/**
* Get the Burner contract instance
* @param vaultAddress The address of the vault
* @returns The Burner contract instance
*/
getBurnerContract(vaultAddress: string): Promise<ethers.Contract>;
/**
* Get the burner address for a vault
* @param vaultAddress The address of the vault
* @returns The burner address
*/
getBurnerAddress(vaultAddress: string): Promise<string>;
/**
* Get the Slasher contract instance
* @param vaultAddress The address of the vault
* @returns The Slasher contract instance
*/
getSlasherContract(vaultAddress: string): Promise<ethers.Contract>;
/**
* Get the slasher address for a vault
* @param vaultAddress The address of the vault
* @returns The slasher address
*/
getSlasherAddress(vaultAddress: string): Promise<string>;
}