Sunday, December 22, 2024

transactions – unhealthy knowledge construction on spending a P2WPKH Ouput

i’ve drawback on spending the P2WPKH output and that i learn some doc and sources, it appears my knowledge construction is for spending a P2PKH out. how ought to i modify my knowledge construction to make it proper?

this is the transaction i made and put 10000 satoshi in tackle bc1qqs5lcmj58lmmfd6ap34xqqfuzfvz02nxjayrjx and that i need to ship 2500 to my self and 2500 again to the tackle it got here from.

that is the information construction earlier than signing the tx:

01000000
01
14fe532eec4ddc9bfd8686a7234300c24a47c60e437ae26e966a43e47f947def
00000000
16
00140429fc6e543ff7b4b75d0c6a60013c125827aa66
ffffffff

02
c409000000000000
1976a9140429fc6e543ff7b4b75d0c6a60013c125827aa6688ac

c409000000000000
1976a9145951ac8720b1865ba633d19eaa6473afae7c46b388ac
00000000
01000000

and that is the information construction after signing it:

01000000
01
14fe532eec4ddc9bfd8686a7234300c24a47c60e437ae26e966a43e47f947def
00000000
6b48304402206b6fde1ca4cac9873f5f2c08edcdf65b621d4c5f49bf187bcd457e2bccbd4dfd02202002f6f82c98979a79efd54234691fdbda684bd33395d810a077effebb0e910f6f01210280a1bfa268074c9171ed0e30f332706789c5138e1428e92506e671b1997eb874
ffffffff

02c409000000000000
1976a9140429fc6e543ff7b4b75d0c6a60013c125827aa6688ac
c409000000000000
1976a9145951ac8720b1865ba633d19eaa6473afae7c46b388ac
00000000

i get error : “Code: -26, Error: non-mandatory-script-verify-flag (Witness requires empty scriptSig)”

i did analysis on the error however the anwsers didn’t assist.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles