MetaplexAuctioneerProgram.withdraw constructor

MetaplexAuctioneerProgram.withdraw({
  1. required SolAddress auctionHouseProgram,
  2. required SolAddress wallet,
  3. required SolAddress receiptAccount,
  4. required SolAddress escrowPaymentAccount,
  5. required SolAddress treasuryMint,
  6. required SolAddress authority,
  7. required SolAddress auctionHouse,
  8. required SolAddress auctionHouseFeeAccount,
  9. required SolAddress auctioneerAuthority,
  10. required SolAddress ahAuctioneerPda,
  11. required MetaplexAuctioneerWithdrawLayout layout,
  12. SolAddress tokenProgramId = SPLTokenProgramConst.tokenProgramId,
  13. SolAddress systemProgram = SystemProgramConst.programId,
  14. SolAddress rent = SystemProgramConst.sysvarRentPubkey,
  15. SolAddress ata = AssociatedTokenAccountProgramConst.associatedTokenProgramId,
})

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

Implementation

factory MetaplexAuctioneerProgram.withdraw(
    {
    /// Auction House Program
    required SolAddress auctionHouseProgram,

    /// User wallet account.
    required SolAddress wallet,

    /// SPL token account or native SOL account to transfer funds to. If the account is a native SOL account, this is the same as the wallet address.
    required SolAddress receiptAccount,

    /// Buyer escrow payment account PDA.
    required SolAddress escrowPaymentAccount,

    /// Auction House instance treasury mint account.
    required SolAddress treasuryMint,

    /// Auction House instance authority account.
    required SolAddress authority,

    /// Auction House instance PDA account.
    required SolAddress auctionHouse,

    /// Auction House instance fee account.
    required SolAddress auctionHouseFeeAccount,

    /// The auctioneer program PDA running this auction.
    required SolAddress auctioneerAuthority,

    /// The auctioneer PDA owned by Auction House storing scopes.
    required SolAddress ahAuctioneerPda,
    required MetaplexAuctioneerWithdrawLayout layout,
    SolAddress tokenProgramId = SPLTokenProgramConst.tokenProgramId,
    SolAddress systemProgram = SystemProgramConst.programId,
    SolAddress rent = SystemProgramConst.sysvarRentPubkey,
    SolAddress ata =
        AssociatedTokenAccountProgramConst.associatedTokenProgramId}) {
  return MetaplexAuctioneerProgram(keys: [
    auctionHouseProgram.toReadOnly(),
    wallet.toReadOnly(),
    receiptAccount.toWritable(),
    escrowPaymentAccount.toWritable(),
    treasuryMint.toReadOnly(),
    authority.toReadOnly(),
    auctionHouse.toReadOnly(),
    auctionHouseFeeAccount.toWritable(),
    auctioneerAuthority.toReadOnly(),
    ahAuctioneerPda.toReadOnly(),
    tokenProgramId.toReadOnly(),
    systemProgram.toReadOnly(),
    ata.toReadOnly(),
    rent.toReadOnly(),
  ], programId: MetaplexAuctioneerProgramConst.programId, layout: layout);
}