/** * 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 beet from '@metaplex-foundation/beet'; import * as web3 from '@solana/web3.js'; /** * @category Instructions * @category WithdrawFunds * @category generated */ export const withdrawFundsStruct = new beet.BeetArgsStruct<{ instructionDiscriminator: number[] /* size: 8 */; }>( [['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)]], 'WithdrawFundsInstructionArgs', ); /** * Accounts required by the _withdrawFunds_ instruction * * @property [_writable_] candyMachine * @property [**signer**] authority * @category Instructions * @category WithdrawFunds * @category generated */ export type WithdrawFundsInstructionAccounts = { candyMachine: web3.PublicKey; authority: web3.PublicKey; }; export const withdrawFundsInstructionDiscriminator = [241, 36, 29, 111, 208, 31, 104, 217]; /** * Creates a _WithdrawFunds_ instruction. * * @param accounts that will be accessed while the instruction is processed * @category Instructions * @category WithdrawFunds * @category generated */ export function createWithdrawFundsInstruction( accounts: WithdrawFundsInstructionAccounts, programId = new web3.PublicKey('cndy3Z4yapfJBmL3ShUp5exZKqR3z33thTzeNMm2gRZ'), ) { const [data] = withdrawFundsStruct.serialize({ instructionDiscriminator: withdrawFundsInstructionDiscriminator, }); const keys: web3.AccountMeta[] = [ { pubkey: accounts.candyMachine, isWritable: true, isSigner: false, }, { pubkey: accounts.authority, isWritable: false, isSigner: true, }, ]; const ix = new web3.TransactionInstruction({ programId, keys, data, }); return ix; }