NameServiceProgram.transfer constructor
NameServiceProgram.transfer({
- required NameServiceTransferLayout layout,
- required SolAddress nameAccountKey,
- required SolAddress currentNameOwnerKey,
- SolAddress nameProgramId = NameServiceProgramConst.programId,
- SolAddress? nameClassKey,
- SolAddress? nameParent,
Transfer ownership of a name record.
Implementation
factory NameServiceProgram.transfer({
required NameServiceTransferLayout layout,
/// Name record to be transferred
required SolAddress nameAccountKey,
/// Account owner
required SolAddress currentNameOwnerKey,
SolAddress nameProgramId = NameServiceProgramConst.programId,
/// Account class
SolAddress? nameClassKey,
/// Parent name record
SolAddress? nameParent,
}) {
return NameServiceProgram(
keys: [
nameAccountKey.toWritable(),
currentNameOwnerKey.toSigner(),
if (nameClassKey != null) nameClassKey.toSigner(),
if (nameParent != null) nameParent.toReadOnly(),
],
programId: nameProgramId,
layout: layout,
);
}