/** * 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 '@convergence-rfq/beet' import * as web3 from '@solana/web3.js' /** * @category Instructions * @category CleanUpRfq * @category generated */ export const cleanUpRfqStruct = new beet.BeetArgsStruct<{ instructionDiscriminator: number[] /* size: 8 */ }>( [['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)]], 'CleanUpRfqInstructionArgs' ) /** * Accounts required by the _cleanUpRfq_ instruction * * @property [_writable_] taker * @property [] protocol * @property [_writable_] rfq * @property [_writable_] whitelist * @category Instructions * @category CleanUpRfq * @category generated */ export type CleanUpRfqInstructionAccounts = { taker: web3.PublicKey protocol: web3.PublicKey rfq: web3.PublicKey whitelist: web3.PublicKey anchorRemainingAccounts?: web3.AccountMeta[] } export const cleanUpRfqInstructionDiscriminator = [ 40, 69, 5, 196, 231, 91, 188, 16, ] /** * Creates a _CleanUpRfq_ instruction. * * @param accounts that will be accessed while the instruction is processed * @category Instructions * @category CleanUpRfq * @category generated */ export function createCleanUpRfqInstruction( accounts: CleanUpRfqInstructionAccounts, programId = new web3.PublicKey('FqAhTZg86EKEzeWMLtutVDRXJuLWrey7oDHr3Au6RFdo') ) { const [data] = cleanUpRfqStruct.serialize({ instructionDiscriminator: cleanUpRfqInstructionDiscriminator, }) const keys: web3.AccountMeta[] = [ { pubkey: accounts.taker, isWritable: true, isSigner: false, }, { pubkey: accounts.protocol, isWritable: false, isSigner: false, }, { pubkey: accounts.rfq, isWritable: true, isSigner: false, }, { pubkey: accounts.whitelist, isWritable: true, isSigner: false, }, ] if (accounts.anchorRemainingAccounts != null) { for (const acc of accounts.anchorRemainingAccounts) { keys.push(acc) } } const ix = new web3.TransactionInstruction({ programId, keys, data, }) return ix }