Voucher.fromBuffer constructor

Voucher.fromBuffer(
  1. List<int> data
)

Implementation

factory Voucher.fromBuffer(List<int> data) {
  final decode = LayoutSerializable.decode(
      bytes: data,
      layout: _Utils.layout,
      validator: {"discriminator": _Utils.discriminator});
  return Voucher(
      leafSchema: LeafSchemaV1.fromJson(decode["leafschema"]),
      index: decode["index"],
      merkleTree: decode["merkleTree"]);
}