MintAssets.fromJson constructor

MintAssets.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory MintAssets.fromJson(Map<String, dynamic> json) {
  final Map<AssetName, BigInt> assets = {};

  for (final i in json.entries) {
    assets[AssetName.fromHex(i.key)] = BigintUtils.parse(i.value);
  }
  return MintAssets(assets);
}