okx/js-wallet-sdk

solana signTransaction()

Closed this issue · 2 comments

When I use wallet.signTransaction to generate a solana tx, which method of solana/web3.js should I use to send the transaction? I use sendEncodedTransaction(tx) and get an error message: failed to deserialize solana_sdk::transaction::versioned::VersionedTransaction: io error: failed to fill whole buffer
thanks

When I use wallet.signTransaction to generate a solana tx, which method of solana/web3.js should I use to send the transaction? I use sendEncodedTransaction(tx) and get an error message: failed to deserialize solana_sdk::transaction::versioned::VersionedTransaction: io error: failed to fill whole buffer thanks

=========================================================================
just use post method of http to send the signed transaction as a param. for example, use curl,

curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1, "method":"sendTransaction", "params":["4z4zz6dMdE3bxju8aETexPv62Ta4mguLTPyDgdAcihsJvmeipde26Vy1ayDRfbi4VHoanYB5CZJyHJhAjGns63Y6jwcwERqymn92CEk2qcvEYWk3dfbZSf7QRK5VQf34FVb9mXXXXXXXXXXXXXXXXXXXXXXXX"]}' https://api.devnet.solana.com/ |jq

for sendEncodedTransaction, it is base64 encoded tx, but signed tx generate by our sdk is encoded base58.
i think it is the problem.