Quantcast
Channel: Recent Questions - Solana Stack Exchange
Viewing all articles
Browse latest Browse all 7869

How do I send transactions with new web3.js?

$
0
0

I've been trying to create & send transactions like this, but I'm gettingSolanaError: JSON-RPC error: Invalid method parameter(s) (invalid base58 encoding: InvalidCharacter { character: '+', index: 12 })

  const transactionMessage = pipe(    createTransactionMessage({ version: 0 }),    (tx) => setTransactionMessageFeePayerSigner(kp, tx),    (tx) =>      setTransactionMessageLifetimeUsingBlockhash(        { blockhash, lastValidBlockHeight },        tx      ),    (tx) => appendTransactionMessageInstructions(instructions, tx),    (m) => addSignersToTransactionMessage([kp, newAccountKp], m)  );  const tx = await pipe(compileTransaction(transactionMessage), (tx) =>    signTransaction([kp.keyPair, newAccountKp.keyPair], tx)  );  const sig = rpc    .sendTransaction(getBase64EncodedWireTransaction(tx), {      skipPreflight: true,    })    .send();

Viewing all articles
Browse latest Browse all 7869

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>