// Sign the transaction
const feePayer = USER_KEYPAIR;
const deserializedTx = Transaction.from(Buffer.from(swapTransaction, 'base64'));
deserializedTx.partialSign(feePayer);
const txnSignature = await SOLANA_CONNECTION.sendRawTransaction(deserializedTx.serialize());
console.log("Transaction Signature:", txnSignature);
AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQAIDUGl5q+Zq0zIL42LyEvJYGbgUEYxxIsulpFm8AHhnB1qFOEtZ+D4Ilypv9Ww690rn/cD8kbUh9Ao9xYuxB21S7iiHZpJZ1Uy9xq1yiOta3BcBOI7Dv+jmETs0W7Leny+Aqd7CAAxlFNBQ5o72mru11WL5P+3Va+9S+k0ShjN/T3k9id6bJBs2RJCCo23cMqkn/SEvyBCeAxr8skWXhg1pegAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMGRm/lIRcy/+ytunLDm+e8jOW7xfcSayxDmzpAAAAABHnVW/IxwG7udMVuzmgVB/2xst6j9I5RArHNola8E48G3fbh12Whk9nL4UbO63msHLSF7V9bN5E6jPWFfv8AqU9LbA5BCP0qaiR46uCsxZ2yG7Tt9RHBYs9gLR4MCQH7jJclj04kifG7PRApFI4NgwtaE5na/xCEBI572Nvp+FmUybJQtABckCxdkxgGpl0F9Df2Wu25KNb8vPIFQ0coHLQ/+if11/ZKdMCbHylYed5LCas238ndUUsyGqezjOXo6ujdgssg4zarX6kEeMXqLFhWmVceu3DMN0Rs96k6QIUHBgAFAsBcFQAKBgABABcFCAEBBQIAAQwCAAAA6QMAAAAAAAAIAQEBEQoGAAMACwUIAQEHHwgJAAECBAMXCwcHDAcaCBYZDhESGBAVFA8NExsCBAkkwSCbM0HWnIEHAQAAAAdkAAHpAwAAAAAAAAOzViAAAAAAMgAACAMBAAABCQHlye8UzleS8b2iRTpEDZ4XD4kpF/YtPybePM42c0r5cApHPzxBRj5DPUI6BQUOFxQ7
Error: Versioned messages must be deserialized with VersionedMessage.deserialize()
Question: How to deserialize encoded transaction?
P.S. It works with other encoded transactions, but not with my. Example of the correct one:
AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEDA+Z8BRyNDL30G+lsh0lwSNNhbnN6HAnoyUtyAiN7Pg+OUK2wQtYmX3uHnIO2htEANdTK9dP12UzWjFk+hpR4qAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAiOec80h+J5X8oUoZEmnxVj+E8V+0O4Nr9ly+Fu2D+8cBAgIAAQwCAAAAAOH1BQAAAAA=
VersionedTransaction.deserialize
? The error message seems to lead you towards doing that