MetaplexHydraProgram.distributeWallet constructor

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

Implementation

factory MetaplexHydraProgram.distributeWallet(
    {required SolAddress payer,
    required SolAddress member,
    required SolAddress membershipVoucher,
    required SolAddress fanout,
    required SolAddress holdingAccount,
    required SolAddress fanoutForMint,
    required SolAddress fanoutForMintMembershipVoucher,
    required SolAddress fanoutMint,
    required SolAddress fanoutMintMemberTokenAccount,
    required MetaplexHydraDistributeWalletLayout layout,
    SolAddress systemProgram = SystemProgramConst.programId,
    SolAddress rent = SystemProgramConst.sysvarRentPubkey,
    SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId}) {
  return MetaplexHydraProgram(keys: [
    payer.toSigner(),
    member.toWritable(),
    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);
}