Skip to content

Commit

Permalink
Refactor bls keypair script
Browse files Browse the repository at this point in the history
  • Loading branch information
MoeMahhouk committed Apr 30, 2024
1 parent 1f8308e commit 27d57d2
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions scripts/create-bls-keypair/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,15 @@ package main
import (
"fmt"
"log"

"github.com/flashbots/go-boost-utils/bls"
)

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))
}

0 comments on commit 27d57d2

Please sign in to comment.