@@ -10,7 +10,6 @@ import (
10
10
"fmt"
11
11
"math/big"
12
12
13
- "github.com/decred/dcrd/dcrec/secp256k1/v4"
14
13
"github.com/ecadlabs/goblst/minpk"
15
14
tz "github.com/ecadlabs/gotez/v2"
16
15
"github.com/ecadlabs/gotez/v2/b58"
@@ -66,7 +65,7 @@ func NewPrivateKey(priv tz.PrivateKey) (PrivateKey, error) {
66
65
return Ed25519PrivateKey (ed25519 .NewKeyFromSeed (key [:])), nil
67
66
68
67
case * tz.Secp256k1PrivateKey :
69
- p , err := unmarshalPrivateKey (key [:], secp256k1 . S256 ())
68
+ p , err := unmarshalPrivateKey (key [:], S256 ())
70
69
if err != nil {
71
70
return nil , err
72
71
}
@@ -106,7 +105,7 @@ func NewPublicKey(pub tz.PublicKey) (PublicKey, error) {
106
105
)
107
106
switch key := pub .(type ) {
108
107
case * tz.Secp256k1PublicKey :
109
- curve = secp256k1 . S256 ()
108
+ curve = S256 ()
110
109
data = key [:]
111
110
case * tz.P256PublicKey :
112
111
curve = elliptic .P256 ()
@@ -134,7 +133,7 @@ func NewPrivateKeyFrom(priv crypto.PrivateKey) (PrivateKey, error) {
134
133
switch priv := priv .(type ) {
135
134
case * ecdsa.PrivateKey :
136
135
switch priv .Curve {
137
- case secp256k1 . S256 (), elliptic .P256 ():
136
+ case S256 (), elliptic .P256 ():
138
137
return (* ECDSAPrivateKey )(priv ), nil
139
138
default :
140
139
return nil , ErrUnsupportedKeyType
@@ -154,7 +153,7 @@ func NewPublicKeyFrom(pub crypto.PublicKey) (PublicKey, error) {
154
153
switch pub := pub .(type ) {
155
154
case * ecdsa.PublicKey :
156
155
switch pub .Curve {
157
- case secp256k1 . S256 (), elliptic .P256 ():
156
+ case S256 (), elliptic .P256 ():
158
157
return (* ECDSAPublicKey )(pub ), nil
159
158
default :
160
159
return nil , ErrUnsupportedKeyType
@@ -184,7 +183,7 @@ func NewSignature(sig tz.Signature) (Signature, error) {
184
183
return & ECDSASignature {
185
184
R : r ,
186
185
S : s ,
187
- Curve : secp256k1 . S256 (),
186
+ Curve : S256 (),
188
187
}, nil
189
188
190
189
case * tz.P256Signature :
0 commit comments