MetaplexNFTPacksProgram.addVoucherToPack constructor

MetaplexNFTPacksProgram.addVoucherToPack({
  1. required SolAddress packSet,
  2. required SolAddress packVoucher,
  3. required SolAddress authority,
  4. required SolAddress voucherOwner,
  5. required SolAddress masterEdition,
  6. required SolAddress masterMetadata,
  7. required SolAddress mint,
  8. required SolAddress source,
  9. required SolAddress store,
  10. SolAddress rent = SystemProgramConst.sysvarRentPubkey,
  11. SolAddress systemProgram = SystemProgramConst.programId,
  12. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
})

Implementation

factory MetaplexNFTPacksProgram.addVoucherToPack(
    {required SolAddress packSet,
    required SolAddress packVoucher,
    required SolAddress authority,
    required SolAddress voucherOwner,
    required SolAddress masterEdition,
    required SolAddress masterMetadata,
    required SolAddress mint,
    required SolAddress source,
    required SolAddress store,
    SolAddress rent = SystemProgramConst.sysvarRentPubkey,
    SolAddress systemProgram = SystemProgramConst.programId,
    SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId}) {
  return MetaplexNFTPacksProgram(
      keys: [
        packSet.toWritable(),
        packVoucher.toWritable(),
        authority.toSignerAndWritable(),
        voucherOwner.toSigner(),
        masterEdition.toReadOnly(),
        masterMetadata.toReadOnly(),
        mint.toReadOnly(),
        source.toWritable(),
        store.toReadOnly(),
        rent.toReadOnly(),
        systemProgram.toReadOnly(),
        tokenProgram.toReadOnly(),
      ],
      programId: MetaplexNFTPacksProgramConst.programId,
      layout: const MetaplexNFTPacksAddVoucherToPackLayout());
}