Asserts a message fits its version's size limit before it is signed, so the
failure surfaces locally rather than as an opaque rejection from the network.
Kit's SolanaError propagates untouched on every version, so
isSolanaError(err, SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT) is a
reliable check regardless of which version produced it. The remedy for an
oversized legacy or v0 transaction — version 1's larger limit — is
documentation rather than something to encode in a wrapper error, since
wrapping would make the thrown type depend on the version.
Asserts a message fits its version's size limit before it is signed, so the failure surfaces locally rather than as an opaque rejection from the network.
Kit's
SolanaErrorpropagates untouched on every version, soisSolanaError(err, SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT)is a reliable check regardless of which version produced it. The remedy for an oversized legacy or v0 transaction — version 1's larger limit — is documentation rather than something to encode in a wrapper error, since wrapping would make the thrown type depend on the version.