mirror of
https://github.com/muun/recovery.git
synced 2025-11-13 07:11:45 -05:00
Release v0.3.0
This commit is contained in:
19
vendor/github.com/muun/libwallet/publickey.go
generated
vendored
Normal file
19
vendor/github.com/muun/libwallet/publickey.go
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
package libwallet
|
||||
|
||||
import (
|
||||
"github.com/btcsuite/btcd/btcec"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
type PublicKey struct {
|
||||
key *btcec.PublicKey
|
||||
}
|
||||
|
||||
func NewPublicKeyFromBytes(bytes []byte) (*PublicKey, error) {
|
||||
key, err := btcec.ParsePubKey(bytes, btcec.S256())
|
||||
if err != nil {
|
||||
return nil, errors.Wrapf(err, "NewPublicKeyFromBytes: failed to parse pub key")
|
||||
}
|
||||
|
||||
return &PublicKey{key}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user