toJson method

Map<String, dynamic> toJson()

Converts the current Wallet instance into a JSON object. Note that the private key is not serialized for safety reasons.

Implementation

Map<String, dynamic> toJson() {
  return <String, dynamic>{
    'hex_address': HEX.encode(address),
    'bech32_address': bech32Address,
    'public_key': HEX.encode(publicKey),
    'network_info': networkInfo.toJson(),
  };
}