transactions – Signal message with personal key result’s completely different than txinwitness

0
69


I am learning segwit and I am doing a little experiment in regtest.
I create a uncooked transaction with P2SH tackle.

My Transaction knowledge with out signature is:

0200000001faf19017fe7e20747535ac41009922e4beb76e17a7fd5423bc60e75fbc8381c40000000000ffffffff01606b042a0100000017a914b63007b51b936175644dcf654f77c528e35f01178700000000

that is my message to signal, as an alternative to make use of signrawtransactionwithkey I attempt to use signmessagewithprivkey and I anticipate the signature that I can discover in txwitness discipline (first row).

signmessagewithprivkey return base64 signature then I convert it in hex.
result’s:

20db4febb769c43c9072daf30934a345b2327b6107e701f21c7fe052a040180d4129dc3079dc7dad29db37c31fa6401013819e386beb9396e330b3b6e9f7fbcf5b

signrawtransactionwithkey return:

"txinwitness": [
      "3044022077f49ad0371ea5baf0ce60d3d15175c9bb5e37ff7f3bc023b76863b2a91d379e022073010deba5eef8619745cd79d94a73c4a4527391253731104fc734449322d85b01",            "02985586bf43d26229a97092f76086cfe6f9bf09d93bef16a92f65185c8f7f0b17"
      ],

I’m wondering, why the results of signmessagewithprivkey is not equal at first uncooked of txwitness?

LEAVE A REPLY

Please enter your comment!
Please enter your name here