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