MetaplexAuctionHouseProgram.withdraw constructor

MetaplexAuctionHouseProgram.withdraw({
  1. required SolAddress wallet,
  2. required SolAddress receiptAccount,
  3. required SolAddress escrowPaymentAccount,
  4. required SolAddress treasuryMint,
  5. required SolAddress authority,
  6. required SolAddress auctionHouse,
  7. required SolAddress auctionHouseFeeAccount,
  8. required MetaplexAuctionHouseWithdrawLayout layout,
  9. SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
  10. SolAddress systemProgram = SystemProgramConst.programId,
  11. SolAddress rent = SystemProgramConst.sysvarRentPubkey,
  12. SolAddress ataProgram = AssociatedTokenAccountProgramConst.associatedTokenProgramId,
})

Withdraw amount from the escrow payment account for your specific wallet.

Implementation

factory MetaplexAuctionHouseProgram.withdraw(
    {required SolAddress wallet,
    required SolAddress receiptAccount,
    required SolAddress escrowPaymentAccount,
    required SolAddress treasuryMint,
    required SolAddress authority,
    required SolAddress auctionHouse,
    required SolAddress auctionHouseFeeAccount,
    required MetaplexAuctionHouseWithdrawLayout layout,
    SolAddress tokenProgram = SPLTokenProgramConst.tokenProgramId,
    SolAddress systemProgram = SystemProgramConst.programId,
    SolAddress rent = SystemProgramConst.sysvarRentPubkey,
    SolAddress ataProgram =
        AssociatedTokenAccountProgramConst.associatedTokenProgramId}) {
  return MetaplexAuctionHouseProgram(keys: [
    wallet.toReadOnly(),
    receiptAccount.toWritable(),
    escrowPaymentAccount.toWritable(),
    treasuryMint.toReadOnly(),
    authority.toReadOnly(),
    auctionHouse.toReadOnly(),
    auctionHouseFeeAccount.toWritable(),
    tokenProgram.toReadOnly(),
    systemProgram.toReadOnly(),
    ataProgram.toReadOnly(),
    rent.toReadOnly()
  ], programId: MetaplexAuctionHouseProgramConst.programId, layout: layout);
}