From e82757fda0288cdf96dfb07f2404b68c380f8873 Mon Sep 17 00:00:00 2001 From: MoeMahhouk Date: Tue, 30 Apr 2024 08:43:25 +0000 Subject: [PATCH] Refactor bls keypair script --- scripts/create-bls-keypair/main.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/scripts/create-bls-keypair/main.go b/scripts/create-bls-keypair/main.go index 118e2645..425d621d 100644 --- a/scripts/create-bls-keypair/main.go +++ b/scripts/create-bls-keypair/main.go @@ -8,16 +8,11 @@ import ( ) func main() { - sk, _, err := bls.GenerateNewKeypair() - if err != nil { - log.Fatal(err.Error()) - } - - blsPubkey, err := bls.PublicKeyFromSecretKey(sk) + sk, pk, err := bls.GenerateNewKeypair() if err != nil { log.Fatal(err.Error()) } fmt.Printf("secret key: 0x%x\n", bls.SecretKeyToBytes(sk)) - fmt.Printf("public key: 0x%x\n", bls.PublicKeyToBytes(blsPubkey)) + fmt.Printf("public key: 0x%x\n", bls.PublicKeyToBytes(pk)) }