@drift-labs/sdk
Version:
SDK for Drift Protocol
11 lines (10 loc) • 832 B
TypeScript
import { TransactionInstruction } from '@solana/web3.js';
/**
* Constructs a minimal Ed25519 verification instruction that references the data
* inside the drift custom instruction (e.g. postPythLazerOracleUpdate, placeSignedMsgTakerOrder).
*
* @param customInstructionIndex The index of the custom instruction in the transaction (e.g. if tx contains compute budget limit, compute budget price, ed25519 verify, custom ix, this would be 3).
* @param messageOffset The offset within the custom instruction data where the signed message begins.
* @param customInstructionData The entire instruction data array for the custom instruction.
*/
export declare function createMinimalEd25519VerifyIx(customInstructionIndex: number, messageOffset: number, customInstructionData: Uint8Array, magicLen?: number): TransactionInstruction;