Kit
Functions

getTransactionMessageSize

getTransactionMessageSize(transactionMessage): number

Gets the compiled transaction size of a given transaction message in bytes.

Parameters

ParameterType
transactionMessageReadonly<{ instructions: readonly Instruction<string, readonly (AccountLookupMeta<string, string> | AccountMeta<string>)[]>[]; version: TransactionVersion; }> & TransactionMessageWithFeePayer<string>

Returns

number

Example

const transactionSize = getTransactionMessageSize(transactionMessage);

On this page