MetaplexHydraInitLayout.fromBuffer constructor

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

Implementation

factory MetaplexHydraInitLayout.fromBuffer(List<int> data) {
  final decode = MetaplexHydraProgramLayout.decodeAndValidateStruct(
      layout: _layout,
      bytes: data,
      instruction: MetaplexHydraProgramInstruction.processInit.insturction);
  return MetaplexHydraInitLayout(
      bumpSeed: decode["bumpSeed"],
      name: decode["name"],
      nativeAccountBumpSeed: decode["nativeAccountBumpSeed"],
      totalShares: decode["totalShares"],
      membershipModel: MembershipModel.fromValue(decode["membershipModel"]));
}