The solana tpu client (rust) takes a &Transaction
argument however I deal with VersionedTransaction
's.
I would like to know 2 things..
- How can I send a VersionedTransaction via the tpu client.
- How can I serialize a VersionedTransaction into base64.
I create the transactions using the solana_sdk like so
let message = V0Message::try_compile(
&wallet.pubkey(),
&instructions,
&[],
block_hash
).unwrap();
let versioned_message = VersionedMessage::V0(message);
let transaction = VersionedTransaction::try_new(versioned_message, &[wallet]).unwrap();