Replies: 1 comment
-
We don't have any method for decoding BTC to transaction to the C++ data structure yet. That's why you can't sign it, signing is not just signing the whole HEX, but each of the UTXO's |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently working on signing unsigned transactions using Wallet Core. The unsigned transactions are prepared for me by our backend and provided to me in HEX format.
Here's a simplified version of my process:
I receive the transaction in HEX format.
I decode it to Data() using Swift.
I attempt to sign the transaction using one of the following methods:
let signedData = secretPrivateKeyBtc.sign(digest: dataToSign, curve: .secp256k1)
and
let signed = secretPrivateKeyBtc.signAsDER(digest: dataToSign)
and
let txsss = AnySigner.nativeSign(data: dataToSign, coin: .litecoin)
.The signed transaction is then decoded using a service.
However, in each attempt, I encounter different errors:
"Cannot read slice out of bounds"
"Trying to access beyond buffer length"
I've tried various approaches, but the issue persists. Any insights or suggestions on what might be causing these errors would be greatly appreciated.
Thanks in advance for your help!
Initial hex from backend
70736274ff010053020000000173c963a93a8026862b6ba10fa8828fae759a8093b9804b6b6736372f4f0e69720200000000ffffffff01e80300000000000017a91480e5b3772b1bb13892ea10f50aeaa5f9c2d0a9a28700000000000100fdfd00020000000001015a7c7479348d3e647366f8accee6696a9d1db6edd48d436d199b93cfa01a8e6c0100000000ffffffff0300efb50000000000160014c2a039f18f90840d43337fc3468d3e98b7148a1fd832450000000000160014e39cf0742c9eec202b5cd828195253adeb63ac104ae3c60300000000160014643ec5aefc22da32a5756347caff4ef309f08c9d0247304402204254e60197
Methods to decode HEX to Data
and
and many many others...
Beta Was this translation helpful? Give feedback.
All reactions