docs: describe LoadPrivateKey in readme

This commit is contained in:
Evgeniy Kulikov 2019-11-21 17:29:34 +03:00
parent d059767e79
commit f707f6449c
No known key found for this signature in database
GPG key ID: BF6AEE0A2A699BF2

View file

@ -60,3 +60,16 @@ wif, err := crypto.WIFEncode(sk)
// if something went wrong, returns error: // if something went wrong, returns error:
skFromWIF, err := crypto.WIFDecode(wif) skFromWIF, err := crypto.WIFDecode(wif)
``` ```
### LoadPrivateKey
```
// Load private key from wif format
sk, err := crypto.LoadPrivateKey(wif_string)
// Load private key from hex string
sk, err := crypto.LoadPrivateKey(hex_string)
// Load private key from file
sk, err := crypto.LoadPrivateKey(file_path)
```