NameServiceCreateLayout.fromBuffer constructor

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

Creates a NameServiceCreateLayout instance from buffer data.

Implementation

factory NameServiceCreateLayout.fromBuffer(List<int> data) {
  Map<String, dynamic> decode = ProgramLayout.decodeAndValidateStruct(
    layout: _layout,
    bytes: data,
    instruction: NameServiceProgramInstruction.create.insturction,
  );
  decode = ProgramLayout.decodeAndValidateStruct(
    layout: _layout,
    bytes: data,
    instruction: NameServiceProgramInstruction.create.insturction,
  );
  return NameServiceCreateLayout(
    lamports: decode["lamports"],
    hashedName: decode["hashedName"],
    space: decode["space"],
  );
}