Map<String, dynamic> toJson() { return { 'email': email, 'address': address, 'chainId': chainId, 'self': self?.toJson(), 'peer': peer?.toJson(), }; }