SPLTokenSetAuthorityLayout.fromBuffer constructor
Constructs an SPLTokenSetAuthorityLayout instance from buffer.
Implementation
factory SPLTokenSetAuthorityLayout.fromBuffer(List<int> bytes) {
final decode = ProgramLayout.decodeAndValidateStruct(
layout: _layout,
bytes: bytes,
instruction: SPLTokenProgramInstruction.setAuthority.insturction);
return SPLTokenSetAuthorityLayout(
authorityType: AuthorityType.fromValue(decode["authorityType"]),
newAuthority: decode["newAuthority"]);
}