SPLTokenInitializePermanentDelegateLayout.fromBuffer constructor
Constructs an SPLTokenInitializePermanentDelegateLayout instance from buffer.
Implementation
factory SPLTokenInitializePermanentDelegateLayout.fromBuffer(
List<int> bytes) {
final decode = ProgramLayout.decodeAndValidateStruct(
layout: _layout,
bytes: bytes,
instruction:
SPLTokenProgramInstruction.initializePermanentDelegate.insturction,
);
final SolAddress delegate = decode["delegate"];
return SPLTokenInitializePermanentDelegateLayout(
delegate: delegate == SolAddress.defaultPubKey ? null : delegate,
);
}