NameServiceProgram.delete constructor

NameServiceProgram.delete({
  1. SolAddress nameProgramId = NameServiceProgramConst.programId,
  2. required SolAddress nameAccountKey,
  3. required SolAddress nameOwnerKey,
  4. required SolAddress refundTargetKey,
})

Delete a name record.

Implementation

factory NameServiceProgram.delete({
  SolAddress nameProgramId = NameServiceProgramConst.programId,

  /// Name record to be deleted
  required SolAddress nameAccountKey,

  /// Account owner
  required SolAddress nameOwnerKey,

  /// Refund account
  required SolAddress refundTargetKey,
}) {
  return NameServiceProgram(
    keys: [
      nameAccountKey.toWritable(),
      nameOwnerKey.toSigner(),
      refundTargetKey.toWritable(),
    ],
    programId: nameProgramId,
    layout: NameServiceDeleteLayout(),
  );
}