SPLToken2022InitializeGroupPointerLayout.fromBuffer constructor

SPLToken2022InitializeGroupPointerLayout.fromBuffer(
  1. List<int> bytes
)

Implementation

factory SPLToken2022InitializeGroupPointerLayout.fromBuffer(List<int> bytes) {
  final decode = ProgramLayout.decodeAndValidateStruct(
    layout: _layout,
    bytes: bytes,
    instruction: SPLTokenProgramInstruction.groupPointerExtension.insturction,
  );
  return SPLToken2022InitializeGroupPointerLayout(
    authority: decode["authority"] == SolAddress.defaultPubKey
        ? null
        : decode["authority"],
    groupAddress: decode["groupAddress"] == SolAddress.defaultPubKey
        ? null
        : decode["groupAddress"],
  );
}