import { RawTransaction } from 'libs/transaction'; interface IBaseWallet { isReadOnly?: boolean; getAddressString(): Promise | string; } export interface IReadOnlyWallet extends IBaseWallet { isReadOnly: true; } export interface IFullWallet extends IBaseWallet { isReadOnly?: false; signRawTransaction(tx: RawTransaction): Promise | string; signMessage(msg: string): Promise | string; } export type IWallet = IReadOnlyWallet | IFullWallet;