/** * 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 web3 from '@solana/web3.js' import * as beetSolana from '@convergence-rfq/beet-solana' import * as beet from '@convergence-rfq/beet' /** * @category Instructions * @category SetInstrumentEnabledStatus * @category generated */ export type SetInstrumentEnabledStatusInstructionArgs = { instrumentKey: web3.PublicKey enabledStatusToSet: boolean } /** * @category Instructions * @category SetInstrumentEnabledStatus * @category generated */ export const setInstrumentEnabledStatusStruct = new beet.BeetArgsStruct< SetInstrumentEnabledStatusInstructionArgs & { instructionDiscriminator: number[] /* size: 8 */ } >( [ ['instructionDiscriminator', beet.uniformFixedSizeArray(beet.u8, 8)], ['instrumentKey', beetSolana.publicKey], ['enabledStatusToSet', beet.bool], ], 'SetInstrumentEnabledStatusInstructionArgs' ) /** * Accounts required by the _setInstrumentEnabledStatus_ instruction * * @property [**signer**] authority * @property [_writable_] protocol * @category Instructions * @category SetInstrumentEnabledStatus * @category generated */ export type SetInstrumentEnabledStatusInstructionAccounts = { authority: web3.PublicKey protocol: web3.PublicKey anchorRemainingAccounts?: web3.AccountMeta[] } export const setInstrumentEnabledStatusInstructionDiscriminator = [ 178, 92, 107, 172, 234, 204, 29, 87, ] /** * Creates a _SetInstrumentEnabledStatus_ 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 SetInstrumentEnabledStatus * @category generated */ export function createSetInstrumentEnabledStatusInstruction( accounts: SetInstrumentEnabledStatusInstructionAccounts, args: SetInstrumentEnabledStatusInstructionArgs, programId = new web3.PublicKey('FqAhTZg86EKEzeWMLtutVDRXJuLWrey7oDHr3Au6RFdo') ) { const [data] = setInstrumentEnabledStatusStruct.serialize({ instructionDiscriminator: setInstrumentEnabledStatusInstructionDiscriminator, ...args, }) const keys: web3.AccountMeta[] = [ { pubkey: accounts.authority, isWritable: false, isSigner: true, }, { pubkey: accounts.protocol, 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 }