import { TransactionInstruction } from "@solana/web3.js" ; import { PublicKey } from "./publicKey" ; /**
 * ID of the memo program.
 */ export const MEMO_PROGRAM_ID = new PublicKey ( "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr" ) ; param text param signers returns export const createMemoInstruction = ( text , signers = [ ] ) : TransactionInstruction => { return new TransactionInstruction ( { programId : MEMO_PROGRAM_ID , keys : signers . map ( ( s ) => ( { pubkey : s , isSigner : true , isWritable : false , } ) ) , data : Buffer . from ( text , "utf8" ) , } ) ; } ;