MetaplexTokenMetaDataProgram.createMasterEdition constructor

MetaplexTokenMetaDataProgram.createMasterEdition({
  1. required SolAddress edition,
  2. required SolAddress mint,
  3. required SolAddress updateAuthority,
  4. required SolAddress mintAuthority,
  5. required SolAddress payer,
  6. required SolAddress metadata,
  7. SolAddress systemProgram = SystemProgramConst.programId,
  8. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  9. SolAddress rent = SystemProgramConst.sysvarRentPubkey,
})

Implementation

factory MetaplexTokenMetaDataProgram.createMasterEdition({
  required SolAddress edition,
  required SolAddress mint,
  required SolAddress updateAuthority,
  required SolAddress mintAuthority,
  required SolAddress payer,
  required SolAddress metadata,
  SolAddress systemProgram = SystemProgramConst.programId,
  SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  SolAddress rent = SystemProgramConst.sysvarRentPubkey,
}) {
  return MetaplexTokenMetaDataProgram(
      keys: [
        edition.toWritable(),
        mint.toWritable(),
        updateAuthority.toSigner(),
        mintAuthority.toSigner(),
        payer.toSignerAndWritable(),
        metadata.toReadOnly(),
        tokenProgram.toReadOnly(),
        systemProgram.toReadOnly(),
        rent.toReadOnly(),
      ],
      programId: MetaplexTokenMetaDataProgramConst.programId,
      layout: MetaplexTokenMetaDataCreateMasterEditionLayout());
}