MetaplexHydraProgram.addMemberNft constructor

MetaplexHydraProgram.addMemberNft({
  1. required SolAddress authority,
  2. required SolAddress fanout,
  3. required SolAddress membershipAccount,
  4. required SolAddress mint,
  5. required SolAddress metadata,
  6. required MetaplexHydraAddMemberNftLayout layout,
  7. SolAddress systemProgram = SystemProgramConst.programId,
  8. SolAddress rent = SystemProgramConst.sysvarRentPubkey,
  9. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
})

Implementation

factory MetaplexHydraProgram.addMemberNft(
    {required SolAddress authority,
    required SolAddress fanout,
    required SolAddress membershipAccount,
    required SolAddress mint,
    required SolAddress metadata,
    required MetaplexHydraAddMemberNftLayout layout,
    SolAddress systemProgram = SystemProgramConst.programId,
    SolAddress rent = SystemProgramConst.sysvarRentPubkey,
    SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId}) {
  return MetaplexHydraProgram(keys: [
    authority.toSignerAndWritable(),
    fanout.toWritable(),
    membershipAccount.toWritable(),
    mint.toReadOnly(),
    metadata.toReadOnly(),
    systemProgram.toReadOnly(),
    rent.toReadOnly(),
    tokenProgram.toReadOnly(),
  ], programId: MetaplexHydraProgramConst.programId, layout: layout);
}