Creating a Raw Transaction - Discussion

You have to generate a legacy address type and use it in your tx.

bitcoin-cli getnewaddress "label" "address_type"
1 Like

Thank you @Alko89! It’s a little bit helped. Now instead segwit type tx I have pubkeyhash. So in the result I didn’t get scriptSig filled again :sob:

I’m not sure if I wrote your command correctly:

First I wrote
bitcoin-cli -regtest getnewaddress "label" "scripthash"

But got the error Unknown address type ‘scripthash’.

Then I wrote:
bitcoin-cli -regtest getnewaddress "label" "legacy"

It worked but the type became pubkeyhash.
Could you tell me please where is the error?

@Alko89 I’ve got scripthash type after this command:
bitcoin-cli -regtest getnewaddress "label" "p2sh-segwit"

But in the end I still got empty scriptSig.

The only difference between my transaction and Filip transaction in the video that he has
"reqSigs":1

And in my transaction there is no that value at all:

Is that causing a problem?

you guys need to make an update for this video. Microsoft is killing Atom in December 2022 (https://www.opensourceforu.com/2022/06/atom-text-editor-will-officially-be-terminated-later-this-year/#:~:text=On%20December%2015%2C%20Microsoft’s%20GitHub,focus%20on%20cloud-based%20software ), I suppose any editor would work. but since this video is done on powershell, will nano work?

i’m unable to parse the transaction into the createrawtransaction function for any of these inputs, I read through several other forums, they all suggested this should work, any help please:
‘[{“txid”: “c7acc9171a4bde000cd3f82bf265d55b4a426cb25a57fb4419b268391477eafe”, “vout”: 0,}]’ ‘{“bcrt1qscfmx58ggy37p0m32eejwrwxf4sqj3afk0eh8u”: 49}’

“[{“txid”: “c7acc9171a4bde000cd3f82bf265d55b4a426cb25a57fb4419b268391477eafe”, “vout”: 0,}]” “{“bcrt1qscfmx58ggy37p0m32eejwrwxf4sqj3afk0eh8u”: 49}”

‘’’[{“txid”: “c7acc9171a4bde000cd3f82bf265d55b4a426cb25a57fb4419b268391477eafe”, “vout”: 0,}]’ ‘{“bcrt1qscfmx58ggy37p0m32eejwrwxf4sqj3afk0eh8u”: 49}’

after numerous trial and error the follow works:’[{“txid”: “c7acc9171a4bde000cd3f82bf265d55b4a426cb25a57fb4419b268391477eafe”, “vout”: 0}]’ ‘{“bcrt1qscfmx58ggy37p0m32eejwrwxf4sqj3afk0eh8u”: 49}’
I had an extra , after vout: 0.
also spacing is needed and important

Hi how can i get Raw Transaction in binance & Blockchain platform