@lightprotocol/compressed-token - v0.23.0-beta.8
    Preparing search index...

    Function estimateTransactionSize

    • Estimate the serialized byte size of a V0 VersionedTransaction built from the given instructions and signer count.

      The estimate accounts for Solana's account-key deduplication: all unique pubkeys across every instruction (keys + programIds) are collected into a single set, matching the behaviour of TransactionMessage.compileToV0Message.

      This intentionally does NOT use address lookup tables, so the result is an upper bound. If lookup tables are used at send time the actual size will be smaller.

      Parameters

      • instructions: TransactionInstruction[]

        The instructions that will be included in the tx.

      • numSigners: number

        Number of signers (determines signature count).

      Returns number

      Estimated byte size of the serialized transaction.