Docking jup problem
xiaohua66888 opened this issue · 1 comments
xiaohua66888 commented
// deserialize the transaction
const swapTransactionBuf = Buffer.from(swapTransaction, 'base64');
var transaction = VersionedTransaction.deserialize(swapTransactionBuf);
console.log(transaction);
// sign the transaction
transaction.sign([wallet.payer]);
// Execute the transaction
const rawTransaction = transaction.serialize()
const txid = await connection.sendRawTransaction(rawTransaction, {
skipPreflight: true,
maxRetries: 2
});
await connection.confirmTransaction(txid);
console.log(https://solscan.io/tx/${txid}
);
https://station.jup.ag/docs/apis/swap-api
How to achieve it?