Skip to content

Commit e82757f

Browse files
committed
Refactor bls keypair script
1 parent 1f8308e commit e82757f

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

scripts/create-bls-keypair/main.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,11 @@ import (
88
)
99

1010
func main() {
11-
sk, _, err := bls.GenerateNewKeypair()
12-
if err != nil {
13-
log.Fatal(err.Error())
14-
}
15-
16-
blsPubkey, err := bls.PublicKeyFromSecretKey(sk)
11+
sk, pk, err := bls.GenerateNewKeypair()
1712
if err != nil {
1813
log.Fatal(err.Error())
1914
}
2015

2116
fmt.Printf("secret key: 0x%x\n", bls.SecretKeyToBytes(sk))
22-
fmt.Printf("public key: 0x%x\n", bls.PublicKeyToBytes(blsPubkey))
17+
fmt.Printf("public key: 0x%x\n", bls.PublicKeyToBytes(pk))
2318
}

0 commit comments

Comments
 (0)