UNPKG

@byzantine/vault-sdk

Version:

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

106 lines (105 loc) 3.98 kB
import { ethers } from "ethers"; import { DelegatorType } from "../../types"; export declare class SymbioticClient { private provider; private signer?; private contractProvider; private vaultTypeClient; constructor(provider: ethers.Provider, signer?: ethers.Signer); /** * Get the Symbiotic Vault contract instance * @param vaultAddress The address of the Symbiotic vault or SuperVault * @returns The Vault contract instance */ private getSymVaultContract; /** * 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>; /** * 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 epoch at a specific timestamp for a Symbiotic vault * @param vaultAddress The address of the vault * @param timestamp The timestamp to check * @returns The epoch number */ getEpochAt(vaultAddress: string, timestamp: number): Promise<number>; /** * Get the epoch duration for a Symbiotic vault * @param vaultAddress The address of the vault * @returns The epoch duration */ getEpochDuration(vaultAddress: string): Promise<number>; /** * Get the current epoch for a Symbiotic vault * @param vaultAddress The address of the vault * @returns The current epoch number */ getCurrentEpoch(vaultAddress: string): Promise<number>; /** * Get the start timestamp of the current epoch for a Symbiotic vault * @param vaultAddress The address of the vault * @returns The start timestamp of the current epoch */ getCurrentEpochStart(vaultAddress: string): Promise<number>; /** * Get the start timestamp of the previous epoch for a Symbiotic vault * @param vaultAddress The address of the vault * @returns The start timestamp of the previous epoch */ getPreviousEpochStart(vaultAddress: string): Promise<number>; /** * Get the start timestamp of the next epoch for a Symbiotic vault * @param vaultAddress The address of the vault * @returns The start timestamp of the next epoch */ getNextEpochStart(vaultAddress: string): Promise<number>; /** * Get the Delegator contract instance * @param vaultAddress The address of the vault * @returns The Delegator contract instance */ private getDelegatorContract; /** * 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 slasher address for a Symbiotic vault * @param vaultAddress The address of the vault * @returns The slasher address */ getSlasherAddress(vaultAddress: string): Promise<string>; /** * Get the delegator type for a Symbiotic vault * @param vaultAddress The address of the vault * @returns The delegator type */ getDelegatorType(vaultAddress: string): Promise<DelegatorType>; /** * 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 delegator operator for a vault, only for OSD and ONSD vaults * @param vaultAddress The address of the vault * @returns The delegator operator */ getDelegatorOperator(vaultAddress: string): Promise<string>; /** * Get the delegator network for a vault, only for ONSD vaults * @param vaultAddress The address of the vault * @returns The delegator network */ getDelegatorNetwork(vaultAddress: string): Promise<string>; }