UNPKG

@vechain/sdk-network

Version:

This module serves as the standard interface connecting decentralized applications (dApps) and users to the VeChainThor blockchain

18 lines (14 loc) 533 B
import { type VeChainProvider } from '../../../../providers/vechain-provider'; /** * RPC Method eth_accounts implementation * * @param provider - Provider with ProviderInternalWallet instance to use. */ const ethAccounts = async (provider?: VeChainProvider): Promise<string[]> => { // ProviderInternalWallet exists if (provider?.wallet !== undefined) return await provider?.wallet.getAddresses(); // In error case (if wallet is not defined), return an empty array return []; }; export { ethAccounts };