I want to create a raw transaction using the BSV JavaScript library from MoneyButton (https://github.com/moneybutton/bsv/) When creating a bitcoin Satoshi Vision (BSV) transaction I always get an error.
'node_modules/bsv/lib/encoding/base58check.js:58 if (csum.toString('hex') !== hash4.toString('hex')) { throw new Error('Checksum mismatch') }'
I have also tried to generate the transaction using the JavaScript BitbossIO/keyring library and I was also not able to generate a raw transaction. I don't know which part I'm getting wrong.
const bsv = require('bsv');
var privateKey = new bsv.PrivateKey.fromWIF('pL3yyzZEc96qU8PUyAtk3TBzyosTVGhA1eMWc6icZzS2ZKTnHGuAh');
var utxo = new bsv.UnspentOutput({
"txId" : "600fee0e6eca8eb19c40f5bfae5871446e617d44c39a3ad44782c571dbf59650",
"outputIndex" : 1,
"address" : "12cyVmfJVwkBA4MUSUDarUL2jXiM98JEoe",
"script" : "76a91411c5d84f5eca47921b0b92042de543f209c301a188ac",
"satoshis" : 6691
});
var transaction = new bsv.Transaction()
console.log(transaction)
.from(utxo)
.to('1PM2zxJArgHFxqYkrFqN7aKQV8nfnEGA56', 5000)
.change('1PM2zxJArgHFxqYkrFqN7aKQV8nfnEGA56')
.sign(privateKey);
console.log(transaction.toString());´
I wish I could generate a transaction. Also, please find above the private key to the transaction. You may use the 10cents, but please help me with the transaction. ;)