Value.deserialize constructor
Value.deserialize(
- CborObject cbor
Deserializes a Value instance from a CBOR object.
Implementation
factory Value.deserialize(CborObject cbor) {
if (cbor is CborListValue) {
return Value(
coin: cbor.getIndex<CborObject>(0).getInteger(),
multiAsset: MultiAsset.deserialize(cbor.getIndex(1)));
}
return Value(coin: cbor.getInteger());
}