LoadPrivateKey loads the private key from raw key bytes.
()
| 40 | |
| 41 | // LoadPrivateKey loads the private key from raw key bytes. |
| 42 | func (p *DeveloperPrivateKey) LoadPrivateKey() (err error) { |
| 43 | p.Key, err = kms.DecodePrivateKey(p.RawKey, []byte{}) |
| 44 | if err != nil { |
| 45 | err = errors.Wrapf(err, "load private key failed") |
| 46 | } |
| 47 | return |
| 48 | } |
| 49 | |
| 50 | // GetPrivateKey load private key of account from proxy database. |
| 51 | func GetPrivateKey(db *gorp.DbMap, developer int64, account utils.AccountAddress) (p *DeveloperPrivateKey, err error) { |
no test coverage detected