MultiAsset.deserialize constructor

MultiAsset.deserialize(
  1. CborMapValue<CborObject, CborObject> cbor
)

Constructs an instance of MultiAsset from a CBOR object.

Implementation

factory MultiAsset.deserialize(CborMapValue<CborObject, CborObject> cbor) {
  final assets = {
    for (final i in cbor.value.entries)
      PolicyID.deserialize(i.key.cast()): Assets.deserialize(i.value.cast())
  };
  return MultiAsset(assets);
}