import Tx from 'ethereumjs-tx'; interface IBaseWallet { isReadOnly?: boolean; getAddressString(): Promise | string; getPrivateKeyString?(): string; } export interface IReadOnlyWallet extends IBaseWallet { isReadOnly: true; } export interface IFullWallet extends IBaseWallet { isReadOnly?: false; signRawTransaction(tx: Tx): Promise | Buffer; signMessage(msg: string): Promise | string; } export type IWallet = IReadOnlyWallet | IFullWallet;