BitcoinKit icon indicating copy to clipboard operation
BitcoinKit copied to clipboard

How to import a wallet through a private key string?

Open shmxybfq opened this issue 7 years ago • 1 comments

What problem does this feture solve?

Describe what you've considered?

Code sample / Spec

I have a private key string "Ky7VymVZ6fugetBJZkr7bEhWsYTXdGU3JmV8cSgG9ZRXThf8g2u4",I need import it,but i not found a suitable method. thanks.

shmxybfq avatar Jan 10 '19 03:01 shmxybfq

That is a WIF, so you can use this init: https://github.com/yenom/BitcoinKit/blob/master/Sources/BitcoinKit/Core/Keys/PrivateKey.swift#L82

Sajjon avatar Jan 17 '19 23:01 Sajjon