@byzantine/vault-sdk
Version:
Byzantine Vault SDK for creating and managing vaults on Ethereum for restaking strategies
27 lines (26 loc) • 961 B
TypeScript
/**
* Utility functions for working with providers and signers
*/
import { HDNodeWallet } from "ethers";
import { Address } from "viem";
/**
* Creates an ethers wallet from a mnemonic phrase
* @param mnemonic - Mnemonic phrase
* @param index - Account index (default: 0)
* @returns Ethers wallet
*/
export declare function getWalletFromMnemonic(mnemonic: string): HDNodeWallet;
/**
* Validates if a string is a valid Ethereum address
* @param address - The address to validate
* @returns True if the address is valid
*/
export declare function isValidAddress(address: string): address is Address;
/**
* Formats an amount for display with a specified number of decimals
* @param amount - Amount to format
* @param decimals - Number of decimals
* @param maxDecimals - Maximum number of decimals to display
* @returns Formatted amount string
*/
export declare function formatAmount(amount: bigint, decimals: number, maxDecimals?: number): string;