Versioned Transaction can't sign or serialize
Versioned Transaction can't sign or serialize
Loading saved threads...
Dev Bharel · External communityPost link
External question — Solana Stack Exchange
Author: Dev Bharel
Original post: https://solana.stackexchange.com/questions/4973
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I'm trying to sign a VersionedTransaction using Solana Wallet Adapter and getting
TypeError: Blob.encode[data] requires (length 40) Uint8Array as src
My code:
const tx = new TransactionMessage({
payerKey: publicKey,
recentBlockhash,
instructions: ixG
})
let preSignedTx = new VersionedTransaction(tx.compileToV0Message());
signTransaction ? await signTransaction(preSignedTx) : alert("Error");
I was able to create a legacy tx and sign that fine, don't know what the error is for V0 tx.
Quote
Report
Dejan Ignjatovic · External communityPost link
External answer — Solana Stack Exchange
Author: Dejan Ignjatovic
Original post: https://solana.stackexchange.com/a/6562
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
I don't know what the current situation is, but at the time when we were implementing versioned transactions, they weren't supported by the majority of wallets. We tested our implementation with Phantom and Solflare because they were among the few wallets that supported versioned transactions. Also make sure you have recent version of @solana/wallet-adapter packages, check
https://github.com/solana-labs/wallet-adapter/blob/master/APP.md
for more details...
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External question — Solana Stack Exchange Author: Dev Bharel Source score (net votes, not local likes): 3 Original post: https://solana.stackexchange.com/questions/4973 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. I'm trying to sign a VersionedTransaction using Solana Wallet Adapter and getting TypeError: Blob.encode[data] requires (length 40) Uint8Array as src My code: const tx = new TransactionMessage({ payerKey: publicKey, recentBlockhash, instructions: ixG }) let preSignedTx = new VersionedTransaction(tx.compileToV0Message()); signTransaction ? await signTransaction(preSignedTx) : alert("Error"); I was able to create a legacy tx and sign that fine, don't know what the error is for V0 tx.
Checking account access…