MetaplexNFTPacksProgram.requestCardForRedeem constructor

MetaplexNFTPacksProgram.requestCardForRedeem({
  1. required SolAddress packSet,
  2. required SolAddress packConfig,
  3. required SolAddress store,
  4. required SolAddress edition,
  5. required SolAddress editionMint,
  6. required SolAddress packVoucher,
  7. required SolAddress provingProcess,
  8. required SolAddress userWallet,
  9. required SolAddress recentSlothashes,
  10. required SolAddress clock,
  11. SolAddress? userToken,
  12. required MetaplexNFTPacksRequestCardForRedeemLayout layout,
  13. SolAddress rent = SystemProgramConst.sysvarRentPubkey,
  14. SolAddress systemProgram = SystemProgramConst.programId,
})

Implementation

factory MetaplexNFTPacksProgram.requestCardForRedeem({
  required SolAddress packSet,
  required SolAddress packConfig,
  required SolAddress store,
  required SolAddress edition,
  required SolAddress editionMint,
  required SolAddress packVoucher,
  required SolAddress provingProcess,
  required SolAddress userWallet,
  required SolAddress recentSlothashes,
  required SolAddress clock,
  SolAddress? userToken,
  required MetaplexNFTPacksRequestCardForRedeemLayout layout,
  SolAddress rent = SystemProgramConst.sysvarRentPubkey,
  SolAddress systemProgram = SystemProgramConst.programId,
}) {
  return MetaplexNFTPacksProgram(keys: [
    packSet.toReadOnly(),
    packConfig.toWritable(),
    store.toReadOnly(),
    edition.toReadOnly(),
    editionMint.toReadOnly(),
    packVoucher.toReadOnly(),
    provingProcess.toWritable(),
    userWallet.toSigner(),
    recentSlothashes.toReadOnly(),
    clock.toReadOnly(),
    rent.toReadOnly(),
    systemProgram.toReadOnly(),
    if (userToken != null) userToken.toReadOnly()
  ], programId: MetaplexNFTPacksProgramConst.programId, layout: layout);
}