/** * This code was GENERATED using the solita package. * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. * * See: https://github.com/metaplex-foundation/solita */ import * as splToken from '@solana/spl-token'; import * as beet from '@metaplex-foundation/beet'; import * as web3 from '@solana/web3.js'; /** * @category Instructions * @category AuctioneerWithdraw * @category generated */ export type AuctioneerWithdrawInstructionArgs = { escrowPaymentBump: number; amount: beet.bignum; }; /** * @category Instructions * @category AuctioneerWithdraw * @category generated */ const auctioneerWithdrawStruct = new beet.BeetArgsStruct< AuctioneerWithdrawInstructionArgs & { instructionDiscriminator: number[] /* size: 8 */; } >( [ ['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)], ['escrowPaymentBump', beet.u8], ['amount', beet.u64], ], 'AuctioneerWithdrawInstructionArgs', ); /** * Accounts required by the _auctioneerWithdraw_ instruction * * @property [] wallet * @property [_writable_] receiptAccount * @property [_writable_] escrowPaymentAccount * @property [] treasuryMint * @property [] authority * @property [**signer**] auctioneerAuthority * @property [] auctionHouse * @property [_writable_] auctionHouseFeeAccount * @property [] ahAuctioneerPda * @category Instructions * @category AuctioneerWithdraw * @category generated */ export type AuctioneerWithdrawInstructionAccounts = { wallet: web3.PublicKey; receiptAccount: web3.PublicKey; escrowPaymentAccount: web3.PublicKey; treasuryMint: web3.PublicKey; authority: web3.PublicKey; auctioneerAuthority: web3.PublicKey; auctionHouse: web3.PublicKey; auctionHouseFeeAccount: web3.PublicKey; ahAuctioneerPda: web3.PublicKey; }; const auctioneerWithdrawInstructionDiscriminator = [85, 166, 219, 110, 168, 143, 180, 236]; /** * Creates a _AuctioneerWithdraw_ instruction. * * @param accounts that will be accessed while the instruction is processed * @param args to provide as instruction data to the program * * @category Instructions * @category AuctioneerWithdraw * @category generated */ export function createAuctioneerWithdrawInstruction( accounts: AuctioneerWithdrawInstructionAccounts, args: AuctioneerWithdrawInstructionArgs, ) { const { wallet, receiptAccount, escrowPaymentAccount, treasuryMint, authority, auctioneerAuthority, auctionHouse, auctionHouseFeeAccount, ahAuctioneerPda, } = accounts; const [data] = auctioneerWithdrawStruct.serialize({ instructionDiscriminator: auctioneerWithdrawInstructionDiscriminator, ...args, }); const keys: web3.AccountMeta[] = [ { pubkey: wallet, isWritable: false, isSigner: false, }, { pubkey: receiptAccount, isWritable: true, isSigner: false, }, { pubkey: escrowPaymentAccount, isWritable: true, isSigner: false, }, { pubkey: treasuryMint, isWritable: false, isSigner: false, }, { pubkey: authority, isWritable: false, isSigner: false, }, { pubkey: auctioneerAuthority, isWritable: false, isSigner: true, }, { pubkey: auctionHouse, isWritable: false, isSigner: false, }, { pubkey: auctionHouseFeeAccount, isWritable: true, isSigner: false, }, { pubkey: ahAuctioneerPda, isWritable: false, isSigner: false, }, { pubkey: splToken.TOKEN_PROGRAM_ID, isWritable: false, isSigner: false, }, { pubkey: web3.SystemProgram.programId, isWritable: false, isSigner: false, }, { pubkey: splToken.ASSOCIATED_TOKEN_PROGRAM_ID, isWritable: false, isSigner: false, }, { pubkey: web3.SYSVAR_RENT_PUBKEY, isWritable: false, isSigner: false, }, ]; const ix = new web3.TransactionInstruction({ programId: new web3.PublicKey('hausS13jsjafwWwGqZTUQRmWyvyxn9EQpqMwV1PBBmk'), keys, data, }); return ix; }