StakeInitializeLayout.fromBuffer constructor

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

Implementation

factory StakeInitializeLayout.fromBuffer(List<int> data) {
  final decode = ProgramLayout.decodeAndValidateStruct(
      layout: _layout,
      bytes: data,
      instruction: StakeProgramInstruction.initialize.insturction);
  return StakeInitializeLayout(
      authorized: StakeAuthorized.fromJson(decode["authorized"]),
      lockup: StakeLockup.fromJson(decode["lockup"]));
}