AssetCode.deserialize constructor

AssetCode.deserialize(
  1. String from
)

Implementation

factory AssetCode.deserialize(String from) {
  final decoded = Base58Encoder.instance.decode(from);
  return AssetCode(
      decoded.first,
      ToplAddress(decoded.sublist(1, 1 + ToplAddress.addressSize),
          networkId: decoded[1],
          proposition: PropositionType.fromPrefix(decoded[2])),
      Latin1Data(decoded.sublist(35)),
      Network.fromNetworkPrefix(decoded[1]).name);
}