MetaplexHydraProgram.distributeNft constructor

MetaplexHydraProgram.distributeNft({
  1. required SolAddress payer,
  2. required SolAddress member,
  3. required SolAddress membershipMintTokenAccount,
  4. required SolAddress membershipKey,
  5. required SolAddress membershipVoucher,
  6. required SolAddress fanout,
  7. required SolAddress holdingAccount,
  8. required SolAddress fanoutForMint,
  9. required SolAddress fanoutForMintMembershipVoucher,
  10. required SolAddress fanoutMint,
  11. required SolAddress fanoutMintMemberTokenAccount,
  12. required MetaplexHydraDistributeNftLayout layout,
  13. SolAddress systemProgram = SystemProgramConst.programId,
  14. SolAddress rent = SystemProgramConst.sysvarRentPubkey,
  15. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
})

Implementation

factory MetaplexHydraProgram.distributeNft(
    {required SolAddress payer,
    required SolAddress member,
    required SolAddress membershipMintTokenAccount,
    required SolAddress membershipKey,
    required SolAddress membershipVoucher,
    required SolAddress fanout,
    required SolAddress holdingAccount,
    required SolAddress fanoutForMint,
    required SolAddress fanoutForMintMembershipVoucher,
    required SolAddress fanoutMint,
    required SolAddress fanoutMintMemberTokenAccount,
    required MetaplexHydraDistributeNftLayout layout,
    SolAddress systemProgram = SystemProgramConst.programId,
    SolAddress rent = SystemProgramConst.sysvarRentPubkey,
    SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId}) {
  return MetaplexHydraProgram(keys: [
    payer.toSigner(),
    member.toWritable(),
    membershipMintTokenAccount.toWritable(),
    membershipKey.toReadOnly(),
    membershipVoucher.toWritable(),
    fanout.toWritable(),
    holdingAccount.toWritable(),
    fanoutForMint.toWritable(),
    fanoutForMintMembershipVoucher.toWritable(),
    fanoutMint.toReadOnly(),
    fanoutMintMemberTokenAccount.toWritable(),
    systemProgram.toReadOnly(),
    rent.toReadOnly(),
    tokenProgram.toReadOnly(),
  ], programId: MetaplexHydraProgramConst.programId, layout: layout);
}