docs: describe LoadPrivateKey in readme

pull/1/head
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
1 changed files with 13 additions and 0 deletions

View File

@ -60,3 +60,16 @@ wif, err := crypto.WIFEncode(sk)
// if something went wrong, returns error:
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)
```