Skip to content

Commit 47de025

Browse files
committed
Refactor bls keypair script
1 parent 1f8308e commit 47de025

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

scripts/create-bls-keypair/main.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,15 @@ package main
33
import (
44
"fmt"
55
"log"
6-
76
"github.com/flashbots/go-boost-utils/bls"
87
)
98

109
func main() {
11-
sk, _, err := bls.GenerateNewKeypair()
12-
if err != nil {
13-
log.Fatal(err.Error())
14-
}
15-
16-
blsPubkey, err := bls.PublicKeyFromSecretKey(sk)
10+
sk, pk, err := bls.GenerateNewKeypair()
1711
if err != nil {
1812
log.Fatal(err.Error())
1913
}
2014

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

0 commit comments

Comments
 (0)