I am trying to verify the witness of a P2TR transaction, but the signature verification failed, could you please help?
The raw transaction:
010000000001016dacbb729930a8ba699a4188880d1b3525f430e52ad0c01fb4f6eae7987febd50300000000fdffffff014a01000000000000225120e2bc122cdb981a985074e182db9120e52c79b96710d517f84ab186c6ab092c4a0340318bd919ead99017116322d9b861fef0e1f7d26a115dcc7b48fba34bfd5be023ef6d5ab364861b99bd0950ff74b3e93e50c6fd6d17751336f0cf435bb0738c5d8e2064a5ee88fba503623726eabb0aa54bcced4eb2328d30dd05c8088bf5ed26fc41ac0063036f7264010118746578742f706c61696e3b636861727365743d7574662d3800487b2270223a226f72632d3230222c20227469636b223a226d656d65222c20226964223a2233333838303736222c20226f70223a226d696e74222c2022616d74223a2231303030227d6821c064a5ee88fba503623726eabb0aa54bcced4eb2328d30dd05c8088bf5ed26fc4100000000
The scriptpubkey
of input: 5120dde70c00d3aec1533bd7f8b6f704ec21e6ed0a0de317a0ccf8199abde58d3062
, and the value: 4677
.
Above are arguments, and I generate a sigmsg
from those arguments:
000101000000000000009d9a573f31fa9eb2787db1c5d2162e36d76d21b0ecfa8c1e65617a4f5ca4a54bb4e368d5ab0ab9129e0c72ac46249d5bb8dc63b28638ebbc35bb69f62bae4ef4e342cce0133cd546aca2580d6f5bc5a184674e8dadda449fcfd073f503a44fe423e9829bfb4e23fbd3c4848baa035af15d73bcb83e510f7f097f90a21a4280d2386a04a2c1c490d8709f4b2bdf3d0d95d2aca0b6052ecc4a4c6a93fa33fba6ff0200000000
Then sighash
: 54383836474379391a2ef0151bdbd9dc0e3b0e770f5052c433952082b09a2d7d
.
The merkle_root
: ec24ababd925ccbc309ce2684694fa32d17a8263b0a3f2d2999febfdfc7e5d28
.
And the tweaked_pubkey
: dde70c00d3aec1533bd7f8b6f704ec21e6ed0a0de317a0ccf8199abde58d3062
.
In the end, I use signature 318bd919ead99017116322d9b861fef0e1f7d26a115dcc7b48fba34bfd5be023ef6d5ab364861b99bd0950ff74b3e93e50c6fd6d17751336f0cf435bb0738c5d
to verify with sighash
and tweaked_pubkey
, but failed.
64a5ee88fba503623726eabb0aa54bcced4eb2328d30dd05c8088bf5ed26fc41
, but still can't pass the schnorr signature verify.