Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get signature as expected. #253

Open
rachkumar opened this issue May 16, 2020 · 0 comments
Open

Get signature as expected. #253

rachkumar opened this issue May 16, 2020 · 0 comments

Comments

@rachkumar
Copy link

rachkumar commented May 16, 2020

Hi I can able to sign a message by:
let message = "Hi BTC".data(using: .utf8)!
let signatureData = try Crypto.sign(message, privateKey: wallet.privKeys[0]).

Now am following the link https://www.blockcypher.com/dev/bitcoin/#creating-transactions for the transaction.

Above link expected to sign data as

Hashing the hex-encoded string twice using SHA256 should give you back the corresponding tosign data.
Decoding the hex-encoded string using our /txs/decode endpoint (or an independent, client-side source) should give you the output addresses and amounts that match your work-in-progress transaction.

I think it not matching with their requirements.

How to do this with our SDK..Please help to solve this..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant