@byzantine/vault-sdk
Version:
Byzantine Vault SDK for creating and managing vaults on Ethereum for restaking strategies
47 lines (46 loc) • 2.38 kB
TypeScript
import { ethers } from "ethers";
/**
* Check if an address is whitelisted to deposit in the vault
* @param vaultContract - The vault contract instance
* @param address - Address to check
* @returns True if the address is whitelisted
*/
export declare function isAddressWhitelisted(vaultContract: ethers.Contract, address: string): Promise<boolean>;
/**
* Check if the vault is private
* @param vaultContract - The vault contract instance
* @returns True if the vault is private
*/
export declare function isVaultPrivate(vaultContract: ethers.Contract): Promise<boolean>;
/**
* Check if an address is the whitelist manager
* @param vaultContract - The vault contract instance
* @param address - Address to check
* @returns True if the address is the whitelist manager
*/
export declare function isWhitelistManager(vaultContract: ethers.Contract, address: string): Promise<boolean>;
/**
* Set whitelist status for multiple addresses
* @param signer - Ethereum signer (must be the whitelist manager)
* @param vaultContract - The vault contract connected to signer
* @param addresses - Array of addresses to whitelist or remove from whitelist
* @param canDeposit - Whether the addresses can deposit (true) or not (false)
* @returns Transaction response
*/
export declare function setAddressesWhitelistStatus(signer: ethers.Signer, vaultContract: ethers.Contract, addresses: string[], canDeposit: boolean): Promise<ethers.TransactionResponse>;
/**
* Set the private status of the vault
* @param signer - Ethereum signer (must be the whitelist manager)
* @param vaultContract - The vault contract connected to signer
* @param isPrivate - Whether the vault should be private (true) or public (false)
* @returns Transaction response
*/
export declare function setVaultPrivateStatus(signer: ethers.Signer, vaultContract: ethers.Contract, isPrivate: boolean): Promise<ethers.TransactionResponse>;
/**
* Transfer the whitelist manager role to a new address
* @param signer - Ethereum signer (must be the role admin)
* @param vaultContract - The vault contract connected to signer
* @param newManagerAddress - Address of the new whitelist manager
* @returns Transaction response
*/
export declare function transferWhitelistManagerRole(signer: ethers.Signer, vaultContract: ethers.Contract, newManagerAddress: string): Promise<ethers.TransactionResponse>;