Revising OP_RETURN message lengths since we are now broadcasting XEC txs via chronik. The sizes below factors in a little bit of leeway for weird symbols that take up additional bytes in messages.
Unencrypted messages
206 chars was tested to be the right size for unencrypted OP_RETURN messages, up from the existing 145 char limit.
Encrypted messages
In terms of encrypted messages, based on the ecies-lite library code, if the compressEpk param is supplied as true, then the compressed version of the recipient's public key is encoded into the message as the ecies ephemeral public key, freeing up more stack space for the message content itself.
I've tested this up to an encrypted messaging size of 125 chars, up from the existing 96 char limit.
Airdrop tx messages
Airdrop multi-send adds additional encoding (token ID + airdrop encoding) into the message, which needs to be subtracted from the unencrypted limit from above (206 chars). Therefore this input limit is now dynamically adjusted to 170 chars if cashtab detects it is routed from the airdrop component.
Further optimization
Further optimizations are possible, but given we do have to deal with a combination of one to many sends and airdrop encoded transactions in the mix I think this diff is a decent ROI for the time being.