/** * 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 ValidateRfqByPrintTradeProvider * @category generated */ export const validateRfqByPrintTradeProviderStruct = new beet.BeetArgsStruct<{ instructionDiscriminator: number[] /* size: 8 */ }>( [['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)]], 'ValidateRfqByPrintTradeProviderInstructionArgs' ) /** * Accounts required by the _validateRfqByPrintTradeProvider_ instruction * * @property [**signer**] taker * @property [] protocol * @property [_writable_] rfq * @category Instructions * @category ValidateRfqByPrintTradeProvider * @category generated */ export type ValidateRfqByPrintTradeProviderInstructionAccounts = { taker: web3.PublicKey protocol: web3.PublicKey rfq: web3.PublicKey anchorRemainingAccounts?: web3.AccountMeta[] } export const validateRfqByPrintTradeProviderInstructionDiscriminator = [ 103, 106, 22, 148, 184, 118, 124, 149, ] /** * Creates a _ValidateRfqByPrintTradeProvider_ instruction. * * @param accounts that will be accessed while the instruction is processed * @category Instructions * @category ValidateRfqByPrintTradeProvider * @category generated */ export function createValidateRfqByPrintTradeProviderInstruction( accounts: ValidateRfqByPrintTradeProviderInstructionAccounts, programId = new web3.PublicKey('FqAhTZg86EKEzeWMLtutVDRXJuLWrey7oDHr3Au6RFdo') ) { const [data] = validateRfqByPrintTradeProviderStruct.serialize({ instructionDiscriminator: validateRfqByPrintTradeProviderInstructionDiscriminator, }) const keys: web3.AccountMeta[] = [ { pubkey: accounts.taker, isWritable: false, isSigner: true, }, { pubkey: accounts.protocol, isWritable: false, isSigner: false, }, { pubkey: accounts.rfq, 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 }